/* Cikut landing. Family layer (record line, scale, endorsement) comes from
   brand/record.css; this file sets the Cikut face, ground and accent. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-Variable.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-display: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --brand-text: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --brand-accent: #3b82f6;
  --brand-accent-hover: #60a5fa;
  /* Ink navy on signal blue is 5.2:1; white on signal blue fails AA. */
  --brand-accent-ink: #0b1120;
}

/* Cikut has one ground: ink navy. The neutral ramp is re-tinted toward it. */
:root[data-ground='dark'] {
  --rm-ink: #eef2f8;
  --rm-ink-2: #b3bdcf;
  --rm-ink-3: #8a96ad;
  --rm-paper: #0b1120;
  --rm-paper-2: #111a2e;
  --rm-paper-3: #18233b;
  --rm-line: rgb(203 216 240 / 11%);
  --rm-line-strong: rgb(203 216 240 / 20%);
  color-scheme: dark;
}

html {
  background: var(--rm-paper);
}

body {
  font-family: var(--brand-text);
  font-size: var(--rm-step-0);
  line-height: 1.55;
  color: var(--rm-ink);
  background: var(--rm-paper);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgb(59 130 246 / 35%);
  color: var(--rm-ink);
}

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

.shell {
  width: 100%;
  max-width: var(--rm-shell);
  margin-inline: auto;
  padding-inline: var(--rm-gutter);
}

.skip {
  position: absolute;
  left: var(--rm-gutter);
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--rm-ink);
  color: var(--rm-paper);
  z-index: 10;
}

.skip:focus {
  top: 0.75rem;
}

h1,
h2 {
  font-family: var(--brand-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code,
kbd {
  font-family: var(--brand-mono);
  font-size: 0.9em;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.top {
  padding-block: 1.5rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.04em;
}

/* ── Hero: the promise, the one action, and the room as a record ─────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
  padding-block: clamp(3rem, 9vw, 8rem) clamp(4rem, 10vw, 9rem);
}

.hero h1 {
  font-size: var(--rm-step-4);
  font-stretch: 92%;
  max-width: 11ch;
}

.lede {
  margin-top: 1.75rem;
  max-width: 34ch;
  font-size: var(--rm-step-1);
  line-height: 1.45;
  color: var(--rm-ink-2);
}

.act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2.5rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  background: var(--brand-accent);
  color: var(--brand-accent-ink);
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  transition: background-color 160ms ease;
}

.cta:hover {
  background: var(--brand-accent-hover);
}

.cta:focus-visible {
  outline-color: var(--brand-accent-hover);
}

.opening {
  margin-top: 1.25rem;
  max-width: 34ch;
  color: var(--rm-ink);
  font-weight: 550;
}

.aside {
  margin-top: 1.5rem;
  max-width: 40ch;
  font-size: var(--rm-step--1);
  color: var(--rm-ink-3);
}

.aside code {
  color: var(--rm-ink-2);
}

.aside a,
.form__consent a,
.legal a {
  text-decoration: underline;
  text-decoration-color: var(--rm-line-strong);
  text-underline-offset: 0.2em;
}

.hero__record {
  margin: 0;
}

.hero__record .rm-record__row {
  grid-template-columns: 5ch 9ch 1fr auto;
}

.hero__record figcaption {
  margin-top: 1rem;
  font-size: var(--rm-step--1);
  color: var(--rm-ink-3);
}

/* ── Identity: the handle at room scale ───────────────────────────────── */

.identity {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--rm-line);
  background: var(--rm-paper-2);
  overflow: hidden;
}

.handle {
  padding-inline: var(--rm-gutter);
  font-family: var(--brand-mono);
  font-size: clamp(2rem, 9vw, 9.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.95;
  white-space: nowrap;
  max-width: var(--rm-shell);
  margin-inline: auto;
}

.handle__server {
  color: var(--rm-ink-3);
}

.identity__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 6vw, 5rem);
}

.identity h2 {
  font-size: var(--rm-step-3);
  max-width: 14ch;
}

.identity__copy p {
  max-width: 44ch;
  color: var(--rm-ink-2);
}

.identity__copy p + p {
  margin-top: 1.25rem;
}

/* ── The web client, drawn from services/widget/src/widget/ui ──────────
   Structure follows FullscreenShell: Sidebar (Messages list) + ChatArea.
   Sent bubbles are a neutral tint here so the accent stays on the one action. */

.client {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.client__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.client__head h2 {
  font-size: var(--rm-step-3);
  max-width: 16ch;
}

.client__head p {
  max-width: 36ch;
  color: var(--rm-ink-3);
  font-size: var(--rm-step--1);
}

.app {
  display: grid;
  grid-template-columns: 17.5rem 1fr;
  height: 30rem;
  border: 1px solid var(--rm-line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a1a;
  font-size: 14px;
  line-height: 1.45;
}

.app__rooms {
  border-right: 1px solid var(--rm-line);
  overflow: hidden;
}

.app__rooms-head,
.app__chat-head {
  padding: 1rem 1.125rem;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--rm-line);
}

.app__room {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
}

.app__room.is-active {
  background: #1a1a2e;
}

.app__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #1a1a2e;
  border: 1px solid var(--rm-line);
  font-size: 13px;
  font-weight: 600;
  color: var(--rm-ink-2);
}

.app__room-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.125rem;
}

.app__room-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.app__room-name {
  font-weight: 600;
}

.app__room-time,
.app__room-preview {
  color: #9ca3af;
  font-size: 13px;
}

.app__room-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app__badge {
  min-width: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  background: var(--rm-ink-2);
  color: #0a0a1a;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.app__chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.app__messages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  overflow: hidden;
  justify-content: flex-end;
}

.app__msg {
  max-width: 80%;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  background: #1a1a2e;
  align-self: flex-start;
}

.app__msg.is-sent {
  align-self: flex-end;
  background: #2b3a5c;
}

.app__msg-time {
  display: block;
  margin-top: 0.25rem;
  font-size: 11px;
  color: #9ca3af;
}

.app__msg.is-sent .app__msg-time {
  color: rgb(255 255 255 / 70%);
}

.app__compose {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--rm-line);
}

.app__input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--rm-line);
  border-radius: 8px;
  color: #9ca3af;
}

.app__send {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #2b3a5c;
}

/* ── WhatsApp: one sentence, then the path the chat takes ─────────────── */

.bridge {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--rm-line);
}

.bridge h2 {
  font-size: var(--rm-step-3);
  max-width: 20ch;
}

.path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rm-line-strong);
}

.path li {
  position: relative;
  padding: 1.5rem 2rem 0 0;
  color: var(--rm-ink-2);
  max-width: 30ch;
}

.path li::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rm-ink);
}

.path strong {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--rm-ink);
  font-weight: 600;
  font-size: var(--rm-step-1);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* ── Next: the planned team room, as the record it would leave ─────────── */

.next {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--rm-line);
}

.next__head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.next__head h2 {
  font-size: var(--rm-step-3);
  max-width: 18ch;
}

.next__head p {
  max-width: 36ch;
  color: var(--rm-ink-3);
  font-size: var(--rm-step--1);
}

.next__record {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}

.next__record .rm-record__row {
  grid-template-columns: 5ch 15ch 1fr auto;
}

.next__record figcaption {
  margin-top: 1rem;
  font-size: var(--rm-step--1);
  color: var(--rm-ink-3);
}

.next__terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}

.next__terms dt {
  font-weight: 600;
  font-size: var(--rm-step-1);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.next__terms dd {
  margin: 0.5rem 0 0;
  max-width: 44ch;
  color: var(--rm-ink-2);
}

/* ── Waitlist ─────────────────────────────────────────────────────────── */

.waitlist {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--rm-line);
  background: var(--rm-paper-2);
  scroll-margin-top: 1rem;
}

.waitlist__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.waitlist h2 {
  font-size: var(--rm-step-3);
}

.waitlist__intro p {
  margin-top: 1.5rem;
  max-width: 36ch;
  color: var(--rm-ink-2);
  font-size: var(--rm-step-1);
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 1.5rem;
}

.form__row {
  display: grid;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.form label,
.form legend {
  font-weight: 550;
}

.form__optional {
  margin-left: 0.4em;
  font-weight: 400;
  color: var(--rm-ink-3);
  font-size: var(--rm-step--1);
}

.form input[type='text'],
.form input[type='email'],
.form textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rm-line-strong);
  border-radius: 8px;
  background: var(--rm-paper);
  color: var(--rm-ink);
  font: inherit;
}

.form input::placeholder {
  color: var(--rm-ink-3);
}

.form textarea {
  resize: vertical;
}

.form__choice {
  gap: 0.625rem;
}

.form__choice legend {
  margin-bottom: 0.5rem;
}

.form__choice label,
.form__consent {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-weight: 400;
  color: var(--rm-ink-2);
}

.form input[type='radio'],
.form input[type='checkbox'] {
  accent-color: var(--rm-ink);
  flex: none;
}

.form__consent {
  font-size: var(--rm-step--1);
}

.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit {
  justify-self: start;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.form__submit:disabled {
  background: var(--rm-ink-3);
  cursor: progress;
}

.form__status {
  min-height: 1.5em;
  font-size: var(--rm-step--1);
  color: var(--rm-ink-2);
}

.form__status[data-state='success'] {
  color: var(--rm-passed);
}

.form__status[data-state='error'] {
  color: var(--rm-held);
}

/* ── Legal pages ──────────────────────────────────────────────────────── */

.legal {
  padding-block: clamp(3rem, 7vw, 6rem);
  max-width: 48rem;
}

.legal h1 {
  font-size: var(--rm-step-3);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: var(--rm-step-1);
  letter-spacing: -0.01em;
}

.legal p {
  margin-top: 0.75rem;
  color: var(--rm-ink-2);
  max-width: 60ch;
}

/* ── What is not built ────────────────────────────────────────────────── */

.unready {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--rm-line);
}

.unready h2 {
  font-size: var(--rm-step-2);
}

.unready dl {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 44rem);
  margin-top: 2rem;
  border-top: 1px solid var(--rm-line);
}

.unready dt,
.unready dd {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rm-line);
}

.unready dt {
  font-weight: 600;
  padding-right: 2rem;
}

.unready dd {
  color: var(--rm-ink-2);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--rm-line);
  font-size: var(--rm-step--1);
  color: var(--rm-ink-3);
}

.foot nav {
  display: flex;
  gap: 1.5rem;
}

.foot nav a {
  text-decoration: underline;
  text-decoration-color: var(--rm-line-strong);
  text-underline-offset: 0.2em;
}

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

.foot .rm-endorsement {
  margin-left: auto;
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 60rem) {
  .hero,
  .identity__body,
  .next__head,
  .next__terms,
  .waitlist__body {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .path {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 1px solid var(--rm-line-strong);
    margin-left: 4px;
  }

  .path li {
    padding: 0 0 2rem 1.5rem;
  }

  .path li::before {
    top: 0.45em;
    left: -5px;
  }

  .app {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* FullscreenShell shows one pane at a time under 768px: the open room. */
@media (max-width: 48rem) {
  .app__rooms {
    display: none;
  }
}

@media (max-width: 40rem) {
  .hero__record .rm-record__row,
  .next__record .rm-record__row {
    grid-template-columns: 5ch 1fr;
  }

  .unready dl {
    grid-template-columns: 1fr;
  }

  .unready dt {
    padding-bottom: 0.25rem;
    border-bottom: 0;
  }

  .unready dd {
    padding-top: 0;
  }

  .foot .rm-endorsement {
    margin-left: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}
