/* Red Dot App site. Colors and type follow the red-dot-app brand
   (assets/brand/README.md): the red dot is the only colored element. */

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("fonts/InterDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --dot: #E5372E;
  --dot-hot: #FF4B3E;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --paper: #FAFAF7;
  --pause: #8A8A8E;
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 38rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F5F5F7;
    --muted: #A1A1A6;
    --paper: #1C1C1E;
    --pause: #B0B0B5;
  }
}

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

body {
  font: 400 17px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

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

.wrap { max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 1.25rem/1 "Inter Display", Inter, system-ui, sans-serif; letter-spacing: -0.02em;
}
.brand::before {
  content: ""; width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--dot);
}
.lang { font-weight: 500; font-size: 0.9375rem; color: var(--muted); text-decoration: none; }
.lang:hover { color: var(--ink); }

/* Type */
h1, h2 {
  font-family: "Inter Display", Inter, system-ui, sans-serif;
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 22ch;
}
h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
p { max-width: var(--measure); text-wrap: pretty; }
.lead { font-size: clamp(1.125rem, 1.8vw, 1.3rem); line-height: 1.5; margin-top: 28px; max-width: 32rem; }
.muted { color: var(--muted); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  min-height: min(80vh, 760px);
  padding-block: clamp(32px, 6vw, 72px) clamp(56px, 8vw, 112px);
}
.status { margin-top: 32px; color: var(--muted); font-weight: 500; font-size: 0.9375rem; }

/* The demo dot: behaves like the tray icon. */
.demo { --d: clamp(150px, 22vw, 240px); display: grid; justify-items: center; gap: 22px; }
.stage { width: calc(var(--d) * 1.4); height: calc(var(--d) * 1.4); display: grid; place-items: center; }
.dot {
  width: var(--d); height: var(--d); border: 0; border-radius: 50%; padding: 0;
  background: var(--dot); cursor: pointer; touch-action: none;
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: background-color .18s ease, box-shadow .25s ease, transform .18s ease;
}
.dot:focus-visible { outline-offset: calc(var(--d) * 0.2); border-radius: 50%; }
.dot[data-state="listening"] { animation: breathe 3s ease-in-out infinite; }
.dot[data-state="capturing"] {
  background: var(--dot-hot);
  transform: scale(1.04);
  box-shadow: 0 0 0 calc(var(--d) * 0.13) color-mix(in srgb, var(--dot-hot) 20%, transparent);
}
.dot[data-state="processing"] {
  box-shadow:
    0 0 0 calc(var(--d) * 0.07) var(--paper),
    0 0 0 calc(var(--d) * 0.12) color-mix(in srgb, var(--dot) 60%, transparent);
}
.dot[data-state="paused"] {
  background: transparent;
  box-shadow: inset 0 0 0 calc(var(--d) * 0.1) var(--pause);
}
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .66; } }

.demo-state { font-weight: 500; min-height: 1.55em; text-align: center; }
.field {
  width: min(100%, 24rem); min-height: 4.4em; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 1rem; line-height: 1.45;
}
.field .placeholder { color: var(--muted); }
.caret {
  display: inline-block; width: 2px; height: 1.1em; margin-left: 1px;
  vertical-align: -0.18em; background: var(--ink);
}
.demo figcaption { color: var(--muted); font-size: 0.9375rem; text-align: center; max-width: 22rem; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.section > p { margin-top: 20px; }
.section > ul + p { margin-top: 36px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(32px, 5vw, 72px); margin-top: 40px; }
.cols h3 + p { margin-top: 10px; }

.states {
  list-style: none; padding: 0; margin-top: 44px;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 20px;
}
.states svg { width: 56px; height: 56px; display: block; }
.states b { display: block; margin-top: 14px; font-weight: 500; }
.states span { display: block; color: var(--muted); font-size: 0.9375rem; line-height: 1.45; margin-top: 2px; }
.s-dot { fill: var(--dot); }
.s-hot { fill: var(--dot-hot); }
.s-halo { fill: var(--dot-hot); opacity: .2; }
.s-ring { fill: none; stroke: var(--dot); stroke-width: 4; opacity: .55; }
.s-ring-faint { fill: none; stroke: var(--dot); stroke-width: 4; opacity: .25; }
.s-arc { fill: none; stroke: var(--dot); stroke-width: 4; stroke-linecap: round; }
.s-pause { fill: none; stroke: var(--pause); stroke-width: 6; }
.s-badge { fill: var(--ink); stroke: var(--paper); stroke-width: 3; }
.s-mark { fill: var(--paper); }

.list {
  list-style: none; padding: 0; margin-top: 36px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px);
}
.list li { padding-block: 14px; border-top: 1px solid var(--line); }
.list li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 5vw, 72px); margin-top: 40px; }
.facts p { margin-top: 8px; }

.platforms { list-style: none; padding: 0; margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.platforms b { display: block; font-size: 1.25rem; font-weight: 500; }
.platforms span { color: var(--muted); }

.foot { padding-block: 40px 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }

/* Narrow screens */
@media (max-width: 920px) {
  .states { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .cols, .facts, .list { grid-template-columns: 1fr; }
  .list li:nth-last-child(2) { border-bottom: 0; }
  .platforms { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .dot { transition: none; }
  .dot[data-state="listening"] { animation: none; }
}
