/* Home page: dusk sky, still water, a physical headline and two dialogs. */

:root {
  --water: 70svh;
  --sky-top: #6e2a3e;
  --sky-mid: #b98a95;
  --deep: #3c1622;
  --pontoon-h: 56px;
}

html.home, html.home body { height: 100%; overflow: hidden; }
html.home { touch-action: none; }
html.home body {
  /* seen only until the water canvas draws, or without WebGL2 */
  background: linear-gradient(to bottom, var(--sky-top) 0, var(--sky-mid) 44%, var(--stone) var(--water), #8b6a73 var(--water), var(--deep) 100%);
  font-stretch: 125%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.can-grab { cursor: grab; }
body.is-grabbing, body.is-grabbing * { cursor: grabbing !important; }

#water { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

.top {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(16px, 3vw, 40px);
  color: var(--paper);
}
.top :focus-visible { outline-color: var(--paper); }
.mark { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; text-decoration: none; }
.contact {
  font: 600 14px/1 var(--font); font-stretch: 125%;
  color: var(--paper); background: transparent;
  border: 1.5px solid var(--paper); border-radius: 999px; padding: 11px 18px; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.contact:hover { background: var(--paper); color: var(--sky-top); }

.home main { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero {
  position: absolute; left: 0; right: 0; top: 24svh; margin: 0;
  text-align: center; text-transform: uppercase; color: var(--ink);
  font: 400 clamp(46px, 8.1vw, 150px)/0.9 var(--font-display);
  letter-spacing: -0.005em;
}
.hero .line { display: block; }
.hero .w { display: inline-block; white-space: nowrap; }
.hero .ch { display: inline-block; will-change: transform; }
.hero .bl { display: inline-block; width: 0; height: 0; }
.is-booting .hero, .is-booting .stage { opacity: 0; } /* until the first physics frame; opacity keeps layout measurable */
.stage { position: absolute; inset: 0; z-index: 2; }
.obj { position: absolute; left: 0; top: 0; will-change: transform; }
.obj svg { display: block; }
.water-line { position: absolute; left: 0; right: 0; top: var(--water); height: 0; }

.pontoon {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--water) - var(--pontoon-h));
  transform: translateX(-50%);
  width: min(300px, calc(100vw - 96px)); height: var(--pontoon-h);
  background: var(--burgundy); color: var(--paper); border: 0; border-radius: 6px;
  font: 600 16px/1 var(--font); font-stretch: 125%; cursor: pointer; pointer-events: auto;
  transition: filter 0.15s;
}
.pontoon:hover { filter: brightness(1.18); }
.pontoon:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.colophon {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 14px; margin: 0; padding: 0 16px;
  text-align: center; font: 400 11px/1.5 var(--font); font-stretch: 100%;
  color: rgba(243, 238, 234, 0.82);
  user-select: text;
}
.colophon a { color: inherit; }
.colophon p { margin: 0; }
/* What the company does, in one line (Apple's enrolment review, 2026-10-24). */
.colophon .blurb { font-size: 13px; font-stretch: 112%; color: var(--paper); margin-bottom: 6px; }
.top-links { display: flex; gap: 10px; }
a.contact { text-decoration: none; display: inline-block; }
.colophon :focus-visible { outline-color: var(--paper); }
.noscript { position: absolute; z-index: 3; top: 72px; left: 0; right: 0; text-align: center; color: var(--paper); font-size: 14px; }

/* ---------- Dialogs ---------- */
.dlg {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  font-stretch: 125%; user-select: text;
}
.dlg::backdrop { background: rgba(60, 22, 34, 0.45); backdrop-filter: blur(3px); }
.dlg[open] { animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.sheet { background: #f3f1ec; border-radius: 10px; padding: 28px; }
.sheet h2, .done-title { font: 400 38px/1 var(--font-display); text-transform: uppercase; margin: 0 0 22px; }
.field { display: block; border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.hint { color: var(--ink-3); font-weight: 400; }
.field input:not([type="radio"]), .field textarea {
  width: 100%; font: 400 16px/1.45 var(--font); font-stretch: 100%; color: var(--ink);
  background: #fff; border: 1px solid #c9c6c0; border-radius: 6px; padding: 12px 14px; resize: vertical;
}
.field input:not([type="radio"]):focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field [aria-invalid="true"] { border-color: var(--burgundy); box-shadow: 0 0 0 1px var(--burgundy); }
.opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 6px;
  border: 1px solid #c9c6c0; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1.35; font-stretch: 100%;
}
.opt:has(input:checked) { border-color: var(--ink); background: #fff; }
.opt input { accent-color: var(--burgundy); margin: 2px 0 0; flex: none; }
.turnstile:empty { display: none; }
.turnstile { margin: 4px 0 12px; }
.form-status { color: var(--burgundy); font-size: 14px; margin: 0 0 12px; }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn-quiet, .btn-send { font: 600 15px/1 var(--font); font-stretch: 125%; padding: 14px 20px; border-radius: 6px; cursor: pointer; }
.btn-quiet { background: transparent; color: var(--ink-3); border: 1px solid transparent; }
.btn-quiet:hover { color: var(--ink); }
.btn-send { background: var(--burgundy); color: var(--paper); border: 1px solid var(--burgundy); }
.btn-send:disabled { opacity: 0.7; cursor: progress; }
.done { display: none; }
.dlg.is-sent .form { display: none; }
.dlg.is-sent .done { display: block; }
.done-title { margin-bottom: 6px; }
.done .btn-quiet { margin-top: 18px; padding-left: 0; }

@media (max-width: 640px) {
  :root { --water: 72svh; --pontoon-h: 52px; }
  .hero { top: 26svh; }
  .pontoon { width: min(260px, calc(100vw - 120px)); }
}

@media (prefers-reduced-motion: reduce) {
  .dlg[open] { animation: none; }
}
