/* ==========================================================================
   FOS — local download site
   One design system: ink/lilac/gold, Inter/DM Sans, Mac-OS-like precise
   spacing. Sections read as one screen each.
   ========================================================================== */

@layer reset, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; }
  img, svg, video { display: block; max-width: 100%; }
  button, input, select { font: inherit; color: inherit; background: none; border: 0; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
}

@layer base {
  :root {
    color-scheme: dark;

    /* brand */
    --ink: #07080c;
    --ink-2: #0b0d14;
    --ink-3: #10131d;
    --lilac: #7c5cff;
    --lilac-2: #9b7bff;
    --steel: #3b6fe0;
    --gold: #d9a04a;
    --cyan: #3ddbd9;
    --green: #2ee6a6;

    --text: #f2f1ee;
    --muted: #a2a4b3;
    --dim: #6f7284;
    --line: rgba(255, 255, 255, 0.085);
    --line-strong: rgba(255, 255, 255, 0.16);
    --glass: rgba(255, 255, 255, 0.035);
    --glass-2: rgba(255, 255, 255, 0.06);

    --grad: linear-gradient(100deg, var(--steel) 0%, var(--lilac) 48%, var(--gold) 100%);

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 34px;

    --pad: clamp(18px, 4vw, 96px);
    --max: 1360px;
    --section: clamp(80px, 11vw, 168px);

    --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font);
    background: var(--ink);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }

  ::selection { background: rgba(124, 92, 255, 0.45); color: #fff; }

  /* custom scrollbar, desktop only */
  @media (pointer: fine) {
    ::-webkit-scrollbar { width: 10px; }
    ::-webkit-scrollbar-track { background: var(--ink); }
    ::-webkit-scrollbar-thumb { background: #232633; border-radius: 99px; border: 2px solid var(--ink); }
    ::-webkit-scrollbar-thumb:hover { background: #343a4d; }
  }

  h1, h2, h3 { font-weight: 500; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
  p { text-wrap: pretty; }

  .mono { font-family: var(--mono); font-size: 0.82em; letter-spacing: 0.015em; }
}

@layer layout {
  .shell { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
  .section { padding-block: var(--section); position: relative; }
  .section + .section { border-top: 1px solid var(--line); }

  .eyebrow {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .eyebrow::before {
    content: "";
    width: 22px; height: 1px;
    background: linear-gradient(90deg, var(--lilac), transparent);
  }

  .h2 { font-size: clamp(2rem, 4.6vw, 3.9rem); }
  .lede { color: var(--muted); font-size: clamp(0.98rem, 1.35vw, 1.12rem); max-width: 58ch; margin-top: 20px; }

  .grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ==========================================================================
   NAV
   ========================================================================== */

@layer components {
  .nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 80;
    height: 66px;
    display: flex;
    align-items: center;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
    border-bottom: 1px solid transparent;
  }
  .nav.is-scrolled {
    background: rgba(7, 8, 12, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom-color: var(--line);
  }
  .nav .shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

  .brand { display: flex; align-items: center; gap: 11px; }
  .brand img { width: 27px; height: 27px; }
  .brand span { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em; }
  .brand small {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--dim);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: 0.06em;
    margin-left: 2px;
  }

  .nav-links { display: flex; align-items: center; gap: 4px; }
  .nav-links a {
    font-size: 0.88rem;
    color: var(--muted);
    padding: 8px 13px;
    border-radius: 99px;
    transition: color 0.25s, background 0.25s;
  }
  .nav-links a:hover { color: var(--text); background: var(--glass-2); }

  .btn {
    --h: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: var(--h);
    padding: 0 22px;
    border-radius: 99px;
    font-weight: 500;
    font-size: 0.94rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.4s;
    white-space: nowrap;
  }
  .btn:active { transform: scale(0.985); }
  .btn svg { width: 17px; height: 17px; flex: none; }

  .btn-primary {
    background: var(--text);
    color: var(--ink);
    overflow: hidden;
  }
  .btn-primary::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background: var(--grad);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }
  .btn-primary:hover { color: #fff; box-shadow: 0 10px 40px -10px rgba(124, 92, 255, 0.6); }
  .btn-primary:hover::after { opacity: 1; }

  .btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: var(--glass); }
  .btn-ghost:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, 0.28); }

  .nav .btn { --h: 38px; padding: 0 17px; font-size: 0.85rem; }

  .nav-burger {
    display: none;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
  }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after {
    content: ""; display: block;
    width: 16px; height: 1.5px; background: var(--text);
    border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s;
  }
  .nav-burger span { position: relative; }
  .nav-burger span::before { position: absolute; top: -5px; }
  .nav-burger span::after { position: absolute; top: 5px; }

  /* ======================================================================
     HERO
     ====================================================================== */

  .hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: 130px;
    padding-bottom: 70px;
    overflow: clip;
  }

  .hero-bg { position: absolute; inset: 0; z-index: -2; }
  .hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transform: scale(1.08);
    animation: hero-drift 28s var(--ease-io) infinite alternate;
  }
  .hero-bg::after {
    content: "";
    position: absolute; inset: 0;
    /* darken the left where the copy sits, keep colour on the right */
    background:
      linear-gradient(100deg, rgba(7, 8, 12, 0.94) 0%, rgba(7, 8, 12, 0.72) 42%, rgba(7, 8, 12, 0.2) 72%, rgba(7, 8, 12, 0.45) 100%),
      radial-gradient(80% 70% at 70% 40%, transparent 0%, rgba(7, 8, 12, 0.5) 70%, var(--ink) 100%),
      linear-gradient(to bottom, rgba(7, 8, 12, 0.55) 0%, transparent 26%, transparent 45%, var(--ink) 97%);
  }

  /* animated grain */
  .hero-bg::before {
    content: "";
    position: absolute; inset: -100%;
    z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
    opacity: 0.055;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: grain 7s steps(6) infinite;
  }

  #mesh {
    position: absolute; inset: 0; z-index: -1;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0.9;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    width: 100%;
  }

  .reveal-line { display: block; overflow: hidden; }
  .reveal-line > span {
    display: block;
    transform: translateY(110%);
    animation: rise 1.15s var(--ease) forwards;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 6.6vw, 5.5rem);
    letter-spacing: -0.05em;
    line-height: 0.94;
    margin: 26px 0 0;
  }
  .hero h1 .thin { color: var(--muted); font-weight: 400; }

  .hero-sub {
    margin-top: 30px;
    max-width: 44ch;
    color: var(--muted);
    font-size: clamp(1rem, 1.45vw, 1.15rem);
    line-height: 1.65;
  }
  .hero-sub b { color: var(--text); font-weight: 500; }

  .hero-actions {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-top: 36px;
    align-items: center;
  }

  .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 34px; }
  .chip {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    padding: 5px 11px;
    border-radius: 99px;
    display: inline-flex; align-items: center; gap: 7px;
  }
  .chip i {
    width: 5px; height: 5px; border-radius: 99px;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
  }
  .chip.is-warn i { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

  /* --- download card --- */
  .dl-card {
    position: relative;
    border-radius: var(--r-xl);
    padding: 1px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 42%, rgba(124, 92, 255, 0.35));
    box-shadow: 0 40px 120px -50px rgba(124, 92, 255, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.5);
  }
  .dl-inner {
    background: linear-gradient(180deg, #0d0f17 0%, #08090e 100%);
    border-radius: calc(var(--r-xl) - 1px);
    padding: clamp(22px, 2.4vw, 32px);
    position: relative;
    overflow: hidden;
  }
  .dl-inner::before {
    content: "";
    position: absolute; inset: -40% -20% auto auto;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(124, 92, 255, 0.32), transparent 68%);
    filter: blur(20px);
    pointer-events: none;
    animation: breathe 9s ease-in-out infinite;
  }

  .dl-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; }
  .dl-head .eyebrow { color: var(--lilac-2); }
  .dl-ver {
    font-family: var(--mono); font-size: 0.72rem;
    color: var(--text);
    border: 1px solid var(--line-strong);
    padding: 4px 10px; border-radius: 99px;
  }

  .dl-title { font-size: 1.36rem; font-weight: 500; margin-top: 18px; letter-spacing: -0.03em; }
  .dl-title small { display: block; font-size: 0.82rem; color: var(--dim); font-weight: 400; margin-top: 4px; letter-spacing: 0; }

  .flags { display: grid; gap: 9px; margin-top: 22px; }
  .flag {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    font-size: 0.85rem;
    padding-bottom: 9px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  }
  .flag span { color: var(--dim); }
  .flag b { font-weight: 500; font-family: var(--mono); font-size: 0.78rem; color: var(--text); text-align: right; }

  .dl-cta { margin-top: 26px; display: grid; gap: 10px; }
  .dl-cta .btn { width: 100%; --h: 54px; font-size: 0.98rem; }
  .dl-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .dl-secondary .btn { --h: 42px; font-size: 0.82rem; padding: 0 12px; }

  .progress { margin-top: 16px; display: none; }
  .progress.is-on { display: block; }
  .progress-bar { height: 3px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
  .progress-fill {
    height: 100%; width: 0%;
    background: var(--grad);
    border-radius: 99px;
    transition: width 0.25s linear;
  }
  .progress-meta { display: flex; justify-content: space-between; margin-top: 9px; font-family: var(--mono); font-size: 0.68rem; color: var(--dim); }

  .dl-note { margin-top: 18px; font-size: 0.76rem; color: var(--dim); line-height: 1.55; }

  .hash-row {
    margin-top: 20px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
  }
  .hash-row code {
    font-family: var(--mono);
    font-size: 0.67rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
  }
  .copy-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.7rem; color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 8px; padding: 5px 9px;
    cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s;
  }
  .copy-btn:hover { color: var(--text); background: var(--glass-2); }
  .copy-btn.is-done { color: var(--green); border-color: rgba(46, 230, 166, 0.4); }

  .scroll-hint {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.2em;
    color: var(--dim); text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 9px;
  }
  .scroll-hint::after {
    content: ""; width: 1px; height: 34px;
    background: linear-gradient(to bottom, var(--line-strong), transparent);
    animation: hint 2.4s var(--ease-io) infinite;
    transform-origin: top;
  }

  /* ======================================================================
     TICKER
     ====================================================================== */

  .ticker {
    border-block: 1px solid var(--line);
    background: #05060a;
    overflow: hidden;
    padding-block: 17px;
    position: relative;
  }
  .ticker::before, .ticker::after {
    content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; width: 120px; pointer-events: none;
  }
  .ticker::before { left: 0; background: linear-gradient(90deg, #05060a, transparent); }
  .ticker::after { right: 0; background: linear-gradient(-90deg, #05060a, transparent); }
  .ticker-track { display: flex; gap: 0; width: max-content; animation: ticker 44s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .ticker-track span {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--dim);
    letter-spacing: 0.13em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 34px;
    padding-right: 34px;
    white-space: nowrap;
  }
  .ticker-track span::after { content: ""; width: 4px; height: 4px; border-radius: 99px; background: var(--lilac); opacity: 0.45; }

  /* ======================================================================
     FEATURES
     ====================================================================== */

  .sec-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; flex-wrap: wrap; }
  .sec-head .h2 { max-width: 16ch; }

  .f-big {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    margin-top: clamp(56px, 7vw, 92px);
  }
  .f-big h3 { font-size: clamp(1.6rem, 2.8vw, 2.5rem); letter-spacing: -0.04em; }
  .f-big p { color: var(--muted); margin-top: 18px; max-width: 48ch; }
  .f-list { margin-top: 28px; display: grid; gap: 13px; }
  .f-list li {
    display: grid; grid-template-columns: 22px 1fr; gap: 12px;
    font-size: 0.92rem; color: var(--muted);
  }
  .f-list svg { width: 18px; height: 18px; margin-top: 2px; color: var(--lilac-2); }

  /* the "night desktop" mock */
  .desk {
    position: relative;
    aspect-ratio: 16 / 10.4;
    border-radius: 20px;
    overflow: hidden;
    background: #0a0b11;
    border: 1px solid var(--line-strong);
    box-shadow: 0 50px 120px -60px #000, inset 0 1px 0 rgba(255,255,255,0.08);
  }
  .desk > img.wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.82; }
  .desk::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 20% 0%, transparent, rgba(5, 6, 10, 0.5));
    pointer-events: none;
  }

  .desk-top {
    position: relative; z-index: 2;
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 16px;
    font-size: 0.62rem; color: rgba(255,255,255,0.78);
    font-family: var(--mono);
  }
  .desk-top .pill {
    background: rgba(10, 12, 18, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border-radius: 99px;
    padding: 4px 10px;
    display: flex; gap: 10px; align-items: center;
  }
  .desk-top .pill i { width: 5px; height: 5px; border-radius: 99px; background: var(--green); box-shadow: 0 0 8px var(--green); }

  .win {
    z-index: 2;
    position: absolute;
    bottom: 64px; left: 50%; transform: translateX(-50%);
    width: min(84%, 520px);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(10, 12, 18, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 30px 60px -20px #000;
    backdrop-filter: blur(16px);
  }
  .win-bar {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .win-bar i { width: 8px; height: 8px; border-radius: 99px; background: #33374a; }
  .win-bar i:nth-child(1) { background: #e0664d; }
  .win-bar i:nth-child(2) { background: #d9a04a; }
  .win-bar i:nth-child(3) { background: #46c48a; }
  .win-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.6rem; color: var(--dim); }
  .win-body { padding: 14px 16px 16px; font-family: var(--mono); font-size: 0.66rem; line-height: 1.9; }
  .win-body .p1 { color: var(--lilac-2); }
  .win-body .ok { color: var(--green); }
  .win-body .w { color: var(--gold); }
  .win-body .d { color: var(--dim); }
  .blink { display: inline-block; width: 7px; height: 12px; background: var(--text); vertical-align: -2px; animation: blink 1.1s steps(2) infinite; }

  .dock {
    position: absolute; z-index: 3;
    bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; align-items: end;
    padding: 7px 10px;
    background: rgba(12, 14, 22, 0.55);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    backdrop-filter: blur(18px) saturate(160%);
  }
  .dock div {
    width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center;
    font-size: 0.55rem; font-weight: 600; color: #fff;
    transition: transform 0.3s var(--ease);
  }
  .dock div:hover { transform: translateY(-6px) scale(1.12); }
  .dock .d1 { background: linear-gradient(140deg, #2a4fd0, #6a7bff); }
  .dock .d2 { background: linear-gradient(140deg, #1b1d28, #31364a); }
  .dock .d3 { background: linear-gradient(140deg, #c8552d, #e09a4a); }
  .dock .d4 { background: linear-gradient(140deg, #24324a, #4c6384); }
  .dock .d5 { background: linear-gradient(140deg, #5c2fa8, #9467ff); }
  .dock .d6 { background: linear-gradient(140deg, #0e5c58, #2ee6a6); }
  .dock .d7 { background: linear-gradient(140deg, #3a3f52, #6b7291); }

  .feat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-top: clamp(56px, 7vw, 92px);
  }
  .feat {
    background: #080a0f;
    padding: clamp(24px, 3vw, 38px);
    position: relative;
    overflow: hidden;
    transition: background 0.5s var(--ease);
    min-height: 210px;
  }
  .feat:hover { background: #0c0e16; }
  .feat::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 92, 255, 0.13), transparent 70%);
    opacity: 0; transition: opacity 0.4s;
    pointer-events: none;
  }
  .feat:hover::after { opacity: 1; }
  .feat .ico {
    width: 40px; height: 40px; border-radius: 11px;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong);
    background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.01));
    color: var(--lilac-2);
    margin-bottom: 22px;
  }
  .feat .ico svg { width: 19px; height: 19px; }
  .feat h4 { font-size: 1rem; font-weight: 500; letter-spacing: -0.02em; }
  .feat p { font-size: 0.86rem; color: var(--muted); margin-top: 8px; line-height: 1.6; }

  /* ======================================================================
     STACK — hardware sheet
     ====================================================================== */

  .req {
    margin-top: clamp(48px, 6vw, 76px);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background:
      radial-gradient(80% 120% at 100% 0%, rgba(124, 92, 255, 0.09), transparent 60%),
      #080a0f;
  }
  .req-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 22px clamp(20px, 3vw, 34px);
    align-items: baseline;
  }
  .req-row + .req-row { border-top: 1px solid var(--line); }
  .req-row > span {
    font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.13em; color: var(--dim);
  }
  .req-row p { font-size: 0.95rem; color: var(--text); }
  .req-row p em { font-style: normal; color: var(--muted); font-size: 0.86rem; display: block; margin-top: 3px; }

  /* ======================================================================
     WALLPAPER GALLERY
     ====================================================================== */

  .gal-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; }
  .gal-nav { display: flex; gap: 8px; }
  .gal-nav button {
    width: 42px; height: 42px; border-radius: 99px;
    border: 1px solid var(--line-strong);
    display: grid; place-items: center;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
  }
  .gal-nav button:hover { background: var(--glass-2); border-color: rgba(255,255,255,0.3); }
  .gal-nav button:active { transform: scale(0.94); }
  .gal-nav svg { width: 16px; height: 16px; }

  .gal {
    display: flex;
    gap: 18px;
    margin-top: 38px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
  }
  .gal::-webkit-scrollbar { display: none; }

  .shot {
    flex: none;
    width: clamp(290px, 52vw, 680px);
    scroll-snap-align: center;
    border-radius: var(--r-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line-strong);
    background: #0a0b11;
    cursor: zoom-in;
  }
  .shot img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
    filter: saturate(0.92) brightness(0.9);
  }
  .shot:hover img { transform: scale(1.035); filter: saturate(1.05) brightness(1); }
  .shot figcaption {
    position: absolute; inset: auto 0 0 0;
    padding: 48px 22px 18px;
    display: flex; justify-content: space-between; align-items: end; gap: 12px;
    background: linear-gradient(to top, rgba(5, 6, 10, 0.9), rgba(5, 6, 10, 0.35) 55%, transparent);
    font-size: 0.85rem;
    pointer-events: none;
  }
  .shot figcaption b { font-weight: 500; letter-spacing: -0.01em; }
  .shot figcaption span {
    font-family: var(--mono); font-size: 0.6rem; color: var(--dim);
    text-transform: uppercase; letter-spacing: 0.1em;
    white-space: nowrap;
  }
  .shot.empty {
    display: grid; place-items: center; cursor: default;
    border-style: dashed;
    background: radial-gradient(circle at 50% 50%, #0e1019, #07080c);
  }
  .shot.empty div { text-align: center; color: var(--dim); font-size: 0.85rem; padding: 24px; }
  .shot.empty b { display: block; color: var(--text); font-weight: 500; margin-bottom: 6px; font-size: 1rem; }
  .shot.empty code { font-family: var(--mono); font-size: 0.72rem; color: var(--lilac-2); }

  .gal-progress { height: 1px; background: var(--line); margin-top: 22px; position: relative; }
  .gal-progress i {
    position: absolute; left: 0; top: 0; bottom: 0; width: 20%;
    background: var(--grad);
    transition: left 0.15s linear, width 0.3s;
    border-radius: 2px;
  }

  /* lightbox */
  .lightbox {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(4, 5, 8, 0.94);
    backdrop-filter: blur(20px);
    display: grid; place-items: center;
    padding: 32px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s var(--ease);
  }
  .lightbox.is-open { opacity: 1; pointer-events: auto; }
  .lightbox img {
    max-width: 100%; max-height: 86vh;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    transform: scale(0.97);
    transition: transform 0.4s var(--ease);
  }
  .lightbox.is-open img { transform: scale(1); }
  .lightbox button {
    position: absolute; top: 22px; right: 22px;
    width: 44px; height: 44px; border-radius: 99px;
    border: 1px solid var(--line-strong);
    display: grid; place-items: center; cursor: pointer;
    background: rgba(12, 14, 22, 0.6);
  }

  /* ======================================================================
     STEPS
     ====================================================================== */

  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: clamp(48px, 6vw, 72px); }
  .step { background: #080a0f; padding: clamp(24px, 3vw, 36px); position: relative; }
  .step-n {
    font-family: var(--mono); font-size: 0.7rem; color: var(--lilac-2);
    letter-spacing: 0.12em;
  }
  .step h4 { font-size: 1.16rem; font-weight: 500; margin-top: 16px; letter-spacing: -0.025em; }
  .step p { font-size: 0.87rem; color: var(--muted); margin-top: 10px; }
  .cmd {
    margin-top: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #05060a;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cyan);
    overflow: hidden;
  }
  .cmd code { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .cmd code::-webkit-scrollbar { display: none; }
  .copy-btn-tiny {
    flex: none; width: 26px; height: 26px; border-radius: 7px;
    display: grid; place-items: center; cursor: pointer;
    color: var(--dim); border: 1px solid var(--line);
    transition: color 0.2s, border-color 0.2s;
  }
  .copy-btn-tiny:hover { color: var(--text); border-color: var(--line-strong); }
  .copy-btn-tiny.is-done { color: var(--green); }
  .copy-btn-tiny svg { width: 13px; height: 13px; }

  .warn {
    margin-top: 22px;
    display: flex; gap: 14px; align-items: flex-start;
    border: 1px solid rgba(217, 160, 74, 0.26);
    background: rgba(217, 160, 74, 0.05);
    border-radius: var(--r-md);
    padding: 16px 18px;
    font-size: 0.84rem;
    color: #e8d6b7;
  }
  .warn svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--gold); }

  /* ======================================================================
     FAQ
     ====================================================================== */

  .faq { border-top: 1px solid var(--line); margin-top: 44px; }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 26px 4px;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    font-weight: 500;
    cursor: pointer;
    list-style: none;
    letter-spacing: -0.02em;
    transition: color 0.25s;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary:hover { color: var(--lilac-2); }
  .faq summary .plus { position: relative; flex: none; width: 16px; height: 16px; }
  .faq summary .plus::before, .faq summary .plus::after {
    content: ""; position: absolute; inset: 50% 0 auto; height: 1.4px; background: currentColor;
    transition: transform 0.4s var(--ease), opacity 0.3s;
  }
  .faq summary .plus::after { transform: rotate(90deg); }
  .faq details[open] summary .plus::after { transform: rotate(0deg); opacity: 0; }
  .faq-body {
    padding: 0 4px 28px;
    max-width: 78ch;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.7;
  }
  .faq-body code { font-family: var(--mono); font-size: 0.8em; background: #05060a; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--cyan); }
  .faq-body a { color: var(--lilac-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(155,123,255,0.4); }

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

  .foot { border-top: 1px solid var(--line); padding-block: 56px 42px; position: relative; overflow: hidden; }
  .foot-glow {
    position: absolute; bottom: -260px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 420px;
    background: radial-gradient(ellipse, rgba(124, 92, 255, 0.16), transparent 70%);
    pointer-events: none;
  }
  .foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; position: relative; }
  .foot h5 { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 400; margin-bottom: 16px; }
  .foot ul { display: grid; gap: 10px; }
  .foot ul a { font-size: 0.87rem; color: var(--muted); transition: color 0.2s; }
  .foot ul a:hover { color: var(--text); }
  .foot-brand p { color: var(--dim); font-size: 0.84rem; max-width: 34ch; margin-top: 16px; line-height: 1.65; }

  .foot-bottom {
    margin-top: 56px; padding-top: 26px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    font-size: 0.76rem; color: var(--dim);
    position: relative;
  }
  .foot-bottom a:hover { color: var(--text); }

  /* ======================================================================
     REVEAL
     ====================================================================== */

  [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--delay, 0ms);
  }
  [data-reveal].is-in { opacity: 1; transform: none; }

  /* ======================================================================
     RESPONSIVE
     ====================================================================== */

  @media (max-width: 1080px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero { min-height: auto; padding-top: 128px; }
    .dl-card { max-width: 560px; }
    .f-big { grid-template-columns: 1fr; }
    .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .scroll-hint { display: none; }
  }

  @media (max-width: 760px) {
    .nav-links { display: none; }
    .nav.is-open .nav-links {
      display: flex;
      position: fixed;
      top: 66px; left: 0; right: 0;
      flex-direction: column;
      align-items: stretch;
      gap: 2px;
      padding: 14px var(--pad) 22px;
      background: rgba(7, 8, 12, 0.97);
      border-bottom: 1px solid var(--line);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      animation: rise 0.45s var(--ease);
    }
    .nav.is-open .nav-links a { padding: 12px 4px; font-size: 1rem; border-radius: 8px; }
    .nav.is-open .nav-burger span { background: transparent; }
    .nav.is-open .nav-burger span::before { transform: translateY(5px) rotate(45deg); }
    .nav.is-open .nav-burger span::after { transform: translateY(-5px) rotate(-45deg); }
    .nav-burger { display: flex; }
    .feat-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .req-row { grid-template-columns: 1fr; gap: 8px; }
    .foot-grid { grid-template-columns: 1fr; gap: 32px; }
    .dl-secondary { grid-template-columns: 1fr; }
    .hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
    .sec-head { align-items: start; }
    .shot { width: 84vw; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
    .reveal-line > span { transform: none; }
  }
}

@layer motion {
  @keyframes rise { to { transform: translateY(0); } }
  @keyframes hero-drift { from { transform: scale(1.08) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
  @keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); }
    80% { transform: translate(3%, 1%); }
  }
  @keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
  @keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
  @keyframes hint { 0% { transform: scaleY(0.2); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
  @keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(124,92,255,0.45); } 100% { box-shadow: 0 0 0 14px rgba(124,92,255,0); } }
}
