/*
 * TouchBack site styles.
 *
 * The palette is SRS §6.2, verbatim: a deep midnight room, warm peach light
 * for you, cool periwinkle light for them, and the rose-violet they make when
 * they meet. Soft bloom rather than neon, thin restrained borders, glass that
 * barely shows, generous whitespace.
 *
 * The app is one dark world and so is the site. `color-scheme: dark` is
 * declared so a browser does not invent a light theme around it.
 */

:root {
  /* Backgrounds and surfaces */
  --bg: #070b10;
  --bg-alt: #0b1118;
  --surface: rgba(20, 26, 36, 0.78);
  --surface-2: rgba(27, 32, 43, 0.72);
  --surface-solid: #111822;

  /* Ink */
  --ink: #f5f3f2;
  --ink-soft: #a9a7ae;
  --ink-faint: #6f7480;

  /* The two people */
  --warm: #ffaa94;
  --warm-soft: #f6a9a7;
  --cool: #8da7ff;
  --cool-soft: #a38cff;
  --overlap: #d69ae7;

  --cta-bg: #f6e5de;
  --cta-ink: #11141a;
  --presence: #45d67a;
  --danger: #ff7e7e;

  --outline: rgba(255, 255, 255, 0.1);
  --outline-strong: rgba(255, 255, 255, 0.16);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --page-max: 1120px;

  /* Light, not shadow: on a near-black page depth comes from glow. */
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.35);
  --glow-warm: 0 0 40px rgba(255, 170, 148, 0.35);
  --glow-cool: 0 0 40px rgba(141, 167, 255, 0.35);

  --font-ui: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  --font-accent: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;

  color-scheme: dark;
}

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

/* The browser's own `[hidden] { display: none }` is an attribute selector, so
   any class that sets `display` outranks it. Anything toggled with the
   `hidden` property needs this to actually disappear. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;

  /* Two faint pools of light — one warm, one cool — fixed behind the page, so
     it feels like the dim room the app is set in rather than a flat black. */
  background-image:
    radial-gradient(820px 520px at 12% -8%, rgba(255, 170, 148, 0.1), transparent 70%),
    radial-gradient(900px 600px at 92% 6%, rgba(141, 167, 255, 0.12), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* A breath of grain so the gradients do not band into stripes. SRS §6.1. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--warm);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--cta-bg);
  color: var(--cta-ink);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ type -- */

/* Headers are light, never extra-bold. SRS §6.3. */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
}

h3 {
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 60ch;
}

h1 + .lead,
h2 + .lead,
h3 + .lead {
  margin-top: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--warm), var(--cool));
}

/* The serif italic is punctuation, used where a person would lean in — the
   second half of the brand line, a scribbled aside. Never UI, never legal. */
.accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: linear-gradient(95deg, var(--warm) 0%, var(--overlap) 50%, var(--cool) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.scribble {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--warm-soft);
  opacity: 0.9;
}

.warm {
  color: var(--warm);
}

.cool {
  color: var(--cool);
}

/* ------------------------------------------------------------------ nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 16, 0.72);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--outline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--outline);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 3px;
  flex: none;
}

.lang-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  cursor: pointer;
}

.lang-switch button.is-active {
  background: var(--ink);
  color: var(--cta-ink);
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
}

/* The app's CTA: a soft pearl pill with dark type. SRS §6.2 cta.* */
.btn-primary {
  background: linear-gradient(180deg, #fbf0eb, var(--cta-bg));
  color: var(--cta-ink);
  box-shadow: 0 8px 30px rgba(246, 229, 222, 0.12);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 40px rgba(246, 229, 222, 0.22);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--outline-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.26);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.9rem;
  flex: none;
}

/* A store CTA with no URL is not a link, and must not look like one. */
.is-disabled {
  cursor: default;
  pointer-events: none;
}

.btn.is-disabled {
  background: var(--surface);
  color: var(--ink-faint);
  border-color: var(--outline);
  box-shadow: none;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.store-badge {
  display: inline-block;
  border-radius: 13px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badge:not(.is-disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(141, 167, 255, 0.18);
}

.store-badge.is-disabled {
  opacity: 0.72;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* The presence dot from the Touch Room: green means they are here. */
.dot-here {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--presence);
  flex: none;
  box-shadow: 0 0 0 4px rgba(69, 214, 122, 0.14);
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  padding: 72px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero h1 .accent {
  display: block;
  font-size: 1.08em;
  line-height: 1.02;
}

.hero-scribble {
  margin-top: 30px;
}

/* ---------------------------------------------------------- touch demo --- */

/* A working miniature of the Touch Room. Move over it and your warm light
   follows; theirs drifts to meet you. landing.js drives it; without script,
   or under Reduce Motion, it is a still of two touches meeting. */
.demo {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 460px;
  margin-left: auto;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(141, 167, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(24, 31, 44, 0.9), rgba(12, 17, 25, 0.92));
  border: 1px solid var(--outline-strong);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

.demo-head {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.demo-title {
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.demo-presence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.demo svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.demo-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.demo-status strong {
  display: block;
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.demo-status span {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.demo.is-connected .demo-status strong {
  color: #f3dcfa;
  letter-spacing: 0.24em;
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
}

.demo-hint {
  margin-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 460px;
  margin-left: auto;
}

.orb-halo {
  transition: opacity 0.3s ease;
}

.demo .bloom {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.demo.is-connected .bloom {
  opacity: 1;
}

/* --------------------------------------------------------------- promise -- */

.promise-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

.promise {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.promise strong {
  display: block;
  font-weight: 400;
  font-size: 1.08rem;
}

.promise span {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.ring-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--outline-strong);
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.06), transparent 70%);
  color: var(--warm);
}

.ring-icon.cool {
  color: var(--cool);
}

.ring-icon.overlap {
  color: var(--overlap);
}

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

.section {
  padding: 96px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(11, 17, 24, 0.9), rgba(11, 17, 24, 0.6));
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
}

.section-head {
  max-width: 680px;
  margin-bottom: 52px;
}

.section-head .lead {
  margin-top: 18px;
}

.section-head.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head.centered .lead {
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------------- grids -- */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--outline-strong);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.card .ring-icon {
  margin-bottom: 20px;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--outline-strong);
  color: var(--ink);
  font-weight: 400;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.step-code {
  display: inline-block;
  margin-top: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--outline-strong);
  color: var(--ink);
}

/* ------------------------------------------------------------ room flow --- */

/* The Touch Room's states, in the order a session moves through them. */
.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  counter-reset: flow;
}

.flow-item {
  position: relative;
  padding: 24px 18px 22px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
}

.flow-item svg {
  width: 100%;
  height: 74px;
  margin-bottom: 16px;
}

.flow-item h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.flow-item p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.flow-quote {
  display: block;
  margin-top: 12px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--warm-soft);
}

/* ---------------------------------------------------------------- memory -- */

.memory-card .glyph {
  height: 120px;
  margin: -6px -6px 18px;
  border-radius: var(--r-md);
  background: radial-gradient(90% 90% at 50% 40%, rgba(214, 154, 231, 0.1), transparent 70%),
    rgba(7, 11, 16, 0.5);
  border: 1px solid var(--outline);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.memory-card .glyph svg {
  width: 100%;
  height: 100%;
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--outline-strong);
  color: var(--ink-soft);
  margin-left: 8px;
  vertical-align: 3px;
}

.tag-plus {
  border-color: rgba(214, 154, 231, 0.4);
  color: var(--overlap);
}

/* ------------------------------------------------------------------ plus -- */

.plus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 52px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(214, 154, 231, 0.22);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(255, 170, 148, 0.1), transparent 60%),
    radial-gradient(80% 120% at 100% 100%, rgba(141, 167, 255, 0.12), transparent 60%),
    var(--surface-solid);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4);
}

.plus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.plus-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  color: var(--ink);
}

.plus-list li::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--overlap) 60%, transparent 100%);
  box-shadow: 0 0 12px rgba(214, 154, 231, 0.7);
}

.plus-free {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--outline);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.plus-free strong {
  color: var(--ink);
  font-weight: 500;
}

/* ----------------------------------------------------------------- quiet -- */

/* The privacy promise. It is the product's premise — a room for two, nobody
   else in it — so it gets a surface of its own. */
.quiet {
  background: linear-gradient(160deg, #0f1520 0%, #0a0f16 100%);
  border: 1px solid var(--outline);
  border-radius: var(--r-xl);
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
}

.quiet::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(141, 167, 255, 0.16), transparent);
  pointer-events: none;
}

.quiet h2 {
  max-width: 16ch;
}

.quiet .lead {
  margin-top: 20px;
  max-width: 64ch;
}

.quiet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.quiet-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  padding: 20px;
}

.quiet-item strong {
  display: block;
  font-weight: 400;
  font-size: 1.04rem;
  margin-bottom: 6px;
}

.quiet-item span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------- cta -- */

.cta {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-xl);
  padding: 72px 40px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Two lights about to meet, behind the copy. */
.cta::before,
.cta::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  top: 50%;
  pointer-events: none;
  animation: approach 10s ease-in-out infinite;
}

.cta::before {
  left: 8%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 170, 148, 0.2), transparent);
}

.cta::after {
  right: 8%;
  transform: translate(50%, -50%);
  background: radial-gradient(closest-side, rgba(141, 167, 255, 0.22), transparent);
  animation-direction: reverse;
}

@keyframes approach {
  0%,
  100% {
    margin-left: 0;
    margin-right: 0;
  }
  50% {
    margin-left: 40px;
    margin-right: 40px;
  }
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta .lead {
  margin: 20px auto 0;
  max-width: 52ch;
}

.cta .store-row {
  justify-content: center;
}

/* ---------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--outline);
  padding: 48px 0 42px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-legal {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--outline);
  color: var(--ink-faint);
  font-size: 0.86rem;
}

/* ------------------------------------------------------------ doc pages -- */

.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 90px;
}

.doc h1 {
  font-size: clamp(2.2rem, 5vw, 3.1rem);
}

.doc h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin: 50px 0 14px;
  padding-top: 8px;
}

.doc h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: #cfcdd3;
  font-size: 1rem;
}

.doc strong {
  color: var(--ink);
  font-weight: 500;
}

.doc p + p,
.doc p + ul,
.doc p + ol,
.doc ul + p,
.doc ol + p {
  margin-top: 14px;
}

.doc ul,
.doc ol {
  margin: 14px 0;
  padding-left: 24px;
}

.doc li + li {
  margin-top: 8px;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 2px 6px;
}

.updated {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 12px !important;
}

.callout {
  background: linear-gradient(135deg, rgba(255, 170, 148, 0.08), rgba(141, 167, 255, 0.08));
  border: 1px solid var(--outline-strong);
  border-radius: var(--r-md);
  padding: 22px 24px;
  margin: 28px 0;
}

.callout.warn {
  background: rgba(255, 126, 126, 0.07);
  border-color: rgba(255, 126, 126, 0.28);
}

.doc-toc {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 30px 0 10px;
}

.doc-toc h2 {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
  padding: 0;
  font-weight: 500;
}

.doc-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.doc-toc li {
  margin: 0 0 6px;
  break-inside: avoid;
}

.doc-toc a {
  font-size: 0.95rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  background: var(--surface);
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  font-size: 0.94rem;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
  color: #cfcdd3;
}

th {
  background: var(--surface-2);
  font-weight: 500;
  color: var(--ink);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--outline);
}

/* --------------------------------------------------------------- support -- */

.faq {
  border: 1px solid var(--outline);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 18px 22px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 400;
  font-size: 1.04rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--warm);
  line-height: 1;
  flex: none;
}

.faq[open] summary::after {
  content: '\2013';
}

.faq[open] summary {
  margin-bottom: 12px;
}

.faq p,
.faq li {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.faq p + p {
  margin-top: 10px;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  margin: 30px 0 46px;
  border-radius: var(--r-lg);
  border: 1px solid var(--outline-strong);
  background: linear-gradient(135deg, rgba(255, 170, 148, 0.07), rgba(141, 167, 255, 0.07));
}

.contact-card p {
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- redirect -- */

/* The invite fallback: what a TouchBack link shows on a device that did not
   hand it to the app. */
.redirect {
  min-height: 82vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 24px;
}

.redirect-inner {
  max-width: 480px;
}

.redirect h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin: 26px 0 12px;
}

.redirect p {
  color: var(--ink-soft);
}

.redirect .brand {
  justify-content: center;
  margin-bottom: 34px;
}

.redirect .store-row {
  justify-content: center;
}

.meet {
  width: 150px;
  height: 70px;
  margin: 0 auto;
}

.invite-steps {
  text-align: left;
  margin: 30px auto 0;
  padding: 20px 22px 20px 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.invite-steps li + li {
  margin-top: 8px;
}

.invite-steps strong {
  color: var(--ink);
  font-weight: 500;
}

.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--outline-strong);
  border-top-color: var(--warm);
  border-right-color: var(--cool);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ambient motion, used sparingly: a breath, a drift. */
.breathe {
  animation: breathe 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 980px) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
  }

  .quiet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .demo,
  .demo-hint {
    margin-left: auto;
    margin-right: auto;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .promise-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .plus {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px 32px;
  }

  .nav-links {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 44px 0 64px;
  }

  .section {
    padding: 68px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .flow,
  .quiet-grid {
    grid-template-columns: 1fr;
  }

  .flow-item svg {
    height: 64px;
  }

  .quiet {
    padding: 40px 22px;
    border-radius: var(--r-lg);
  }

  .plus {
    padding: 36px 20px;
    border-radius: var(--r-lg);
  }

  .cta {
    padding: 50px 20px;
  }

  .doc-toc ol {
    columns: 1;
  }

  .store-row .store-badge img {
    width: 170px;
    height: auto;
  }

  .brand-tag {
    display: none;
  }

  /* Brand + language switch + a download button do not fit across a phone,
     and a flex row that does not fit widens the whole document. The button
     is the one that goes: the hero's store badges are a screen away. */
  .nav .btn {
    display: none;
  }
}

/* Reduce Motion is honoured in the app, and it is here too. Every decorative
   animation stops; nothing that conveys meaning depended on one. SRS §6.5. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .nav,
  .footer,
  .doc-nav,
  .store-row {
    display: none;
  }

  body,
  body::before {
    background: #fff;
    color: #000;
  }

  .doc p,
  .doc li,
  .doc h1,
  .doc h2,
  .doc h3 {
    color: #000;
  }
}
