/* Bozza site. Colours and type follow the app (src/renderer/src/styles/tokens.css): limewash ground, moss for
   "yours, on, go", sky as the second wave colour, one family (Hanken Grotesk, self-hosted, OFL). Left-aligned,
   one reading column; the live demo in the hero is the single loud element. */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --wall: #e8eae5; /* limewash */
  --paper: #fbfcf9;
  --ink: #1f2420;
  --ink-soft: #4b544e;
  --rule: #d3d7cf;
  --moss: #3d7a4b;
  --moss-text: #33683f;
  --sky: #8fb0c3;
  /* the bar, as the app draws it */
  --bar: rgba(250, 251, 248, 0.94);
  --bar-solid: #fafbf8;
  --wave-1: rgba(61, 122, 75, 0.9);
  --wave-2: rgba(143, 176, 195, 0.85);
  --wave-3: rgba(31, 36, 32, 0.28);
  --lift: 0 18px 40px -24px rgba(38, 58, 48, 0.45);
  --font: 'Hanken Grotesk', ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --wall: #0d0e0d;
    --paper: #161716;
    --ink: #ecefeb;
    --ink-soft: #a6ada7;
    --rule: #2a2c2a;
    --moss: #8fd39b;
    --moss-text: #8fd39b;
    --sky: #6f93a8;
    --bar: rgba(18, 19, 18, 0.94);
    --bar-solid: #121312;
    --wave-1: rgba(143, 211, 155, 0.95);
    --wave-2: rgba(111, 147, 168, 0.85);
    --wave-3: rgba(236, 239, 235, 0.55);
    --lift: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  }
}

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

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

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-optical-sizing: auto;
}

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.top nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
}
.top nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.top nav a:hover,
.top nav a[aria-current='page'] {
  color: var(--ink);
}

/* Type scale: 17 body, 22 / 30 / 56 headings (a fourth step at a time). */
h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 650;
}
h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
.lede {
  max-width: 34em;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Hero */
.hero {
  display: grid;
  gap: 28px;
  padding-block: 40px 56px;
}
.status {
  font-size: 15px;
  color: var(--ink-soft);
}
.status strong {
  color: var(--ink);
  font-weight: 600;
}

/* The demo: a window with a draft, the dictation bar under it, and the key. */
.stage {
  position: relative;
  margin: 0;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 28px 28px 0;
  overflow: hidden;
}
.draft {
  max-width: 560px;
  min-height: 188px;
  font-size: 17px;
  line-height: 1.6;
}
.draft .meta {
  color: var(--ink-soft);
  font-size: 15px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.draft .body {
  min-height: 3.2em;
}
.draft .typed {
  transition: opacity 240ms ease-out;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--moss);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-block: 28px 32px;
}

/* The pill: 56×10 at rest, 240×42 while listening, with the moving ring and glow from the app. */
@property --spin {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
.bar {
  position: relative;
  display: flex;
  justify-content: center;
  --level: 0;
}
.bar.live {
  animation: spin 2.8s linear infinite;
}
@keyframes spin {
  to {
    --spin: 360deg;
  }
}
.pill {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 10px;
  border-radius: 999px;
  background: var(--bar);
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--rule), var(--lift);
  transition:
    width 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 240ms ease;
}
.bar.live .pill,
.bar.busy .pill {
  width: 240px;
  height: 42px;
  border-radius: 18px;
}
.bar.live .pill {
  border: 2px solid transparent;
  box-shadow: var(--lift);
  background:
    linear-gradient(var(--bar-solid), var(--bar-solid)) padding-box,
    conic-gradient(
        from var(--spin),
        color-mix(in srgb, var(--wave-1) calc(45% + var(--level) * 55%), transparent),
        color-mix(in srgb, var(--wave-2) calc(45% + var(--level) * 55%), transparent),
        color-mix(in srgb, var(--wave-1) 18%, transparent),
        color-mix(in srgb, var(--wave-1) calc(45% + var(--level) * 55%), transparent)
      )
      border-box;
}
.glow {
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  opacity: 0;
  background: conic-gradient(from var(--spin), var(--wave-1), var(--wave-2), color-mix(in srgb, var(--wave-1) 30%, transparent), var(--wave-1));
  filter: blur(calc(4px + var(--level) * 7px));
  transition: opacity 240ms ease;
}
.bar.live .glow {
  opacity: calc(0.28 + var(--level) * 0.62);
}
.pill canvas {
  display: block;
  width: 200px;
  height: 34px;
  opacity: 0;
  transition: opacity 160ms ease;
}
.bar.live canvas,
.bar.busy canvas {
  opacity: 1;
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  box-shadow:
    inset 0 0 0 1px var(--rule),
    0 3px 0 var(--rule);
  transition:
    transform 80ms ease,
    box-shadow 80ms ease;
}
.key.down {
  transform: translateY(3px);
  box-shadow:
    inset 0 0 0 1px var(--moss),
    0 0 0 var(--rule);
  color: var(--moss-text);
}
.dock .hint {
  font-size: 15px;
  color: var(--ink-soft);
  min-width: 9em;
}

/* Sections */
.section {
  padding-block: 56px;
  border-top: 1px solid var(--rule);
}
.section > h2 {
  margin-bottom: 28px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 6px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--moss);
  color: var(--paper);
  font-weight: 700;
  font-size: 15px;
}
.steps p,
.features dd {
  color: var(--ink-soft);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px 40px;
  margin: 0;
}
.features div {
  display: grid;
  gap: 6px;
  align-content: start;
}
.features dt {
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.features dd {
  margin: 0;
}
.pro {
  color: var(--moss-text);
  font-weight: 600;
  font-size: 15px;
  margin-left: 6px;
}

.plans {
  display: grid;
  gap: 16px;
  max-width: 40em;
}
.plans p {
  color: var(--ink-soft);
}
.plans p strong {
  color: var(--ink);
  font-weight: 600;
}

/* Long-form pages (privacy, support) */
.doc {
  max-width: 40em;
  padding-block: 32px 72px;
}
.doc h1 {
  font-size: clamp(36px, 6vw, 52px);
  max-width: none;
  margin-bottom: 12px;
}
.doc .updated {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 32px;
}
.doc h2 {
  font-size: 24px;
  margin: 44px 0 14px;
}
.doc h3 {
  margin: 28px 0 8px;
}
.doc p,
.doc ul {
  margin: 0 0 14px;
}
.doc ul {
  padding-left: 1.2em;
}
.doc li {
  margin-bottom: 8px;
}
.doc .summary {
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
  margin-bottom: 8px;
}
.doc details {
  border-top: 1px solid var(--rule);
  padding-block: 14px;
}
.doc details:last-of-type {
  border-bottom: 1px solid var(--rule);
}
.doc summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
}
.doc details > p,
.doc details > ul {
  margin-top: 10px;
  color: var(--ink-soft);
}
.contact {
  font-size: 22px;
  font-weight: 600;
  margin: 8px 0 20px;
}

/* Footer */
.foot {
  border-top: 1px solid var(--rule);
  padding-block: 28px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 15px;
  color: var(--ink-soft);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.foot a {
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .stage {
    padding: 20px 20px 0;
  }
  .dock {
    flex-direction: column-reverse;
    gap: 14px;
  }
  .dock .hint {
    text-align: center;
  }
  .top nav {
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bar.live,
  .caret {
    animation: none;
  }
  .pill,
  .key,
  .glow,
  .draft .typed {
    transition: none;
  }
}
