/*
  Voice Control for Gemini
  The recording bar is the one bold element. Everything else stays quiet.
*/

:root {
  --paper: #fafafc;
  --ink: #221e33;
  --ink-soft: #5b5670;
  --line: #dedbe8;
  --lilac: #eeeaf7;
  --violet: #7a44b8;
  --blue: #3e6ae8;
  --rec: #e5392f;
  --keycap: #ffffff;

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;

  --measure: 36rem;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

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

a {
  color: var(--violet);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

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

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 16px;
}

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

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

/* Buttons: the primary one borrows the shape of the bar's Send button */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--violet);
}

.btn-secondary {
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.fine-print {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Hero */

.hero {
  padding: clamp(32px, 7vw, 88px) 0 0;
}

.hero h1 {
  font-size: clamp(42px, 7.2vw, 88px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hero h1 span {
  display: block;
}

.hero .lead {
  max-width: var(--measure);
  margin: 28px 0 32px;
  font-size: 20px;
  color: var(--ink-soft);
}

/* The demo stage */

.stage {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 64px);
  background: var(--lilac);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
}

.bar {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
  padding: 10px 10px 10px clamp(16px, 2.5vw, 26px);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(62, 40, 120, 0.35);
  font-family: var(--display);
  font-size: clamp(18px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.bar .dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--rec);
  animation: pulse 1.2s ease-in-out infinite;
}

.bar .lang {
  letter-spacing: 0.02em;
}

.wave {
  display: flex;
  align-items: center;
  gap: 0.09em;
  height: 1em;
}

.wave span {
  width: 0.11em;
  height: 30%;
  border-radius: 1em;
  background: linear-gradient(var(--blue), var(--violet));
  animation: wave 0.9s ease-in-out infinite;
}

.wave span:nth-child(2) { animation-delay: -0.2s; }
.wave span:nth-child(3) { animation-delay: -0.5s; }
.wave span:nth-child(4) { animation-delay: -0.1s; }
.wave span:nth-child(5) { animation-delay: -0.7s; }
.wave span:nth-child(6) { animation-delay: -0.35s; }

.bar .time {
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 2.3em;
}

.bar .done {
  padding: 0 0.2em;
}

.bar .send {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.42em 0.8em;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: transform 0.12s, background-color 0.2s;
}

.bar .send svg {
  width: 0.8em;
  height: 0.8em;
}

.prompt {
  width: min(100%, 720px);
  min-height: 4.4em;
  padding: 18px 22px;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--line);
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink);
}

.prompt .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--blue);
  animation: blink 1s steps(1) infinite;
}

.prompt-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* End state after the demo runs */

.stage.is-sent .dot,
.stage.is-sent .wave span,
.stage.is-sent .caret {
  animation: none;
}

.stage.is-sent .dot {
  background: var(--line);
}

.stage.is-sent .wave span {
  height: 20%;
}

.stage.is-sent .send {
  background: var(--violet);
}

.stage.is-pressing .send {
  transform: scale(0.94);
}

@keyframes wave {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bar .dot,
  .wave span,
  .prompt .caret {
    animation: none;
  }

  .wave span:nth-child(odd) { height: 70%; }
  .wave span:nth-child(even) { height: 40%; }
}

/* Features */

.features {
  padding: clamp(72px, 10vw, 128px) 0 0;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(64px, 9vw, 112px);
}

.feature h2 {
  margin-bottom: 18px;
}

.feature p + p {
  margin-top: 12px;
}

.feature p,
.feature li {
  color: var(--ink-soft);
}

.feature ul {
  margin: 0;
  padding-left: 1.1em;
}

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

.feature q {
  color: var(--ink);
  quotes: "\201C" "\201D";
}

.shot {
  margin: 0;
  display: flex;
  justify-content: center;
  padding: clamp(20px, 4vw, 44px);
  background: var(--lilac);
  border-radius: 28px;
}

.shot img {
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px rgba(62, 40, 120, 0.45);
}

.shot.narrow img {
  max-width: 340px;
}

/* Shortcuts: drawn as keys */

.shortcuts {
  background: var(--ink);
  color: #fff;
  padding: clamp(64px, 9vw, 112px) 0;
}

.shortcuts .intro {
  max-width: var(--measure);
  margin: 16px 0 44px;
  color: #c9c4da;
}

.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px 40px;
  margin: 0;
}

.keys div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.keys dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.keys dd {
  margin: 0;
  color: #c9c4da;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--keycap);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 #cfcadc;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
}

kbd.space {
  min-width: 220px;
}

.plus {
  color: #8f89a6;
}

/* Install */

.install {
  padding: clamp(72px, 10vw, 128px) 0;
}

.install .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
}

.install h2 {
  margin-bottom: 28px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--violet);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  font-size: 15px;
  color: var(--ink-soft);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 32px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer .note {
  flex-basis: 100%;
  max-width: var(--measure);
}

/* Privacy page */

.legal {
  max-width: calc(40rem + 2 * var(--gutter));
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

.legal h1 {
  font-size: clamp(40px, 6vw, 60px);
  letter-spacing: -0.03em;
}

.legal .updated {
  margin: 14px 0 36px;
  color: var(--ink-soft);
}

.legal .summary {
  padding: 22px 26px;
  margin-bottom: 12px;
  background: var(--lilac);
  border-radius: 20px;
  font-size: 20px;
}

.legal h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
}

.legal p + p {
  margin-top: 14px;
}

.legal ul {
  margin: 14px 0;
  padding-left: 1.2em;
}

.legal li + li {
  margin-top: 6px;
}

.legal code {
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--lilac);
}

/* Small screens */

@media (max-width: 820px) {
  .feature,
  .install .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav .optional {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .brand span {
    display: none;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .bar .done {
    display: none;
  }

  kbd.space {
    min-width: 160px;
  }
}

/* Support page */

.legal ol {
  margin: 14px 0;
  padding-left: 1.4em;
}

.legal ol li + li {
  margin-top: 6px;
}

.legal h2[id] {
  scroll-margin-top: 24px;
}

.toc {
  padding: 22px 26px;
  background: var(--lilac);
  border-radius: 20px;
}

.toc ul {
  margin: 0;
  padding-left: 1.1em;
}

.toc a {
  color: var(--ink);
}

.toc a:hover {
  color: var(--violet);
}

kbd.inline {
  min-width: 0;
  height: auto;
  padding: 1px 8px;
  border-radius: 6px;
  box-shadow: inset 0 -2px 0 #cfcadc, 0 0 0 1px var(--line);
  font-size: 0.85em;
}

.contact {
  margin-top: 56px;
  padding: 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
}

.contact h2 {
  margin-top: 0;
}

.contact a {
  color: #d9c8f5;
}

/* Hands-free loop */

.shot.loop {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loop ol {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 0;
  list-style: none;
}

/* The return path from the last state back to the first */
.loop ol::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: -28px;
  width: 28px;
  border: 2px dashed #b9aee0;
  border-right: 0;
  border-radius: 18px 0 0 18px;
}

.loop li {
  display: flex;
  align-items: center;
  gap: 18px;
}

.loop .state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 14px 22px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -18px rgba(62, 40, 120, 0.35);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.loop .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.loop .dot.rec {
  background: var(--rec);
}

.loop .dot.play {
  background: var(--blue);
}

.loop .caption {
  color: var(--ink-soft);
  font-size: 16px;
}

.loop .again {
  font-size: 15px;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .loop li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .loop .state {
    min-width: 170px;
  }
}
