/* Perch site: tokens, page layout, hero, feature sections, FAQ, footer.
   panel.css draws the menu bar panel mocks; scenes.css the desktop, notch and sync scenes. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* From the icon: deep teal sky, cream bird, mint wire. */
  --teal: #1d686b;
  --teal-deep: #0e3842;
  --cream: #f6ecdb;
  --wire: #8ac2bb;

  --bg: #f5f2ea;
  --bg-2: #ece7db;
  --surface: #fffdf8;
  --ink: #142629;
  --ink-2: rgb(20 38 41 / 0.68);
  --ink-3: rgb(20 38 41 / 0.45);
  --line: rgb(20 38 41 / 0.1);
  --accent: #1d686b;
  --accent-ink: #fffdf8;

  /* macOS system colours, light */
  --green: #28a745;
  --orange: #e8890c;
  --red: #e5372b;
  --blue: #0a7aff;
  --purple: #a550d9;
  --claude: #d97857;
  --codex: #111;

  --radius: 22px;
  --shadow: 0 1px 1px rgb(0 0 0 / 0.04), 0 10px 30px -8px rgb(14 56 66 / 0.25), 0 30px 60px -30px rgb(14 56 66 / 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1a1d;
    --bg-2: #10252a;
    --surface: #132a2f;
    --ink: #edf1ee;
    --ink-2: rgb(237 241 238 / 0.7);
    --ink-3: rgb(237 241 238 / 0.45);
    --line: rgb(237 241 238 / 0.12);
    --accent: #8ac2bb;
    --accent-ink: #0b1a1d;
    --green: #32d74b;
    --orange: #ff9f0a;
    --red: #ff453a;
    --blue: #0a84ff;
    --purple: #bf5af2;
    --codex: #f2f2f2;
    --shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 14px 40px -10px rgb(0 0 0 / 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: var(--accent); }
h1, h2 { font-family: var(--font-display); letter-spacing: -0.022em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 72px; }

/* --- top bar ------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(20px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { border-radius: 22%; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.topbar nav a { color: var(--ink-2); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font: 600 16px/1 var(--font); text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn[aria-disabled="true"] { cursor: default; transform: none; }
.btn[aria-disabled="true"]:not(.btn-primary) { color: var(--ink-2); }
.soon {
  font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

/* --- hero --------------------------------------------------------------- */
.hero { text-align: center; padding: 72px 20px 40px; overflow: hidden; }
.hero-icon { margin: 0 auto 18px; width: 168px; height: 168px; filter: drop-shadow(0 18px 30px rgb(14 56 66 / 0.35)); }
.hero h1 { font-size: clamp(52px, 9vw, 92px); font-weight: 750; }
.pitch { max-width: 620px; margin: 16px auto 28px; font-size: clamp(19px, 2.4vw, 23px); color: var(--ink-2); line-height: 1.4; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.req { display: flex; justify-content: center; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.req span { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; }
.hero-stage { margin: 56px auto 0; max-width: 980px; }

/* --- feature sections ----------------------------------------------------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 6vw, 88px);
  max-width: 1120px; margin: 0 auto; padding: 96px 28px;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .copy { order: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 14px; font-weight: 650; letter-spacing: 0.02em; color: var(--accent);
}
.eyebrow svg { width: 18px; height: 18px; fill: currentColor; }
.feature h2, .first-open h2, .faq h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 700; }
.lede { margin-top: 16px; font-size: 19px; color: var(--ink-2); }
.points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; font-size: 16px; color: var(--ink-2); }
.points li { padding-left: 22px; position: relative; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--wire); }
.points b { color: var(--ink); font-weight: 600; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; }

/* --- first open, FAQ, footer ---------------------------------------------- */
.first-open { padding: 96px 28px; background: var(--bg-2); }
.first-open > div { max-width: 760px; margin: 0 auto; }
.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li {
  counter-increment: s; position: relative; padding: 16px 18px 16px 60px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2);
}
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font: 700 15px/1 var(--font-round);
}
.steps b { color: var(--ink); }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }

.faq { max-width: 760px; margin: 0 auto; padding: 96px 28px; }
.qs { margin-top: 28px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 600; font-size: 18px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 0.2s var(--ease);
}
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { padding: 0 0 20px; color: var(--ink-2); }

.footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  max-width: 1120px; margin: 0 auto; padding: 36px 28px 48px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3);
}
.footer nav { display: flex; gap: 20px; }
.footer nav a { color: var(--ink-2); text-decoration: none; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }
.footer p { margin-left: auto; }

/* --- motion: reveal on scroll, only with script and full motion ----------- */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero-icon { animation: hop 0.9s var(--ease) both; }
  .hero h1, .pitch, .cta, .req { animation: rise 0.8s var(--ease) both; }
  .pitch { animation-delay: 0.08s; }
  .cta { animation-delay: 0.14s; }
  .req { animation-delay: 0.2s; }
  .hero-stage { animation: rise 1s 0.25s var(--ease) both; }
}
@keyframes hop { 0% { opacity: 0; transform: translateY(24px) scale(0.92); } 60% { opacity: 1; transform: translateY(-6px) scale(1.01); } 100% { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- small screens ----------------------------------------------------- */
@media (max-width: 860px) {
  .topbar nav { display: none; }
  .topbar .btn { margin-left: auto; }
  .feature { grid-template-columns: 1fr; padding: 64px 20px; gap: 36px; }
  .feature.flip .copy { order: 0; }
  .first-open, .faq { padding: 64px 20px; }
  .hero { padding-top: 48px; }
  .hero-icon { width: 128px; height: 128px; }
  .footer p { margin-left: 0; width: 100%; }
}
