:root {
  --bg: #fff7e5;
  --bg-soft: #fff1cc;
  --bg-deep: #ffd581;
  --surface: rgba(255, 250, 237, 0.88);
  --surface-strong: rgba(255, 248, 231, 0.96);
  --ink: #000000;
  --muted: #2f2f2f;
  --line: rgba(0, 0, 0, 0.12);
  --accent: #c98b16;
  --accent-dark: #9f6a08;
  --shadow: 0 22px 65px rgba(122, 89, 20, 0.16);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 999px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto Slab", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 213, 129, 0.7), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 213, 129, 0.38), transparent 24%),
    linear-gradient(180deg, #fffaf0 0%, #fff4dc 42%, #ffecc0 100%);
}

.page-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.28;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 100%);
}

.topbar,
.page {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 248, 228, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.58rem 0.86rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff8e8;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-copy {
  display: grid;
}

.brand-copy small,
.eyebrow,
.bridge-label,
.popover-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a,
.button,
.menu-toggle,
.term,
.bridge-card,
.popover-close {
  transition: 180ms ease;
}

.site-nav a {
  padding: 0.72rem 0.92rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(201, 139, 22, 0.14);
  color: var(--accent-dark);
}

.menu-toggle {
  display: none;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff6df;
  color: var(--ink);
  font: inherit;
}

.page {
  padding: 1.35rem 0 4rem;
}

.hero,
.section,
.panel,
.hero-card,
.family-card,
.model-card,
.bridge-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.95fr);
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.hero-copy,
.section {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
}

.hero-copy {
  padding: 2rem;
}

.hero h1,
.section-heading h2,
.subpage h1 {
  margin: 0;
  line-height: 0.94;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 1rem;
}

.hero-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.55rem;
}

.support-box {
  margin-top: 1rem;
}

.support-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
}

.button-primary {
  background: var(--ink);
  color: #fff8e8;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
}

.button:hover,
.menu-toggle:hover,
.term:hover,
.bridge-card:hover,
.popover-close:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 2rem 0 0;
}

.hero-stats div {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
}

.hero-stats dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stats dd {
  margin: 0;
  font-weight: 700;
}

.hero-media {
  display: grid;
  grid-template-rows: 1.2fr 0.88fr;
  gap: 1rem;
}

.hero-card,
.photo-panel img,
.model-card img {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.hero-card img,
.photo-panel img,
.model-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-main img {
  object-position: center;
}

.hero-card-side img {
  object-position: center top;
}

.section {
  margin-top: 1.2rem;
  padding: 1.35rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  max-width: 15ch;
}

.cards,
.family-grid,
.model-strip,
.split {
  display: grid;
  gap: 1rem;
}

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

.cards-3,
.family-grid,
.model-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.panel,
.family-card,
.model-card,
.bridge-card {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.panel h3,
.model-card h3,
.bridge-card h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.panel h4 {
  margin-top: 0;
  margin-bottom: 0.55rem;
}

.panel p,
.family-card p,
.model-card p,
.bridge-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.72;
}

.bullet-list {
  margin: 0;
  padding-left: 1.12rem;
  color: var(--muted);
  line-height: 1.72;
}

.family-model {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.42rem 0.72rem;
  border-radius: var(--radius-sm);
  background: rgba(201, 139, 22, 0.12);
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.family-card-focus,
.compare-focus {
  background: linear-gradient(180deg, rgba(255, 213, 129, 0.42), rgba(255, 248, 231, 0.98));
}

.photo-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
}

.photo-panel img {
  max-height: 300px;
}

.photo-panel div {
  padding: 1.05rem 1.15rem 1.15rem;
}

.emphasis-row {
  margin-top: 1rem;
}

.panel-strong {
  background: linear-gradient(180deg, rgba(255, 213, 129, 0.4), rgba(255, 248, 231, 0.98));
}

.panel-weak {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(255, 248, 231, 0.98));
}

.model-card img {
  height: 220px;
  margin-bottom: 0.95rem;
}

.compare-block + .compare-block {
  margin-top: 1rem;
}

.compare-block h3 {
  margin: 0 0 0.9rem;
  font-size: 1.22rem;
}

.bridge-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.96), rgba(31, 31, 31, 0.94));
}

.bridge-card h3,
.bridge-card p,
.bridge-card .bridge-label {
  color: #fff6df;
}

.bridge-card p {
  color: rgba(255, 246, 223, 0.78);
}

.glossary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.term {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 0;
  border-radius: 12px;
  padding: 0.48rem 0.74rem;
  background: rgba(201, 139, 22, 0.12);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.term::after {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: rgba(201, 139, 22, 0.18);
  font-size: 0.72rem;
}

.popover {
  position: fixed;
  z-index: 70;
  width: min(340px, calc(100vw - 1.5rem));
  padding: 1rem 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.94);
  color: #fff7e7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.popover::after {
  content: "";
  position: absolute;
  left: var(--arrow-left, 50%);
  top: 100%;
  width: 14px;
  height: 14px;
  background: rgba(0, 0, 0, 0.94);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}

.popover h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.popover-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0 0 0.75rem;
}

.popover p {
  margin: 0;
  line-height: 1.6;
}

.popover-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.subpage {
  width: min(calc(100% - 2rem), 920px);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.subpage h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 7vw, 4.2rem);
}

@media (max-width: 1100px) {
  .hero,
  .cards-4,
  .cards-3,
  .cards-2,
  .family-grid,
  .model-strip,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-media {
    grid-template-rows: auto;
  }
}

@media (max-width: 760px) {
  .topbar,
  .page {
    width: min(calc(100% - 1rem), var(--max));
  }

  .topbar {
    flex-wrap: wrap;
    top: 0.45rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding-top: 0.4rem;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
  }

  .hero-copy,
  .section {
    padding: 1.1rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 13vw, 4.3rem);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .button,
  .menu-toggle {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .popover {
    left: 0.75rem !important;
    right: 0.75rem;
    width: auto;
  }

  .popover::after {
    display: none;
  }
}
