/* Crafted Chaos Labs. Plain CSS, mobile first. Colours taken from the intro: near-black, steel, the cyan ring. */
:root {
  --bg: #05090b;
  --panel: #0c1418;
  --line: #1c2a30;
  --text: #e6ecee;
  --muted: #9aa9ae;
  --accent: #39c6d3;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* ── Intro: full screen, the logo circle always whole ───────────────────────
   The circle in the video is about 98% of the frame's height and 56% of its width, so the video is sized to
   the largest 16:9 box whose height fits the screen and whose middle 58% fits its width. On a wide screen it
   fills the height; on a phone the circle fills the width, centred, with the dark edges running off the sides. */
.intro {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #020405; /* the colour of the video's own edges, so a wide screen shows no seam */
}
.intro-video, .intro-end {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(177.78vh, 172vw);
  width: min(177.78svh, 172vw);
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  object-fit: cover;
  display: block;
  /* the edges melt into the background (left/right on wide screens, top/bottom on phones); the circle sits in the
     middle 53% of the width and 98% of the height, so only its dark outer rim meets the top/bottom fade */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-composite: intersect;
}
.intro-end { opacity: 0; transition: opacity .4s var(--ease); }

/* The tagline, then Walt, appear under the logo once the intro has ended (or straight away with reduced motion). */
.intro-foot {
  position: absolute;
  left: 50%;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.tagline {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 4.6vw, 26px);
  font-weight: 700;
  letter-spacing: .02em;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s var(--ease) .2s, transform .8s var(--ease) .2s;
}
.subline {
  margin: -6px 0 0;
  max-width: 34em;
  color: #b4c2c6;
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.4;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95), 0 2px 14px rgba(0, 0, 0, .9), 0 0 24px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s;
}
.js .intro.ended .tagline, html:not(.js) .tagline, .js .intro.ended .subline, html:not(.js) .subline { opacity: 1; transform: none; }

/* Walt: a round button with a gentle pulse while idle; the caption shows his line while he talks.
   Without JavaScript the button does nothing, so it stays hidden. */
.walt-cameo {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s var(--ease) .9s, visibility 0s linear .9s;
}
.js .intro.ended .walt-cameo { opacity: 1; visibility: visible; }
.walt {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(5, 9, 11, .75);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: walt-pulse 2.6s var(--ease) infinite;
}
.walt.talking { animation: none; background: var(--accent); color: #031013; box-shadow: 0 0 0 6px rgba(57, 198, 211, .25); }
.walt:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.walt-label { color: var(--text); font-size: 15px; font-weight: 600; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.walt-caption {
  margin: 0;
  min-height: calc(3 * 1.4em);
  max-width: 34em;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  font-style: italic;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.walt-caption:empty { visibility: hidden; }
@keyframes walt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 198, 211, .45); }
  60% { box-shadow: 0 0 0 12px rgba(57, 198, 211, 0); }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro.ended .intro-end { opacity: 1; }
.intro.ended .intro-video { visibility: hidden; }

/* Skip and the speaker sit over the intro, out of the logo's way, clear of the notch and home bar. */
.skip, .sound {
  position: fixed;
  z-index: 10;
  background: rgba(5, 9, 11, .6);
  border: 1px solid var(--line);
  color: var(--text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .3s var(--ease);
}
.skip {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.sound {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sound[hidden], .skip[hidden] { display: none; }
.sound svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .speaker { fill: currentColor; stroke: none; }
.sound .waves { display: none; }
.sound[aria-pressed="true"] .waves { display: inline; }
.sound[aria-pressed="true"] .mute { display: none; }
.skip:focus-visible, .sound:focus-visible, .mail:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Content: fades in when the intro ends (or is skipped). Without JavaScript it is simply there. ── */
.js .content { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js.revealed .content { opacity: 1; transform: none; }
.content { max-width: 960px; margin: 0 auto; padding: 0 20px 40px; }
.section { padding: 56px 0 8px; }
.section:focus { outline: none; }
h2 {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
p { margin: 0 0 12px; color: var(--muted); }
#about p { color: var(--text); max-width: 40em; }
#about p:first-of-type { font-size: 1.1em; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.card p:last-child { margin-bottom: 0; }
.card-more { background: transparent; border-style: dashed; }
.tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.points { margin: 0 0 14px; padding-left: 20px; color: var(--muted); }
.points li { margin-bottom: 6px; }
.proof { font-size: 15px; }
.proof a { color: var(--accent); }
.button.button-quiet { padding: 0 18px; background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button.button-quiet[hidden] { display: none; }
.tag-beta { color: #f2b950; border-color: #f2b950; }

/* Waitlist */
.card:has(.waitlist) { display: flex; flex-direction: column; align-items: flex-start; }
.card .waitlist { align-self: stretch; margin-top: auto; }
.card:has(.waitlist) > .waitlist { margin-top: auto; }
.waitlist { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.waitlist-title { margin: 0; color: var(--text); font-weight: 600; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.field em { font-style: normal; opacity: .7; }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #071014;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px stops iPhone zooming into the field */
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
/* Interaction-only widget: out of the layout (no gap above the button) unless Cloudflare needs a click. */
.waitlist { position: relative; }
.waitlist .turnstile:not(.show) { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #031013;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button:disabled { opacity: .6; cursor: wait; }
.button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.status { margin: 0; min-height: 1.4em; font-size: 15px; }
.status.ok { color: #6fe0a0; }
.status.error { color: #ff8f7a; }
.waitlist.done .field, .waitlist.done .button, .waitlist.done .turnstile { display: none; }
.fine { margin: 0; font-size: 13px; color: #6f7e83; }
.fine a { color: inherit; }
.fine-cf { margin-top: -4px; }

.mail { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-top: 56px;
  padding: 24px 0 calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: #8a989d;
  font-size: 15px;
}
.footer .dot { color: #45555a; }

@media (min-width: 720px) {
  body { font-size: 18px; }
  .content { padding: 0 32px 56px; }
  .section { padding-top: 80px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Reduced motion: no video, no fades (intro.js shows the final logo frame instead). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-video { display: none; }
  .intro-end { opacity: 1; transition: none; }
  .tagline, .subline { opacity: 1; transform: none; transition: none; }
  .walt-cameo { transition: none; }
  .walt { animation: none; }
  .js .content { opacity: 1; transform: none; transition: none; }
}

/* ── Privacy, Terms and Support pages ── */
.legal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px 0;
}
.legal-home { color: var(--text); font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.legal-nav { display: flex; gap: 18px; font-size: 15px; }
.legal-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.legal-nav a:hover, .legal-nav a[aria-current="page"] { color: var(--accent); }
.legal-main { max-width: 760px; margin: 0 auto; padding: 36px 20px 24px; }
.legal-main h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.2; }
.legal-main h2 { margin: 36px 0 12px; }
.legal-main h3 { margin: 22px 0 6px; font-size: 17px; }
.legal-main p, .legal-main li { color: var(--text); }
.legal-main ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; }
.legal-date { color: var(--muted) !important; font-size: 14px; margin-bottom: 24px; }
.legal-foot { max-width: 760px; margin: 24px auto 0; padding-left: 20px; padding-right: 20px; }
.legal-home:focus-visible, .legal-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: inherit; }

/* ── Chat with Walt (walt-chat.js) ── */
.walt-chat-open {
  background: none;
  border: 0;
  padding: 6px 4px;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
.walt-chat-open[hidden] { display: none; }
.walt-chat-open:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.walt-chat {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 4, 5, .72);
}
.walt-chat[hidden] { display: none; }
html.wc-open { overflow: hidden; }
.wc-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: min(640px, 100svh);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}
.wc-head { display: flex; align-items: center; justify-content: space-between; }
.wc-head h2 { margin: 0; }
.wc-close { width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }
.wc-close:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.wc-note { margin: 2px 0 10px; font-size: 13px; color: #6f7e83; }
.wc-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; }
.wc-msg { max-width: 85%; }
.wc-msg p { margin: 0; padding: 10px 13px; border-radius: 14px; font-size: 16px; line-height: 1.45; }
.wc-walt p { background: #13232a; color: var(--text); border-bottom-left-radius: 4px; }
.wc-you { align-self: flex-end; }
.wc-you p { background: var(--accent); color: #031013; border-bottom-right-radius: 4px; }
.wc-thinking p { color: var(--muted); }
.wc-hear { margin-top: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--accent); background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.wc-hear[aria-pressed="true"] { background: var(--accent); color: #031013; }
.wc-hear:disabled { opacity: .6; cursor: wait; }
.wc-form { display: grid; gap: 8px; }
.wc-row { display: flex; gap: 8px; }
.wc-row input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #071014; color: var(--text); font: inherit; font-size: 16px; }
.wc-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.wc-send { padding: 0 18px; }
@media (min-width: 720px) {
  .walt-chat { align-items: center; }
  .wc-panel { border-radius: 18px; height: min(640px, 90vh); }
}
