/* =========================================================================
   UNTITLED TIME — base design system
   Warm paper · Cormorant Garamond · Space Mono · brush Chinese · vermillion seal
   Elevated from the original DNA. Direction theming lives in directions.css.
   ========================================================================= */

:root {
    /* ---- palette (warm neutrals) ---- */
    --paper:        #F1EFE8;
    --paper-deep:   #E8E4D9;
    --ink:          #1b1a16;
    --ink-soft:     #3C3830;
    --ink-faint:    rgba(27, 26, 22, 0.55);
    --hair:         rgba(27, 26, 22, 0.12);
    --hair-soft:    rgba(27, 26, 22, 0.07);

    --void:         #100F0C;
    --void-2:       #18160F;
    --void-paper:   #EDEAE0;
    --void-faint:   rgba(237, 234, 224, 0.62);
    --void-hair:    rgba(237, 234, 224, 0.16);

    /* ---- accent (vermillion seal) ---- */
    --seal:         #A83F39;
    --seal-bright:  #d8584c;
    --accent-h:     12;          /* hue, overridable by tweaks */
    --accent:       var(--seal);

    /* cosmology */
    --star-cool:    #cdddff;
    --star-warm:    #ffddaa;
    --polaris:      #fff5cf;

    /* ---- type ----
       --serif = Cormorant Garamond, the high-contrast DISPLAY face (hero,
       headings, pull-quotes only). --text = Spectral, the sturdy READING face
       used for all body & lead copy so paragraph color stays even and calm. */
    --serif:    'Cormorant Garamond', Georgia, serif;
    --text:     'Spectral', Georgia, serif;
    --mono:     'Space Mono', ui-monospace, monospace;
    --han:      'Noto Serif TC', serif;
    --brush:    'Ma Shan Zheng', cursive;

    /* fluid type scale */
    --t-hero:   clamp(4.8rem, 13vw, 12rem);
    --t-h2:     clamp(2.1rem, 4.4vw, 3.4rem);
    --t-h3:     clamp(1.35rem, 2.4vw, 1.85rem);
    --t-lead:   clamp(1.35rem, 2.3vw, 1.75rem);
    --t-quote:  clamp(1.6rem, 3.4vw, 2.5rem);
    --t-body:   clamp(1.24rem, 1.6vw, 1.5rem);
    --t-label:  0.72rem;

    /* rhythm */
    --rail:     210px;          /* left marker rail width */
    --pad-x:    clamp(1.6rem, 8vw, 11rem);
    --section-y: clamp(5.5rem, 13vh, 11rem);

    /* texture toggles (driven by tweaks) */
    --paper-opacity: 1;
    --grain-opacity: 0.5;
}

/* ---- background texture (paper grain + clouds) ---- */
:root {
    --tex-fibers: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='0.22'/%3E%3C/svg%3E");
    --tex-clouds: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)' opacity='0.07'/%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    background-color: var(--paper);
    background-image:
        var(--tex-fibers),
        var(--tex-clouds),
        radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.7) 0%, rgba(214,208,194,0.35) 100%);
    background-blend-mode: multiply, overlay, normal;
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--text);
    font-size: var(--t-body);
    font-weight: 500;
    line-height: 1.58;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

/* ---- shared label type ---- */
.meta, .marker, .kicker, .ticks, figcaption, .credit {
    font-family: var(--mono);
    font-size: var(--t-label);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    font-weight: 400;
}

/* ---- seal characters ---- */
.seal {
    font-family: var(--han);
    color: var(--accent);
    font-weight: 700;
    display: inline-block;
    margin-right: 0.4em;
    line-height: 1;
}
.han { font-family: var(--han); }

/* =========================================================================
   WATERMARK
   ========================================================================= */
.watermark {
    position: fixed;
    top: 8vh;
    right: 3vw;
    font-family: var(--brush);
    font-size: 34vw;
    line-height: 0.8;
    color: var(--ink);
    opacity: 0.035;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    position: relative;
    min-height: calc(100svh - clamp(0.75rem, 1.8vh, 1.25rem));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(3.5rem, 8vh, 6rem) var(--pad-x) clamp(2.2rem, 5vh, 3.4rem);
    text-align: center;
    z-index: 1;
}
.hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 14vh; bottom: 14vh; width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(var(--hair), transparent);
    opacity: 0.35;
}

.hero-meta {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    justify-content: flex-start;
    max-width: min(44rem, 94%);
    width: 100%;
    margin-bottom: clamp(1.4rem, 4vh, 2.6rem);
}
.hero-meta .rule { flex: 0 0 3rem; height: 1px; background: var(--accent); opacity: 0.8; }

.hero h1 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: var(--t-hero);
    line-height: 0.9;
    letter-spacing: 0;
    margin-bottom: clamp(1.4rem, 3.5vh, 2.4rem);
    overflow-wrap: anywhere;
    text-align: center;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero .tagline {
    font-size: var(--t-lead);
    font-style: italic;
    color: var(--ink-soft);
    max-width: 30ch;
    line-height: 1.32;
    text-wrap: balance;
}
.hero .hero-q {
    font-family: var(--serif);
    font-weight: 300;
    font-style: italic;
    font-size: var(--t-lead);
    color: var(--ink-soft);
    max-width: min(44rem, 94%);
    width: 100%;
    line-height: 1.34;
    text-wrap: pretty;
    text-align: left;
    margin-top: clamp(1.1rem, 2.4vh, 1.6rem);
}
.hero .hero-q:first-of-type { margin-top: clamp(1.4rem, 3.4vh, 2.2rem); }
.hero .hero-q em { color: var(--accent); font-style: italic; }

.hero .scroll-cue {
    margin-top: clamp(2.4rem, 7vh, 5rem);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--ink-faint);
}
.hero .scroll-cue .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 3.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:.35;transform:scale(.8);} 50%{opacity:1;transform:scale(1);} }

.hero-credit {
    margin-top: clamp(1.8rem, 5vh, 3rem);
    padding-top: 1.2rem;
    border-top: 1px solid var(--hair);
    max-width: min(44rem, 94%);
    width: 100%;
    display: grid;
    gap: 0.55rem;
    justify-items: start;
    text-align: left;
}
.hero-credit .cred-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.2rem;
    align-items: baseline;
    justify-content: flex-start;
}
.hero-credit .cred-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 0;
}
.hero-credit .cred-name {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

/* =========================================================================
   SECTION SCAFFOLD  (marker rail + body)
   ========================================================================= */
.section {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: var(--section-y) var(--pad-x);
}
.section > .rail { position: relative; }
.section > .rail .marker {
    position: sticky;
    top: 3rem;
    display: block;
}
.section > .rail .marker .idx { display:block; color: var(--accent); margin-bottom: 0.5rem; }
.section > .rail .seal-lg {
    font-family: var(--han);
    color: var(--accent);
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1;
    margin-top: 1.4rem;
    opacity: 0.9;
    display: block;
}

.body { max-width: 50rem; }
.body > * + * { margin-top: 1.3rem; }

h2.head {
    font-family: var(--serif);
    font-weight: 300;
    font-size: var(--t-h2);
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    text-wrap: balance;
}
h2.head + .lead, h2.head + p { margin-top: 1.6rem; }

h3.sub {
    font-family: var(--serif);
    font-weight: 400;
    font-size: var(--t-h3);
    line-height: 1.12;
}

.lead {
    font-family: var(--text);
    font-size: var(--t-lead);
    line-height: 1.46;
    color: var(--ink-soft);
    font-style: normal;
    font-weight: 500;
    text-wrap: pretty;
}
p { text-wrap: pretty; }
p .han { color: var(--accent); font-size: 1.06em; }
em { color: var(--ink); }
.inverted em { color: var(--seal-bright); }
.inverted .pull em { color: var(--seal-bright); }

/* lone pull-transition band — no rail, centered, breathing room without dead space */
.pull-band {
    padding: clamp(2.5rem, 6vh, 4.5rem) var(--pad-x);
    display: flex;
    justify-content: center;
    position: relative;
}
.pull-band .pull {
    margin: 0;
    max-width: 38rem;
    text-align: center;
    text-wrap: balance;
}
.pull-band::before, .pull-band::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1px;
    height: clamp(1.2rem, 3vh, 2.2rem);
    background: var(--hair);
}
.pull-band::before { top: 0; }
.pull-band::after  { bottom: 0; }

blockquote {
    font-family: var(--serif);
    font-size: var(--t-quote);
    font-style: italic;
    font-weight: 400;
    line-height: 1.32;
    color: var(--ink-soft);
    margin: clamp(2.4rem, 6vh, 4rem) 0;
    padding-left: clamp(1.4rem, 3vw, 2.6rem);
    border-left: 1px solid var(--accent);
    position: relative;
    text-wrap: balance;
}
blockquote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--mono);
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* concept intro band */
.concept {
    grid-template-columns: var(--rail) minmax(0,1fr);
    padding-top: clamp(3rem,7vh,5rem);
    padding-bottom: clamp(3rem,7vh,5rem);
    border-top: 1px solid var(--hair-soft);
    border-bottom: 1px solid var(--hair-soft);
}
.concept .body { max-width: 56rem; }
.concept .concept-line {
    font-family: var(--text);
    font-weight: 500;
    font-size: var(--t-lead);
    font-style: normal;
    line-height: 1.46;
    letter-spacing: 0;
    color: var(--ink);
    text-wrap: pretty;
}
.concept .concept-line em { font-style: italic; color: var(--accent); }

/* =========================================================================
   INVERTED (void) SECTIONS
   ========================================================================= */
.inverted {
    background: var(--void);
    color: var(--void-paper);
}
.inverted .head, .inverted .lead, .inverted p, .inverted h3.sub { color: var(--void-paper); }
.inverted .lead { color: var(--void-faint); }
.inverted .marker, .inverted figcaption, .inverted .ticks { color: var(--void-faint); }
.inverted .marker .idx, .inverted .seal, .inverted .seal-lg { color: var(--seal-bright); }
.inverted blockquote { color: var(--void-paper); border-left-color: var(--seal-bright); }
.inverted blockquote cite { color: var(--void-faint); }
.inverted p .han { color: var(--seal-bright); }
.inverted ::selection { background: var(--seal-bright); color: var(--void); }

/* =========================================================================
   FIGURES / GALLERY
   ========================================================================= */
figure { margin: 0; }
.figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    filter: saturate(0.78) contrast(0.96);
}
figcaption {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: baseline;
}
figcaption .num { color: var(--accent); }

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.7rem, 1.4vw, 1.1rem);
    margin-top: clamp(2rem, 5vh, 3.2rem);
    padding-top: 1.4rem;
    border-top: 1px solid var(--hair);
}
.gallery .figure img { height: clamp(120px, 16vw, 220px); object-fit: cover; }
.inverted .gallery { border-top-color: var(--void-hair); }

/* full-bleed feature figure */
.feature-figure {
    grid-column: 1 / -1;
    margin-top: clamp(2.4rem, 6vh, 4rem);
}
.feature-figure img {
    width: 100%;
    height: clamp(320px, 56vh, 640px);
    object-fit: cover;
    border-radius: 3px;
    filter: saturate(0.8) contrast(0.97) brightness(0.98);
}

/* =========================================================================
   REVEAL ANIMATION
   ========================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 1.4s cubic-bezier(.22,.61,.36,1), transform 1.4s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--rd, 0ms);
}
.reveal.in { opacity: 1; transform: none; }
/* above-the-fold / fallback: show instantly with no transition so content is
   never trapped invisible if rendering is paused or JS is unavailable */
.reveal.instant { transition: none; opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================================
   FOOTER
   ========================================================================= */
footer.site-foot {
    position: relative;
    z-index: 1;
    background: var(--void);
    color: var(--void-faint);
    min-height: min(72svh, 760px);
    display: flex;
    align-items: center;
    padding: clamp(5rem, 12vh, 9rem) var(--pad-x) clamp(2.5rem, 6vh, 4rem);
}
.foot-wrap {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2.6rem, 6vw, 7rem);
    align-items: start;
}
.foot-wrap .invitation {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
    line-height: 1.65;
    color: var(--void-faint);
    max-width: 42rem;
    margin-bottom: 0;
    text-wrap: pretty;
}
.foot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    gap: 2rem 3rem;
    padding-left: clamp(2rem, 4vw, 4rem);
    border-left: 1px solid var(--void-hair);
}
.foot-grid .lbl { display:block; color: var(--seal-bright); margin-bottom: 0.6rem; }
.foot-grid a { color: var(--void-paper); text-decoration: none; border-bottom: 1px solid var(--void-hair); }
.foot-grid a:hover { border-bottom-color: var(--seal-bright); }
.person-link,
.foot-grid a.person-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 0;
    transition: text-shadow 0.25s ease, color 0.25s ease;
}
.person-link:hover,
.person-link:focus-visible,
.foot-grid a.person-link:hover,
.foot-grid a.person-link:focus-visible {
    color: inherit;
    border-bottom-color: transparent;
    text-shadow:
        0 0 0.65rem rgba(216, 88, 76, 0.62),
        0 0 1.4rem rgba(255, 245, 207, 0.22);
}
.person-link:focus-visible {
    outline: 1px solid var(--seal-bright);
    outline-offset: 0.14em;
}
.foot-colophon {
    grid-column: 1 / -1;
    margin-top: clamp(1rem, 2vh, 1.8rem);
    padding-top: 1.8rem;
    border-top: 1px solid var(--void-hair);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(237,234,224,0.4);
}

/* ---- inquiry form ---- */
.foot-form {
    display: grid;
    gap: 0;
    margin-top: 0.5rem;
}
.foot-form input,
.foot-form textarea {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--void-hair);
    border-radius: 0;
    color: var(--void-paper);
    font-family: var(--serif);
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0.55rem 0;
    width: 100%;
    outline: none;
    resize: none;
    transition: border-color 0.28s ease;
    line-height: 1.5;
    caret-color: var(--seal-bright);
}
.foot-form textarea {
    margin-top: 0;
}
.foot-form input::placeholder,
.foot-form textarea::placeholder {
    color: rgba(237, 234, 224, 0.25);
    font-style: italic;
    font-weight: 300;
}
.foot-form input:focus,
.foot-form textarea:focus {
    border-bottom-color: rgba(168, 63, 57, 0.7);
    outline: none;
}
.foot-form button {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    align-self: start;
    background: transparent;
    border: 1px solid var(--void-hair);
    border-radius: 0;
    color: var(--void-faint);
    font-family: var(--mono);
    font-size: var(--t-label);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: border-color 0.28s ease, color 0.28s ease;
    margin-top: 1.1rem;
    line-height: 1;
}
.foot-form button:hover,
.foot-form button:focus-visible {
    border-color: var(--seal-bright);
    color: var(--seal-bright);
    outline: none;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
    .section, .concept { grid-template-columns: 1fr; gap: 1.4rem; }
    .section > .rail .marker { position: static; }
    .section > .rail {
        display: flex; align-items: baseline; gap: 1.2rem;
        border-bottom: 1px solid var(--hair); padding-bottom: 0.9rem;
    }
    .inverted .rail { border-bottom-color: var(--void-hair); }
    .section > .rail .seal-lg { margin-top: 0; font-size: 2rem; }
    .hero::before { display: none; }
    .gallery { grid-template-columns: 1fr 1fr; }
    footer.site-foot {
        min-height: auto;
        align-items: stretch;
    }
    .foot-wrap {
        grid-template-columns: 1fr;
        gap: 2.4rem;
    }
    .foot-wrap .invitation {
        max-width: 100%;
    }
    .foot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-left: 0;
        padding-top: 2.2rem;
        border-left: 0;
        border-top: 1px solid var(--void-hair);
    }
}

@media (max-width: 640px) {
    :root {
        --pad-x: 1.15rem;
        --section-y: 4.5rem;
        --t-body: 1.12rem;
        --t-lead: 1.28rem;
        --t-quote: 1.5rem;
    }

    body { background-attachment: scroll; }

    .hero {
        min-height: calc(100svh - 0.75rem);
        padding-top: 4.25rem;
        padding-bottom: 2.4rem;
    }

    .hero-credit .cred-row {
        display: grid;
        gap: 0.25rem;
    }

    .hero-credit .cred-label {
        min-width: 0;
        white-space: normal;
    }

    .section > .rail {
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
    }

    .section > .rail .marker {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    blockquote {
        margin: 2rem 0;
    }

    .feature-figure img {
        height: clamp(240px, 68vw, 340px);
    }

    figcaption {
        align-items: flex-start;
        gap: 0.35rem 0.7rem;
    }

    .foot-colophon {
        display: grid;
        gap: 0.85rem;
    }

    .foot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    :root {
        --t-hero: 4.2rem;
        --t-h2: 2rem;
    }
}

@media (max-width: 560px) {
    .gallery { grid-template-columns: 1fr; }
    blockquote { padding-left: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { transition: none; opacity: 1; transform: none; }
    .hero .scroll-cue .dot { animation: none; }
}
