/* Breasy — holding page.
   Deliberately quiet: the logo is the only strong element, everything else stays out of its way.
   Accent is sampled from the logo and lives in one variable. */

:root {
  --bg:        #ffffff;
  --wash-top:  #ffffff;   /* page gradient - tints of the brand blue over white */
  --wash-mid:  #e9f2fb;   /* ~14% */
  --wash-bot:  #cfe2f6;   /* ~26% */
  --ink:       #111518;
  --ink-soft:  #5A666B;
  --ink-faint: #8B989D;
  --hair:      #E2E7E9;
  --accent:    #3490DE;   /* sampled from the logo */
  --accent-hi: #2A7CC4;   /* hover */
  --accent-lo: #EDF5FC;
  --danger:    #B4471F;

  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --r: 8px;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: linear-gradient(165deg, var(--wash-top) 0%, var(--wash-mid) 45%, var(--wash-bot) 100%);
  background-attachment: fixed;   /* no banding shift if the page ever scrolls */
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Invisible build marker - a dev aid, not part of the design. Hover it for the
   deployed commit; give it a background temporarily if you need to find it.
   Uses its own tooltip rather than the native title attribute, which needs about a
   second of hover and gives no feedback while you wait. */
.build-marker {
  position: fixed;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  z-index: 100;
  cursor: default;
}

.build-tip {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  padding: 6px 9px;
  border-radius: 4px;
  background: #111518;
  color: #fff;
  font: 12px/1.35 ui-monospace, 'IBM Plex Mono', monospace;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s;
  pointer-events: none;
  box-shadow: 0 6px 18px -6px rgba(17,21,24,.5);
}
.build-marker:hover .build-tip { opacity: 1; visibility: visible; }

/* ---------- holding page ---------- */

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 24px;
  text-align: center;
}

.logo {
  display: block;
  width: auto;
  max-width: min(320px, 78vw);
  height: auto;
}

/* The waves flow. They are drawn as sine curves (wavelength 93, amplitude 8 in
   viewBox units, fitted to the original artwork) extending well past the clip, and
   translated by exactly one wavelength - so the loop is seamless and the mark is
   always the real logo, just at a different phase.
   Transform only: no geometry is recalculated per frame, which is what keeps it smooth. */
.wave-flow {
  animation: waveFlow 14s linear infinite;
  will-change: transform;
}

@keyframes waveFlow {
  from { transform: translateX(-93px); }   /* px maps to user units inside the viewBox */
  to   { transform: translateX(0); }
}

/* Motion on a page that may sit open for a long time is an accessibility and battery
   issue. translateX(0) is the original artwork exactly, so stopping loses nothing. */
@media (prefers-reduced-motion: reduce) {
  .wave-flow { animation: none; }
}

.headline {
  margin: 0;
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* Logo and headline sit side by side, and stack again when there is not room. */
.lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 22px);
}

/* ---------- video lightbox ---------- */

.help {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--hair);
  background: none;
  color: var(--ink-faint);
  font: 500 16px/1 var(--font);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color .18s, color .18s, background .18s;
}
.help:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lo);
}

.lightbox {
  position: relative;
  width: min(900px, 92vw);
  max-height: 86vh;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px -20px rgba(17,21,24,.55);
  animation: rise .22s ease-out;
}

.lb-frame, .lb-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lb-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  appearance: none;
  border: 0;
  background: rgba(17,21,24,.55);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.lb-close:hover { background: rgba(17,21,24,.8); }

/* Matches the V3 headline treatment: 40% grey, and a size that tracks V3's
   6cqw of the monitor screen (min(560px, 92vw) x 0.92776 x 0.06).
   A separate class so the /v1 archive keeps its original heavier headline. */
.headline-soft {
  font-size: clamp(1.2rem, 5.1vw, 1.95rem);
  font-weight: 500;
  color: #999999;
}

.link {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 2px;
  margin: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--hair);
  transition: color .18s, border-color .18s;
}
.link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- modal ---------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 21, 24, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade .18s ease-out;
}
.scrim[hidden] { display: none !important; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: var(--r);
  box-shadow: 0 24px 60px -20px rgba(17, 21, 24, .35);
  animation: rise .22s ease-out;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.modal-pane { padding: 24px 26px 26px; }
.modal-pane[hidden] { display: none !important; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.x {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-faint);
  padding: 0 2px;
  margin: -2px -4px 0 0;
  transition: color .15s;
}
.x:hover { color: var(--ink); }

/* ---------- form ---------- */

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.row .field { margin-bottom: 0; }
.row + .field { margin-top: 14px; }

.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input {
  font-family: var(--font);
  font-size: 16px;            /* 16px stops iOS zooming on focus */
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lo);
}
.field input.is-bad { border-color: var(--danger); }

.err {
  margin: 0;
  font-size: 12.5px;
  color: var(--danger);
}
.err[hidden] { display: none !important; }
.form-err { margin-top: 14px; }

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  appearance: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn:disabled { opacity: .6; cursor: default; }

.btn-ghost {
  background: none;
  border-color: var(--hair);
  color: var(--ink-soft);
}
.btn-ghost:hover { background: none; border-color: var(--ink-faint); color: var(--ink); }

/* ---------- thank you ---------- */

.thanks { text-align: center; padding: 44px 26px 46px; }

.tick {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-lo);
  color: var(--accent);
}

.thanks-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.thanks-sub { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- consent ---------- */

.consent {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 420px) {
  .row { grid-template-columns: 1fr; gap: 0; }
  .row .field { margin-bottom: 14px; }
  .modal-pane { padding: 20px 20px 22px; }
  .actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}



/* ---------- V3: content inside a monitor (/v3) ----------
   The PNG's screen is a transparent cut-out, so the content sits behind it and shows
   through. Screen geometry measured from the source image (526x422): the hole is
   488x299 at (19,18), which is the percentages below - do not round them, the bezel
   edge is only a couple of px and drift shows. */

.stage-monitor { gap: 30px; }

.monitor {
  position: relative;
  width: min(560px, 92vw);
  aspect-ratio: 526 / 422;
}

.screen {
  position: absolute;
  left:   3.612%;
  top:    4.265%;
  width:  92.776%;
  height: 70.853%;
  overflow: hidden;                 /* nothing escapes the bezel */
  background: var(--wash-mid);      /* same light blue as the page wash */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4cqw;                      /* logo and headline read as one block */
  container-type: size;             /* so children can size against the screen, not the page */
}

.monitor-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;             /* the bezel must not swallow mouse moves */
  user-select: none;
}

/* Sized in cqw so the contents track the screen exactly at any monitor width. */
.screen .logo { width: 62cqw; max-width: none; }

.screen .headline {
  font-size: 6cqw;
  color: #999999;        /* 40% grey - reads as 40% black, the usual meaning */
  font-weight: 500;      /* the lighter colour needs a touch less weight to stay even */
}
