/* ============================================================
   sparrow — marketing site
   Design language: "dawn flight" — warm sunrise gradient
   (gold -> rust -> plum) on a twilight-ink ground.
   Pure static. System fonts. Dark-mode aware.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* dawn gradient */
  --gold:   #f2c14e;
  --rust:   #e8703a;
  --plum:   #c8456b;
  --grad:   linear-gradient(120deg, var(--gold), var(--rust) 52%, var(--plum));
  --grad-soft: linear-gradient(120deg, #f2c14e22, #e8703a1a 52%, #c8456b22);

  /* light theme (dawn paper) */
  --bg:       #fbf9f4;
  --bg-tint:  #f5f1e8;
  --surface:  #ffffff;
  --surface-2:#fbf8f2;
  --ink:      #1b1a24;
  --ink-2:    #4a4757;
  --muted:    #6c6879;
  --line:     #e9e3d6;
  --line-2:   #ddd5c4;
  --accent:   #d1592a;
  --accent-ink:#b8481f;
  --code-bg:  #1a1a24;
  --code-ink: #e7e3d8;
  --ring:     #e8703a55;
  --shadow:   0 1px 2px #1b1a2408, 0 12px 32px -12px #1b1a241f;
  --shadow-lg:0 2px 4px #1b1a240a, 0 30px 60px -20px #1b1a2426;
  --star:     #1b1a2408;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0f0f16;
    --bg-tint:  #14141f;
    --surface:  #17171f;
    --surface-2:#1c1c27;
    --ink:      #f3f1ea;
    --ink-2:    #c8c5d2;
    --muted:    #918da0;
    --line:     #262433;
    --line-2:   #322f42;
    --accent:   #f2884f;
    --accent-ink:#f6a06f;
    --code-bg:  #0b0b12;
    --code-ink: #e7e3d8;
    --ring:     #f2884f66;
    --shadow:   0 1px 2px #0006, 0 12px 32px -12px #0009;
    --shadow-lg:0 2px 4px #0007, 0 40px 80px -24px #000b;
    --star:     #ffffff0e;
    --grad-soft: linear-gradient(120deg, #f2c14e1f, #e8703a17 52%, #c8456b26);
  }
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1,h2,h3 { line-height: 1.08; letter-spacing: -0.022em; font-weight: 750; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img,svg { display: block; }
code,kbd,pre { font-family: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace; }
::selection { background: var(--rust); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
section { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: var(--grad); border-radius: 2px;
}
.lead { color: var(--ink-2); font-size: 1.19rem; line-height: 1.55; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --pad: 12px 20px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: var(--pad);
  font: inherit; font-size: .98rem; font-weight: 650; letter-spacing: -.01em;
  border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: #fff; background: var(--grad); background-size: 140% 140%;
  box-shadow: 0 6px 20px -6px var(--rust), inset 0 1px 0 #ffffff40;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px var(--rust), inset 0 1px 0 #ffffff55; background-position: 100% 0; }
.btn-ghost {
  color: var(--ink); background: var(--surface); border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--rust); color: var(--accent-ink); }
.btn-sm { padding: 8px 15px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; border-radius: 14px; }
.link-arrow { color: var(--accent-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header.scrolled { border-color: var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav { display: flex; align-items: center; gap: 14px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.16rem; letter-spacing: -.03em; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover .mark { animation: hop .5s ease; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.nav-links a {
  padding: 8px 12px; border-radius: 9px; font-size: .95rem; font-weight: 550; color: var(--ink-2);
  transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-tint); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-right .signin { padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: color .18s; }
.nav-right .signin:hover { color: var(--accent-ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 40px; height: 38px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 120%;
  background:
    radial-gradient(46% 60% at 78% 8%, #e8703a22, transparent 70%),
    radial-gradient(40% 55% at 12% 0%, #c8456b1c, transparent 70%),
    radial-gradient(38% 50% at 50% -10%, #f2c14e22, transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); font-weight: 780; margin: 18px 0 0; }
.hero .lead { margin-top: 20px; max-width: 34ch; }
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .9rem; }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { width: 15px; height: 15px; color: var(--accent); }

/* dashed flight-path decoration (restored from prod) */
.flightpath { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.flightpath path { fill: none; stroke: var(--rust); stroke-width: 1.4; stroke-dasharray: 3 7; opacity: .22; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .flightpath .dash { animation: dashmove 3s linear infinite; }
}

/* ambient dawn flock — faint sparrows soaring the upper sky along curved motion paths */
.flock { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
/* outer wrapper: rides a CSS motion path (offset-path) with gentle banking (offset-rotate) */
.flock .bird { position: absolute; top: 0; left: 0; will-change: transform, opacity; }
/* inner facer: carries the facing flip INSIDE the motion transform so facing survives banking */
.flock .facer { display: block; transform: scaleX(-1); } /* face travel direction (up-right) */
.flock .facer svg { display: block; height: auto; }
.flock .fly { opacity: 0; offset-rotate: auto; offset-anchor: center; }
@media (prefers-reduced-motion: no-preference) {
  .flock .fly { animation-name: flyacross; animation-timing-function: linear; animation-iteration-count: infinite; }
  /* Per-bird offset-path variants — all echo the dashed spline (lower-left -> upper-right),
     shifted vertically & scaled so the flock loosely follows the arc instead of one rail.
     Near/large birds ride the higher, flatter arcs (kept clear of the headline/copy);
     far/small birds trail on the lower, deeper arcs. Coordinates are px in .flock space
     (origin = hero top-left). offset-distance is animated 0->100% by @keyframes flyacross. */
  .flock .fly:nth-child(1) { offset-path: path('M -160 214 C 250 150, 470 176, 720 104 S 1160 46, 1480 8'); }   /* near  */
  .flock .fly:nth-child(2) { offset-path: path('M -160 262 C 250 186, 470 224, 720 146 S 1160 74, 1480 22'); }  /* mid   */
  .flock .fly:nth-child(3) { offset-path: path('M -160 300 C 250 234, 470 272, 720 192 S 1160 112, 1480 44'); } /* far   */
  .flock .fly:nth-child(4) { offset-path: path('M -160 282 C 250 214, 470 252, 720 168 S 1160 92, 1480 32'); }  /* far   */
  .flock .fly:nth-child(5) { offset-path: path('M -160 196 C 250 138, 470 154, 720 90 S 1160 42, 1480 6'); }    /* near  */
  .flock .fly:nth-child(6) { offset-path: path('M -160 320 C 250 252, 470 288, 720 208 S 1160 122, 1480 48'); } /* far   */
  .flock .fly:nth-child(7) { offset-path: path('M -160 240 C 250 168, 470 202, 720 128 S 1160 62, 1480 16'); }  /* mid   */
}
.flock .still { display: none; }
.flock .still svg { display: block; height: auto; transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) {
  .flock .fly { display: none; }
  .flock .still { display: block; }
}

/* ---------- Chat mock ---------- */
.chat {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .5s cubic-bezier(.2,.8,.3,1);
}
.chat:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg) translateY(-4px); }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.chat-top .dots { display: flex; gap: 6px; }
.chat-top .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.chat-room { font-weight: 650; font-size: .92rem; margin-left: 4px; }
.chat-room b { color: var(--accent-ink); }
.chat-live { margin-left: auto; font-size: .72rem; font-weight: 650; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.chat-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fbf6b; box-shadow: 0 0 0 0 #3fbf6b88; }
@media (prefers-reduced-motion: no-preference) { .chat-live::before { animation: pulse 2s infinite; } }
.chat-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 11px; opacity: 0; transform: translateY(8px); }
.msg.in { animation: msgin .5s cubic-bezier(.2,.8,.3,1) forwards; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: .82rem; font-weight: 700; color: #fff; }
.msg-body { min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-name { font-weight: 650; font-size: .9rem; }
.badge-agent { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); background: var(--grad-soft); border: 1px solid var(--ring); padding: 1px 6px; border-radius: 5px; }
.badge-human { font-size: .62rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.msg-time { font-size: .72rem; color: var(--muted); margin-left: auto; }
.msg-text { font-size: .93rem; color: var(--ink-2); line-height: 1.5; }
.msg-text code { background: var(--bg-tint); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .84em; color: var(--accent-ink); }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 8px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: blink 1.4s infinite both; }
  .typing i:nth-child(2){ animation-delay: .2s; } .typing i:nth-child(3){ animation-delay: .4s; }
}

/* ---------- Section scaffolding ---------- */
.band { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 14px 0 0; }
.section-head p { margin-top: 16px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), border-color .25s, box-shadow .25s;
}
.feature::after { content:""; position:absolute; inset:0 0 auto 0; height:3px; background: var(--grad); opacity: 0; transition: opacity .25s; }
.feature:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.feature:hover::after { opacity: 1; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--ring); color: var(--accent-ink); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.12rem; font-weight: 700; }
.feature p { margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.55; }

/* ---------- Connect (tabs) ---------- */
.connect-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px,4vw,56px); align-items: start; }
.connect-grid > * { min-width: 0; } /* let the code panel shrink so its pre scrolls instead of widening the page */
.tabs { display: inline-flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); padding: 6px; border-radius: 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 9px; border: none; background: none; cursor: pointer;
  font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink-2); transition: color .18s, background .18s;
}
.tab svg { width: 17px; height: 17px; }
.tab[aria-selected="true"] { color: #fff; background: var(--grad); box-shadow: 0 4px 12px -4px var(--rust); }
.tab-desc { margin-top: 22px; color: var(--muted); font-size: .98rem; max-width: 40ch; }
.tab-desc strong { color: var(--ink); font-weight: 650; }
.tab-list { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.tab-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; list-style: none; }
.tab-list li svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }
.tab-list { padding: 0; margin-left: 0; }

/* code card */
.code {
  background: var(--code-bg); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #ffffff12; }
.code-top .dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.code-top .dots i:nth-child(1){ background:#ff5f57; } .code-top .dots i:nth-child(2){ background:#febc2e; } .code-top .dots i:nth-child(3){ background:#28c840; }
.code-file { margin-left: 8px; font-size: .8rem; color: #ffffff8c; font-family: ui-monospace, monospace; }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font-size: .87rem; line-height: 1.7; color: var(--code-ink); }
.code pre::-webkit-scrollbar { height: 8px; } .code pre::-webkit-scrollbar-thumb { background:#ffffff22; border-radius: 8px; }
.tok-c { color: #7f8aa3; } .tok-k { color: #f2c14e; } .tok-s { color: #7fd18b; } .tok-f { color: #f2884f; } .tok-p { color: #c99cf0; } .tok-n { color: #6fb6ff; }
.panel { display: none; }
.panel.active { display: block; animation: fade .3s ease; }

/* ---------- Open source ---------- */
.os { position: relative; overflow: hidden; }
.os-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: clamp(28px, 4vw, 52px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,4vw,52px); align-items: center;
}
.os-card h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-top: 14px; }
.os-card p { margin-top: 16px; color: var(--ink-2); }
.os-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.os-stats { margin-top: 26px; display: flex; gap: 26px; flex-wrap: wrap; }
.os-stat .n { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.os-stat .l { font-size: .82rem; color: var(--muted); }

/* ---------- Cloud CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-inner {
  position: relative; border-radius: 26px; padding: clamp(40px, 6vw, 76px) clamp(28px,5vw,64px);
  background: var(--grad); background-size: 160% 160%; color: #fff; text-align: center;
  box-shadow: 0 30px 70px -24px var(--rust); overflow: hidden;
}
@media (prefers-reduced-motion: no-preference){ .cta-inner{ animation: gradshift 12s ease infinite; } }
.cta-inner::before { content:""; position:absolute; inset:0; background: radial-gradient(60% 90% at 50% -20%, #ffffff33, transparent 60%); pointer-events:none; }
.cta-inner h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: #fff; position: relative; }
.cta-inner p { margin: 16px auto 0; max-width: 52ch; color: #fff; opacity: .92; font-size: 1.1rem; position: relative; }
.cta-inner .slug { font-family: ui-monospace, monospace; background: #ffffff26; padding: 2px 9px; border-radius: 7px; border: 1px solid #ffffff40; }
.cta-inner .btns { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }
.btn-white { background: #fff; color: var(--accent-ink); box-shadow: 0 10px 26px -8px #0006; }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px #0007; }
.btn-clear { background: #ffffff1f; color: #fff; border-color: #ffffff55; }
.btn-clear:hover { background: #ffffff33; transform: translateY(-2px); }
/* floating birds in band */
.cta-birds { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.cta-birds svg { position:absolute; fill:#ffffff2e; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-tint); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand { margin-bottom: 14px; }
.footer .tag { color: var(--muted); font-size: .92rem; max-width: 30ch; }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: .94rem; transition: color .18s; }
.footer ul a:hover { color: var(--accent-ink); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.footer-bottom .mit { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Keyframes ---------- */
@keyframes hop { 0%,100%{transform:translateY(0)} 30%{transform:translateY(-5px) rotate(-6deg)} 60%{transform:translateY(0)} }
@keyframes pulse { 0%{box-shadow:0 0 0 0 #3fbf6b99} 70%{box-shadow:0 0 0 7px #3fbf6b00} 100%{box-shadow:0 0 0 0 #3fbf6b00} }
@keyframes blink { 0%,80%,100%{opacity:.3; transform:translateY(0)} 40%{opacity:1; transform:translateY(-2px)} }
@keyframes msgin { to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
@keyframes flyacross {
  0%   { offset-distance: 0%;   opacity: 0; }
  52%  { opacity: 0; }                         /* invisible across the whole left column (copy/headline/CTA) */
  60%  { opacity: var(--peak, .4); }           /* fade in only after clearing the copy, in the open upper-right sky */
  86%  { opacity: var(--peak, .4); }
  100% { offset-distance: 100%; opacity: 0; }  /* fade out heading into the upper-right corner */
}
/* mobile flock rides a short arc within the top sky strip (no copy beneath), so it
   fades early and stays visible across the whole crossing */
@keyframes flyacross-mobile {
  0%   { offset-distance: 0%;   opacity: 0; }
  16%  { opacity: var(--peak, .4); }
  84%  { opacity: var(--peak, .4); }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes dashmove { to { stroke-dashoffset: -100; } }
@keyframes gradshift { 0%,100%{ background-position: 0% 50% } 50%{ background-position: 100% 50% } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: 46ch; }
  /* stacked layout leaves almost no sky — confine the flock to the top strip
     above the eyebrow so birds never drift over the headline/copy/CTA. Scale the
     concept down: one shallow shared arc across the strip, smaller birds. */
  .flock { height: 56px; }
  .flock .fly { offset-path: path('M -50 44 C 90 30, 180 34, 250 22 S 380 12, 470 2') !important; animation-name: flyacross-mobile; }
  .flock .fly .facer svg { width: 24px; }
  .chat { transform: none; margin-top: 8px; }
  .chat:hover { transform: translateY(-3px); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .connect-grid { grid-template-columns: 1fr; }
  .os-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links, .nav-right .signin, .nav-right .cta-desktop { display: none; }
  .nav-toggle { display: grid; }
  .nav.open + .mobile-menu { display: block; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* mobile menu */
.mobile-menu { display: none; border-bottom: 1px solid var(--line); background: var(--bg); }
.mobile-menu .wrap { padding-block: 14px; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a { padding: 12px 12px; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.mobile-menu a:hover { background: var(--bg-tint); color: var(--ink); }
.mobile-menu .mm-cta { margin-top: 8px; }
.mobile-menu.show { display: block; }

