/* TermCue marketing site — light by default, optional dark */

:root,
html[data-theme="light"] {
  --bg: #f4f8f9;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef5f7;
  --surface-3: #e4eef1;
  --fg: #0f1c22;
  --muted: #5a6f78;
  --subtle: #84949c;
  --accent: #0d9488;
  --accent-bright: #0f766e;
  --accent-dim: #14b8a6;
  --accent-glow: rgba(13, 148, 136, 0.12);
  --accent-glow-strong: rgba(13, 148, 136, 0.22);
  --accent-fg: #ffffff;
  --border: #d5e2e7;
  --border-light: #b8ccd3;
  --ok: #059669;
  --warn: #d97706;
  --phone-frame: #e8eef1;
  --phone-bezel: #c5d4da;
  --hero-grad-a: #0f1c22;
  --hero-grad-b: #0d9488;
  --header-bg: rgba(244, 248, 249, 0.82);
  --shadow: 0 16px 40px -18px rgba(15, 28, 34, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-phone: 2.75rem;
  --max: 72rem;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #030507;
  --bg-elevated: #080c0e;
  --surface: #0c1114;
  --surface-2: #12191d;
  --surface-3: #182025;
  --fg: #f0f6f8;
  --muted: #8a9ca4;
  --subtle: #55666e;
  --accent: #2dd4bf;
  --accent-bright: #5eead4;
  --accent-dim: #14b8a6;
  --accent-glow: rgba(45, 212, 191, 0.14);
  --accent-glow-strong: rgba(45, 212, 191, 0.28);
  --accent-fg: #042f2e;
  --border: #1a2529;
  --border-light: #263338;
  --ok: #34d399;
  --warn: #fbbf24;
  --phone-frame: #151c20;
  --phone-bezel: #243036;
  --hero-grad-a: #ffffff;
  --hero-grad-b: #99f6e4;
  --header-bg: rgba(3, 5, 7, 0.72);
  --shadow: 0 16px 48px -18px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 90% 55% at 50% -10%, black 15%, transparent 65%);
  opacity: 0.7;
}

a { color: var(--accent-bright); text-decoration: none; transition: opacity 0.2s, color 0.2s; }
a:hover { opacity: 0.88; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand:hover { opacity: 1; color: var(--fg); }

.cue-brand {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 28, 34, 0.06);
}

.cue-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav a:hover { color: var(--fg); opacity: 1; }
.nav a.active,
.nav a[aria-current="page"] { color: var(--accent-bright); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--accent-fg) !important;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}
.nav-cta:hover { opacity: 1 !important; filter: brightness(1.05); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.theme-toggle:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hero */
.hero { padding: 4.75rem 0 3.75rem; position: relative; }

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.kicker::before {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--hero-grad-a) 20%, var(--hero-grad-b) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 0.85rem;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.7rem 0 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 1;
  filter: brightness(1.04);
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--surface-2);
  opacity: 1;
  transform: translateY(-1px);
}

.hero-note {
  font-size: 0.78rem;
  color: var(--subtle);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.phone {
  width: min(285px, 78vw);
  border-radius: var(--radius-phone);
  background: linear-gradient(165deg, var(--phone-frame), var(--surface-2));
  padding: 11px;
  box-shadow:
    0 0 0 1px var(--phone-bezel),
    var(--shadow),
    0 0 60px -20px color-mix(in srgb, var(--accent) 30%, transparent);
  position: relative;
}

.phone-screen {
  border-radius: calc(var(--radius-phone) - 9px);
  overflow: hidden;
  background: var(--surface-3);
  aspect-ratio: 390 / 844;
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Blinking block cursor over terminal screenshots */
.term-cursor {
  position: absolute;
  left: 34.1%;
  top: 21.8%;
  width: 2.56%;
  height: 2.13%;
  min-width: 6px;
  min-height: 10px;
  background: #eaeaea;
  border-radius: 1px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
}

.phone-screen.show-term-cursor .term-cursor {
  visibility: visible;
  animation: term-cursor-blink 1.05s steps(1, end) infinite;
}

@keyframes term-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-screen.show-term-cursor .term-cursor {
    animation: none;
    opacity: 1;
  }
}

.shot-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 340px;
}

.shot-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.shot-pill:hover { border-color: var(--border-light); color: var(--fg); }
.shot-pill[aria-pressed="true"] {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* Sections */
.section { padding: 4.75rem 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.95rem;
  color: var(--fg);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  color: var(--fg);
}

.card-grid {
  display: grid;
  gap: 1.15rem;
  margin-top: 2.3rem;
}
@media (min-width: 700px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem 1.3rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
html[data-theme="dark"] .card { box-shadow: none; }
.card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); font-size: 0.94rem; line-height: 1.55; }
.card-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 11px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.95rem;
  font-size: 1.1rem;
}

.surfaces-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.3rem;
}
@media (min-width: 640px) { .surfaces-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .surfaces-grid { grid-template-columns: repeat(3, 1fr); } }

.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.surface-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.surface-card .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.surface-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.feature-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
}
.feature-list { display: grid; gap: 0.75rem; }
.feature-btn {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
  color: inherit;
}
.feature-btn:hover { border-color: var(--border-light); }
.feature-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}
.feature-btn p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.feature-sticky {
  position: sticky;
  top: 5rem;
  display: flex;
  justify-content: center;
}

.split {
  display: grid;
  gap: 2.75rem;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split.reverse { direction: rtl; }
  .split.reverse > * { direction: ltr; }
}
.split ul { list-style: none; margin-top: 1.15rem; }
.split ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.split ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.meta {
  font-size: 0.84rem;
  color: var(--subtle);
  margin-top: 1rem;
  font-family: var(--mono);
}

.shot-row {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-items: center;
}
@media (min-width: 700px) {
  .shot-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
.shot-row figure { margin: 0; text-align: center; }
.shot-row figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.shot-row .phone { width: min(200px, 70vw); }

.privacy-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}
.privacy-grid {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.85rem;
}
@media (min-width: 700px) { .privacy-grid { grid-template-columns: repeat(3, 1fr); } }
.privacy-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.privacy-item h4 span { color: var(--ok); }
.privacy-item p { color: var(--muted); font-size: 0.9rem; }

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 2.3rem;
  counter-reset: step;
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.55rem;
}
.step p { color: var(--muted); font-size: 0.87rem; line-height: 1.45; }

.cta-band {
  background: linear-gradient(135deg, var(--accent-glow) 0%, var(--surface) 55%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius-lg);
  padding: 2.75rem 1.75rem;
  text-align: center;
  margin: 2rem 0 0;
}
.cta-band p {
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto 1.5rem;
}

.icon-showcase {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center;
}
@media (min-width: 800px) {
  .icon-showcase { grid-template-columns: 1fr 1fr; }
}
.homescreen-mock {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
}
.homescreen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.ghost-tile {
  aspect-ratio: 1;
  border-radius: 16px;
  background: color-mix(in srgb, var(--subtle) 18%, transparent);
}
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
}
.app-tile img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.icon-size-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-end;
  margin: 0 0 1rem;
}
.icon-size-row li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.icon-size-row img { border-radius: 10px; border: 1px solid var(--border); }
.icon-spec { color: var(--muted); font-size: 0.9rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--fg); }
.footer-fine {
  font-size: 0.8rem;
  color: var(--subtle);
  max-width: 40rem;
}

.legal-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.25rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}
.legal-main h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.7rem;
}
.legal-main .note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  margin: 1.35rem 0 1.75rem;
}
.legal-main .note p { margin: 0; color: var(--fg); }
.legal-main article h2 {
  font-size: 1.3rem;
  margin-top: 2.1rem;
  margin-bottom: 0.7rem;
}
.legal-main article p,
.legal-main article li,
.legal-main article dd {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}
.legal-main article ul,
.legal-main article ol {
  margin: 0.7rem 0 1.15rem;
  padding-left: 1.2rem;
}
.legal-main article ul { list-style: disc; }
.faq dt {
  font-weight: 600;
  color: var(--fg);
  margin-top: 1.15rem;
}
.faq dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.page-hero { padding: 3.5rem 0 2rem; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.7rem;
  color: var(--fg);
}
.legal-content {
  max-width: 42rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 1;
}
.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 2.25rem;
  margin-bottom: 0.7rem;
}
.legal-content p,
.legal-content li {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}
.legal-content ul {
  list-style: none;
  margin: 0.7rem 0 1.15rem;
}
.legal-content ul li {
  position: relative;
  padding-left: 1.25rem;
}
.legal-content ul li::before {
  content: "·";
  position: absolute;
  left: 0.35rem;
  color: var(--accent);
  font-weight: 700;
}
.legal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  margin: 1.35rem 0;
}
.legal-box p { margin-bottom: 0; color: var(--fg); font-size: 0.95rem; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--border); }
.faq-item h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.faq-item p { color: var(--muted); font-size: 0.94rem; margin-bottom: 0; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.07s; }
.reveal-delay-2 { transition-delay: 0.14s; }
.reveal-delay-3 { transition-delay: 0.21s; }
.reveal-delay-4 { transition-delay: 0.28s; }

@media (max-width: 720px) {
  .nav > a:not(.nav-cta) { display: none; }
  .hero { padding: 3.25rem 0 2.75rem; }
  .section { padding: 3.25rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
