/* The Mystery Narrator — teal detective storybook */
:root {
  --teal: #11484c;
  --teal-deep: #0c3538;
  --teal-mid: #1c6b70;
  --teal-bright: #2f8b90;
  --cream: #f4ebd8;
  --cream-2: #efe3c8;
  --paper: #fff8ea;
  --ink: #142a2c;
  --ink-soft: #3a5557;
  --gold: #e8b84a;
  --gold-deep: #c4922c;
  --orange: #d4652f;
  --white: #fffbf3;
  --shadow: 0 22px 48px rgba(8, 32, 34, 0.28);
  --font-display: "Fredoka", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --wrap: 70rem;
  --radius: 1.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--teal-mid);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--orange); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.site-header {
  background: var(--teal-deep);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.7rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
}
.wordmark:hover { color: var(--gold); }
.wordmark .mark { flex: none; color: var(--gold); }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.site-header nav a {
  color: var(--cream);
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--gold);
}

.hero {
  background:
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(232, 184, 74, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 80% at 0% 80%, rgba(212, 101, 47, 0.12), transparent 45%),
    linear-gradient(165deg, #0e3d41 0%, var(--teal) 42%, #16575c 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Ccircle cx='28' cy='28' r='14' fill='none' stroke='%23ffffff' stroke-width='3'/%3E%3Cpath d='M38 38 l18 18' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  padding: 2rem 0 2.5rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.42rem 0.95rem;
  background: var(--gold);
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--gold-deep);
}

h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2.35rem, 8vw, 4.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.sub {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--gold);
  line-height: 1.25;
}

.mechanic {
  margin: 0 0 0.9rem;
  font-size: 1.2rem;
  font-weight: 700;
  max-width: 38rem;
  text-wrap: pretty;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: #e7f0ef;
  font-size: 1.05rem;
}

.listen-label {
  margin: 0 0 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}

.listen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--paper);
  color: var(--teal-deep);
  font-weight: 800;
  text-decoration: none;
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  border: 2px solid var(--gold);
  box-shadow: 0 3px 0 var(--gold-deep);
  font-size: 0.98rem;
  line-height: 1.2;
}
.btn:hover {
  background: var(--gold);
  color: var(--teal-deep);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--gold-deep);
}

.hero-art { margin: 0; justify-self: center; }

.cover-frame {
  background: var(--cream);
  padding: 0.65rem;
  border-radius: 1.6rem;
  box-shadow: var(--shadow), 0 0 0 3px rgba(232, 184, 74, 0.35);
  transform: rotate(-1.4deg);
  max-width: 22rem;
  position: relative;
}
.cover-frame::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 1.6rem;
  width: 1.4rem;
  height: 2.1rem;
  background: linear-gradient(180deg, var(--orange), #b5471f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.cover-frame img,
.cover-frame picture {
  display: block;
  border-radius: 1.05rem;
}

.wave {
  color: var(--cream);
  line-height: 0;
  position: relative;
  z-index: 1;
}
.wave svg { display: block; width: 100%; height: 52px; }

.panel {
  padding: 3rem 0 3.4rem;
  background: var(--cream);
  background-image: radial-gradient(rgba(17, 72, 76, 0.045) 1px, transparent 1px);
  background-size: 18px 18px;
}

.panel-teal {
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(232, 184, 74, 0.1), transparent 50%),
    linear-gradient(180deg, #0f3f43, var(--teal) 40%, #0e3a3e);
  color: var(--white);
}

.kicker {
  margin: 0 0 0.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--orange);
}

.panel-teal .kicker { color: var(--gold); }

h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.15;
  color: var(--teal-deep);
}

.panel-teal h2 { color: var(--white); }

.intro {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.12rem;
}
.intro.light { color: #dceceb; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  background: var(--paper);
  border: 2px solid rgba(17, 72, 76, 0.1);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 8px 0 rgba(17, 72, 76, 0.08);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.55rem;
  background: var(--gold);
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--gold-deep);
}

.steps h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--teal-deep);
}

.steps p { margin: 0; color: var(--ink-soft); }

.after {
  margin: 1.5rem 0 0;
  font-weight: 700;
  color: var(--teal);
}

.cases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  counter-reset: case;
}

.cases li {
  counter-increment: case;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  background: rgba(255, 248, 234, 0.08);
  border: 1px dashed rgba(232, 184, 74, 0.45);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 550;
  color: var(--white);
}

.cases li::before {
  content: counter(case, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--teal-deep);
  background: var(--gold);
  border-radius: 0.45rem;
  min-width: 2.4rem;
  text-align: center;
  padding: 0.15rem 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  flex: none;
}

.facts {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.facts > div {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  border-left: 6px solid var(--gold);
  box-shadow: 0 6px 0 rgba(17, 72, 76, 0.07);
}

.facts dt {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--orange);
  margin: 0 0 0.2rem;
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--teal-deep);
  font-weight: 550;
}

.panel-contact {
  padding-top: 0.5rem;
  background: var(--cream);
}

.contact-card {
  background: var(--paper);
  border-radius: 1.5rem;
  padding: 1.75rem 1.4rem;
  border: 2px solid rgba(17, 72, 76, 0.1);
  box-shadow: 0 10px 0 rgba(17, 72, 76, 0.08);
  text-align: center;
}

.contact-card h2 { margin-bottom: 0.4rem; }
.contact-card p { margin: 0 0 1rem; color: var(--ink-soft); }

.email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  font-weight: 600;
  color: var(--teal);
  text-decoration-thickness: 2px;
}
.email:hover { color: var(--orange); }

.site-footer {
  background: var(--teal-deep);
  color: var(--cream);
  padding: 1.25rem 0 1.5rem;
  border-top: 3px solid var(--gold);
  font-weight: 700;
}
.footer-inner p { margin: 0; text-align: center; }

@media (min-width: 640px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cover-frame { max-width: 24rem; }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding: 2.6rem 0 2.2rem;
    gap: 2.5rem;
  }
  .cover-frame { max-width: 26rem; }
  .wave svg { height: 72px; }
  .facts { grid-template-columns: 1fr 1fr 1fr; }
  .contact-card { padding: 2.2rem; }
}

@media (max-width: 399px) {
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .cover-frame { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

@media print {
  .site-header, .listen, .wave, .skip { display: none; }
  body { background: #fff; color: #000; }
  .hero, .panel-teal { background: #fff; color: #000; }
  .hero h1, .panel-teal h2, .cases li, .sub { color: #000; }
}

/* spec patches */

.hero-kicker{margin:0 0 1rem;font-size:clamp(1.12rem,2.5vw,1.35rem);font-weight:800;line-height:1.4;color:var(--white);max-width:40rem}

.age-pill{display:inline-block;padding:.1rem .65rem .16rem;background:var(--gold);color:var(--teal-deep);border-radius:999px;box-shadow:0 3px 0 var(--gold-deep);white-space:nowrap}

.cases-cream li{background:var(--paper);color:var(--teal-deep);border:2px solid rgba(17,72,76,.1);box-shadow:0 6px 0 rgba(17,72,76,.07)}

.about-grid{display:grid;gap:1.5rem}

.email-light{display:inline-block;font-family:var(--font-display);font-size:clamp(1.1rem,3vw,1.45rem);font-weight:600;color:var(--gold);text-decoration-thickness:2px}

.email-light:hover{color:var(--white)}

.contact-on-teal{background:rgba(255,248,234,.08);border:1px dashed rgba(232,184,74,.45);border-radius:1.25rem;padding:1.25rem 1.2rem}

.dock{display:none}

@media (min-width:900px){.about-grid{grid-template-columns:1.2fr .9fr;align-items:start}}

@media (max-width:899px){body{padding-bottom:4.8rem}.dock{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;gap:.45rem;padding:.55rem .75rem max(.55rem,env(safe-area-inset-bottom));background:rgba(12,53,56,.94);border-top:2px solid var(--gold)}.dock .btn{flex:1;padding:.7rem .4rem;font-size:.9rem}}

@media (prefers-reduced-motion:reduce){.cover-frame{transform:none}}

@media (min-width: 900px) { .steps { grid-template-columns: 1fr 1fr 1fr; } }

.cases a { color: inherit; text-decoration: none; flex: 1; }
.cases a:hover { color: var(--orange); text-decoration: underline; }
.cases-cream a { color: var(--teal-deep); }
