/* Poseidon's Mist: Restroom Confidence Score
   Palette sampled from the Poseidon character logo. Gold only on dark surfaces (contrast).
   Look: poster-style stacked caps on solid color blocks, print-piece blocks that overlap.
   Highlights are a fill change on the whole block, never an outline. */
:root {
  --foam: #E1F5F4;
  --shallows: #83D0DE;
  --aqua: #40B4CF;
  --ocean: #0780A7;
  --teal: #005962;
  --teal-dark: #00464D;
  --navy: #0F3448;
  --gold: #F5B82E;
  --cream: #FFFAEB;
  --ink: #124055;
  --ink-soft: #3F6476;
  --paper: #FBFEFE;
  --line: #C3E3E6;
  --white: #FFFFFF;

  --display: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* radius scale: print pieces square-ish / controls / option rows / large */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 20px;

  --shadow-1: 0 1px 2px rgba(18, 64, 85, .08), 0 3px 10px rgba(18, 64, 85, .08);
  --shadow-2: 0 4px 8px rgba(18, 64, 85, .10), 0 18px 40px rgba(18, 64, 85, .16);

  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -48px; padding: 8px 12px;
  background: var(--ink); color: var(--white); border-radius: var(--r-sm); z-index: 20;
}
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.small { font-size: .9rem; color: var(--ink-soft); }

/* ---------- solid color blocks (class names kept from the water version) ---------- */
.water-teal  { background: var(--teal);      color: var(--cream); }
.water-calm  { background: var(--shallows);  color: var(--ink); }
.water-chop  { background: var(--aqua);      color: var(--ink); }
.water-rough { background: var(--ocean);     color: var(--cream); }
.water-deep  { background: var(--teal-dark); color: var(--cream); }

/* ---------- header / footer ---------- */
.site-header {
  padding: 10px var(--gutter);
  background: var(--navy);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1;
  color: var(--cream); text-decoration: none;
}
.wordmark img { width: 44px; height: auto; }
.header-tag {
  font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--shallows);
}
.site-footer {
  padding: 28px var(--gutter);
  font-size: .875rem;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; cursor: pointer; border: 0;
  border-radius: var(--r-sm);
  padding: 12px 22px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-lg { padding: 17px 30px; font-size: 1.1rem; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #9FC3C7; cursor: not-allowed; transform: none; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #B9841A; }
.btn-gold:hover { background: #FFCB52; }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #B9841A; }
.btn-link {
  background: none; color: var(--teal); padding: 12px 4px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.btn-link:hover { color: var(--ink); }

/* ---------- landing: hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  column-gap: 16px;
  min-height: clamp(560px, 88vh, 900px);
  padding: clamp(36px, 6vw, 80px) var(--gutter) clamp(64px, 8vw, 104px);
}
.hero-title {
  grid-column: 1 / 8;
  grid-row: 1;
  font-size: clamp(3.4rem, 9vw, 8.6rem);
  line-height: .84;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--cream);
  position: relative; z-index: 2;
}
.hero-art {
  grid-column: 6 / 13;
  grid-row: 1 / 4;
  align-self: end;
  justify-self: end;
  width: 100%;
  max-width: 780px;
  margin: 0 calc(-1 * var(--gutter) * .4) calc(-1 * clamp(64px, 8vw, 104px) - 18px) 0;
  position: relative; z-index: 1;
}
.hero-art img { width: 100%; height: auto; }
.hero-panel {
  grid-column: 1 / 6;
  grid-row: 3;
  margin-top: 44px;
  position: relative; z-index: 2;
  background: var(--cream);
  color: var(--ink);
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px;
  max-width: 560px;
}
.lede { font-size: clamp(1.08rem, 1.5vw, 1.25rem); margin: 0; }

/* ---------- ticker ---------- */
.ticker {
  position: relative; z-index: 5;
  width: 106%; margin: -30px 0 0 -3%;
  background: var(--gold); color: var(--ink);
  transform: rotate(-1.6deg);
  overflow: hidden;
  padding: 15px 0;
  box-shadow: var(--shadow-1);
}
.ticker-track {
  display: flex; width: max-content;
  font-family: var(--mono); font-weight: 700; font-size: clamp(.85rem, 1.3vw, 1rem);
  text-transform: uppercase; letter-spacing: .05em;
  animation: marquee 32s linear infinite;
}
.ticker-track span { display: inline-flex; align-items: center; padding: 0 22px; white-space: nowrap; }
.ticker-track span::after {
  content: ""; width: 9px; height: 9px; margin-left: 44px; border-radius: 50%; background: var(--ink);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- landing: score parts (sachets) ---------- */
.poster-h {
  font-size: clamp(2.5rem, 5.6vw, 5rem);
  line-height: .88;
  text-transform: uppercase;
  letter-spacing: -.005em;
  color: var(--ink);
}
.measures {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 40px;
  padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(72px, 9vw, 128px);
  max-width: 1440px;
}
.measures .poster-h { grid-column: 1 / 6; align-self: start; }
.sachets {
  grid-column: 6 / 13;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px;
  filter: drop-shadow(0 12px 18px rgba(18, 64, 85, .18));
}
.sachet {
  --zig: 9px;
  position: relative;
  padding: calc(var(--zig) + 30px) 28px calc(var(--zig) + 32px);
  /* crimped top and bottom edges, like the foil packet */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) 51% repeat-x,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zig)) 51% repeat-x;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) 51% repeat-x,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--zig)) 51% repeat-x;
}
/* heat-seal crimp bands */
.sachet::before, .sachet::after {
  content: ""; position: absolute; left: 0; right: 0; height: calc(var(--zig) + 14px);
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 2px, transparent 2px 7px);
  pointer-events: none;
}
.sachet::before { top: 0; }
.sachet::after { bottom: 0; }
.sachet-meta {
  display: block;
  font-family: var(--mono); font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 14px; margin-bottom: 20px;
  border-bottom: 2px dashed currentColor;
}
.sachet h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: .95; text-transform: uppercase; margin-bottom: 10px; }
.sachet p { margin: 0; max-width: 34ch; }
.sachet-teal  { grid-column: 1 / 3; background: var(--teal); color: var(--cream); transform: rotate(-1.4deg); padding-right: 30%; }
.sachet-aqua  { background: var(--aqua); color: var(--ink); transform: rotate(1.8deg) translateY(8px); }
.sachet-gold  { background: var(--gold); color: var(--ink); transform: rotate(-2.4deg); }

/* ---------- landing: depth chart (signature) ---------- */
.depth { padding-bottom: 0; }
.depth-h { padding: 0 var(--gutter); margin-bottom: 28px; }
.depth-bands { list-style: none; margin: 0; padding: 0; }
.depth-band {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: clamp(84px, 11vw, 150px);
  padding: 10px var(--gutter);
}
.band-name {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 6.4rem); line-height: .9;
}
.band-range { font-family: var(--mono); font-weight: 700; font-size: clamp(1.2rem, 2.2vw, 1.8rem); white-space: nowrap; }

/* ---------- landing: who + closer ---------- */
.closer {
  position: relative;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: 24px;
  align-items: end;
}
.who {
  grid-column: 1 / -1;
  justify-self: end;
  position: relative; z-index: 3;
  width: min(620px, 100%);
  margin: -28px max(0px, 6vw) 0 0;
  background: var(--cream);
  color: var(--ink);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-2);
}
.who h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); text-transform: uppercase; margin-bottom: 16px; }
.who-small { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.closer-copy {
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 36px;
}
.closer-line {
  margin: 0;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 7vw, 6.6rem);
  line-height: .86;
}
.closer-art { align-self: end; justify-self: center; width: 100%; max-width: 440px; overflow: hidden; }
.closer-art img { width: 100%; height: auto; margin-bottom: -16%; }

/* ---------- survey ---------- */
.survey-top {
  padding: 18px max(var(--gutter), calc((100% - 680px) / 2 + var(--gutter))) 22px;
}
.q-meta {
  margin: 0 0 14px;
  font-family: var(--mono); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--cream);
}
.progress { height: 8px; background: rgba(255, 250, 235, .22); overflow: hidden; border-radius: var(--r-xs); }
.progress-fill { height: 100%; width: 0; background: var(--gold); transition: width .35s ease; }
.survey-shell {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) 64px;
}
.q-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-text {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  padding: 0;
  margin-bottom: 10px;
}
.q-text:focus { outline: none; }
.q-hint { color: var(--ink-soft); margin: 0 0 22px; min-height: 1px; }
.q-hint:empty { margin-bottom: 14px; }

.options { display: grid; gap: 10px; }
.opt {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 14px;
  padding: 15px 16px;
  background: var(--foam);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, transform .12s ease;
}
.opt:hover { background: #CDEDEE; }
.opt > input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark {
  width: 22px; height: 22px; margin-top: 1px;
  background: var(--white);
  display: grid; place-items: center;
}
.opt.radio .mark { border-radius: 50%; }
.opt.check .mark { border-radius: 5px; }
.opt.is-on { background: var(--teal); color: var(--cream); }
.opt.is-on .mark { background: var(--gold); }
.opt.radio.is-on .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.opt.check.is-on .mark::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.opt:has(input:focus-visible) { outline: 3px solid var(--ocean); outline-offset: 2px; }
.opt.is-disabled { opacity: .45; cursor: not-allowed; }
.opt-other { grid-column: 2; margin-top: 10px; }
.text-input, .opt-other input, textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--foam);
  color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }
.text-input:focus, .opt-other input:focus, textarea:focus { outline: none; background: var(--shallows); }
.opt.is-on .opt-other input { background: var(--cream); }
.opt.is-on .opt-other input:focus { background: var(--white); }

.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale .opt {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 16px 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
}
.scale .opt .mark { display: none; }
.scale .opt.is-on { background: var(--teal); color: var(--cream); transform: translateY(-3px); }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: .9rem; color: var(--ink-soft); }
.scale-picked { margin-top: 14px; font-weight: 700; min-height: 1.5em; }

.concept {
  background: var(--aqua);
  color: var(--ink);
  border-radius: var(--r-xs);
  padding: 22px 26px 26px;
  margin-bottom: 34px;
  transform: rotate(-1deg);
  box-shadow: var(--shadow-1);
}
.concept-lead {
  font-family: var(--mono); font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px;
}
.concept h3 { font-size: 1.5rem; text-transform: uppercase; line-height: .95; margin-bottom: 10px; }
.concept p:not(.concept-lead) { margin: 0; }

.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; }
.q-nav .btn-link[disabled] { visibility: hidden; }

/* ---------- results ---------- */
.results-hero {
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(48px, 7vw, 96px);
}
.results-hero[data-tier="calm"]  { background: var(--shallows);  color: var(--ink); }
.results-hero[data-tier="chop"]  { background: var(--aqua);      color: var(--ink); }
.results-hero[data-tier="rough"] { background: var(--ocean);     color: var(--cream); }
.results-hero[data-tier="deep"]  { background: var(--teal-dark); color: var(--cream); }
.score-label {
  font-family: var(--mono); font-weight: 700; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 10px;
}
.score-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 15rem);
  line-height: .8;
  letter-spacing: -.03em;
  margin: 0 0 14px;
  font-variant-numeric: tabular-nums;
}
.score-num .of { font-size: .22em; letter-spacing: 0; margin-left: 8px; font-family: var(--mono); }
.tier { font-size: clamp(2.4rem, 6vw, 4.6rem); text-transform: uppercase; line-height: .9; margin-bottom: 14px; }
.tier-read { font-size: 1.2rem; max-width: 38ch; }

.results {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) 64px;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  column-gap: clamp(32px, 7vw, 112px);
  row-gap: 64px;
}
.breakdown, .insights, .signup, .privacy { grid-column: 1; }
.results-gauge { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding-right: 84px; align-self: start; }

.breakdown h2, .insights h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); text-transform: uppercase; margin-bottom: 18px; }
.parts { list-style: none; padding: 0; margin: 0; }
.part { padding: 14px 0; border-top: 1px solid var(--line); }
.part:last-child { border-bottom: 1px solid var(--line); }
.part-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.part-name { font-weight: 700; }
.part-score { font-family: var(--mono); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.part-bar { height: 12px; background: var(--foam); }
.part-bar span { display: block; height: 100%; width: 0; background: var(--ocean); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.insights p { max-width: 58ch; }

/* gauge on results */
.gauge { display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-2); }
.gauge-band {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 18px;
  min-height: 82px;
  background-size: cover;
}
.gauge-band .name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; text-transform: uppercase; white-space: nowrap; }
.gauge-band .range { font-family: var(--mono); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.gauge-band[data-tier="calm"]  { background: var(--shallows);  color: var(--ink); }
.gauge-band[data-tier="chop"]  { background: var(--aqua);      color: var(--ink); }
.gauge-band[data-tier="rough"] { background: var(--ocean);     color: var(--cream); }
.gauge-band[data-tier="deep"]  { background: var(--teal-dark); color: var(--cream); }
.gauge-band.is-you { background: var(--gold); color: var(--ink); }
.gauge-marker {
  position: absolute; right: -10px; transform: translate(100%, -50%);
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-weight: 700; color: var(--ink); white-space: nowrap;
  transition: top .9s cubic-bezier(.2, .8, .2, 1);
}
.gauge-marker::before {
  content: ""; width: 0; height: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  border-right: 10px solid var(--ink);
}

/* signup sachet */
.signup.sachet { padding: 26px 30px 30px; transform: rotate(-1deg); box-shadow: none; filter: drop-shadow(0 12px 18px rgba(18, 64, 85, .18)); }
.signup h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); text-transform: uppercase; line-height: .95; margin-bottom: 10px; }
.signup-form { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.signup-form input {
  flex: 1 1 220px;
  font: inherit; padding: 12px 14px; border: 0;
  border-radius: var(--r-sm); background: var(--cream); color: var(--ink);
}
.signup-form input:focus { outline: none; background: var(--white); }
.form-msg { margin: 10px 0 0; font-weight: 700; }
.form-msg:empty { margin: 0; }
.form-msg.is-error { color: #8A1F18; }
.share { margin-top: 4px; padding-left: 0; color: var(--ink); }

/* ---------- ended ---------- */
.ended { max-width: 560px; margin: 0 auto; padding: clamp(48px, 10vw, 120px) var(--gutter); }
.ended h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); text-transform: uppercase; line-height: .95; margin-bottom: 16px; }
.ended .btn-link { padding-left: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .measures .poster-h, .sachets { grid-column: 1 / -1; }
  .sachets { max-width: 680px; }
  .results { grid-template-columns: 1fr; }
  .results-gauge { grid-column: 1; grid-row: auto; max-width: 460px; }
}
@media (max-width: 760px) {
  .header-tag { display: none; }
  .hero { grid-template-rows: auto auto auto; min-height: 0; padding-bottom: 72px; }
  .hero-title { grid-column: 1 / -1; }
  .hero-art { grid-column: 1 / -1; grid-row: 2; max-width: 460px; justify-self: center; margin: 8px 0 -70px; }
  .hero-panel { grid-column: 1 / -1; margin-top: 0; position: relative; z-index: 4; }
  .sachets { grid-template-columns: 1fr; }
  .sachet-teal { grid-column: auto; padding-right: 28px; }
  .who { margin-right: 0; }
  .closer { grid-template-columns: 1fr; }
  .closer-copy { padding-bottom: 0; }
  .closer-art { max-width: 260px; justify-self: end; margin-top: 8px; }
}
@media (max-width: 480px) {
  .gauge-band { min-height: 64px; padding: 14px; }
  .scale .opt { font-size: 1.25rem; padding: 14px 4px; }
  .q-nav .btn-primary { min-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
