/* ═══════════ DeskProxy marketing site ═══════════ */
:root {
  --bg: #0b0d10;
  --bg-raise: #14171c;
  --bg-card: #1a1e24;
  --line: #262b33;
  --text: #f2f4f7;
  --text-dim: #9aa3b0;
  --accent: #ff6b2c;
  --accent-soft: rgba(255, 107, 44, 0.12);
  --green: #3ecf8e;
  --red: #ff5c5c;
  --radius: 14px;
  --font: -apple-system, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --container: 1440px;
}

/* ultra-wide: let it breathe */
@media (min-width: 1800px) {
  :root { --container: 1680px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ── ambient backdrop: fixed glow field + faint grid, behind everything ──
   Two layers so the grid stays crisp while the glows stay soft. */
body::before,
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; }
body::before {
  background:
    radial-gradient(50rem 32rem at 78% -6%, rgba(255, 107, 44, .11), transparent 65%),
    radial-gradient(44rem 30rem at 8% 18%, rgba(80, 140, 255, .09), transparent 62%),
    radial-gradient(38rem 28rem at 55% 108%, rgba(62, 207, 142, .06), transparent 60%);
}
body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 64px 64px;
  /* fade the grid out toward the bottom so it never fights the content */
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 88%);
}

/* keyboard users get a visible ring everywhere */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
a { color: inherit; text-decoration: none; }
section { padding: 120px 32px; max-width: var(--container); margin: 0 auto; }

.kicker {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.section-head { text-align: center; margin-bottom: 64px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 60px); }
.section-sub { color: var(--text-dim); max-width: 720px; margin: 20px auto 0; font-size: clamp(17px, 1.2vw, 20px); }

/* ── reveal-on-scroll ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

/* ── buttons ── */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px rgba(255, 107, 44, 0.35); }
.btn-ghost { border: 1px solid var(--line); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(11, 13, 16, 0.42);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: rgba(11, 13, 16, 0.86);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
/* wordmark is a 352×60 SVG — height-constrained, width follows */
.nav-wordmark { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }
.nav-cta { color: var(--accent) !important; font-weight: 600; }

/* ═══════════ HERO ═══════════ */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 32px 80px; max-width: var(--container); margin: 0 auto; }
.hero-sticky { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; width: 100%; }
.hero-copy h1 {
  font-size: clamp(40px, 6vw, 64px); margin-bottom: 24px;
  /* faint top-down fade keeps the headline from sitting flat on the dark bg */
  background: linear-gradient(180deg, #fff 30%, #b9c2d0 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-copy p { color: var(--text-dim); font-size: 19px; max-width: 480px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* device — real daemon-rendered frames, cycled by js/main.js */
.hero-device {
  position: relative; display: flex; justify-content: center;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.device-frame {
  position: relative;
  width: min(420px, 80vw);
  background: linear-gradient(160deg, #23282f 0%, #1c2027 45%, #15181d 100%);
  border: 1px solid #2e343d; border-radius: 24px; padding: 18px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, .55),
    0 0 120px rgba(255, 107, 44, .10),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}
.device-screen {
  position: relative; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden;
  background: #0a0e15;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8), inset 0 2px 12px rgba(0, 0, 0, .6);
}
/* glass glare — a fixed diagonal sheen over whichever frame is showing */
.device-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 22%, transparent 46%);
}
/* stacked frames; only .is-on is visible, so swaps cross-fade */
.device-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .7s ease;
}
.device-shot.is-on { opacity: 1; }
.device-stand {
  width: 38%; height: 16px; margin: 18px auto 0;
  background: linear-gradient(#2a2f37, #16191e);
  border-radius: 0 0 10px 10px;
}

/* ── frame indicator under the device ── */
.device-dots {
  position: absolute; bottom: -34px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 7px;
}
.device-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line); transition: background .4s, width .4s;
}
.device-dots i.on { background: var(--accent); width: 18px; border-radius: 999px; }

/* ── "Works with" strip under the hero copy ── */
.works-with { margin-top: 34px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.works-with-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); font-weight: 600;
}
.works-with ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.works-with li {
  font-size: 13px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

/* ═══════════ EXPLODED HARDWARE ═══════════ */
.exploded { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.exploded-stack { display: flex; flex-direction: column; gap: 22px; perspective: 900px; }
.layer {
  height: 92px; border-radius: var(--radius); position: relative;
  transform: rotateX(55deg) rotateZ(-8deg); transform-style: preserve-3d;
  border: 1px solid var(--line);
  transition: transform 0.4s ease;
}
.layer:hover { transform: rotateX(48deg) rotateZ(-8deg) translateZ(12px); }
.layer-glass { background: linear-gradient(135deg, rgba(120, 180, 255, 0.14), rgba(120, 180, 255, 0.04)); backdrop-filter: blur(2px); }
.layer-display { background: linear-gradient(135deg, #14263e, #0d1522); }
.layer-board { background: linear-gradient(135deg, #14261b, #0d1a12); }
.layer-back { background: linear-gradient(135deg, #23262c, #141519); }
.layer-tag {
  position: absolute; right: -12px; top: 50%;
  transform: rotateZ(8deg) rotateX(-55deg) translateY(-50%);
  font-size: 13px; color: var(--text-dim); white-space: nowrap;
  background: var(--bg-raise); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px;
}
.spec-list { list-style: none; display: flex; flex-direction: column; gap: 28px; }
.spec-list strong { display: block; font-size: 18px; margin-bottom: 4px; }
.spec-list span { color: var(--text-dim); font-size: 15px; }

/* ═══════════ USES ═══════════ */
.use-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.use-card {
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.use-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.use-card h3 { font-size: 20px; margin-bottom: 10px; }
.use-card p { color: var(--text-dim); font-size: 15px; }

/* ── hero: lede carries the pitch, sub carries the second beat ── */
.hero-copy .hero-lede { font-size: 20px; color: var(--text); margin-bottom: 18px; }
.hero-copy .hero-lede strong { color: var(--accent); font-weight: 600; }
.hero-copy .hero-sub { font-size: 17px; margin-bottom: 36px; }

/* ── build: SDK pitch, numbered steps ── */
.build-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-bottom: 56px;
}
.build-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .25s, transform .25s;
}
.build-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.build-num {
  display: block; font-family: var(--mono); font-size: 13px;
  color: var(--accent); margin-bottom: 14px; letter-spacing: .08em;
}
.build-card h3 { font-size: 20px; margin-bottom: 10px; }
.build-card p { color: var(--text-dim); font-size: 15px; }

/* ── voice: same card system, wider grid so six cards sit evenly ── */
.voice-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.voice-grid .use-card h3 { display: flex; gap: 10px; align-items: center; }

/* ═══════════ MARQUEE ═══════════ */
.marquee-section { max-width: none; padding-left: 0; padding-right: 0; }
.marquee { overflow: hidden; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; }
.marquee-right .marquee-track { animation: scroll-l 48s linear infinite; }
.marquee-left  .marquee-track { animation: scroll-r 56s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll-l { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
@keyframes scroll-r { from { transform: translateX(-33.333%); } to { transform: translateX(0); } }

/* tile cards — real 480×320 daemon renders */
.tilecard {
  position: relative; flex-shrink: 0;
  width: 336px; aspect-ratio: 3 / 2;
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; background: #0e1218;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tilecard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tilecard:hover { transform: scale(1.04); border-color: var(--accent); }
.tilecard-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 22px 14px 8px; text-align: right;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.tilecard:hover .tilecard-label { opacity: 1; }
.tilecard-lg { width: min(560px, 100%); }

/* ═══════════ WALKTHROUGH ═══════════ */
.walkthrough { display: flex; flex-direction: column; gap: 40px; }
.wt {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding: 48px; background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: 24px;
}
.wt-flip .wt-copy { order: 2; }
.wt-copy h3 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 16px; }
.wt-copy p { color: var(--text-dim); margin-bottom: 20px; }
.wt-views { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.wt-views li {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.wt-screen { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.wt-thumbs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.wt-thumbs .tilecard { width: 150px; cursor: pointer; }

/* ═══════════ DAEMON APP ═══════════ */
.daemon-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.app-shot {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.app-shot img { width: 100%; display: block; }

/* ═══════════ PRIVACY ═══════════ */
.privacy-grid .use-card h3 { display: flex; gap: 10px; align-items: center; }
.privacy .section-head h2 { max-width: 900px; margin: 0 auto; }

@media (max-width: 900px) {
  .daemon-split { grid-template-columns: 1fr; gap: 40px; }
}

/* ═══════════ STORE ═══════════ */
.store-mock { display: flex; justify-content: center; }
.store-window {
  width: min(860px, 100%); background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.store-titlebar { display: flex; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.store-titlebar span { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.store-titlebar span:first-child { background: #ff5f57; }
.store-titlebar span:nth-child(2) { background: #febc2e; }
.store-titlebar span:nth-child(3) { background: #28c840; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; padding: 24px; }
.store-item {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; position: relative; transition: border-color 0.2s ease;
}
.store-item:hover { border-color: var(--accent); }
.store-item b { display: block; font-size: 15px; margin-bottom: 2px; }
.store-item span { font-size: 12px; color: var(--text-dim); }
.store-item i {
  position: absolute; top: 16px; right: 14px; font-style: normal;
  font-size: 11px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); padding: 3px 12px; border-radius: 999px;
}
.store-item.installed span { color: var(--green); }

/* ═══════════ SDK ═══════════ */
.sdk-code { display: flex; justify-content: center; }
.sdk-code pre {
  background: #0d1117; border: 1px solid var(--line); border-radius: 16px;
  padding: 32px 36px; overflow-x: auto; max-width: 720px; width: 100%;
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
}
.sdk-code .c { color: #667381; }
.sdk-code .t { color: #7ee787; }
.sdk-code .a { color: #79c0ff; }
.sdk-code .s { color: #a5d6ff; }
.sdk-code .k { color: #ff7b72; }
.sdk-code .f { color: #d2a8ff; }
.sdk-code .n { color: #79c0ff; }

/* ═══════════ SIGNUP ═══════════ */
.signup { text-align: center; }
.signup-inner h2 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 16px; }
.price { color: var(--accent); }
.signup-inner p { color: var(--text-dim); margin-bottom: 32px; }
.signup-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.signup-form input {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 24px; font-size: 15px; color: var(--text); width: min(340px, 100%);
  outline: none; transition: border-color 0.2s ease;
}
.signup-form input:focus { border-color: var(--accent); }
.signup-done { color: var(--green); font-weight: 600; margin-top: 20px; }
.signup-error { color: #ff6b6b; font-weight: 600; margin-top: 16px; }
.signup-form button[disabled] { opacity: .6; cursor: not-allowed; }
.footer {
  margin-top: 120px; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-size: 13px;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .hero-sticky, .exploded, .wt { grid-template-columns: 1fr; gap: 40px; }
  .wt-flip .wt-copy { order: 0; }
  .nav-links a:not(.nav-cta) { display: none; }
  section { padding: 80px 20px; }
  .layer-tag { right: 8px; }
  /* chips collide with the frame at narrow widths — the "Works with"
     strip under the hero copy already carries the same information */
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .hero-device, .m-wicon { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
