/* Just Speak to It — justspeaktoit.com
   Palette mirrors the app: Sources/SpeakCore/BrandColors.swift
   Accent #FF6B3D · warm #FF9C4A · deep #E3522E · lagoon #2ED4BF / #1AAB99 */

:root {
  color-scheme: dark;

  --ground: #121417;
  --ground-deep: #0d0f11;
  --surface: #191c21;
  --surface-2: #212630;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);

  --text: #f5f3f0;
  --text-dim: #adb4bd;
  --text-faint: #868e98;

  --accent: #ff6b3d;
  --accent-warm: #ff9c4a;
  --accent-deep: #e3522e;
  --accent-link: #ff9166;
  --lagoon: #2ed4bf;
  --lagoon-deep: #1aab99;

  --display: "Cabinet Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --body: "General Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --radius: 18px;
  --radius-lg: 26px;
  --block: clamp(4.5rem, 9vw, 7.5rem);

  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ground);
  background-image:
    radial-gradient(58rem 34rem at 88% -8%, rgba(255, 107, 61, .20), transparent 70%),
    radial-gradient(46rem 30rem at 4% 6%, rgba(46, 212, 191, .09), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .18vw, 1.0625rem);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-link); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent-warm); }

:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.024em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

code {
  font-family: var(--mono);
  font-size: .88em;
  color: var(--text);
  word-break: break-word;
}

em { font-style: italic; }

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -140%);
  z-index: 100;
  background: var(--accent);
  color: #16100d;
  font-weight: 600;
  padding: .7rem 1.1rem;
  border-radius: 0 0 12px 12px;
  text-decoration: none;
}

.skip-link:focus { transform: translate(-50%, 0); color: #16100d; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 1.15rem;
  position: relative;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -.02em;
  text-decoration: none;
  flex: none;
}

.brand img { width: 34px; height: 34px; }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: clamp(.9rem, 2vw, 1.9rem);
}

.site-nav a {
  color: var(--text-dim);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--text); }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header { justify-content: space-between; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-deep));
  color: #180f0a;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  box-shadow: 0 10px 30px -14px rgba(255, 107, 61, .9);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.button:hover {
  color: #180f0a;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -16px rgba(255, 107, 61, .95);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.button-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); box-shadow: none; }

.button-small { padding: .6rem 1.1rem; font-size: .93rem; }

.quiet-link {
  color: var(--text-dim);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.quiet-link:hover { color: var(--text); border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .button, .button:hover { transform: none; transition: none; }
}

/* ---------- Shared section furniture ---------- */

.section { padding-block: var(--block); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow--lagoon { color: var(--lagoon); }

.section-head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 { font-size: clamp(2.1rem, 1.1rem + 3.6vw, 3.5rem); margin-block: .7rem .8rem; }
.section-head p { color: var(--text-dim); font-size: 1.06rem; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.4vw, 1.7rem);
}

.card h3 {
  font-size: 1.22rem;
  letter-spacing: -.018em;
  margin-bottom: .5rem;
}

.card p { color: var(--text-dim); font-size: .97rem; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(1.75rem, 4vw, 3.25rem) clamp(3rem, 6vw, 5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Let the screenshot run to the right edge of the viewport so the app is
   legible rather than a thumbnail. */
@media (min-width: 1100px) {
  .hero .capture {
    width: calc(100% + var(--gutter) + (100vw - min(100vw, var(--wrap))) / 2 - 12px);
  }
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .9rem;
  text-decoration: none;
}

.badge:hover { color: var(--text); border-color: var(--line-strong); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lagoon);
  box-shadow: 0 0 0 4px rgba(46, 212, 191, .16);
  flex: none;
}

.hero h1 {
  font-size: clamp(2.75rem, 1.2rem + 5.6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: initial;
  margin-block: 1.1rem .9rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent-warm), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.08rem, 1rem + .4vw, 1.24rem);
  color: var(--text-dim);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 2rem;
}

.download-meta {
  margin-top: .95rem;
  font-size: .9rem;
  color: var(--text-faint);
}

.download-meta a { color: var(--text-dim); }
.download-meta + .download-meta { margin-top: .5rem; }
.download-meta code { color: var(--text-dim); font-size: .85em; }

/* ---------- Voice demo ---------- */

.voice-demo {
  margin-top: 2.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.15rem;
  max-width: 30rem;
}

.voice-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .74rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: .85rem;
}

.voice-replay {
  font: inherit;
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .7rem;
  cursor: pointer;
}

.voice-replay:hover { color: var(--text); border-color: var(--line-strong); }

.voice-line {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  flex: none;
}

.voice-wave i {
  display: block;
  width: 3px;
  height: 30px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-warm), var(--accent-deep));
  transform: scaleY(.4);
}

.voice-words {
  font-family: var(--mono);
  font-size: .92rem;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.voice-done {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(46, 212, 191, .16);
  color: var(--lagoon);
  font-size: .8rem;
}

/* ---------- Captures ---------- */

.capture {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: .5rem .5rem .35rem;
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .95);
}

.capture > a {
  display: block;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
}

.capture img { width: 100%; height: auto; }

.capture figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: space-between;
  padding: .7rem .6rem .5rem;
  font-size: .82rem;
  color: var(--text-faint);
}

.capture figcaption a { color: var(--text-dim); }

/* ---------- Marquee strip ---------- */

.glance {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  align-items: center;
  justify-content: center;
  border-block: 1px solid var(--line);
  padding-block: 1.1rem;
  font-size: .93rem;
  color: var(--text-dim);
}

.glance span, .glance a { display: inline-flex; align-items: center; gap: .5rem; }
.glance a { color: var(--text-dim); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.glance a:hover { color: var(--text); }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  counter-reset: step;
}

.step { position: relative; display: flex; flex-direction: column; gap: .55rem; }

.step-index {
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}

.step h3 { font-size: 1.5rem; }

.step-demo {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  font-size: .88rem;
  color: var(--text-faint);
}

kbd {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: .2rem .55rem;
}

.tick { color: var(--lagoon); }

/* ---------- Ownership ---------- */

.own { background: var(--ground-deep); border-block: 1px solid var(--line); }

.own-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem;
}

.own-grid .card { display: flex; flex-direction: column; gap: .45rem; }

.icon {
  width: 34px; height: 34px;
  margin-bottom: .7rem;
  color: var(--accent);
}

.icon--lagoon { color: var(--lagoon); }

.note {
  margin-top: 1.6rem;
  font-size: .93rem;
  color: var(--text-faint);
  max-width: 70ch;
}

/* ---------- Providers ---------- */

.provider-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1.1rem;
}

@media (min-width: 900px) {
  .provider-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.provider-group h3 {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  font-size: 1.16rem;
  margin-bottom: .85rem;
}

.count {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--accent);
  background: rgba(255, 107, 61, .12);
  border-radius: 999px;
  padding: .12rem .55rem;
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }

.chips li {
  font-size: .86rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .26rem .7rem;
}

.chips li.is-local {
  color: var(--lagoon);
  border-color: rgba(46, 212, 191, .3);
  background: rgba(46, 212, 191, .09);
}

.provider-group > p { margin-top: .9rem; font-size: .88rem; color: var(--text-faint); }

.provider-foot {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.6rem;
  align-items: center;
  font-size: .93rem;
  color: var(--text-faint);
}

/* ---------- Mobile section ---------- */

.mobile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 880px) {
  .mobile-grid { grid-template-columns: minmax(0, 1fr); }
  .mobile-shot { max-width: 17rem; margin-inline: auto; }
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }

.feature-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; }

.feature-list svg { width: 1.25rem; height: 1.25rem; color: var(--accent); margin-top: .15rem; }

.feature-list strong { display: block; font-family: var(--display); font-size: 1.06rem; font-weight: 700; letter-spacing: -.015em; }

.feature-list span { color: var(--text-dim); font-size: .95rem; }

.mobile-shot { margin: 0; }

.mobile-shot a {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .95);
}

.mobile-shot figcaption { margin-top: .8rem; font-size: .82rem; color: var(--text-faint); text-align: center; }

/* ---------- Automation ---------- */

.automate { background: var(--ground-deep); border-block: 1px solid var(--line); }

.automate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 900px) { .automate-grid { grid-template-columns: minmax(0, 1fr); } }

.terminal {
  background: #0a0c0e;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.terminal-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.terminal-bar i:first-child { background: var(--accent-deep); }
.terminal-bar span { margin-left: .5rem; }

.terminal pre {
  margin: 0;
  padding: 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.75;
  color: var(--text-dim);
  tab-size: 2;
}

@media (max-width: 560px) {
  .terminal pre { font-size: .72rem; padding: .9rem; }
}

.terminal .p { color: var(--lagoon); }
.terminal .c { color: var(--text-faint); }
.terminal .o { color: var(--text); }

.surface-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.surface-list li { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.surface-list strong { display: block; font-family: var(--display); font-size: 1.08rem; letter-spacing: -.015em; }
.surface-list span { color: var(--text-dim); font-size: .95rem; }
.surface-list code { font-family: var(--mono); font-size: .86em; color: var(--accent-link); }

/* ---------- Inside the app ---------- */

.inside-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

@media (max-width: 940px) { .inside-grid { grid-template-columns: minmax(0, 1fr); } }

.tag-list {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .85rem 1.1rem;
  align-items: baseline;
}

.tag-list li { display: contents; }
.tag-list b { font-family: var(--display); font-weight: 700; font-size: .95rem; color: var(--text); }
.tag-list span { color: var(--text-dim); font-size: .95rem; }

@media (max-width: 460px) {
  .tag-list { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .tag-list b { margin-bottom: -.7rem; }
}

/* ---------- Open source ---------- */

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.1rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.link-card:hover { color: inherit; border-color: var(--accent); transform: translateY(-3px); }
.link-card h3 { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.link-card h3 span { color: var(--accent); font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .link-card, .link-card:hover { transform: none; transition: none; }
}

/* ---------- Final CTA ---------- */

.cta { padding-block: var(--block); }

.cta-well {
  background:
    linear-gradient(135deg, var(--accent-warm), var(--accent-deep) 62%, #c8421f);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.8rem 2.5rem;
  align-items: center;
  color: #1a0f09;
}

@media (max-width: 800px) { .cta-well { grid-template-columns: minmax(0, 1fr); } }

.cta-well h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem); color: #190e08; }
.cta-well p { color: rgba(26, 15, 9, .9); margin-top: .6rem; font-size: 1.05rem; }

.cta-actions { display: grid; gap: .8rem; justify-items: start; }

.cta-well .button {
  background: #17191c;
  color: #fff6f1;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .9);
}

.cta-well .button:hover { background: #0e1012; color: #fff6f1; }

.cta-actions p { font-size: .9rem; color: rgba(26, 15, 9, .92); margin: 0; }
.cta-actions a:not(.button) { color: #3a1a0c; font-weight: 500; }
.cta-actions a:not(.button):hover { color: #190e08; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 2.6rem 3.2rem; }

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-top p { color: var(--text-dim); font-size: .95rem; margin-top: .7rem; max-width: 34ch; }

.footer-nav { display: flex; flex-wrap: wrap; gap: .7rem 1.6rem; }
.footer-nav a { color: var(--text-dim); font-size: .95rem; text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.6rem;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--text-faint);
}

.footer-bottom a { color: var(--text-dim); }
