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

:root {
    /* Compliance tokens from design prose: Interlude Intersection Observer (no listeners */
    --dark: #1c1e26;
    --deep: #0d0f14;
    --purple-deep: #2a1f3d;
    --teal-deep: #1a3a4a;
    --warm: #f0ead6;
    --slate: #6a7b8c;
    --rose: #d4a0a0;
    --green: #3ddc84;
    --teal: #1de9b6;
    --violet: #7b4ddb;
    --display: "Nunito", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --body: "Libre Baskerville", "Lora", Georgia, serif;
    --mono: "Inconsolata", "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --kr: "Noto Sans KR", "Inter", system-ui, sans-serif;
    --jp: "Noto Sans JP", "Inter", system-ui, sans-serif;
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--warm);
    background: var(--dark);
    font-family: var(--body);
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.75;
}

.filter-source {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    filter: url(#grain-filter);
    opacity: 0.15;
    mix-blend-mode: overlay;
    background: #d4a0a0;
}

.aurora-particles {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    opacity: var(--alpha);
    background: var(--color);
    box-shadow: 0 0 18px var(--color), 0 0 44px var(--color);
    animation: particleDrift var(--duration) linear infinite;
    animation-delay: var(--delay);
}

@keyframes particleDrift {
    0% { transform: translate3d(0, 18vh, 0); }
    50% { transform: translate3d(var(--sway), -38vh, 0); }
    100% { transform: translate3d(calc(var(--sway) * -0.45), -92vh, 0); }
}

.threshold {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, #1c1e26 0%, #2a1f3d 30%, #1a3a4a 60%, #1c1e26 100%);
    background-size: 400% 400%;
    animation: auroraBreath 20s ease-in-out infinite;
}

.threshold::before,
.study::before,
.horizon::before {
    content: "";
    position: absolute;
    inset: -10%;
    z-index: 0;
    opacity: 0.3;
    background-image:
        repeating-linear-gradient(30deg, rgba(106, 123, 140, 0.18) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(150deg, rgba(106, 123, 140, 0.14) 0 1px, transparent 1px 42px);
}

@keyframes auroraBreath {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

.edge-grain {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 13vw;
    z-index: 2;
    opacity: 0.24;
    background-image: linear-gradient(180deg, transparent, rgba(212, 160, 160, 0.22), transparent);
    animation: edgeFlow 8s linear infinite;
}

.edge-grain-left { left: 0; }
.edge-grain-right { right: 0; animation-delay: -4s; }

@keyframes edgeFlow {
    from { transform: translateY(-12%); }
    to { transform: translateY(12%); }
}

.hero-field {
    position: relative;
    z-index: 5;
    width: min(1120px, 92vw);
    min-height: 620px;
    display: grid;
    place-items: center;
    padding: 6rem 0;
}

.iso-wordmark-wrap {
    position: relative;
    transform: rotateX(45deg) rotateZ(-45deg);
    transform-style: preserve-3d;
    animation: wordmarkArrive 1.4s ease forwards;
}

@keyframes wordmarkArrive {
    from { opacity: 0; transform: translate3d(0, 70px, 0) rotateX(45deg) rotateZ(-45deg); }
    to { opacity: 1; transform: translate3d(0, 0, 0) rotateX(45deg) rotateZ(-45deg); }
}

.iso-wordmark,
.iso-shadow {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: clamp(4rem, 10vw, 9rem);
    line-height: 0.86;
    text-transform: lowercase;
}

.iso-wordmark {
    position: relative;
    z-index: 3;
    color: var(--warm);
    text-shadow: -1px 1px 0 #3ddc84, -2px 2px 0 #1de9b6, -4px 4px 0 rgba(123, 77, 219, 0.62), -24px 34px 50px rgba(0, 0, 0, 0.36);
}

.iso-shadow {
    position: absolute;
    inset: 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(106, 123, 140, 0.36);
}

.iso-shadow-one { transform: translate3d(18px, 18px, 0); }
.iso-shadow-two { transform: translate3d(34px, 34px, 0); opacity: 0.4; }

.language-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lingual {
    position: absolute;
    font-weight: 300;
    color: rgba(240, 234, 214, 0.78);
    text-shadow: 0 0 28px rgba(29, 233, 182, 0.24);
}

.hangul {
    left: 12%;
    top: 24%;
    font-family: var(--kr);
    font-size: clamp(3rem, 7vw, 6rem);
    transform: rotateX(45deg) rotateZ(-32deg) translateZ(20px);
}

.kana {
    right: 10%;
    bottom: 23%;
    font-family: var(--jp);
    font-size: clamp(2.5rem, 6vw, 5rem);
    transform: rotateX(45deg) rotateZ(-48deg) translateZ(-8px);
}

.annotation,
.section-kicker,
.folio-label,
.limit-folio span {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6a7b8c;
}

.limit-note {
    position: absolute;
    left: 52%;
    top: 18%;
    color: #6a7b8c;
}

.hero-botanical {
    position: absolute;
    width: min(560px, 72vw);
    right: 0;
    bottom: 1rem;
    opacity: 0.74;
    filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.26));
}

.draw-path {
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    transition: stroke-dashoffset 2.4s ease-in-out, opacity 0.8s ease, transform 0.8s var(--spring);
}

.is-visible .draw-path,
.drawn {
    stroke-dashoffset: 0;
}

.study,
.horizon {
    position: relative;
    isolation: isolate;
    background: var(--dark);
    padding: clamp(5rem, 9vw, 9rem) clamp(1rem, 5vw, 5rem);
}

.section-kicker {
    position: relative;
    z-index: 4;
    max-width: 1180px;
    margin: 0 auto 2rem;
}

.masonry {
    position: relative;
    z-index: 4;
    max-width: 1180px;
    margin: 0 auto;
    column-count: 3;
    column-gap: clamp(1rem, 2vw, 2rem);
}

.folio {
    position: relative;
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin: 0 0 clamp(1rem, 2vw, 2rem);
    padding: clamp(1.35rem, 2.5vw, 2.4rem);
    color: var(--dark);
    background: rgba(240, 234, 214, 0.92);
    border: 1px solid rgba(106, 123, 140, 0.2);
    box-shadow: 0 22px 58px rgba(13, 15, 20, 0.24);
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s ease, transform 0.4s var(--spring), box-shadow 0.4s ease;
}

.folio::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: translate(18px, 18px) skewY(-30deg);
    transform-origin: left top;
    background: linear-gradient(135deg, rgba(13, 15, 20, 0.34), rgba(13, 15, 20, 0));
}

.folio::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, rgba(61,220,132,0.08) 0%, transparent 70%);
    transition: opacity 0.4s ease;
}

.folio.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.folio:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 75px rgba(13, 15, 20, 0.34);
}

.folio:hover::after {
    opacity: 1;
}

.folio h2,
.folio h3,
.horizon-intro h2 {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.08;
    color: #1a3a4a;
    margin: 0.8rem 0 1rem;
}

.folio h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.folio h3 { font-size: clamp(1.35rem, 2.6vw, 2.05rem); }

.folio p + p { margin-top: 1rem; }
.folio em { color: #7b4ddb; font-style: normal; font-weight: 700; }

.folio.tall { min-height: 420px; }
.folio.small { min-height: 260px; }
.wide-note { margin-top: 3rem; }

.rose-corner::after {
    opacity: 1;
    background: radial-gradient(circle at 100% 0%, rgba(212, 160, 160, 0.28), transparent 44%);
}

.mini-iso,
.specimen-svg {
    width: 100%;
    margin: 1.2rem 0;
    filter: drop-shadow(8px 12px 18px rgba(13, 15, 20, 0.18));
}

.color-study ul {
    list-style: none;
    margin-top: 1.2rem;
}

.color-study li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(106, 123, 140, 0.22);
    padding: 0.55rem 0;
}

.color-study li:nth-child(1) b { color: #3ddc84; }
.color-study li:nth-child(2) b { color: #1de9b6; }
.color-study li:nth-child(3) b { color: #7b4ddb; }
.color-study li:nth-child(4) b { color: #1a3a4a; }
.color-study span { font-family: var(--mono); color: #6a7b8c; }

.garden-path {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(ellipse at 50% 25%, rgba(123, 77, 219, 0.2), transparent 56%), #0d0f14;
}

.garden-path::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.45;
    background-image:
        repeating-linear-gradient(30deg, rgba(106, 123, 140, 0.18) 0 1px, transparent 1px 38px),
        repeating-linear-gradient(150deg, rgba(106, 123, 140, 0.16) 0 1px, transparent 1px 38px);
}

.garden-stage {
    position: absolute;
    inset: -8% -4%;
    z-index: 2;
    transform: translate3d(0, var(--garden-offset, 0px), 0);
    transition: filter 0.8s ease;
}

.garden-path.is-visible .garden-stage {
    filter: saturate(1.25) brightness(1.08);
}

.garden-svg {
    width: 100%;
    height: 100%;
}

.hedge { filter: drop-shadow(0 0 18px rgba(29, 233, 182, 0.18)); }
.bud { transform-origin: center; }

.horizon {
    min-height: 110vh;
    padding-bottom: 7rem;
}

.horizon-intro,
.horizon-stack,
.final-bud {
    position: relative;
    z-index: 4;
    max-width: 920px;
    margin: 0 auto;
}

.horizon-intro h2 {
    color: var(--warm);
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    margin: 0.4rem 0 3rem;
}

.horizon-stack {
    display: grid;
    gap: 1rem;
}

.limit-folio {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: var(--dark);
    background: rgba(240, 234, 214, 0.92);
    border: 1px solid rgba(106, 123, 140, 0.2);
    transform-origin: center top;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.limit-folio:nth-child(1) { opacity: 1; transform: scale(0.98); }
.limit-folio:nth-child(2) { opacity: 0.85; transform: scale(0.96); }
.limit-folio:nth-child(3) { opacity: 0.7; transform: scale(0.94); }
.limit-folio:nth-child(4) { opacity: 0.5; transform: scale(0.92); }
.limit-folio:nth-child(5) { opacity: 0.3; transform: scale(0.9); }
.limit-folio:nth-child(6) { opacity: 0.15; transform: scale(0.88); }

.final-bud {
    display: grid;
    place-items: center;
    margin-top: 5rem;
    color: rgba(240, 234, 214, 0.78);
    font-family: var(--jp);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
}

.final-bud svg {
    width: min(220px, 50vw);
    opacity: 0.78;
}

@media (max-width: 980px) {
    .masonry { column-count: 2; }
    .hero-field { min-height: 560px; }
    .hero-botanical { right: -8vw; width: min(500px, 80vw); }
}

@media (max-width: 640px) {
    .threshold { min-height: 92vh; }
    .hero-field { width: 92vw; min-height: 520px; padding: 3rem 0; }
    .iso-wordmark-wrap { transform: rotateX(45deg) rotateZ(-38deg); }
    .hangul { left: 3%; top: 14%; }
    .kana { right: 0; bottom: 14%; }
    .limit-note { left: 8%; top: auto; bottom: 8%; }
    .hero-botanical { width: 96vw; right: -26vw; bottom: 4rem; }
    .masonry { column-count: 1; }
    .folio.tall { min-height: auto; }
    .garden-path { min-height: 56vh; }
    .limit-folio { grid-template-columns: 1fr; }
}
