@font-face {
    font-family: 'Kai';
    src: url('/assets/fonts/kaiu.ttf') format('truetype');
}

:root {
    --bg: #fff8f9;
    --bg-alt: #fff0f4;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 248, 249, 0.82);
    --text: #2d1a22;
    --text-muted: #8c6070;
    --text-light: #b89aa8;
    --rose: #c0536e;
    --rose-soft: #e8a0b4;
    --rose-pale: #fce8ee;
    --petal: #fad6df;
    --blush: #f4c2cf;
    --border: rgba(192, 83, 110, 0.14);
    --border-card: rgba(192, 83, 110, 0.12);
    --shadow-sm: 0 2px 14px rgba(192, 83, 110, 0.07);
    --shadow-hover: 0 16px 48px rgba(192, 83, 110, 0.20);
    --tag-bg: #fce8ee;
    --tag-color: #a03050;
    --tag-border: rgba(192, 83, 110, 0.18);
    --divider: rgba(192, 83, 110, 0.13);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #180d12;
        --bg-alt: #200f17;
        --bg-card: #231319;
        --bg-header: rgba(24, 13, 18, 0.86);
        --text: #f5e8ee;
        --text-muted: #c09aaa;
        --text-light: #7a5565;
        --rose: #e8799a;
        --rose-soft: #c05070;
        --rose-pale: #3a1828;
        --petal: #2e1020;
        --blush: #5a2535;
        --border: rgba(232, 121, 154, 0.14);
        --border-card: rgba(232, 121, 154, 0.11);
        --shadow-sm: 0 2px 14px rgba(0, 0, 0, 0.45);
        --shadow-hover: 0 16px 48px rgba(232, 121, 154, 0.18);
        --tag-bg: #3a1828;
        --tag-color: #e8a0b8;
        --tag-border: rgba(232, 121, 154, 0.2);
        --divider: rgba(232, 121, 154, 0.14);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Kai', 'DFKai-SB', serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.35s, color 0.35s;
}

body::before {
    content: '';
    position: fixed;
    top: -20vh;
    right: -15vw;
    width: clamp(400px, 60vw, 800px);
    height: clamp(400px, 60vw, 800px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--petal) 0%, transparent 68%);
    opacity: .42;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -12vh;
    left: -12vw;
    width: clamp(280px, 42vw, 560px);
    height: clamp(280px, 42vw, 560px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--petal) 0%, transparent 68%);
    opacity: .28;
    pointer-events: none;
    z-index: 0;
}

header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-header);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3rem);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.logo-main {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 600;
    color: var(--rose);
    letter-spacing: .04em;
}

.logo-sub {
    font-size: .72rem;
    color: var(--text-muted);
    letter-spacing: .15em;
    font-weight: 300;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    font-size: .8rem;
    letter-spacing: .1em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rose);
    transition: width .25s ease;
}

nav a:hover {
    color: var(--rose);
}

nav a:hover::after {
    width: 100%;
}

@media (max-width: 520px) {
    nav {
        display: none;
    }
}

.hero {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 7rem) clamp(1.2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 3rem);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 1.1rem;
    animation: rise .6s ease both;
}

.hero-badge::before,
.hero-badge::after {
    content: '';
    display: block;
    width: 22px;
    height: 1px;
    background: var(--rose-soft);
}

.hero h1 {
    font-family: 'Kai', 'DFKai-SB', serif;
    font-size: clamp(2.4rem, 6.5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: .02em;
    animation: rise .7s .08s ease both;
}

.hero h1 span {
    font-style: italic;
    color: var(--rose);
}

.hero-desc {
    margin-top: 1.1rem;
    font-size: clamp(.88rem, 1.8vw, 1rem);
    color: var(--text-muted);
    line-height: 2;
    font-weight: 300;
    animation: rise .7s .16s ease both;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    animation: rise .7s .24s ease both;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: .18rem;
}

.stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--rose);
    line-height: 1;
}

.stat-label {
    font-size: .68rem;
    color: var(--text-light);
    letter-spacing: .1em;
}

.hero-deco {
    font-family: 'Kai', 'DFKai-SB', serif;
    font-style: italic;
    font-size: clamp(5rem, 12vw, 9rem);
    color: var(--blush);
    line-height: 1;
    user-select: none;
    opacity: .55;
    animation: rise .9s .1s ease both;
}

@media (max-width: 700px) {
    .hero-deco {
        display: none;
    }
}

.filter-section {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3rem) 2.4rem;
}

.filter-label {
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: .7rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    animation: rise .7s .3s ease both;
}

.pill {
    font-family: 'Kai', 'DFKai-SB', serif;
    font-size: .78rem;
    letter-spacing: .06em;
    padding: .4em 1.1em;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .22s ease;
    line-height: 1.4;
}

.pill:hover {
    border-color: var(--rose-soft);
    color: var(--rose);
    background: var(--rose-pale);
}

.pill.active {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
}

.stories-section {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 5vw, 3rem) clamp(4rem, 8vw, 7rem);
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: clamp(1.4rem, 3vw, 2rem);
}

.card {
    display: grid;
    grid-template-columns: clamp(160px, 26%, 230px) 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform .35s cubic-bezier(.22, .68, 0, 1.15), box-shadow .35s ease;
    animation: rise .65s ease both;
}

.card:hover {
    transform: translateY(-5px) scale(1.008);
    box-shadow: var(--shadow-hover);
}

@media (max-width: 560px) {
    .card {
        grid-template-columns: 1fr;
    }
}

.card-cover {
    position: relative;
    overflow: hidden;
    background: var(--rose-pale);
    min-height: 180px;
}

@media (max-width: 560px) {
    .card-cover {
        min-height: unset;
        aspect-ratio: 16/9;
    }
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.card:hover .card-cover img {
    transform: scale(1.07);
}

.card-cover-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 3rem;
    color: var(--rose-soft);
    background: linear-gradient(135deg, var(--petal) 0%, var(--rose-pale) 100%);
}

.card-num {
    position: absolute;
    top: .7rem;
    left: .7rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: .68rem;
    font-style: italic;
    letter-spacing: .06em;
    color: #fff;
    background: rgba(192, 83, 110, .65);
    padding: .18em .55em;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.card-body {
    display: flex;
    flex-direction: column;
    padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.2rem, 3vw, 2rem);
    gap: .55rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
}

.tag {
    font-size: .67rem;
    letter-spacing: .08em;
    padding: .2em .7em;
    border-radius: 999px;
    background: var(--tag-bg);
    color: var(--tag-color);
    border: 1px solid var(--tag-border);
    font-weight: 500;
}

.card-title {
    font-family: 'Kai', 'DFKai-SB', serif;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .02em;
}

.card-desc {
    font-size: clamp(.8rem, 1.5vw, .88rem);
    color: var(--text-muted);
    line-height: 1.95;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    padding-top: .85rem;
    border-top: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-author {
    display: flex;
    align-items: center;
    gap: .4em;
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .06em;
}

.author-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rose-soft);
    display: inline-block;
    flex-shrink: 0;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    font-size: .72rem;
    letter-spacing: .12em;
    color: var(--rose);
    background: var(--rose-pale);
    border: 1px solid var(--border);
    padding: .38em 1.05em;
    border-radius: 999px;
    transition: all .22s ease;
    white-space: nowrap;
}

.card:hover .card-cta {
    background: var(--rose);
    color: #fff;
    border-color: var(--rose);
}

.card-cta svg {
    width: 10px;
    height: 10px;
    transition: transform .22s;
    flex-shrink: 0;
}

.card:hover .card-cta svg {
    transform: translateX(3px);
}

.card:nth-child(1) {
    animation-delay: .05s
}

.card:nth-child(2) {
    animation-delay: .12s
}

.card:nth-child(3) {
    animation-delay: .19s
}

.card:nth-child(4) {
    animation-delay: .26s
}

.card:nth-child(5) {
    animation-delay: .33s
}

.card[hidden] {
    display: none
}

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem clamp(1.2rem, 5vw, 3rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--rose);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-links a {
    font-size: .72rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: .08em;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--rose);
}

.footer-copy {
    font-size: .68rem;
    color: var(--text-light);
    letter-spacing: .08em;
}

@media (max-width: 520px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
    }

    .footer-right {
        align-items: center;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}