/* SUBXVoice website. The same materials as the app: a soft-black stage where the voice lives, and
   cream paper where the words land. Ultramarine is the voice; nothing else is blue. */

@font-face {
  font-family: "Funnel Display";
  src: url("fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --page: #f2e8c8;
  --paper: #faf4df;
  --sunk: #e9ddb8;
  --ink: #161412;
  --ink-soft: #4a4438;
  --ink-faint: #6c6453;
  --accent: #3046e8;
  --stage: #161412;
  --stage-ink: #f2e8c8;
  --stage-soft: rgb(242 232 200 / 62%);
  --voice: #6b7cff;
  --rule: rgb(22 20 18 / 12%);
  --display: "Funnel Display", system-ui, sans-serif;
  --text: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img,
svg,
canvas {
  display: block;
}

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
}

/* ---------- Top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s;
}
.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.bar.scrolled {
  background: rgb(22 20 18 / 82%);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgb(242 232 200 / 8%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--stage-ink);
  text-decoration: none;
  font: 800 19px/1 var(--display);
  letter-spacing: -0.02em;
}
.brand b {
  font-weight: 400;
}
.brand img {
  width: 28px;
  height: 28px;
}
.bar nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.bar nav a {
  color: var(--stage-soft);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.bar nav a:hover {
  color: var(--stage-ink);
}
.bar nav .btn {
  color: var(--stage);
}
@media (max-width: 720px) {
  .bar nav a:not(.btn) {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  padding: 14px 22px;
  font: 600 16px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.15s, filter 0.2s, background 0.2s;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn.cream {
  background: var(--stage-ink);
  color: var(--stage);
  box-shadow: inset 0 1px 0 #fffbea, 0 10px 30px -10px rgb(0 0 0 / 60%);
}
.btn.cream:hover {
  filter: brightness(1.05);
}
.btn.ghost {
  background: rgb(242 232 200 / 8%);
  color: var(--stage-ink);
  box-shadow: inset 0 0 0 1px rgb(242 232 200 / 18%);
}
.btn.ghost:hover {
  background: rgb(242 232 200 / 14%);
}
.btn.ink {
  background: var(--ink);
  color: var(--page);
}
.btn.small {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
}
.btn small {
  font-weight: 400;
  opacity: 0.6;
  font-size: 13px;
}

/* ---------- Hero: the stage ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  background: var(--stage);
  color: var(--stage-ink);
  overflow: hidden;
  display: grid;
  align-items: center;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Black under the words, so they read over the characters without hiding the person. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 30%, rgb(22 20 18 / 70%) 55%, rgb(22 20 18 / 92%) 75%),
    linear-gradient(0deg, var(--stage) 0%, transparent 22%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-block: 120px 80px;
}
.hero-copy {
  grid-column: 2;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--voice);
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.hero h1 {
  font: 700 clamp(44px, 6.4vw, 88px) / 0.98 var(--display);
  letter-spacing: -0.035em;
  margin: 0;
}
.hero h1 .typed {
  color: var(--voice);
  white-space: nowrap;
}
.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  margin-left: 0.04em;
  background: var(--voice);
  vertical-align: -0.04em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.lede {
  max-width: 30ch;
  margin: 26px 0 36px;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--stage-soft);
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.fineprint {
  margin: 16px 0 0;
  font: 13px/1.5 var(--mono);
  color: rgb(242 232 200 / 45%);
}
.scrollcue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 2;
  translate: -50% 0;
  width: 22px;
  height: 34px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px rgb(242 232 200 / 35%);
}
.scrollcue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  translate: -50% 0;
  border-radius: 2px;
  background: var(--stage-ink);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% {
    opacity: 0;
    transform: translateY(-3px);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(9px);
  }
}

@media (max-width: 860px) {
  .hero {
    align-items: end;
  }
  .hero::after {
    background: linear-gradient(0deg, var(--stage) 35%, rgb(22 20 18 / 80%) 55%, transparent 80%);
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-block: 52vh 64px;
  }
  .hero-copy {
    grid-column: 1;
  }
  .scrollcue {
    display: none;
  }
}

/* ---------- Sections on paper ---------- */

section.paper {
  padding-block: clamp(80px, 12vw, 150px);
}
.kicker {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h2 {
  font: 700 clamp(34px, 4.6vw, 60px) / 1.02 var(--display);
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 18ch;
}
h3 {
  font: 650 22px/1.2 var(--display);
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.sub {
  max-width: 52ch;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
}

/* Reveal on scroll: a short rise, once. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- The demo: said → written ---------- */

.demo {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
}
.tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tab {
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: 500 16px/1.3 var(--text);
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, color 0.2s;
}
.tab:hover {
  color: var(--ink);
}
.tab[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}
/* How long until the next example: a thin line that fills along the bottom of the open tab. */
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: fill var(--cycle, 9s) linear forwards;
  opacity: 0.6;
}
.demo.paused .tab::after {
  animation-play-state: paused;
}
@keyframes fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.screen {
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 44px);
  min-height: 380px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 22px;
  box-shadow: 0 40px 80px -40px rgb(70 56 20 / 55%);
  position: relative;
  overflow: hidden;
}
.label {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(242 232 200 / 45%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.said {
  font: 400 clamp(17px, 1.7vw, 20px) / 1.6 var(--mono);
  color: var(--stage-soft);
  min-height: 3.2em;
}
.said .w {
  opacity: 0;
  transition: opacity 0.25s, color 0.4s, text-decoration-color 0.4s;
  text-decoration: line-through transparent 2px;
}
.said .w.on {
  opacity: 1;
}
.said .w.drop {
  color: rgb(242 232 200 / 32%);
  text-decoration-color: var(--voice);
}
.written {
  border-left: 3px solid var(--voice);
  padding-left: 18px;
  font: 500 clamp(20px, 2.2vw, 27px) / 1.45 var(--display);
  letter-spacing: -0.01em;
  white-space: pre-line;
  align-self: start;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.written.in {
  opacity: 1;
  transform: none;
}
.wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}
.wave i {
  width: 3px;
  border-radius: 2px;
  background: var(--voice);
  height: 30%;
  transition: height 0.12s;
}
.working {
  width: 26px;
  height: 26px;
  opacity: 0;
  transition: opacity 0.2s;
}
.working.on {
  opacity: 1;
}
@media (max-width: 760px) {
  .demo {
    grid-template-columns: 1fr;
  }
  .tabs {
    flex-direction: row;
    overflow-x: auto;
  }
  .tab {
    white-space: nowrap;
  }
}

/* The mark's motion: the wave breathes, the underscore blinks (the same as in the app). */
.motion-wave {
  transform-box: view-box;
  transform-origin: 50% 42%;
  animation: breathe 1.3s ease-in-out infinite;
}
.motion-cursor {
  animation: blink 1.1s steps(1) infinite;
}
@keyframes breathe {
  50% {
    transform: scaleY(0.5);
  }
}

/* ---------- Languages ---------- */

.langs {
  background: var(--stage);
  color: var(--stage-ink);
  padding-block: clamp(80px, 11vw, 140px);
  overflow: hidden;
}
.langs .kicker {
  color: var(--voice);
}
.langs .sub {
  color: var(--stage-soft);
}
.marquee {
  margin-top: 56px;
  display: grid;
  gap: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.row {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: slide 60s linear infinite;
}
.row.back {
  animation-direction: reverse;
  animation-duration: 75s;
}
.row span {
  font: 600 clamp(26px, 3vw, 40px) / 1 var(--display);
  padding: 18px 26px;
  border-radius: 16px;
  background: rgb(242 232 200 / 5%);
  box-shadow: inset 0 0 0 1px rgb(242 232 200 / 9%);
  white-space: nowrap;
}
.row span:nth-child(5n + 2) {
  color: var(--voice);
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .row {
    animation: none;
  }
}

/* ---------- Feature cards ---------- */

.cards {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--paper);
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -45px rgb(70 56 20 / 50%);
}
.card p {
  margin: 0;
  color: var(--ink-soft);
}
.vis {
  height: 200px;
  margin: -8px -8px 22px;
  border-radius: 16px;
  background: var(--sunk);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
@media (max-width: 960px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Card 1: the pill over a rotating app name. */
.app-name {
  font: 600 15px/1 var(--text);
  color: var(--ink-faint);
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  text-align: center;
  transition: opacity 0.3s;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: 999px;
  padding: 12px 20px;
  font: 500 15px/1 var(--text);
  box-shadow: 0 16px 30px -14px rgb(0 0 0 / 55%);
}
.pill .wave {
  height: 18px;
}
.pill .wave i {
  width: 3px;
}

/* Card 2: a word fixed and learned. */
.learn {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.learn .line {
  font: 500 19px/1.3 var(--display);
}
.learn mark {
  background: none;
  color: inherit;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: 14px;
  padding: 10px 16px 10px 12px;
  font: 500 14px/1.2 var(--text);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.toast.in {
  opacity: 1;
  transform: none;
}
.toast b {
  color: var(--voice);
  font-weight: 600;
}

/* Card 3: one sentence in three styles. */
.styles {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 0 22px;
}
.seg {
  display: inline-flex;
  justify-self: center;
  background: var(--page);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  font: 500 13px/1 var(--text);
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--page);
}
.bubble {
  background: var(--paper);
  border-radius: 14px;
  padding: 14px 16px;
  font: 15px/1.45 var(--text);
  min-height: 72px;
  transition: opacity 0.25s;
}

/* ---------- How it works ---------- */

.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font: 500 13px/1 var(--mono);
  color: var(--ink-faint);
  display: block;
  margin-bottom: 16px;
}
.step p {
  margin: 0;
  color: var(--ink-soft);
}
.key {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 56px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--paper);
  font: 600 20px/1 var(--text);
  box-shadow: inset 0 -4px 0 var(--sunk), 0 1px 0 var(--rule), 0 8px 18px -10px rgb(70 56 20 / 50%);
  animation: press 3.2s ease-in-out infinite;
}
@keyframes press {
  0%,
  12%,
  70%,
  100% {
    transform: none;
    box-shadow: inset 0 -4px 0 var(--sunk), 0 1px 0 var(--rule), 0 8px 18px -10px rgb(70 56 20 / 50%);
  }
  18%,
  64% {
    transform: translateY(3px);
    box-shadow: inset 0 -1px 0 var(--sunk), 0 1px 0 var(--rule), 0 3px 8px -6px rgb(70 56 20 / 50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .key {
    animation: none;
  }
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- Privacy band ---------- */

.private {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.facts li {
  background: var(--paper);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}
.facts li:first-child {
  border-radius: 16px 16px 0 0;
}
.facts li:last-child {
  border-radius: 0 0 16px 16px;
}
.facts svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--accent);
}
@media (max-width: 860px) {
  .private {
    grid-template-columns: 1fr;
  }
}

/* ---------- Final call ---------- */

.final {
  background: var(--stage);
  color: var(--stage-ink);
  text-align: center;
  padding-block: clamp(90px, 13vw, 160px);
  position: relative;
  overflow: hidden;
}
.final h2 {
  margin-inline: auto;
}
.final .sub {
  margin-inline: auto;
  color: var(--stage-soft);
}
.final .ctas {
  justify-content: center;
  margin-top: 36px;
}
.final .bigmark {
  width: 120px;
  height: 120px;
  margin: 0 auto 34px;
}

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

footer {
  background: var(--stage);
  color: rgb(242 232 200 / 55%);
  font-size: 14px;
  padding-block: 28px 40px;
  border-top: 1px solid rgb(242 232 200 / 8%);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}
footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--stage-ink);
}

/* ---------- Legal pages ---------- */

.legal {
  background: var(--page);
}
.legal .bar {
  background: var(--stage);
}
.doc {
  width: min(100% - 2 * var(--gutter), 760px);
  margin: 0 auto;
  padding: 140px 0 100px;
}
.doc h1 {
  font: 700 clamp(38px, 5vw, 56px) / 1.05 var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.doc .updated {
  font: 13px var(--mono);
  color: var(--ink-faint);
  margin: 0 0 40px;
}
.doc h2 {
  font-size: 26px;
  max-width: none;
  margin: 44px 0 12px;
}
.doc p,
.doc li {
  color: var(--ink-soft);
}
.doc li {
  margin-bottom: 8px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}
.doc th,
.doc td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.doc th {
  font-weight: 600;
  color: var(--ink);
}
.doc a {
  color: var(--accent);
}
