/* =====================================================================
   HAULAT - landing stylesheet  (assets/css/index.css)
   Skylrk grain field × Neighborhood brutalism, on Haulat's bones:
   Akira display, DotGothic labels, Inter body, dotted matrix retained.
   ===================================================================== */

/* ---- Akira for every heading (retained convention) ----

   The src is ROOT-RELATIVE, not https://hau.lat/…. An absolute URL to
   the production host meant the font only ever loaded on production:
   every local, staging and preview build silently fell through to Inter,
   so the one thing that makes Haulat look like Haulat was the one thing
   nobody could see while building it. Fonts are same-origin here, so a
   relative path also skips the CORS preflight the absolute one needed.

   Loaded once, in index.css, which every layout pulls in before app.css
   — so the app's --f-display: 'Akira' resolves against this @font-face
   rather than declaring a second one that could drift. */
@font-face {
    font-family: 'Akira';
    src: url('/assets/font/akira.otf') format('opentype');
    font-weight: 400 900;
    font-display: swap;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Akira', 'Inter', sans-serif; text-transform: uppercase; }

/* Akira is a Latin display face with no CJK coverage. Left alone, a
   Chinese or Japanese heading renders Latin characters in Akira and
   everything else in whatever the browser substitutes — two typefaces
   inside one line. These locales get the body face at display weight
   instead, which is the same rule .card-title already followed. */
html[lang="zh-Hant"] :is(h1, h2, h3, h4, h5, h6),
html[lang="ja"] :is(h1, h2, h3, h4, h5, h6) {
    font-family: 'Inter', 'PingFang TC', 'Hiragino Sans', 'Microsoft JhengHei', sans-serif;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

/* The uppercase above is the LANDING page's convention and stops at the
   landing page. app.css restates the typeface for html.app without it —
   the app puts people's own names in headings and the landing page
   never does. */
html.app :is(h1, h2, h3, h4, h5, h6) { text-transform: none; }

/* `.hidden` comes from the Tailwind CDN, and the header's logo fallback
   depends on it: the <img> is shown, and a text wordmark sits next to it
   carrying `hidden`, revealed by onerror only if the image fails.

   If the CDN is slow, blocked, or down, `.hidden` has no rule — so the
   fallback is visible at the same time as the logo and the header reads
   "HAULAT HAULAT". A fallback that appears when nothing has failed is
   worse than no fallback. One line, in our own stylesheet, so the
   header does not depend on a third party to look right. */
.hidden { display: none !important; }

html { scroll-behavior: smooth; }
::-webkit-scrollbar { display: none; }
/* The page paints its own field over this; it only shows for the
   instant before #grain-field lands, and on a light-only page a flash
   of oxblood is a flash of the wrong product. */
body { -ms-overflow-style: none; scrollbar-width: none; background: #FBEFF0; }

/* =====================================================================
   SCROLL PROGRESS - retained, recut for the red field
   ===================================================================== */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: #111111; z-index: 60;
    box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}

/* =====================================================================
   GRAIN FIELD - the Skylrk move. Two drifting radial blobs of deep red
   through signal red into dusty pink, with animated film grain over the
   top (SVG feTurbulence, stepped shimmer). Pure CSS: zero JS cost.
   ===================================================================== */
/* ─────────────────────────────────────────────────────────────────────
   THE FIELD IS NOW THE APP'S FIELD.

   This used to be a red gradient — #6E0B12 → #B01620 → #D96A75 — while
   the signed-in app sat on near-black (#0A0507 → #060304). Signing in
   was a hard cut from a red room to a black one, which made the app feel
   like a different product rather than further inside the same one.

   Same near-black ground now, with the oxblood kept where it always did
   the work: as light. The blobs below are the SAME four positions and
   the same drift, re-alpha'd to read as glow on black rather than as
   stains on red. Nothing about the motion changed.

   Light mode is untouched further down — a pale landing over a pale app
   already agreed with itself.
   ───────────────────────────────────────────────────────────────────── */
#grain-field {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background: linear-gradient(168deg, #0A0507 0%, #12080B 46%, #060304 100%);
}
#grain-field::before {
    content: ''; position: absolute; inset: -25%;
    background:
        /* Halved again after looking at the two side by side. The first
           pass kept the app's near-black STOPS but left the blobs strong
           enough that the page still read maroon next to an app that
           reads black-with-a-glow. Matching the base colour is not
           matching the field — what you see is mostly the blobs. */
        radial-gradient(42% 46% at 24% 30%, rgba(215, 25, 33, .17) 0%, rgba(215, 25, 33, 0) 70%),
        radial-gradient(50% 55% at 78% 22%, rgba(110, 11, 18, .24) 0%, rgba(110, 11, 18, 0) 72%),
        radial-gradient(46% 50% at 68% 82%, rgba(232, 80, 92, .10) 0%, rgba(232, 80, 92, 0) 70%),
        radial-gradient(38% 42% at 38% 88%, rgba(176, 22, 32, .16) 0%, rgba(176, 22, 32, 0) 68%);
    animation: field-drift 26s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes field-drift {
    0%   { transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1); }
    50%  { transform: translate3d(2.5%, 3%, 0) rotate(2.5deg) scale(1.06); }
    100% { transform: translate3d(-1.5%, 1.5%, 0) rotate(-2deg) scale(1.03); }
}
#grain-field::after {
    content: ''; position: absolute; inset: -60px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    /* `overlay` was correct against the old red field and is worthless
       against this one: overlay resolves toward the BACKDROP, and a
       near-black backdrop pulls mid-grey noise straight back down to
       black. The grain vanished the moment the field went dark.

       `screen` is the dark-ground equivalent — it only ever lifts, so
       the noise reads as light in the shadows rather than dirt on them.
       It needs about a third of the opacity to land at the same
       strength, because screen against black is nearly the full value
       of the blend layer. */
    opacity: .07; mix-blend-mode: screen; pointer-events: none;
    animation: grain-shift 1.1s steps(5) infinite;
}
@keyframes grain-shift {
    0% { transform: translate(0, 0); } 20% { transform: translate(-18px, 12px); }
    40% { transform: translate(14px, -20px); } 60% { transform: translate(-10px, -14px); }
    80% { transform: translate(18px, 16px); } 100% { transform: translate(0, 0); }
}

/* =====================================================================
   DOTTED MATRIX - retained device: a translucent white dot lattice
   floating above the grain, beneath everything else.
   ===================================================================== */
#dot-overlay {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1.4px, transparent 1.4px);
    background-size: 38px 38px;
}
/* light cells keep the original dark-dot lattice */
.dot-grid {
    background-image: radial-gradient(rgba(17, 17, 17, .10) 1.3px, transparent 1.3px);
    background-size: 26px 26px;
}

/* =====================================================================
   MODEL STAGE - fixed, behind content, above grain + dots
   ===================================================================== */
#model-stage {
    position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%;
    pointer-events: none;
}
/* =====================================================================
   HEADER - SKYLRK-grade glass: a wide brand pill, a toggle pill whose
   plus spins into a close, and the menu hanging directly beneath.
   The logo ships black, so it's inverted to white in CSS - no new asset.
   ===================================================================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    width: 100%; max-width: 1120px; margin: 0 auto;
    padding: 14px clamp(12px, 3vw, 22px) 0;
    pointer-events: none;
}
.hdr-row { display: flex; gap: 10px; align-items: stretch; pointer-events: auto; }
.hdr-pill {
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(20px) saturate(1.25);
    box-shadow: 0 10px 30px rgba(30, 4, 8, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.hdr-brand {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 15px 26px; min-height: 56px;
}
.hdr-logo {
    height: 30px; width: auto; pointer-events: none;
    filter: brightness(0) invert(1);              /* black asset → white */
}
.hdr-wordmark {
    font-family: 'Akira', sans-serif; color: #FFFFFF;
    font-size: 15px; letter-spacing: .32em; text-transform: uppercase;
}
.hdr-social {
    flex: 0 0 auto; display: flex; align-items: center; gap: 2px;
    padding: 0 10px; min-height: 56px;
}
.hdr-social a {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #FFFFFF; transition: background .16s ease;
}
.hdr-social a:hover { background: rgba(255, 255, 255, .2); }

/* .hdr-lang is gone. The language switcher lives in the menu now: see
   .menu-lang below. .lang-opt stays, because it is the same three
   options wearing the same shape, just somewhere with room for them. */
.lang-opt {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 30px; padding: 0 7px; border-radius: 999px;
    font-family: 'JetBrains Mono', 'PingFang TC', 'Hiragino Sans', 'Microsoft JhengHei', ui-monospace, monospace;
    font-size: 11px; letter-spacing: .08em; text-decoration: none;
    color: rgba(255, 255, 255, .62);
    transition: color .16s ease, background .16s ease;
}
.lang-opt:hover { color: #FFFFFF; }
.lang-opt.on { color: #111111; background: rgba(255, 255, 255, .92); font-weight: 700; }

.hdr-toggle {
    flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
    padding: 0 20px; min-height: 56px; cursor: pointer;
    color: #FFFFFF; -webkit-tap-highlight-color: transparent;
}
.hdr-locale {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
    letter-spacing: .18em; color: rgba(255, 255, 255, .9);
}
.hdr-plus { position: relative; width: 17px; height: 17px; display: block; }
.hdr-plus .bar {
    position: absolute; top: 50%; left: 50%; background: #FFFFFF; border-radius: 2px;
    transform-origin: center;
}
.hdr-plus .bar-h { width: 17px; height: 2px; transform: translate(-50%, -50%); }
.hdr-plus .bar-v { width: 2px; height: 17px; transform: translate(-50%, -50%); }
.hdr-plus { transition: transform .42s cubic-bezier(.22,1,.36,1); }
.site-header.open .hdr-plus { transform: rotate(135deg); }   /* + spins into × */

/* the panel: hangs under the header, glass, rounded hard */
.menu-panel {
    pointer-events: none; opacity: 0;
    transform: translateY(-10px) scale(.985);
    transform-origin: top center;
    transition: opacity .3s ease, transform .35s cubic-bezier(.22,1,.36,1);
    margin-top: 10px; padding: 12px 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .5);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    box-shadow: 0 22px 50px rgba(30, 4, 8, .34), inset 0 1px 0 rgba(255, 255, 255, .5);
    max-height: calc(100svh - 120px); overflow-y: auto;
}
.site-header.open .menu-panel { pointer-events: auto; opacity: 1; transform: translateY(0) scale(1); }
.menu-row {
    display: flex; width: 100%; align-items: center; justify-content: space-between;
    padding: 11px 20px; background: none; border: 0; cursor: pointer;
    font-family: 'Inter', sans-serif; font-weight: 700;
    font-size: clamp(1.35rem, 4.6vw, 1.75rem); letter-spacing: -.01em;
    color: #FFFFFF; text-decoration: none; text-transform: uppercase;
    transition: padding-left .2s ease, opacity .2s ease;
}
.menu-row:hover { padding-left: 27px; opacity: .82; }
.menu-arrow { font-size: .8em; opacity: .85; }
/* ---- language, inside the menu ----
   A setting, not a destination, so it does not wear the uppercase type
   or the arrow that every navigation row here has. Label on the left,
   options on the right, a hairline above it to separate the two kinds
   of thing. */
.menu-sep {
    display: block; height: 1px; margin: 10px 20px 4px;
    background: rgba(255, 255, 255, .28);
}
.menu-lang {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 20px 2px;
}
.menu-lang-k {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
    color: rgba(255, 255, 255, .7); white-space: nowrap;
}
.menu-lang-opts { display: flex; align-items: center; gap: 4px; }

/* 44px of target on 30px of paint. These are the smallest things in the
   menu and the only ones somebody taps with a thumb while holding a
   phone one-handed. */
.menu-lang .lang-opt { position: relative; min-width: 42px; height: 32px; font-size: 12px; }
.menu-lang .lang-opt::after {
    content: ''; position: absolute; left: 0; right: 0;
    top: 50%; transform: translateY(-50%); height: 44px;
}

/* CJK options are two glyphs where EN is two letters, and the mono face
   carries neither. Let them use the system CJK stack so 繁 and JP sit on
   the same baseline at the same weight. */
.menu-lang .lang-opt[lang="zh-Hant"],
.menu-lang .lang-opt[lang="ja"] { font-family: var(--cjk, sans-serif); letter-spacing: .04em; }

.menu-meta {
    display: block; padding: 14px 20px 2px;
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
    letter-spacing: .28em; color: rgba(255, 255, 255, .7);
}

/* =====================================================================
   FOOTER - glass pill. Fixed to the bottom on mobile (thumb country),
   parked at the document's end on desktop.
   ===================================================================== */
.site-footer { position: relative; z-index: 40; width: 100%; padding: 0 12px 14px; }
.footer-pill {
    max-width: 1120px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 13px 22px; border-radius: 999px;
    background: rgba(255, 255, 255, .17);
    border: 1px solid rgba(255, 255, 255, .5);
    backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(20px) saturate(1.25);
    box-shadow: 0 12px 34px rgba(30, 4, 8, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.footer-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.footer-logo { height: 13px; filter: brightness(0) invert(1); }
.footer-tag {
    font-family: 'Inter', sans-serif; font-size: 9.5px; font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .8);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a {
    font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
    text-decoration: none; transition: color .15s ease;
}
.footer-links a:hover { color: #FFFFFF; }
.footer-copy {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px;
    letter-spacing: .2em; color: rgba(255, 255, 255, .6);
}
@media (max-width: 767px) {
    .site-footer { position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
    .footer-pill { padding: 11px 18px; justify-content: center; }
    .footer-brand, .footer-copy { display: none; }
    .footer-links { gap: 20px; }
    body { padding-bottom: 78px; }
}

/* =====================================================================
   COOKIE BAR - glass slab, mono voice, ghost + solid actions
   ===================================================================== */
.cookie-bar {
    position: fixed; z-index: 55;
    left: 12px; right: 12px; bottom: 12px;
    max-width: 620px; margin: 0 auto;
    padding: 20px 22px 18px; border-radius: 24px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .5);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    box-shadow: 0 22px 50px rgba(30, 4, 8, .36), inset 0 1px 0 rgba(255, 255, 255, .5);
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1);
}
.cookie-bar.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cookie-copy {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; line-height: 1.65;
    letter-spacing: .12em; text-transform: uppercase; color: #FFFFFF;
    margin-bottom: 16px;
}
.cookie-actions { display: flex; gap: 12px; }
.cookie-btn {
    flex: 1; padding: 13px 10px; border-radius: 12px; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase;
    transition: transform .15s ease, background .15s ease;
}
.cookie-btn:active { transform: translateY(1px); }
.cookie-btn-ghost {
    color: #FFFFFF; background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .55);
}
.cookie-btn-ghost:hover { background: rgba(255, 255, 255, .3); }
.cookie-btn-solid { color: #4a4f57; background: #F4F5F7; border: 1px solid #FFFFFF; }
.cookie-btn-solid:hover { background: #FFFFFF; }
@media (max-width: 767px) { .cookie-bar { bottom: 84px; } }

/* =====================================================================
   WALLPAPERS - glass panel, one row per format
   ===================================================================== */
.wp-modal { position: fixed; inset: 0; z-index: 70; display: none; }
.wp-modal.on { display: block; }
.wp-scrim { position: absolute; inset: 0; background: rgba(30, 4, 8, .45); }
.wp-panel {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(92vw, 460px); max-height: 88svh; overflow-y: auto;
    padding: 22px 20px 18px; border-radius: 30px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .5);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    box-shadow: 0 30px 70px rgba(30, 4, 8, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.wp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wp-title {
    font-family: 'Inter', sans-serif; font-weight: 800; font-size: 17px;
    letter-spacing: .02em; text-transform: uppercase; color: #FFFFFF;
}
.wp-close { font-size: 26px; line-height: 1; color: #FFFFFF; background: none; border: 0; cursor: pointer; opacity: .85; }
.wp-close:hover { opacity: 1; }
.wp-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; margin-bottom: 12px; border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .4);
    color: #FFFFFF; text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}
.wp-row:hover { background: rgba(255, 255, 255, .27); transform: translateY(-1px); }
.wp-thumb {
    display: block; flex: 0 0 auto; overflow: hidden; border-radius: 10px;
    background: linear-gradient(150deg, #B01620, #D96A75);
    border: 1px solid rgba(255, 255, 255, .35);
}
.wp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wp-thumb img.wp-img-missing { opacity: 0; }        /* placeholder gradient shows through */
.wp-thumb-tall { width: 52px; height: 92px; }
.wp-thumb-mid  { width: 68px; height: 92px; }
.wp-thumb-wide { width: 132px; height: 82px; }
.wp-label {
    margin-left: auto; font-family: 'Inter', sans-serif; font-weight: 600;
    font-size: 15px; letter-spacing: .02em; text-transform: uppercase;
}
.wp-dl { flex: 0 0 auto; opacity: .9; }
.wp-note {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; line-height: 1.7;
    letter-spacing: .08em; color: rgba(255, 255, 255, .78); padding: 4px 4px 0;
}

/* =====================================================================
   TYPE - Neighborhood-scale display over the field
   ===================================================================== */
.hero-title {
    color: #FFFFFF; font-weight: 800;
    font-size: clamp(2.6rem, 9.5vw, 6.2rem);
    line-height: .95; letter-spacing: -0.01em;
    text-shadow: 0 4px 40px rgba(30, 4, 8, .35);
}
.stroke-white {
    color: transparent;
    -webkit-text-stroke: 2px #FFFFFF;
}
.finale-title {
    color: #FFFFFF; font-size: clamp(1.9rem, 6.5vw, 4rem);
    line-height: 1.02; text-shadow: 0 4px 40px rgba(30, 4, 8, .35);
}
.v-rail {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    font-family: 'Akira', sans-serif; font-size: 11px;
    letter-spacing: .5em; color: rgba(255, 255, 255, .55);
    text-transform: uppercase; user-select: none; z-index: 10;
}

/* =====================================================================
   META CHIPS + BRUTAL BUTTONS
   ===================================================================== */
.meta-chip {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px;
    letter-spacing: .22em; text-transform: lowercase;
    color: #FFFFFF; background: rgba(17, 17, 17, .45);
    border: 1px solid rgba(255, 255, 255, .35);
    padding: 6px 12px; border-radius: 4px; backdrop-filter: blur(6px);
}
.meta-chip-red { background: #D71921; border-color: #D71921; }

/* The solid CTA is frosted glass, same as .hdr-pill and .footer-pill —
   a fill, a hairline, a backdrop blur. It was the only flat rectangle on
   a page built entirely from glass.

   .82 is the contrast floor: the field's blobs drift, so a thinner fill
   would drop #111 text below 4.5:1 only when a bright blob happens to be
   behind the button — an intermittent failure that would never show up
   in a screenshot. */
.btn-primary {
    display: inline-block; color: #111111;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .55);
    backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(20px) saturate(1.25);
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .25em;
    padding: 17px 26px; border-radius: 14px;
    box-shadow: 0 10px 30px rgba(30, 4, 8, .30), inset 0 1px 0 rgba(255, 255, 255, .65);
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn-primary:hover { background: rgba(255, 255, 255, .93); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }
@supports not (backdrop-filter: blur(1px)) {
    .btn-primary { background: #FFFFFF; }
}
.btn-glass {
    display: inline-block; color: #FFFFFF;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .45);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .25em;
    padding: 16px 26px; border-radius: 14px;
    transition: background .15s ease, transform .15s ease;
}
.btn-glass:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.btn-glass:active { transform: translateY(1px); }

/* =====================================================================
   CELLS - Neighborhood's hard-border editorial grid
   ===================================================================== */
.cell-frame {
    border-radius: 34px; overflow: hidden;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .45);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    box-shadow: 0 24px 60px rgba(30, 4, 8, .34), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cell {
    padding: 30px 28px; position: relative; color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.cell:last-child { border-bottom: 0; }
@media (min-width: 768px) {
    .cell-frame.md\:grid-cols-3 > .cell { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .22); }
    .cell-frame.md\:grid-cols-3 > .cell:last-child { border-right: 0; }
}
.cell .dot-grid, .cell.dot-grid {
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1.3px, transparent 1.3px);
    background-size: 26px 26px;
}
.cell-index {
    position: absolute; top: 14px; right: 16px;
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9.5px;
    letter-spacing: .16em; color: rgba(255, 255, 255, .6);
}
.cell-title { font-size: 1.15rem; line-height: 1.15; margin: 14px 0 10px; color: #FFFFFF; }
.cell-copy {
    font-family: 'Inter', sans-serif; font-size: .82rem;
    color: rgba(255, 255, 255, .82); line-height: 1.65; margin-bottom: 20px;
}
.cell-cta {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
    letter-spacing: .12em; text-transform: lowercase; color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, .5); padding-bottom: 3px;
    transition: color .15s ease, border-color .15s ease;
}
.cell-cta:hover { color: #FFD9DC; border-color: #FFD9DC; }

/* =====================================================================
   LOOKBOOK - the scatter. Full-bleed and transparent over the grain:
   drops pinned at seeded positions like prints on a wall, a random few
   soft-blurred until chosen. No animation loop at all - the only motion
   is a slow transform-only bob, composited on the GPU, kind to old
   MacBooks and phones alike. Tap to choose (it sharpens, the rest
   soften); tap the chosen piece again to cop it.
   ===================================================================== */
.scatter-stage {
    position: relative; width: 100%;
    height: 100svh; min-height: 620px;
    overflow: hidden;
}
.g-card {
    position: absolute;
    width: min(40vw, 212px);
    background: #FFFFFF;
    border: 1px solid rgba(17, 17, 17, .10);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(30, 4, 8, .26);
    padding: 8px 8px 10px;
    text-decoration: none;
    transform: rotate(var(--rot, 0deg));
    transition: filter .35s ease, transform .25s ease, box-shadow .25s ease;
}
.g-card:hover { filter: none; transform: rotate(var(--rot, 0deg)) scale(1.03); z-index: 200 !important; }
.g-bob {
    display: block;
    animation: bob var(--dur, 8s) ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(6px); } }
.g-card img {
    display: block; width: 100%; aspect-ratio: 3 / 4;
    object-fit: cover; background: #EDEBE8;
    border-radius: 10px; pointer-events: none;
}
.g-blur { filter: blur(4px); }
.g-sel {
    filter: none !important;
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 24px 54px rgba(30, 4, 8, .34), 0 0 0 3px #D71921;
    z-index: 210 !important;
}
.p-caption {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    margin-top: 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px;
    letter-spacing: .1em; text-transform: lowercase; color: #111111;
}
.p-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-price { flex-shrink: 0; color: #D71921; }
.p-store {
    display: block; margin-top: 2px;
    font-family: 'Inter', sans-serif; font-size: 9px;
    letter-spacing: .18em; text-transform: uppercase; color: #9a9a9a;
}
.globe-cue {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px;
    letter-spacing: .28em; text-transform: lowercase;
    color: rgba(255, 255, 255, .65); pointer-events: none;
    white-space: nowrap; z-index: 300;
}
@media (prefers-reduced-motion: reduce) { .g-bob { animation: none; } }

/* =====================================================================
   MOTION - reveal (retained) + scroll cue
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.scroll-cue { animation: cue-bob 2.2s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }

@media (prefers-reduced-motion: reduce) {
    #grain-field::before, #grain-field::after, .scroll-cue { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* =====================================================================
   MOBILE - responsiveness and the cheap seats.
   Backdrop blur and animated grain are the two things that cost real
   frames on phones and older laptops, so both are dialled back here,
   and the scatter thins out. The look survives; the heat doesn't.
   ===================================================================== */
@media (max-width: 767px) {
    .hdr-pill { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .menu-panel, .cookie-bar, .wp-panel, .footer-pill {
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    }
    .cell-frame { backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px); border-radius: 28px; }

    /* the grain keeps its texture, loses its shimmer (repaints every 220ms) */
    #grain-field::after { animation: none; opacity: .13; }
    #grain-field::before { animation-duration: 40s; }

    .site-header { padding: 10px 10px 0; }
    .hdr-brand { padding: 13px 16px; min-height: 50px; }
    .hdr-social { min-height: 50px; padding: 0 6px; gap: 0; }
    .hdr-social a { width: 32px; height: 32px; }
    .hdr-toggle { min-height: 50px; padding: 0 15px; gap: 9px; }
    .hdr-logo { height: 14px; }
    .menu-row { font-size: 1.3rem; padding: 10px 16px; }

    .cell { padding: 24px 22px; }
    .hero-title { font-size: clamp(2.3rem, 12vw, 3.6rem); }
    .v-rail { display: none; }

    /* a lighter wall of prints: fewer cards, fewer blurred layers */
    .scatter-stage { height: 92svh; min-height: 520px; }
    .g-card { width: min(44vw, 168px); }
    .g-card:nth-child(n+9) { display: none; }
    .g-blur { filter: blur(3px); }
}

/* very small phones: keep the hero breathing */
@media (max-width: 380px) {
    .hero-title { font-size: 2.05rem; }
    .hdr-social { display: none; }         /* socials live in the menu too */
}

/* =====================================================================
   CJK - Akira and JetBrains Mono carry no Chinese or Japanese glyphs, so
   those languages fall back to the system faces (PingFang / Hiragino /
   JhengHei / Yu Gothic). System fonts, not webfonts: a Noto CJK download
   is multi-megabyte, and these render beautifully and instantly.
   ===================================================================== */
:root {
    --cjk: 'PingFang TC', 'PingFang SC', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
           'Noto Sans CJK TC', 'Microsoft JhengHei', 'Yu Gothic', sans-serif;
}
html[lang="zh-Hant"] body, html[lang="ja"] body { font-family: 'Inter', var(--cjk); }
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2, html[lang="zh-Hant"] h3,
html[lang="zh-Hant"] h4, html[lang="zh-Hant"] h5, html[lang="zh-Hant"] h6,
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3,
html[lang="ja"] h4, html[lang="ja"] h5, html[lang="ja"] h6 {
    font-family: var(--cjk); font-weight: 800; letter-spacing: .01em;
}
/* CJK sets denser than Latin - the display sizes need a touch more air */
html[lang="zh-Hant"] .hero-title, html[lang="ja"] .hero-title { line-height: 1.14; letter-spacing: .005em; }
html[lang="zh-Hant"] .finale-title, html[lang="ja"] .finale-title { line-height: 1.3; }
html[lang="zh-Hant"] .stroke-white, html[lang="ja"] .stroke-white { -webkit-text-stroke-width: 1.6px; }
html[lang="zh-Hant"] .v-rail, html[lang="ja"] .v-rail { font-family: var(--cjk); letter-spacing: .32em; }
html[lang="zh-Hant"] .cell-copy, html[lang="ja"] .cell-copy { line-height: 1.85; }
html[lang="zh-Hant"] .cookie-copy, html[lang="ja"] .cookie-copy {
    text-transform: none; letter-spacing: .04em; line-height: 1.85;
}
html[lang="zh-Hant"] .menu-row, html[lang="ja"] .menu-row { text-transform: none; letter-spacing: .02em; }
html[lang="zh-Hant"] .wp-label, html[lang="ja"] .wp-label,
html[lang="zh-Hant"] .footer-links a, html[lang="ja"] .footer-links a { text-transform: none; letter-spacing: .06em; }

/* The two media queries that used to live here shrank the language
   options to 25px wide and 9.5px type with the letter-spacing removed,
   so that four pills could survive a 380px header. They are deleted
   rather than adjusted: the switcher moved into the menu, the header is
   three pills again, and nothing has to be made unreadable to fit. */

/* =====================================================================
   LIGHT MODE — and it is the default.

   Everything above this line is the dark landing page, unchanged. It is
   now reached by `html[data-mode="dark"]`; nothing in it was edited, so
   the red field is byte-for-byte the page that has been live.

   This block is the light variant. The reasoning is that a marketing
   page and a product have different jobs: hau.lat meets people who have
   never heard of Haulat and should feel open and legible in daylight on
   a phone, while the app is somewhere you sit and concentrate and dark
   earns its keep. Light landing → dark app is a deliberate pairing, not
   an inconsistency.

   The art direction is preserved exactly: same 160° gradient, same four
   drifting radial blobs, same animated film grain, same glass. Only the
   values are inverted around the same oxblood axis — where dark runs
   #6E0B12 → #B01620 → #D96A75, light runs the pale end of the same
   ramp. The red stops being the field and becomes the accent, which is
   what it is in the app too.

   Scoped on html[data-mode="light"] rather than by rewriting the rules
   above, so that a mistake here can only ever affect light mode and the
   dark page cannot regress.
   ===================================================================== */

html[data-mode="light"] body { background: #FBEFF0; color: #111111; }

/* ---- the field ---- */
html[data-mode="light"] #grain-field {
    background: linear-gradient(160deg, #FFF7F7 0%, #F7DFE2 44%, #F1C7CE 100%);
}
html[data-mode="light"] #grain-field::before {
    /* Same four blobs, same positions, same drift. Alphas come down hard
       because a pale field shows a coloured blob far more readily than a
       dark one does — at the dark page's .85 these read as stains. */
    background:
        radial-gradient(42% 46% at 24% 30%, rgba(215, 25, 33, .16) 0%, rgba(215, 25, 33, 0) 70%),
        radial-gradient(50% 55% at 78% 22%, rgba(110, 11, 18, .10) 0%, rgba(110, 11, 18, 0) 72%),
        radial-gradient(46% 50% at 68% 82%, rgba(255, 217, 220, .85) 0%, rgba(255, 217, 220, 0) 70%),
        radial-gradient(38% 42% at 38% 88%, rgba(217, 106, 117, .22) 0%, rgba(217, 106, 117, 0) 68%);
}
html[data-mode="light"] #grain-field::after {
    /* `overlay` blend against a light ground turns grain into glare.
       `multiply` keeps it as texture, and it needs about half the
       opacity to read at the same strength. */
    opacity: .09; mix-blend-mode: multiply;
}
html[data-mode="light"] #dot-overlay {
    background-image: radial-gradient(rgba(30, 4, 8, .10) 1.4px, transparent 1.4px);
}
html[data-mode="light"] #scroll-progress {
    background: #D71921; box-shadow: 0 0 0 1px rgba(30, 4, 8, .12);
}

/* ---- glass ----
   White-on-white is not a material. The fill flips to near-white with a
   real ink hairline doing the work the white border did on red, and the
   shadow drops to a third of its strength: a 30px black shadow that
   read as depth on oxblood reads as dirt on cream. */
html[data-mode="light"] .hdr-pill,
html[data-mode="light"] .menu-panel,
html[data-mode="light"] .cell-frame,
html[data-mode="light"] .footer-pill,
html[data-mode="light"] .wp-panel {
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(30, 4, 8, .10);
    box-shadow: 0 10px 30px rgba(110, 11, 18, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
html[data-mode="light"] .menu-panel { box-shadow: 0 22px 50px rgba(110, 11, 18, .12), inset 0 1px 0 rgba(255, 255, 255, .9); }
html[data-mode="light"] .cell-frame { box-shadow: 0 24px 60px rgba(110, 11, 18, .10), inset 0 1px 0 rgba(255, 255, 255, .9); }

/* ---- header ---- */
html[data-mode="light"] .hdr-logo { filter: none; }          /* the asset ships black */
html[data-mode="light"] .hdr-wordmark { color: #111111; }
html[data-mode="light"] .hdr-social a { color: #4A2126; }
html[data-mode="light"] .hdr-social a:hover { background: rgba(30, 4, 8, .07); }
html[data-mode="light"] .lang-opt { color: rgba(30, 4, 8, .55); }
html[data-mode="light"] .lang-opt:hover { color: #111111; }
html[data-mode="light"] .lang-opt.on { color: #FFFFFF; background: #111111; }
html[data-mode="light"] .hdr-toggle { color: #111111; }
html[data-mode="light"] .hdr-locale { color: rgba(30, 4, 8, .8); }
html[data-mode="light"] .hdr-plus .bar { background: #111111; }
html[data-mode="light"] .menu-row { color: #111111; }
html[data-mode="light"] .menu-meta { color: rgba(30, 4, 8, .55); }

/* The language block, in light. Both of these were white, which is
   correct on the dark panel and invisible on the pale one: the label
   read as a blank gap and the hairline was not there at all. Same two
   values .menu-meta already uses, so the foot of the menu is one
   consistent piece rather than three different greys. */
html[data-mode="light"] .menu-lang-k { color: rgba(30, 4, 8, .55); }
html[data-mode="light"] .menu-sep    { background: rgba(30, 4, 8, .16); }

/* ---- type ----
   The hero keeps its drop shadow but in oxblood at low alpha rather than
   near-black: a grey shadow under black type on a warm field reads as a
   printing fault. */
html[data-mode="light"] .hero-title,
html[data-mode="light"] .finale-title {
    color: #111111; text-shadow: 0 4px 40px rgba(110, 11, 18, .14);
}
html[data-mode="light"] .stroke-white { -webkit-text-stroke-color: #111111; }
html[data-mode="light"] .v-rail { color: rgba(30, 4, 8, .45); }

/* ---- buttons ----
   The two landing buttons keep their relationship — one solid, one glass
   — and simply swap which end of the ramp the solid one sits at. This is
   the same inversion the app does for .btn--primary, and for the same
   reason: white-on-cream is not a button. */
/* Smoked rather than frosted — the same material at the other end of the
   ramp, carrying white text instead of black. */
html[data-mode="light"] .btn-primary {
    background: rgba(17, 17, 17, .84); color: #FFFFFF;
    border-color: rgba(17, 17, 17, .5);
    box-shadow: 0 10px 30px rgba(110, 11, 18, .18), inset 0 1px 0 rgba(255, 255, 255, .12);
}
html[data-mode="light"] .btn-primary:hover {
    background: rgba(30, 20, 24, .94); border-color: rgba(17, 17, 17, .7);
}
@supports not (backdrop-filter: blur(1px)) {
    html[data-mode="light"] .btn-primary { background: #111111; }
}
html[data-mode="light"] .btn-glass {
    color: #111111;
    background: rgba(255, 255, 255, .5);
    border: 1px solid rgba(30, 4, 8, .16);
}
html[data-mode="light"] .btn-glass:hover { background: rgba(255, 255, 255, .78); }

/* ---- cells ---- */
html[data-mode="light"] .cell { color: #111111; border-bottom-color: rgba(30, 4, 8, .10); }
@media (min-width: 768px) {
    html[data-mode="light"] .cell-frame.md\:grid-cols-3 > .cell { border-right-color: rgba(30, 4, 8, .10); }
}
html[data-mode="light"] .cell .dot-grid,
html[data-mode="light"] .cell.dot-grid {
    background-image: radial-gradient(rgba(30, 4, 8, .09) 1.3px, transparent 1.3px);
}
html[data-mode="light"] .cell-index { color: rgba(30, 4, 8, .5); }
html[data-mode="light"] .cell-title { color: #111111; }
html[data-mode="light"] .cell-copy { color: rgba(30, 4, 8, .78); }

/* ---- footer ---- */
html[data-mode="light"] .footer-logo { filter: none; }
html[data-mode="light"] .footer-tag,
html[data-mode="light"] .footer-copy { color: rgba(30, 4, 8, .55); }
html[data-mode="light"] .footer-links a { color: rgba(30, 4, 8, .7); }
html[data-mode="light"] .footer-links a:hover { color: #111111; }

/* ---- cookie bar + wallpapers ---- */
html[data-mode="light"] .cookie-bar {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(30, 4, 8, .10);
    box-shadow: 0 18px 44px rgba(110, 11, 18, .12);
}
html[data-mode="light"] .cookie-copy { color: rgba(30, 4, 8, .8); }
html[data-mode="light"] .cookie-btn-ghost { color: #111111; background: rgba(30, 4, 8, .06); border-color: rgba(30, 4, 8, .16); }
html[data-mode="light"] .cookie-btn-ghost:hover { background: rgba(30, 4, 8, .11); }
html[data-mode="light"] .cookie-btn-solid { color: #FFFFFF; background: #111111; border-color: #111111; }
html[data-mode="light"] .cookie-btn-solid:hover { background: #2A1418; }
html[data-mode="light"] .wp-scrim { background: rgba(30, 4, 8, .28); }
html[data-mode="light"] .wp-title, html[data-mode="light"] .wp-close { color: #111111; }
html[data-mode="light"] .wp-row { background: rgba(255, 255, 255, .6); border: 1px solid rgba(30, 4, 8, .09); }
html[data-mode="light"] .wp-row:hover { background: rgba(255, 255, 255, .9); }
html[data-mode="light"] .wp-label, html[data-mode="light"] .wp-note { color: rgba(30, 4, 8, .7); }
html[data-mode="light"] .globe-cue, html[data-mode="light"] .scroll-cue { color: rgba(30, 4, 8, .6); }

/* ---- anything still explicitly white ----
   The page was authored white-on-red and Tailwind utilities are sprayed
   through the markup. These catch the ones the named selectors above do
   not reach, without touching index.php. */
html[data-mode="light"] .text-white,
html[data-mode="light"] .text-nWhite { color: #111111 !important; }
html[data-mode="light"] .text-white\/70 { color: rgba(30, 4, 8, .62) !important; }
html[data-mode="light"] .text-white\/60 { color: rgba(30, 4, 8, .55) !important; }
html[data-mode="light"] .text-white\/80 { color: rgba(30, 4, 8, .72) !important; }
html[data-mode="light"] .border-white\/20 { border-color: rgba(30, 4, 8, .14) !important; }

/* =====================================================================
   THE MODE TOGGLE — one pill in the header, sun and moon.
   ===================================================================== */
.hdr-mode {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    padding: 0 14px; min-height: 56px; cursor: pointer;
    color: #FFFFFF; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.hdr-mode svg { width: 18px; height: 18px; display: block; }
html[data-mode="light"] .hdr-mode { color: #111111; }
/* Show the icon for the mode you would GET, not the one you are in — a
   toggle labelled with its current state makes people press it to find
   out what it does. */
html[data-mode="light"] .hdr-mode .ico-sun { display: none; }
html[data-mode="dark"]  .hdr-mode .ico-moon { display: none; }

@media (max-width: 767px) {
    .hdr-mode { padding: 0 10px; }
    .hdr-mode svg { width: 16px; height: 16px; }
}
@media (max-width: 380px) {
    /* Four pills plus a toggle will not fit. The language pills matter
       more on a Taiwanese phone than a theme switch does. */
    .hdr-mode { display: none; }
}

/* =====================================================================
   ONE MODE

   The landing page is light and has no toggle. Theme::prefs() forces
   data-mode="light" on this surface, so every `html[data-mode="light"]`
   rule above is now simply the page's styling rather than a branch.

   These last few were written for the dark field and never had a light
   counterpart, so they stayed white on a pale page: legible only because
   the grain happened to be dark enough behind them, which is not a
   contrast strategy.
   ===================================================================== */

/* The hero paragraph. It carried a Tailwind `text-white/85`, which had
   no light override AND vanishes entirely if the CDN does not load, so
   it now has a class of its own in our own stylesheet. */
.hero-lede { color: rgba(30, 4, 8, .86); }

/* start a find · post a bounty · open a store. Small monospace links
   under three cards, and at 11px a low-contrast colour is the difference
   between a call to action and a decoration. */
.cell-cta {
    color: #111111;
    border-bottom-color: rgba(30, 4, 8, .30);
}
.cell-cta:hover { color: #D71921; border-color: #D71921; }

/* Tailwind opacity utilities the light block missed. Same treatment as
   the ones it caught, listed here rather than edited into that block so
   the omission is visible next time somebody adds one. */
html[data-mode="light"] .text-white\/85 { color: rgba(30, 4, 8, .82) !important; }
html[data-mode="light"] .text-white\/90 { color: rgba(30, 4, 8, .88) !important; }
html[data-mode="light"] .text-white\/50 { color: rgba(30, 4, 8, .48) !important; }
