/* ==========================================================================
   Reboot: Rise Again — design tokens
   Palette: soft atmospheric teal-blue (misted mountains, open sky) mixed
   with white, rather than a hard digital blue — calmer, matches the calm
   the product is selling.
   ========================================================================== */
:root {
  /* Deep teal-navy, like dusk over water rather than neutral black */
  --ink:        #0A2731;
  --ink-2:      #0F3039;
  --panel:      #163F49;
  --panel-2:    #1C4C57;
  --line:       rgba(180, 224, 224, 0.18);
  --line-soft:  rgba(180, 224, 224, 0.09);

  /* Misted mountain-and-sky teal, deep shadow through to pale cyan light */
  --teal:       #4FB6C1;
  --teal-deep:  #1F4C55;
  --teal-bright:#A7E3E8;
  --teal-dim:   rgba(79, 182, 193, 0.16);
  --amber:      #E8B96B;
  --amber-dim:  rgba(232, 185, 107, 0.14);
  --rose:       #FF7A93;

  --paper:      #E9F5F4;
  --mist:       #9BC2C3;
  --mist-dim:   #628587;

  /* Light / white sections — the pale sky and sea-foam in the reference */
  --white:      #FFFFFF;
  --light-bg:   #F1F9F8;
  --light-bg-2: #E1F0EF;
  --light-line: rgba(31, 76, 85, 0.12);
  --light-ink:  #10333A;
  --light-mist: #4C7378;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 26px;
  --r-xl: 36px;

  --shell: 1240px;
  --pad:   clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; overflow-x: hidden; }

/* Native form controls (checkboxes, radios, range sliders, date/time pickers)
   default to the browser's own blue accent unless told otherwise — force
   them onto our palette everywhere. */
:root, input, select, textarea { accent-color: var(--teal); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
}

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

/* --- cursor glow ----------------------------------------------------------
   A soft light that follows the pointer, on every surface. Pure decoration —
   never intercepts clicks, and skipped entirely on touch devices. */
::selection { background: var(--teal); color: var(--ink); }

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 460px; height: 460px;
  margin-left: -230px; margin-top: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 182, 193, .16), rgba(79, 182, 193, 0) 68%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .4s ease;
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

.shell {
  width: min(100% - (var(--pad) * 2), var(--shell));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* --- brand mark, shared by the public header/footer and every panel ------ */
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 48px; width: auto; }
.brand__logo-img { height: 58px; width: auto; max-width: 290px; object-fit: contain; }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--teal), var(--teal-deep));
  color: #032019;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.03em; }
.brand__name small { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .3em; color: var(--teal); font-weight: 400; text-transform: uppercase; margin-top: -2px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--teal);
  opacity: .6;
}

.lede { color: var(--mist); font-size: clamp(15px, 1.4vw, 18px); max-width: 62ch; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--teal);
  --btn-fg: #032019;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .2s;
  box-shadow: 0 10px 30px -14px rgba(79, 182, 193, .8);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -14px rgba(79, 182, 193, .9); }
.btn:active { transform: translateY(0); }

.btn--amber { --btn-bg: var(--amber); --btn-fg: #2A1C00; box-shadow: 0 10px 30px -14px rgba(232,185,107,.75); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); box-shadow: none; }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--block { width: 100%; }
.btn--danger { --btn-bg: rgba(255,122,147,.14); --btn-fg: var(--rose); box-shadow: none; border: 1px solid rgba(255,122,147,.3); }
.btn:disabled { --btn-bg: rgba(255,255,255,.06); --btn-fg: var(--mist-dim); box-shadow: none; cursor: not-allowed; }
.btn:disabled:hover { transform: none; }

/* --- forms --------------------------------------------------------------- */
.field {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--paper);
  font: inherit;
  font-size: 14.5px;
  transition: border-color .2s, background .2s;
}
.field::placeholder { color: var(--mist-dim); }
.field:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(79, 182, 193, .08);
}
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea.field { resize: vertical; line-height: 1.55; }
label.lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist-dim);
  margin-bottom: 7px;
}
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.help { font-size: 12.5px; color: var(--mist-dim); margin-top: 6px; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--rose); font-size: 12.5px; }

/* --- flash --------------------------------------------------------------- */
.flash-stack { position: fixed; top: 18px; right: 18px; z-index: 200; display: grid; gap: 10px; max-width: min(92vw, 380px); }
.flash {
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  font-size: 14px;
  box-shadow: 0 20px 50px -22px rgba(0,0,0,.9);
  animation: flash-in .4s var(--ease) both;
}
.flash--error { border-left-color: var(--rose); }
@keyframes flash-in { from { opacity: 0; transform: translateX(24px); } }

/* --- reveal -------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .form-row--2, .form-row--3 { grid-template-columns: minmax(0, 1fr); }
  /* iOS Safari (and WebViews built on it) auto-zoom the page on focusing
     any input under 16px — a jarring, "broken-looking" jump inside a
     native app's embedded WebView. Force every field to 16px on mobile
     regardless of the desktop design's smaller size. */
  .field, select.field, textarea.field { font-size: 16px; }
}
