/* ============================================================
   glolos.com — softened-vaporwave atlas of localization
   triadic palette: cherry-blossom dusk × wisteria lilac × sage moss
   ============================================================ */

:root {
    --cherry: #F4B4C7;     /* cherry blossom dusk */
    --wisteria: #C2A6E0;   /* wisteria lilac */
    --sage: #B4D8C5;       /* sage moss tea */
    --cream: #FFF1E8;      /* cream linen */
    --plum: #3B2230;       /* plum ink */
    --coral: #E07A9E;      /* coral signal — rationed */
    --mauve: #7A5B7A;      /* mauve hush */
    --peach: #FBE4D0;      /* peach mist */

    --display: 'Quicksand', 'Inter', system-ui, sans-serif;
    --romance: 'Fraunces', 'Lora', Georgia, serif;
    --body: 'Nunito', 'Inter', system-ui, sans-serif;
    --mono: 'Space Mono', 'JetBrains Mono', monospace;

    --ease: cubic-bezier(0.32, 0.05, 0.30, 0.99);
    --locale-tint: 0deg;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    color: var(--plum);
    background: var(--cream);
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: -0.005em;
    overflow-x: hidden;
    min-height: 100vh;
    filter: hue-rotate(var(--locale-tint));
    transition: filter 1.2s var(--ease);
}

/* ============================================================
   STRATUM BASE
   ============================================================ */

.stratum {
    width: 100%;
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 96px);
    display: flex;
    flex-direction: column;
}

/* ============================================================
   STRATUM 1 — DRIFTING HEADER
   ============================================================ */

.stratum--header {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(244, 180, 199, 0.55) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(194, 166, 224, 0.45) 0%, transparent 60%),
        linear-gradient(180deg, var(--cream) 0%, var(--peach) 50%, #FAD8E0 100%);
    justify-content: center;
    align-items: center;
}

.canopy-fog,
.canopy-haze {
    position: absolute;
    inset: -20%;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: canopy-drift 60s var(--ease) infinite alternate;
}

.canopy-fog {
    background: radial-gradient(circle at 40% 50%, var(--cherry), transparent 60%);
}

.canopy-haze {
    background: radial-gradient(circle at 60% 40%, var(--wisteria), transparent 65%);
    animation-duration: 72s;
    animation-direction: alternate-reverse;
}

@keyframes canopy-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(4%, -3%) scale(1.06); }
    100% { transform: translate(-3%, 5%) scale(1.02); }
}

.header-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 56ch;
}

.wordmark {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(5rem, 13vw, 11rem);
    letter-spacing: -0.025em;
    line-height: 1;
    margin: 0 0 clamp(20px, 3vw, 40px);
    text-transform: lowercase;
    background: linear-gradient(120deg, var(--cherry) 0%, var(--wisteria) 50%, var(--sage) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hue-breathe 60s linear infinite;
    display: inline-block;
}

.wordmark-letter {
    display: inline-block;
}

.wordmark-letter--coral {
    background: linear-gradient(180deg, var(--coral), var(--cherry));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes hue-breathe {
    0%   { filter: hue-rotate(-4deg); }
    50%  { filter: hue-rotate(4deg); }
    100% { filter: hue-rotate(-4deg); }
}

.hero-line {
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    color: var(--mauve);
    line-height: 1.6;
    max-width: 48ch;
    margin: 0 auto;
}

.hero-canopy {
    position: absolute;
    bottom: 8%;
    left: 0;
    right: 0;
    width: 100%;
    height: 40%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
}

.hero-canopy-paths {
    fill: none;
    stroke: var(--plum);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
}

.canopy-scrollhint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--mauve);
    letter-spacing: 0.18em;
    text-transform: lowercase;
    opacity: 0.6;
    z-index: 2;
}

/* ============================================================
   PATH-DRAW COMMON
   ============================================================ */

.draw-path {
    fill: none;
    stroke: var(--plum);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 14s var(--ease);
}

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

.seam-path {
    stroke: var(--coral);
    stroke-width: 1.1;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 0.4s var(--ease);
}

.seam.is-drawn .seam-path {
    stroke-dashoffset: 0;
}

.hero-path {
    stroke: var(--mauve);
    stroke-width: 1.3;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 14s var(--ease);
}

.hero-traverse {
    stroke: var(--coral);
    stroke-width: 1.2;
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
    transition: stroke-dashoffset 14s var(--ease);
}

.is-drawn .hero-path,
.is-drawn .hero-traverse {
    stroke-dashoffset: 0;
}

.dusk-path {
    stroke: var(--cherry);
    stroke-width: 1.2;
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    transition: stroke-dashoffset 18s var(--ease);
}

.dusk-botany {
    fill: none;
    stroke: var(--mauve);
    stroke-width: 1.1;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 18s var(--ease) 1.5s;
}

.is-drawn .dusk-path,
.is-drawn .dusk-botany {
    stroke-dashoffset: 0;
}

.loom-path {
    stroke: var(--plum);
    stroke-width: 1.2;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 8s var(--ease);
}

.loom-path--ivy {
    stroke: var(--sage);
    stroke-width: 1.3;
    transition-delay: 2s;
}

.is-drawn .loom-path {
    stroke-dashoffset: 0;
}

/* ============================================================
   SEAMS
   ============================================================ */

.seam {
    width: 100%;
    height: 60px;
    position: relative;
    overflow: hidden;
    background: var(--cream);
    display: flex;
    align-items: center;
}

.seam svg {
    width: 100%;
    height: 100%;
    display: block;
}

.seam--thread {
    height: 40px;
}

.seam--wire {
    height: 80px;
}

.seam--prints svg {
    color: var(--cherry);
}

.seam--prints .seam-path {
    stroke: var(--cherry);
}

.seam--leaves .seam-path {
    stroke: var(--sage);
}

/* ============================================================
   STRATUM 2 — LOCALITY LOOM
   ============================================================ */

.stratum--loom {
    background:
        linear-gradient(180deg, var(--cream) 0%, #FBE7DD 100%);
    padding-top: clamp(60px, 8vw, 120px);
    padding-bottom: clamp(60px, 8vw, 120px);
}

.loom-grid {
    display: grid;
    grid-template-columns: 32% 36% 32%;
    gap: clamp(20px, 3vw, 60px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: stretch;
}

.loom-panel {
    position: relative;
    padding: clamp(20px, 3vw, 40px);
    border-radius: 4px;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.loom-panel--left {
    background:
        repeating-linear-gradient(0deg,
            transparent 0,
            transparent 24px,
            rgba(122, 91, 122, 0.04) 24px,
            rgba(122, 91, 122, 0.04) 25px),
        var(--peach);
    border: 1px solid rgba(122, 91, 122, 0.12);
}

.loom-eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-bottom: 16px;
}

.loom-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    line-height: 1.15;
    color: var(--plum);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    max-width: 22ch;
}

.loom-prose {
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--mauve);
    line-height: 1.65;
    max-width: 32ch;
    margin-bottom: 32px;
}

.loom-svg {
    display: block;
}

.loom-svg--leaf {
    width: 50%;
    max-width: 160px;
    margin: 12px 0 24px auto;
}

.loom-svg--cup {
    width: 45%;
    max-width: 140px;
    margin: 12px auto 0 0;
}

.loom-svg--circuit {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

.loom-panel--center {
    background: var(--cream);
    border: 1px solid rgba(122, 91, 122, 0.12);
    align-items: center;
    justify-content: center;
}

.loom-panel--right {
    background: linear-gradient(180deg, #F0DCEA 0%, #E8D2E6 60%, #DFC8DF 100%);
    border: 1px solid rgba(122, 91, 122, 0.12);
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

.sky-block {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.sky-cloud {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 241, 232, 0.7);
    filter: blur(20px);
}

.sky-cloud--a {
    width: 50%;
    height: 30%;
    top: 18%;
    left: -12%;
    animation: cloud-drift 56s linear infinite;
}

.sky-cloud--b {
    width: 60%;
    height: 25%;
    top: 48%;
    left: 30%;
    animation: cloud-drift 88s linear infinite;
    animation-delay: -20s;
    background: rgba(251, 228, 208, 0.6);
}

.sky-cloud--c {
    width: 40%;
    height: 22%;
    top: 70%;
    left: 10%;
    animation: cloud-drift 70s linear infinite;
    animation-delay: -40s;
    background: rgba(244, 180, 199, 0.45);
}

@keyframes cloud-drift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(140%); }
}

.loom-aside {
    position: relative;
    z-index: 2;
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    color: var(--plum);
    line-height: 1.65;
    max-width: 24ch;
    text-align: right;
    padding: 16px;
    background: rgba(255, 241, 232, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 2px;
}

/* ============================================================
   STRATUM 3 — THE TWELVE CITIES CROSSFADE
   ============================================================ */

.stratum--cities {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 50%, #F0CCDA 0%, #E2BAD8 60%, #D4A8CF 100%);
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cities-stage {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 40px;
}

.cities-greeting {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    transition: opacity 1.2s var(--ease);
}

.cities-greeting.is-fading {
    opacity: 0;
}

.cities-line {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.25;
    color: var(--plum);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 24ch;
}

.cities-locale {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.18em;
    text-transform: lowercase;
}

.cities-ornament {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    transition: opacity 1.2s var(--ease);
}

.cities-ornament.is-fading {
    opacity: 0;
}

.cities-ornament .ornament-group {
    fill: none;
    stroke: var(--plum);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cities-footnote {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.06em;
    margin-top: 40px;
}

.cities-pips {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 28px;
}

.cities-pip {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(59, 34, 48, 0.18);
    transition: background 0.6s var(--ease), transform 0.6s var(--ease);
}

.cities-pip.is-active {
    background: var(--coral);
    transform: scale(1.6);
}

/* ============================================================
   STRATUM 4 — THE DUSK CIRCUIT
   ============================================================ */

.stratum--dusk {
    background:
        linear-gradient(180deg, #F2DCD6 0%, #ECCFC8 100%);
    padding-top: clamp(60px, 8vw, 120px);
    padding-bottom: clamp(60px, 8vw, 120px);
}

.dusk-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.dusk-eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.18em;
    text-transform: lowercase;
    margin-bottom: 20px;
}

.dusk-thesis {
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    line-height: 1.4;
    color: var(--plum);
    max-width: 28ch;
    margin: 0 auto 60px;
}

.dusk-svg {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

/* ============================================================
   STRATUM 5 — THE LOCAL HOURS
   ============================================================ */

.stratum--hours {
    background:
        linear-gradient(180deg, var(--peach) 0%, var(--cream) 60%, #F8E2DA 100%);
    padding-top: clamp(60px, 8vw, 120px);
    padding-bottom: clamp(60px, 8vw, 120px);
}

.hours-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hours-eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.18em;
    text-transform: lowercase;
    margin-bottom: 20px;
}

.hours-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.15;
    color: var(--plum);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hours-prose {
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--mauve);
    line-height: 1.6;
    max-width: 48ch;
    margin: 0 auto 60px;
}

.cottages {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 24px;
    width: 100%;
    margin-bottom: 60px;
}

.cottage {
    position: relative;
    text-align: center;
    padding: 12px 4px;
}

.cottage-svg {
    width: 100%;
    height: auto;
    max-width: 100px;
    margin: 0 auto;
    display: block;
}

.cottage-body {
    fill: none;
    stroke: var(--plum);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cottage-window {
    fill: var(--cream);
    stroke: var(--plum);
    stroke-width: 1;
    transition: fill 1.2s var(--ease), filter 1.2s var(--ease);
}

.cottage.is-dusk .cottage-window {
    fill: var(--coral);
    filter: drop-shadow(0 0 1px var(--coral));
}

.cottage-city {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--plum);
    letter-spacing: 0.06em;
    margin-top: 8px;
    text-transform: lowercase;
}

.cottage-time {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--mauve);
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.cottage.is-dusk .cottage-time {
    color: var(--coral);
}

.hours-footnote {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.06em;
    margin-top: 24px;
}

@media (max-width: 1100px) {
    .cottages { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 800px) {
    .cottages { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 500px) {
    .cottages { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   STRATUM 6 — THE CLOSING FIELD
   ============================================================ */

.stratum--closing {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 30%, var(--peach) 0%, var(--cream) 50%, #F8E0D0 100%);
    justify-content: flex-end;
    align-items: flex-start;
    padding: clamp(40px, 6vw, 96px);
}

.closing-inner {
    margin-top: auto;
}

.closing-mark {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.025em;
    line-height: 1;
    text-transform: lowercase;
    background: linear-gradient(120deg, var(--cherry) 0%, var(--wisteria) 50%, var(--sage) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.closing-line {
    font-family: var(--romance);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--mauve);
    line-height: 1.5;
    max-width: 36ch;
}

/* ============================================================
   FOOTER STRIP
   ============================================================ */

.footer-strip {
    background: var(--cream);
    border-top: 1px solid rgba(122, 91, 122, 0.18);
    padding: 24px clamp(40px, 6vw, 96px);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--mauve);
    letter-spacing: 0.04em;
}

.footer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-key {
    color: var(--mauve);
    text-transform: lowercase;
    opacity: 0.7;
}

.footer-val {
    color: var(--plum);
    font-family: var(--mono);
    font-size: 13px;
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(122, 91, 122, 0.3);
    padding: 2px 0;
    cursor: pointer;
    text-decoration: none;
}

select.footer-val {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 16px;
    background-image: linear-gradient(45deg, transparent 50%, var(--mauve) 50%), linear-gradient(135deg, var(--mauve) 50%, transparent 50%);
    background-position: calc(100% - 8px) 50%, calc(100% - 4px) 50%;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

.sound-toggle {
    background: transparent;
    border: 1px dashed rgba(122, 91, 122, 0.3);
    padding: 4px 10px;
    color: var(--mauve);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.sound-toggle:hover {
    color: var(--coral);
    border-color: var(--coral);
}

.sound-glyph {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(122, 91, 122, 0.3);
    transition: background 0.4s var(--ease);
}

.sound-toggle.is-on .sound-glyph {
    background: var(--coral);
    box-shadow: 0 0 0 2px rgba(224, 122, 158, 0.2);
}

.signature-glyph {
    width: 60px;
    height: 22px;
    color: var(--mauve);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .draw-path,
    .seam-path,
    .hero-path,
    .hero-traverse,
    .dusk-path,
    .dusk-botany,
    .loom-path {
        stroke-dashoffset: 0 !important;
    }

    .canopy-fog,
    .canopy-haze,
    .sky-cloud {
        animation: none !important;
    }
}

/* ============================================================
   RESPONSIVE — STACK LOOM ON SMALL SCREENS
   ============================================================ */

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

    .loom-panel {
        min-height: 60vh;
    }

    .loom-panel--right {
        min-height: 40vh;
    }
}

@media (max-width: 600px) {
    .stratum {
        padding: clamp(32px, 6vw, 60px) 20px;
    }

    .footer-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}
