:root {
  color-scheme: light;
  --bg: #f4f0e7;
  --ink: #121615;
  --muted: #5e6865;
  --surface: #fffdf7;
  --surface-strong: #ffffff;
  --line: #d5d1c5;
  --primary: #1f6f68;
  --primary-strong: #174c49;
  --accent: #a7332f;
  --amber: #c89335;
  --shadow: 0 18px 60px rgb(18 22 21 / 12%);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101413;
    --ink: #f3f0e8;
    --muted: #aeb8b3;
    --surface: #1a201e;
    --surface-strong: #222a27;
    --line: #343d39;
    --primary: #70c7bd;
    --primary-strong: #9de0d8;
    --accent: #f08776;
    --amber: #e0b45f;
    --shadow: 0 18px 60px rgb(0 0 0 / 30%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg), var(--surface));
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.topbar,
.section-heading,
.hero,
.section-grid,
.hero-actions,
.scene-tabs,
.audio-grid,
.blog-grid {
  display: flex;
}

.topbar {
  z-index: 5;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.8rem 0;
  background: color-mix(in srgb, var(--bg), transparent 8%);
  backdrop-filter: blur(18px);
}

.topbar h1,
.hero h2,
.panel h2,
.blog-post h3,
.audio-card h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 20%);
}

.nav a {
  min-width: 4.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

main {
  display: grid;
  gap: 1rem;
}

.hero {
  position: relative;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  min-height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 78%), rgb(0 0 0 / 38%) 55%, rgb(0 0 0 / 12%)),
    url("/assets/case-hero.png") center / cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 720px;
  color: #fffaf0;
}

.hero h2 {
  max-width: 13ch;
  font-size: clamp(2.25rem, 7vw, 5.2rem);
}

.hero p:not(.eyebrow) {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  color: #dfded6;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--primary);
  color: white;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--primary-strong);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface-strong);
}

.hero .button.secondary {
  color: #121615;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--primary);
}

.case-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-self: flex-end;
  min-width: 230px;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: var(--radius);
  background: rgb(15 20 19 / 72%);
  color: #fffaf0;
  backdrop-filter: blur(12px);
}

.case-card strong {
  margin-top: 1rem;
  font-size: 4rem;
  line-height: 0.9;
}

.case-card span:last-child {
  color: #d8d6cf;
}

.status-pill {
  width: max-content;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgb(200 147 53 / 24%);
  color: #ffe0a3;
  font-size: 0.8rem;
  font-weight: 800;
}

.section-grid {
  align-items: stretch;
  gap: 1rem;
}

.brief-panel {
  flex: 1 1 680px;
}

.panel {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel p {
  color: var(--muted);
  line-height: 1.65;
}

.section-heading {
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.stat-list {
  display: grid;
  gap: 0.75rem;
  min-width: 240px;
  margin: 1rem 0 0;
}

.stat-list div {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.stat-list dt,
.blog-post time {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.stat-list dd {
  margin: 0;
  font-weight: 800;
}

.blog-grid,
.audio-grid {
  flex-wrap: wrap;
  gap: 1rem;
}

.blog-post,
.audio-card {
  flex: 1 1 250px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.blog-post h3,
.audio-card h3 {
  margin-top: 0.45rem;
  font-size: 1.2rem;
}

.audio-card audio {
  width: 100%;
  margin-top: 0.8rem;
}

.scene-tabs {
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scene-tabs button {
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  cursor: pointer;
  font-weight: 800;
}

.scene-tabs button[aria-selected="true"] {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary), transparent 84%);
}

.scene-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 1rem;
}

.scene-art {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgb(0 0 0 / 6%), rgb(0 0 0 / 22%)),
    url("/assets/scene-lighthouse.png") center / cover;
}

.scene-stage[data-scene="pier"] .scene-art {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 6%), rgb(0 0 0 / 22%)),
    url("/assets/scene-pier.png") center / cover;
}

.scene-stage[data-scene="archive"] .scene-art {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 6%), rgb(0 0 0 / 22%)),
    url("/assets/scene-archive.png") center / cover;
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.6rem;
  border: 2px solid rgb(255 255 255 / 78%);
  border-radius: 999px;
  background: rgb(167 51 47 / 86%);
  color: #fff;
  box-shadow: 0 8px 20px rgb(0 0 0 / 28%);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.hotspot[aria-pressed="true"] {
  background: rgb(31 111 104 / 90%);
}

.evidence-log {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.evidence-log h3 {
  margin: 0 0 1rem;
}

.evidence-log ul {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-log li {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.evidence-log span {
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.notes-panel {
  margin-bottom: 1rem;
}

textarea {
  width: 100%;
  min-height: 14rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  padding: 0.85rem;
  line-height: 1.55;
}

textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary), transparent 62%);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer a {
  color: var(--primary);
}

.save-state {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (max-width: 840px) {
  .topbar,
  .hero,
  .section-grid,
  .scene-stage {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar {
    align-items: stretch;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav a {
    flex: 1 1 4.6rem;
    min-width: 0;
  }

  .brief-panel {
    flex-basis: auto;
  }

  .hero {
    min-height: 620px;
  }

  .hero h2 {
    max-width: 10ch;
  }

  .case-card {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scene-art {
    min-height: 360px;
  }
}
