/* Kept site: shared tokens, header, footer, buttons. Pages add their own section CSS. */

/* Self-hosted fonts: this site makes zero third-party requests. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/SpaceGrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/SpaceGrotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============ Theme tokens ============ */
/* Light (default): Apple-style white page, grey bento cards, black type. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #F5F5F7;
  --panel-2: #ECECEF;
  --elev: #ffffff;
  --border: #E4E4E9;
  --border-strong: #D4D4DA;
  --lime: #A3E635;
  --lime-2: #B9F050;
  --accent-text: #15803d;
  --text: #0B0B0C;
  --muted: #56575C;
  --dim: #86868B;
  --on-lime: #0B0B0C;
  --ring: rgba(21, 128, 61, 0.45);
  --card-shadow: 0 24px 60px -28px rgba(15, 18, 25, 0.16);
  --demo-bg: linear-gradient(165deg, #ffffff, #F4F6F2 70%);
  --header-bg: rgba(255, 255, 255, 0.72);
  --display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Dark: the Kept app's pure-dark look, with lifted surfaces so cards read as cards. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090B;
  --panel: #141519;
  --panel-2: #1B1D22;
  --elev: #17181D;
  --border: #24262C;
  --border-strong: #34373F;
  --lime: #A3E635;
  --lime-2: #C2F970;
  --accent-text: #B5EC53;
  --text: #F7F8F9;
  --muted: #A8ADB5;
  --dim: #767B83;
  --on-lime: #08090B;
  --ring: rgba(163, 230, 53, 0.55);
  --card-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  --demo-bg: linear-gradient(168deg, #1E2127 0%, #121316 64%);
  --header-bg: rgba(8, 9, 11, 0.72);
}

/* Dark surfaces get a faint top-lit gradient and an inner highlight so they
   feel like material instead of flat grey rectangles. */
:root[data-theme="dark"] .bento,
:root[data-theme="dark"] .persona,
:root[data-theme="dark"] .web-card,
:root[data-theme="dark"] .cta-band,
:root[data-theme="dark"] .form-card,
:root[data-theme="dark"] .step-mini,
:root[data-theme="dark"] .tldr-card {
  background: linear-gradient(180deg, #181A1F 0%, #121317 70%);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
:root[data-theme="dark"] .demo {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
:root[data-theme="dark"] footer.site { background: #0C0D10; }
:root[data-theme="dark"] .marquee { background: #0C0D10; }

/* ============ Base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 300ms ease, color 300ms ease;
}
h1, h2, h3, .display { font-family: var(--display); }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: 14px; top: -48px; z-index: 60;
  background: var(--lime); color: var(--on-lime); font-weight: 700;
  padding: 10px 16px; border-radius: 10px; transition: top 160ms ease;
}
.skip:focus { top: 12px; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 700; font-size: 0.98rem; line-height: 1;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ring); }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--muted); font-size: 0.84rem; font-weight: 600;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }

.kicker {
  display: inline-block; color: var(--accent-text); font-family: var(--display); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 12px;
}
.h-center {
  text-align: center;
  font-size: clamp(2rem, 4.8vw, 3.1rem); letter-spacing: -0.04em; line-height: 1.08;
  margin: 0 0 44px; font-weight: 700;
}
.h-sub { text-align: center; color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: -28px auto 44px; }

/* ============ Header ============ */
header.site {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.5px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.nav { display: flex; align-items: center; }
.nav a { color: var(--muted); font-weight: 600; font-size: 0.92rem; margin-left: 22px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .nav-cta {
  margin-left: 22px; color: var(--on-lime); background: var(--lime);
  padding: 8px 15px; border-radius: 999px; font-family: var(--display); font-weight: 700;
}
.nav .nav-cta:hover { background: var(--lime-2); color: var(--on-lime); }
.theme-toggle {
  margin-left: 18px; width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}
.theme-toggle:hover { border-color: var(--ring); color: var(--text); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ============ Forms (beta + feedback pages) ============ */
.form-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 28px;
  padding: 44px 44px 40px; max-width: 640px; margin: 0 auto;
}
.form-card label {
  display: block; font-family: var(--display); font-weight: 600; font-size: 0.92rem;
  margin: 22px 0 8px; color: var(--text);
}
.form-card label:first-of-type { margin-top: 0; }
.form-card input, .form-card textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--elev); color: var(--text);
  font-family: var(--body); font-size: 1rem; line-height: 1.5;
  transition: border-color 160ms ease;
}
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--ring); }
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card .form-actions { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-card .form-note { color: var(--dim); font-size: 0.88rem; margin: 18px 0 0; }

/* ============ Footer (identical on every page) ============ */
footer.site { border-top: 1px solid var(--border); padding: 60px 0 36px; background: var(--panel); }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid var(--border-strong);
}
.foot-brand .fb-mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin-bottom: 13px; }
.foot-brand p { color: var(--muted); font-size: 0.94rem; margin: 0 0 18px; max-width: 30ch; }
.foot-col h4 {
  margin: 4px 0 14px; font-family: var(--display); font-weight: 700;
  font-size: 0.76rem; letter-spacing: 2px; text-transform: uppercase; color: var(--dim);
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { color: var(--muted); font-weight: 500; font-size: 0.94rem; }
.foot-col a:hover { color: var(--text); text-decoration: none; }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; color: var(--dim); font-size: 0.85rem;
}
.foot-bottom .nt { display: inline-flex; align-items: center; gap: 8px; }
.foot-bottom .nt svg { color: var(--accent-text); }

/* ============ Shared motion ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.zoom { opacity: 0; transform: scale(0.97) translateY(12px); transition: opacity 750ms ease, transform 750ms cubic-bezier(0.22, 1, 0.36, 1); }
.zoom.in { opacity: 1; transform: none; }

/* ============ Responsive shared ============ */
@media (max-width: 960px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { margin-left: 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .form-card { padding: 30px 24px 28px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .zoom { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
