@import url("tokens.css");

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(72rem, calc(100% - 3rem));
  margin-inline: auto;
}

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

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 650;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 2.4rem; height: 2.4rem; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  color: var(--ink);
  border-radius: var(--pill);
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.nav-cta:hover { text-decoration: none; filter: brightness(0.97); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--pill);
  padding: 0.95rem 1.6rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.btn:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

/* Sections */

section { padding: 5rem 0; }

.kicker {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
}

h1, h2, h3 { margin: 0; text-wrap: balance; }

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

/* Hero */

.hero {
  padding: 2.2rem 0 4.5rem;
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  max-width: 62rem;
  margin: 0 auto 1.3rem;
  font-size: clamp(2.05rem, 4.7vw, 3.75rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.hero .sub {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.45;
}

.assistants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Each name is a caption set clear of its logo, not part of it. */
.assistants li {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 450;
}
.assistants img { height: 1.75rem; width: auto; }
/* OpenAI's file carries its own clear space around the Blossom, so it is shown
   larger to sit at the size of the other three. */
.assistants img[src*="openai"] { height: 3.4rem; margin: -0.825rem -0.75rem; }
.pick img[src*="openai"] { height: 4.3rem; margin: -1.025rem 0; }

/* The recording sits on the ribbon. */
.stage {
  position: relative;
  margin: 2.6rem 0 2.8rem;
  padding: 3.4rem 0;
}
.ribbon {
  position: absolute;
  left: 50%;
  top: 0;
  width: max(100vw, 80rem);
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}
.player {
  position: relative;
  width: min(50rem, 100%);
  margin: 0 auto;
}
.player video {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  box-shadow: 0 1.5rem 3.5rem -1.5rem rgb(29 29 29 / 0.28);
}

.clips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
}
.clip-tab,
.clip-toggle {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--paper);
  color: var(--ink);
  padding: 0.42rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.3;
  cursor: pointer;
}
.clip-tab:hover,
.clip-toggle:hover { border-color: var(--ink); }
.clip-tab[aria-pressed="true"] { border-color: var(--ink); }
/* How far the current recording has played. */
.clip-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pink);
  transform-origin: left;
  transform: scaleX(var(--played, 0));
}
.clip-tab span { position: relative; }
.clip-toggle {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
}
.clip-toggle svg { width: 0.8rem; height: 0.8rem; }
.clip-toggle .icon-play,
.clip-toggle.is-paused .icon-pause { display: none; }
.clip-toggle.is-paused .icon-play { display: block; }
/* Without scripting the first recording loops on its own. */
html:not(.js) .clips { display: none; }

/* Who it's for */

.who { text-align: center; }
.who .statement {
  max-width: 50rem;
  margin: 0 auto;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* How it works */

.how-head {
  max-width: 50rem;
  margin: 0 auto 4.5rem;
  text-align: center;
}

.steps {
  display: grid;
  gap: 5.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}
.step-copy { max-width: 26rem; justify-self: end; }
.step:nth-child(even) .step-copy { order: 2; justify-self: start; }
.step h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.055em;
}
.step:nth-child(1) h3 { color: var(--ribbon-2); }
.step:nth-child(2) h3 { color: var(--ribbon-4); }
.step:nth-child(3) h3 { color: var(--ribbon-5); }
.step p {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.step figure { margin: 0; width: min(27rem, 100%); }
.step:nth-child(even) figure { justify-self: end; }
/* The screenshots carry the chat frame's own rounded corners. */
.step figure img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1.2rem 1.6rem rgb(29 29 29 / 0.14));
}

/* Connect */

.connect { text-align: center; padding-bottom: 6rem; }
.connect h2 { margin-bottom: 2rem; }

.picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.pick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: 9.5rem;
  padding: 1.6rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.pick img { height: 2.25rem; width: auto; }
.pick:hover { border-color: var(--ink); }
.pick[aria-selected="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
html:not(.js) .picker { display: none; }

.setup { text-align: left; }
/* Without scripting all four sets of steps show, one under the other. */
html:not(.js) .setup[hidden] { display: block; }
html:not(.js) .setup + .setup { margin-top: 3rem; }
.setup-name {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.js .setup-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.setup ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.setup li {
  counter-increment: step;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.setup li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--pink);
  font-size: 0.95rem;
  font-weight: 650;
}
.setup h4 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.setup li p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.setup li p + p { margin-top: 0.6rem; }
.setup q { color: var(--ink); font-weight: 500; quotes: "“" "”"; }

.link-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.9rem;
}
.link-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--cream);
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0;
}
.copy {
  flex: none;
  border: 0;
  border-radius: 0.6rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  cursor: pointer;
}
.copy:hover { background: #000; }

.setup .who-can {
  margin: 1.2rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

.connect-cta { margin: 2.2rem 0 0; text-align: center; }
.connect-status {
  min-height: 1.5em;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

footer {
  padding: 0 0 2.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}
footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.3rem;
}
footer .brand { font-size: 1rem; }
footer .brand img { width: 1.5rem; height: 1.5rem; }
footer nav { display: flex; gap: 1.5rem; }
footer nav a { color: var(--muted); }
footer nav a:hover { color: var(--ink); }
.marks {
  margin: 1.2rem auto 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

/* Privacy page */

.prose {
  width: min(40rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}
.prose h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.prose h2 { margin: 2.2rem 0 0.5rem; font-size: 1.4rem; letter-spacing: -0.04em; }
.prose p { margin: 0 0 1rem; }

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; gap: 1.8rem; }
  .step-copy,
  .step:nth-child(even) .step-copy { order: 0; justify-self: center; text-align: center; }
  .step figure,
  .step:nth-child(even) figure { justify-self: center; }
  .steps { gap: 4rem; }
  .setup ol { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: min(72rem, calc(100% - 2rem)); }
  section { padding: 3.4rem 0; }
  .hero { padding: 1.2rem 0 3rem; }
  .hero .sub { font-size: 1.12rem; }
  .assistants { display: grid; grid-template-columns: auto auto; gap: 1.1rem 2.2rem; }
  .stage { margin: 1.8rem 0 2rem; padding: 2.6rem 0; }
  .player video { aspect-ratio: 2 / 3; border-radius: 1rem; }
  .clips { gap: 0.35rem; }
  .clip-tab { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
  .clip-toggle { width: 2rem; height: 2rem; }
  .how-head { margin-bottom: 3rem; }
  .step p { font-size: 1.15rem; }
  .picker { display: grid; grid-template-columns: 1fr 1fr; }
  .pick { width: auto; }
  .connect { padding-bottom: 4rem; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
