:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #64706a;
  --line: #d8ded8;
  --surface: #f7f4ef;
  --panel: #fffdfa;
  --field: #ece5db;
  --accent: #8f2f4a;
  --accent-2: #1b6d70;
  --accent-soft: #f3d7dc;
  --shadow: 0 18px 60px rgba(44, 36, 30, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  background:
    radial-gradient(circle at 34% 28%, #f5a8b2 0 9px, transparent 10px),
    radial-gradient(circle at 70% 66%, #8fbfc0 0 8px, transparent 9px),
    linear-gradient(135deg, #f5d7c7, #b1475d 55%, #1b6d70);
  border: 1px solid rgba(23, 32, 28, 0.18);
  border-radius: 8px;
  height: 42px;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 1px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.nav a,
.hero-action,
.filter-button {
  border-radius: 8px;
  min-height: 40px;
  text-decoration: none;
}

.nav a {
  color: var(--muted);
  font-weight: 700;
  padding: 9px 12px;
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--field);
  color: var(--ink);
}

.hero {
  min-height: min(720px, calc(100svh - 72px));
  overflow: hidden;
  position: relative;
}

.hero::after {
  background: linear-gradient(90deg, rgba(23, 19, 20, 0.72), rgba(23, 19, 20, 0.22));
  content: "";
  inset: 0;
  position: absolute;
}

.hero-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-overlay {
  color: #fffdfa;
  max-width: 760px;
  padding: clamp(64px, 10vw, 132px) clamp(22px, 6vw, 72px) clamp(68px, 8vw, 104px);
  position: relative;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f9cbd2;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.94;
  margin-bottom: 22px;
  max-width: 700px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  margin-bottom: 0;
}

h3 {
  font-size: clamp(1.4rem, 2.6vw, 2.25rem);
  line-height: 1.05;
  margin-bottom: 0;
}

h4 {
  font-size: 0.92rem;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero-copy {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  max-width: 640px;
}

.hero-action {
  align-items: center;
  background: #fffdfa;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  margin-top: 18px;
  padding: 11px 18px;
  text-shadow: none;
}

.atlas-shell,
.morphology-band,
.audit-band,
.use-band {
  padding: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 44px);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 24px;
  max-width: 1240px;
}

.section-heading > p {
  color: var(--muted);
  margin: 0;
  max-width: 540px;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1240px;
}

.search {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  min-height: 48px;
  min-width: min(430px, 100%);
  padding: 0 14px;
}

.search span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  font: inherit;
  min-width: 90px;
  outline: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 8px 12px;
}

.filter-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffdfa;
}

.atlas-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(248px, 320px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
}

.case-list,
.viewer {
  min-width: 0;
}

.case-cards {
  display: grid;
  gap: 10px;
}

.case-card {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 82px 1fr;
  padding: 9px;
  text-align: left;
  width: 100%;
}

.case-card:hover,
.case-card:focus-visible,
.case-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.case-card img {
  aspect-ratio: 1;
  border-radius: 6px;
  height: 82px;
  object-fit: cover;
  width: 82px;
}

.case-card strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.2;
}

.case-card span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 4px;
}

.case-card > span {
  min-width: 0;
}

.viewer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(300px, 0.98fr) minmax(300px, 1.02fr);
  overflow: hidden;
}

.viewer-media {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    #241b22;
  background-size: 18px 18px;
  display: flex;
  min-height: 0;
  padding: clamp(8px, 1vw, 14px);
}

.viewer-media img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.viewer-body {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(20px, 3vw, 34px);
}

.viewer-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.grade {
  background: #e8f1ef;
  border: 1px solid #c3dad6;
  border-radius: 999px;
  color: #0c5557;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 9px;
}

.summary {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0;
}

.fact-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.fact-grid div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.fact-grid dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.fact-grid dd {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 4px 0 0;
}

.feature-list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  border-left: 3px solid var(--accent);
  color: #37413c;
  padding-left: 10px;
}

.comparison-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1240px;
}

.comparison-grid div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.comparison-grid strong,
.comparison-grid span {
  display: block;
}

.comparison-grid strong {
  margin-bottom: 8px;
}

.comparison-grid span {
  color: var(--muted);
}

.use-band {
  align-items: center;
  background: var(--ink);
  color: #fffdfa;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.use-band .eyebrow {
  color: #f5b4bf;
}

.use-band p:last-child {
  color: #d9e0dc;
  margin: 0;
  max-width: 620px;
}

@media (max-width: 980px) {
  .section-heading,
  .toolbar,
  .use-band {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    gap: 12px;
  }

  .filters {
    justify-content: flex-start;
  }

  .atlas-grid,
  .viewer {
    grid-template-columns: 1fr;
  }

  .case-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer-media {
    max-height: min(68svh, 620px);
  }

  .comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .section-heading,
  .toolbar {
    max-width: 1120px;
  }

  .atlas-grid {
    grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
    max-width: 1120px;
  }

  .viewer {
    grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
  }

  .viewer-body {
    gap: 16px;
    padding: 22px;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .summary,
  .feature-list li {
    font-size: 0.94rem;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .hero {
    min-height: min(680px, calc(100svh - 122px));
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(23, 19, 20, 0.72), rgba(23, 19, 20, 0.32));
  }

  .hero-overlay {
    padding-top: 56px;
  }

  .case-cards,
  .comparison-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .case-card {
    grid-template-columns: 74px 1fr;
  }

  .case-card img {
    height: 74px;
    width: 74px;
  }

  .viewer-media {
    max-height: none;
  }

  .viewer-heading {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .search {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
  }

  .filter-button {
    flex: 1 1 auto;
  }

  .case-card {
    grid-template-columns: 64px 1fr;
  }

  .case-card img {
    height: 64px;
    width: 64px;
  }
}
