/* ============================================================
   GONGFU TEA — gongfutea.co
   Direction: 东方留白 · 水墨意境 (Eastern negative space / ink)
   Extracted from design-preview-v2.html, extended with article
   typography, video embeds, listing cards, and a mobile nav row.
   ============================================================ */
:root {
    /* Surfaces */
    --paper:        #F4F1E8;   /* 宣纸 xuan paper */
    --paper-deep:   #ECE7D9;   /* aged paper, alternating band */
    --ink:          #1C1B18;   /* 墨 ink — primary text / dark surface */
    /* Text */
    --ink-body:     #33312B;
    --ink-soft:     #57534A;   /* secondary text, ≥4.5:1 on paper */
    --ink-faint:    #6E685B;   /* captions only, ~4.6:1 on paper */
    /* Accents — used sparingly, like a seal on a scroll */
    --cinnabar:     #9E2B25;   /* 朱砂 vermilion seal red, 6.8:1 on paper */
    --pine:         #3D4F43;   /* 黛绿 pine green, deep band */
    /* Tea liquor tones (decorative dots) */
    --liquor-green:  #A9B46E;
    --liquor-white:  #D8C99A;
    --liquor-yellow: #D3AC5B;
    --liquor-oolong: #BE7E36;
    --liquor-red:    #9C4526;
    --liquor-dark:   #5A3A22;
    /* Hairlines */
    --hairline:        1px solid rgba(28, 27, 24, 0.16);
    --hairline-strong: 1px solid rgba(28, 27, 24, 0.34);
    --hairline-light:  1px solid rgba(244, 241, 232, 0.18);
    /* Type */
    --font-display: 'Cormorant Garamond', 'Noto Serif SC', serif;
    --font-body:    'Newsreader', 'Noto Serif SC', serif;
    --font-cn:      'Noto Serif SC', serif;
    /* Spacing rhythm (8px base) */
    --gutter: clamp(1.5rem, 5vw, 5rem);
    --section: clamp(6rem, 14vh, 11rem);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;               /* 17px base for reading */
    line-height: 1.7;
    color: var(--ink-body);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--cinnabar); color: var(--paper); }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--cinnabar);
    outline-offset: 3px;
}

img { display: block; max-width: 100%; }

/* --- Paper grain: barely-there fibre, like xuan paper --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* Skip link — visually hidden until focused */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: var(--paper);
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    font-size: 0.9rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ============================================================
   SEAL — 印章. The one unforgettable mark of the site.
   ============================================================ */
.seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cinnabar);
    color: var(--paper);
    font-family: var(--font-cn);
    font-weight: 600;
    line-height: 1.05;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1.5px rgba(244, 241, 232, 0.55);
    text-align: center;
    user-select: none;
}
.seal--logo {
    width: 2.6rem; height: 2.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    writing-mode: vertical-rl;
    padding: 0.3rem 0;
}
.seal--hero {
    width: 4.5rem; height: 4.5rem;
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    writing-mode: vertical-rl;
    transform: rotate(-3deg);
    box-shadow: inset 0 0 0 2px rgba(244, 241, 232, 0.5), 0 6px 18px -6px rgba(158, 43, 37, 0.45);
}

/* ============================================================
   NAVIGATION — .site-nav only; bare `nav` would also match
   breadcrumb/toc <nav> elements and fix them to the top.
   ============================================================ */
.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.1rem var(--gutter);
    background: rgba(244, 241, 232, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: var(--hairline);
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: var(--ink);
}
.brand-word {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1;
}
.brand-word em {
    font-style: italic;
    font-weight: 300;
    color: var(--ink-soft);
}
.nav-links {
    display: flex;
    gap: clamp(1.4rem, 3vw, 2.8rem);
    list-style: none;
}
.nav-links a {
    position: relative;
    text-decoration: none;
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 0.65rem 0;             /* keeps ≥44px hit area */
    transition: color 0.25s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0.35rem;
    width: 100%; height: 1px;
    background: var(--cinnabar);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-switcher {
    display: flex;
    border: var(--hairline);
    border-radius: 999px;
    overflow: hidden;
}
.lang-switcher a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    padding: 0.55rem 0.95rem;         /* ≥44px tall hit area */
    transition: background 0.25s ease, color 0.25s ease;
}
.lang-switcher a + a { border-left: var(--hairline); }
.lang-switcher a[aria-current="true"] {
    background: var(--ink);
    color: var(--paper);
}
.lang-switcher a:not([aria-current="true"]):hover { background: var(--paper-deep); }

/* ============================================================
   HERO — an unfolded handscroll: content left, scroll painting
   right, vertical verse in the far margin.
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 7rem);
    padding: 7.5rem var(--gutter) 4rem;
}
.hero-copy { max-width: 40rem; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.2rem;
}
.hero-eyebrow .rule {
    width: 3rem; height: 1px;
    background: var(--cinnabar);
}
.hero-eyebrow span {
    font-size: 0.8rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cinnabar);
}
.hero-eyebrow .cn {
    font-family: var(--font-cn);
    font-size: 0.85rem;
    letter-spacing: 0.5em;
    color: var(--ink-faint);
    text-transform: none;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 6.4vw, 5.6rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 2rem;
    text-wrap: balance;
}
.hero h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--pine);
}
.hero h1 .dot { color: var(--cinnabar); font-style: normal; }

.hero-sub {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 30rem;
    margin-bottom: 3rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.hero-cta--center { justify-content: center; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;               /* 52px touch target */
    padding: 0.85rem 2.1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--pine); transform: translateY(-2px); }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(28, 27, 24, 0.4);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); background: rgba(28,27,24,0.04); }

.hero-meta {
    display: flex;
    gap: clamp(1.8rem, 4vw, 3.5rem);
    margin-top: 3.5rem;
    padding-top: 1.8rem;
    border-top: var(--hairline);
}
.hero-meta dt {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.3rem;
}
.hero-meta dd {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.1;
}
.hero-meta dd .cn {
    font-family: var(--font-cn);
    font-size: 0.85rem;
    color: var(--ink-faint);
    margin-left: 0.4rem;
}

/* Hanging scroll — 立轴 */
.scroll-wrap {
    position: relative;
    justify-self: end;
    width: min(100%, 26rem);
}
.scroll {
    background: #FBF9F3;               /* silk mounting 绫绢 */
    padding: clamp(0.9rem, 2vw, 1.4rem);
    box-shadow: 0 30px 60px -30px rgba(28, 27, 24, 0.35);
    position: relative;
}
.scroll::before, .scroll::after {      /* wooden rollers 轴杆 */
    content: '';
    position: absolute;
    left: -0.55rem; right: -0.55rem;
    height: 0.55rem;
    background: linear-gradient(180deg, #4A3B2C, #2C231A);
    border-radius: 999px;
}
.scroll::before { top: -0.55rem; }
.scroll::after  { bottom: -0.55rem; }
.scroll img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    /* 水墨处理: ink first, colour returns on hover */
    filter: grayscale(0.85) sepia(0.14) contrast(1.04) brightness(1.03);
    transition: filter 1.4s ease;
}
.scroll:hover img { filter: grayscale(0.1) sepia(0.06) contrast(1.02); }
.scroll-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--ink-faint);
    letter-spacing: 0.08em;
}
.scroll-caption .cn { font-family: var(--font-cn); letter-spacing: 0.3em; }
.scroll-wrap .seal--hero {
    position: absolute;
    right: -1.4rem;
    bottom: 3.4rem;
    z-index: 2;
}

/* Vertical verse — 题跋 in the margin */
.verse {
    position: absolute;
    top: 50%;
    right: calc(var(--gutter) * 0.55);
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    font-family: var(--font-cn);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    letter-spacing: 0.55em;
    color: var(--ink-faint);
    display: flex;
    gap: 1.6rem;
}
.verse .poet { font-size: 0.72em; color: var(--cinnabar); letter-spacing: 0.4em; }

/* Brush divider — one swept stroke between movements */
.brush {
    display: block;
    width: min(14rem, 40vw);
    margin: 0 auto;
    opacity: 0.75;
}

/* ============================================================
   CLASSIC QUOTE — 《茶经》
   ============================================================ */
.classic {
    background: var(--pine);
    color: var(--paper);
    padding: var(--section) var(--gutter);
    position: relative;
    overflow: hidden;
}
.classic::before {                      /* watermark 茶 */
    content: '茶';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-cn);
    font-weight: 600;
    font-size: min(52vw, 34rem);
    line-height: 1;
    color: rgba(244, 241, 232, 0.045);
    pointer-events: none;
}
.classic-inner {
    position: relative;
    max-width: 62rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}
.classic-cn {
    writing-mode: vertical-rl;
    font-family: var(--font-cn);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    letter-spacing: 0.32em;
    line-height: 1.9;
    color: rgba(244, 241, 232, 0.92);
    border-right: var(--hairline-light);
    padding-right: clamp(1.5rem, 3vw, 3rem);
    height: 22rem;
}
.classic-label {
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(244, 241, 232, 0.55);
    margin-bottom: 1.4rem;
}
.classic blockquote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.35;
    letter-spacing: 0.005em;
    color: var(--paper);
    margin-bottom: 1.6rem;
    text-wrap: balance;
}
.classic cite {
    font-style: normal;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: rgba(244, 241, 232, 0.6);
}
.classic cite .cn { font-family: var(--font-cn); margin-right: 0.6em; letter-spacing: 0.25em; }

/* ============================================================
   THREE PATHS — 一二三
   ============================================================ */
.paths { padding: var(--section) var(--gutter); }
.section-head {
    max-width: 74rem;
    margin: 0 auto clamp(3.5rem, 8vh, 6rem);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
}
.section-head .kicker {
    font-size: 0.8rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cinnabar);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-head .kicker::before {
    content: '';
    width: 2.4rem; height: 1px;
    background: var(--cinnabar);
}
.section-head h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 4.4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 34rem;
    text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--pine); }
.section-head .head-cn {
    writing-mode: vertical-rl;
    font-family: var(--font-cn);
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.5em;
    color: var(--ink-faint);
    padding-bottom: 0.4rem;
}

.paths-grid {
    max-width: 74rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
}
.path {
    text-decoration: none;
    display: block;
    border-top: var(--hairline-strong);
    padding-top: 1.6rem;
    position: relative;
}
.path-num {
    position: absolute;
    top: -1.35rem;
    left: 0;
    background: var(--paper);
    padding-right: 1rem;
    font-family: var(--font-cn);
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--cinnabar);
    letter-spacing: 0.2em;
}
.path figure { overflow: hidden; margin: 0.4rem 0 1.6rem; }
.path img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: grayscale(0.9) sepia(0.12) contrast(1.05);
    transition: filter 1.2s ease, transform 1.2s ease;
}
.path:hover img { filter: grayscale(0.05); transform: scale(1.03); }
.path .card-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 0.15rem;
    transition: color 0.3s ease;
}
.path:hover .card-title { color: var(--cinnabar); }
.path .h3-cn {
    font-family: var(--font-cn);
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: var(--ink-faint);
    display: block;
    margin-bottom: 0.9rem;
}
.path p {
    font-size: 0.98rem;
    font-weight: 300;
    color: var(--ink-soft);
    margin-bottom: 1.2rem;
}
.path .more {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.path .more::after {
    content: '→';
    font-family: var(--font-body);
    transition: transform 0.3s ease;
}
.path:hover .more::after { transform: translateX(5px); }

/* Card meta line — used on listing cards (category / blog index) */
.path .card-meta {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: block;
    margin-bottom: 0.9rem;
}

/* ============================================================
   SIX FAMILIES — 六大茶类
   ============================================================ */
.families {
    background: var(--paper-deep);
    border-top: var(--hairline);
    border-bottom: var(--hairline);
    padding: calc(var(--section) * 0.75) var(--gutter);
}
.families-inner { max-width: 74rem; margin: 0 auto; }
.families-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
}
.families-head h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    color: var(--ink);
}
.families-head .cn {
    font-family: var(--font-cn);
    font-weight: 300;
    letter-spacing: 0.45em;
    color: var(--ink-faint);
    font-size: 0.95rem;
}
.families-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    list-style: none;
}
.family {
    padding: 1.2rem 1.2rem 1.4rem;
    border-left: var(--hairline);
    transition: background 0.35s ease;
}
.family:first-child { border-left: none; }
.family:hover { background: rgba(251, 249, 243, 0.8); }
.family .liquor {
    width: 2.2rem; height: 2.2rem;
    border-radius: 50%;
    margin-bottom: 1.1rem;
    box-shadow: inset 0 -4px 8px rgba(28,27,24,0.18), 0 2px 6px rgba(28,27,24,0.12);
}
.liquor--green  { background: var(--liquor-green); }
.liquor--white  { background: var(--liquor-white); }
.liquor--yellow { background: var(--liquor-yellow); }
.liquor--oolong { background: var(--liquor-oolong); }
.liquor--red    { background: var(--liquor-red); }
.liquor--dark   { background: var(--liquor-dark); }
.family .f-cn {
    font-family: var(--font-cn);
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--ink);
    display: block;
    margin-bottom: 0.25rem;
    letter-spacing: 0.15em;
}
.family .f-en {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: block;
    margin-bottom: 0.7rem;
}
.family .f-note {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--ink-soft);
    line-height: 1.55;
    display: block;
}

/* ============================================================
   NEWSLETTER — 一期一会
   ============================================================ */
.letter {
    padding: var(--section) var(--gutter);
    text-align: center;
    position: relative;
}
.letter .seal--hero {
    position: static;
    transform: rotate(-2deg);
    margin-bottom: 2.2rem;
    width: 3.8rem; height: 3.8rem;
    font-size: 1.1rem;
}
.letter h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    color: var(--ink);
    margin-bottom: 0.6rem;
    text-wrap: balance;
}
.letter .h2-cn {
    font-family: var(--font-cn);
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.55em;
    color: var(--cinnabar);
    display: block;
    margin-bottom: 1.4rem;
}
.letter p {
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 32rem;
    margin: 0 auto 2.6rem;
}
.letter-form {
    display: flex;
    max-width: 30rem;
    margin: 0 auto;
    border-bottom: var(--hairline-strong);
}
.letter-form label {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.letter-form input {
    flex: 1;
    appearance: none;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--ink);
    padding: 0.9rem 0.2rem;
    min-height: 3.25rem;
    outline: none;
}
.letter-form input::placeholder { color: var(--ink-faint); }
.letter-form button {
    appearance: none;
    border: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cinnabar);
    cursor: pointer;
    padding: 0.9rem 0.2rem 0.9rem 1.2rem;
    min-height: 3.25rem;
    transition: letter-spacing 0.3s ease;
}
.letter-form button:hover { letter-spacing: 0.3em; }
.letter-note {
    margin-top: 1.1rem;
    font-size: 0.82rem;
    color: var(--ink-faint);
}

/* ============================================================
   FOOTER — 墨
   ============================================================ */
footer {
    background: var(--ink);
    color: var(--paper);
    padding: calc(var(--section) * 0.7) var(--gutter) 2.5rem;
    position: relative;
    overflow: hidden;
}
.footer-cn-watermark {
    position: absolute;
    right: -2rem;
    bottom: -6rem;
    writing-mode: vertical-rl;
    font-family: var(--font-cn);
    font-weight: 600;
    font-size: 16rem;
    line-height: 1;
    color: rgba(244, 241, 232, 0.035);
    pointer-events: none;
}
.footer-grid {
    position: relative;
    max-width: 74rem;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
}
.footer-brand { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.4rem; }
.footer-brand .seal--logo { width: 2.4rem; height: 2.4rem; font-size: 0.72rem; }
.footer-brand span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
}
.footer-desc {
    font-weight: 300;
    font-size: 0.95rem;
    color: rgba(244, 241, 232, 0.62);
    max-width: 24rem;
}
.footer-col h4 {
    font-size: 0.75rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(244, 241, 232, 0.45);
    margin-bottom: 1.4rem;
}
.footer-col ul { list-style: none; }
.footer-col a {
    display: inline-block;
    text-decoration: none;
    font-weight: 300;
    font-size: 0.95rem;
    color: rgba(244, 241, 232, 0.75);
    padding: 0.35rem 0;
    transition: color 0.25s ease, transform 0.25s ease;
}
.footer-col a:hover { color: var(--paper); transform: translateX(3px); }
.footer-col a .cn {
    font-family: var(--font-cn);
    font-size: 0.8em;
    color: rgba(244, 241, 232, 0.4);
    margin-left: 0.5em;
    letter-spacing: 0.2em;
}
.footer-bottom {
    position: relative;
    max-width: 74rem;
    margin: 0 auto;
    padding-top: 1.8rem;
    border-top: var(--hairline-light);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(244, 241, 232, 0.45);
}
.footer-bottom .cn { font-family: var(--font-cn); letter-spacing: 0.3em; }

/* ============================================================
   REVEAL — quiet fade-and-rise, once per element.
   Hidden state applies ONLY when JS is active (.js on <html>),
   so content is never invisible without scripts.
   ============================================================ */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   PAGE HEAD — shared header for articles, pages, listings.
   Clears the fixed nav.
   ============================================================ */
.page-head {
    padding: 9.5rem var(--gutter) 3rem;
}
.page-head-inner { max-width: 46rem; margin: 0 auto; }
.page-head--center .page-head-inner { text-align: center; margin-left: auto; margin-right: auto; }

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin-bottom: 2.2rem;
}
.page-head--center .breadcrumb { justify-content: center; }
.breadcrumb a {
    text-decoration: none;
    color: var(--ink-soft);
    transition: color 0.25s ease;
}
.breadcrumb a:hover { color: var(--cinnabar); }
.breadcrumb .sep { color: var(--cinnabar); font-size: 0.75em; }

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cinnabar);
    text-decoration: none;
    margin-bottom: 1.4rem;
}
.cat-chip::before {
    content: '';
    width: 2rem; height: 1px;
    background: var(--cinnabar);
}
.cat-chip:hover { color: var(--ink); }

.page-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.5rem, 5.4vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 1.4rem;
    text-wrap: balance;
}
.page-dek {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--ink-soft);
    margin-bottom: 1.8rem;
}
.article-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    padding-top: 1.2rem;
    border-top: var(--hairline);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ============================================================
   ARTICLE — hero image, video, layout, typography
   ============================================================ */
.article-hero {
    max-width: 62rem;
    margin: 0 auto 3.5rem;
    padding: 0 var(--gutter);
}
.article-hero img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    filter: grayscale(0.85) sepia(0.14) contrast(1.04) brightness(1.03);
    transition: filter 1.4s ease;
}
.article-hero:hover img { filter: grayscale(0.1) sepia(0.06) contrast(1.02); }
.article-hero figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    margin-top: 0.9rem;
}

/* Responsive 16:9 embed (youtube-nocookie) */
.video-embed {
    position: relative;
    padding-top: 56.25%;
    margin: 0 0 3.5rem;
    background: var(--ink);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.article-layout {
    max-width: 74rem;
    margin: 0 auto;
    padding: 0 var(--gutter) calc(var(--section) * 0.6);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}
.article-content { max-width: 42rem; }

.article-body { font-size: 1.08rem; }
.article-body > p { margin-bottom: 1.4rem; }
.article-body h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--ink);
    margin: 3.2rem 0 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-wrap: balance;
}
.article-body h2::before {
    content: '';
    flex: none;
    width: 1.5rem; height: 2px;
    background: var(--cinnabar);
}
.article-body h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.4rem;
    color: var(--ink);
    margin: 2.4rem 0 0.9rem;
}
.article-body ul, .article-body ol {
    margin: 0 0 1.4rem;
    padding-left: 1.4rem;
}
.article-body li { margin-bottom: 0.5rem; }
.article-body li::marker { color: var(--cinnabar); }
.article-body a {
    color: var(--cinnabar);
    text-decoration: underline;
    text-decoration-color: rgba(158, 43, 37, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.25s ease;
}
.article-body a:hover { text-decoration-color: var(--cinnabar); }
.article-body blockquote {
    border-left: 3px solid var(--pine);
    padding: 0.4rem 0 0.4rem 1.6rem;
    margin: 2.4rem 0;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--ink);
}
.article-body blockquote p { margin-bottom: 0.6rem; }
.article-body img {
    margin: 2.2rem auto;
    filter: grayscale(0.85) sepia(0.14) contrast(1.04) brightness(1.03);
    transition: filter 1.2s ease;
}
.article-body img:hover { filter: grayscale(0.1) sepia(0.06) contrast(1.02); }
.article-body figure { margin: 2.2rem 0; }
.article-body figure img { margin: 0 auto; }
.article-body figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-faint);
    letter-spacing: 0.06em;
    margin-top: 0.8rem;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.98rem;
}
.article-body th, .article-body td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: var(--hairline);
    vertical-align: top;
}
.article-body th {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: var(--hairline-strong);
}
.article-body hr {
    border: none;
    height: 24px;
    margin: 3rem 0;
    background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20220%2024'%20fill='none'%3E%3Cpath%20d='M4%2014%20C%2040%204,%2080%2020,%20120%2011%20S%20190%206,%20216%2012'%20stroke='%231C1B18'%20stroke-opacity='0.55'%20stroke-width='2.4'%20stroke-linecap='round'/%3E%3Cpath%20d='M60%2017%20C%2090%2012,%20130%2019,%20168%2014'%20stroke='%239E2B25'%20stroke-opacity='0.5'%20stroke-width='1.2'%20stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.75;
}

/* Sources & tags */
.sources {
    margin-top: 3.5rem;
    border-top: var(--hairline-strong);
    padding-top: 2rem;
}
.sources h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--ink);
    margin-bottom: 1rem;
}
.sources ul { list-style: none; }
.sources li { padding: 0.45rem 0; border-bottom: var(--hairline); }
.sources li:last-child { border-bottom: none; }
.sources a {
    text-decoration: none;
    color: var(--ink-soft);
    transition: color 0.25s ease;
}
.sources a:hover { color: var(--cinnabar); }
.sources a::after { content: ' ↗'; color: var(--cinnabar); }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.2rem;
    list-style: none;
}
.tag-list li {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    border: var(--hairline);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
}

/* Sidebar — TOC */
.article-sidebar { position: sticky; top: 7rem; }
.toc { border-top: var(--hairline-strong); padding-top: 1.4rem; }
.toc-title {
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1rem;
}
.toc ul { list-style: none; }
.toc a {
    display: block;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--ink-soft);
    padding: 0.4rem 0 0.4rem 1rem;
    border-left: 2px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.toc a:hover { color: var(--cinnabar); border-left-color: var(--cinnabar); }

/* Related articles band */
.related-band {
    border-top: var(--hairline);
    padding: calc(var(--section) * 0.6) var(--gutter);
}
.related-band .section-head { margin-bottom: clamp(2.5rem, 6vh, 4rem); }

/* ============================================================
   STATIC PAGE & 404
   ============================================================ */
.page-body {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 var(--gutter) calc(var(--section) * 0.6);
}

.error-wrap {
    min-height: 62vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10rem var(--gutter) 6rem;
}
.error-wrap .seal--hero { position: static; transform: rotate(-3deg); margin-bottom: 2rem; }
.error-code {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(4rem, 10vw, 7rem);
    line-height: 1;
    color: var(--ink);
    margin-bottom: 0.6rem;
}
.error-title {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cinnabar);
    margin-bottom: 1.4rem;
}
.error-desc {
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 30rem;
    margin: 0 auto 2.6rem;
}

/* ============================================================
   LISTING GROUPS — blog index grouped by category
   ============================================================ */
.listing-group { padding-bottom: calc(var(--section) * 0.55); }
.listing-group .group-head {
    max-width: 74rem;
    margin: 0 auto 3rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    border-top: var(--hairline-strong);
    padding-top: 1.6rem;
}
.group-head h2 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--ink);
}
.group-head a {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--cinnabar);
    white-space: nowrap;
}
.group-head a:hover { color: var(--ink); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1400px) {
    .verse { display: none; }
}
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 8rem;
        gap: 4rem;
    }
    .hero-copy { max-width: 44rem; }
    .scroll-wrap { justify-self: start; width: min(100%, 26rem); }
    .classic-inner { grid-template-columns: 1fr; }
    .classic-cn {
        writing-mode: horizontal-tb;
        height: auto;
        border-right: none;
        border-bottom: var(--hairline-light);
        padding: 0 0 1.5rem;
        letter-spacing: 0.2em;
        line-height: 1.8;
    }
    .paths-grid { grid-template-columns: 1fr; max-width: 34rem; }
    .families-grid { grid-template-columns: repeat(3, 1fr); }
    .family:nth-child(4) { border-left: none; }
    .family:nth-child(n+4) { border-top: var(--hairline); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; order: -1; }
    .article-content { max-width: 46rem; }
}
@media (max-width: 768px) {
    /* Mobile nav: brand + language on row one, links on a
       horizontally scrollable second row. */
    .site-nav { gap: 0.6rem 1rem; padding: 0.8rem var(--gutter) 0; }
    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem;
        padding-bottom: 0.7rem;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links li { flex: none; }
    .nav-links a { white-space: nowrap; padding: 0.4rem 0; font-size: 0.8rem; }
    .hero { padding-top: 10rem; }
    .page-head { padding-top: 11rem; }
    .error-wrap { padding-top: 12rem; }
    .hero-meta { flex-wrap: wrap; gap: 1.6rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .section-head { grid-template-columns: 1fr; }
    .section-head .head-cn { display: none; }
    .families-grid { grid-template-columns: repeat(2, 1fr); }
    .family:nth-child(4) { border-left: var(--hairline); }
    .family:nth-child(odd) { border-left: none; }
    .family:nth-child(n+3) { border-top: var(--hairline); }
    .letter-form { flex-direction: column; border-bottom: none; }
    .letter-form input { border-bottom: var(--hairline-strong); text-align: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.6rem; }
}
