:root {
  /* Enable native keyword interpolation per modern-web-guidance animate-to-intrinsic-sizes */
  interpolate-size: allow-keywords;

  --bg-deep: #09090c;
  --bg-surface: #121218;
  --bg-card: #171720;
  --bg-parchment: #191612;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.16);
  --gold-border: rgba(212, 175, 55, 0.28);
  --text-main: #f5f2eb;
  --text-muted: #a6a29a;
  --danger: #ef4444;
  --success: #10b981;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(212, 175, 55, 0.09) 0%, transparent 42%),
    radial-gradient(circle at 12% 65%, rgba(16, 185, 129, 0.05) 0%, transparent 45%),
    var(--bg-deep);
}

.container {
  width: min(1220px, 92vw);
  margin-inline: auto;
}

/* Top Banner */
.top-banner {
  background: linear-gradient(90deg, #17130a, #231c0d, #17130a);
  border-bottom: 1px solid var(--gold-border);
  font-size: 0.82rem;
  padding-block: 0.55rem;
}

.top-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.top-banner p {
  margin: 0;
  color: #e7dfd3;
}

.banner-pill {
  background: var(--gold);
  color: #09090c;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.banner-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 12, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.95rem;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, var(--gold), #9a7419);
  color: #09090c;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.tm {
  font-size: 0.65em;
  color: var(--gold);
}

.main-nav {
  display: flex;
  gap: 1.6rem;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.48rem 1rem;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 0.88rem 1.55rem;
  font-size: 0.96rem;
}

.btn-full {
  width: 100%;
  padding: 0.95rem 1.4rem;
  font-size: 0.96rem;
}

.btn-gold {
  background: linear-gradient(135deg, #e5c358, #b8891e);
  color: #09090c;
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--gold-border);
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  padding-block: 4rem 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.eyebrow-badge .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.4vw, 3.85rem);
  line-height: 1.08;
  margin-block: 1.1rem 1rem;
  font-weight: 700;
}

.hero-title em {
  color: var(--gold);
  font-style: italic;
  font-weight: 600;
}

.hero-lede {
  color: var(--text-muted);
  font-size: 1.06rem;
  max-width: 60ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
}

.metric-val {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Hero Showcase Card */
.showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 1.35rem;
  padding: 1.4rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.showcase-tag {
  color: var(--gold);
}

.showcase-margin {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.dish-compare-block {
  border-radius: 0.95rem;
  padding: 1rem;
}

.before-state {
  background: rgba(239, 68, 68, 0.06);
  border: 1px dashed rgba(239, 68, 68, 0.35);
}

.after-state {
  background: rgba(212, 175, 55, 0.07);
  border: 1px solid var(--gold-border);
}

.state-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}

.state-bad {
  color: #f87171;
}

.state-good {
  color: var(--gold);
}

.legacy-menu-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: #0d0d12;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
}

.legacy-dots {
  flex: 1;
  overflow: hidden;
  color: #6b7280;
}

.legacy-price {
  color: #f87171;
  font-weight: 700;
}

.state-diagnosis {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.55rem 0 0;
}

.transform-divider {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  padding-block: 0.65rem;
  letter-spacing: 0.1em;
}

.story-menu-box {
  background: var(--bg-parchment);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}

.story-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.story-dish-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin: 0.2rem 0 0.35rem;
  color: #fff;
}

.story-dish-desc {
  font-size: 0.88rem;
  color: #dcd6c8;
  margin: 0;
  line-height: 1.55;
}

.embedded-price {
  font-weight: 600;
  color: #f5e6c8;
  margin-left: 0.35rem;
}

.story-pairing {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  font-size: 0.76rem;
  font-style: italic;
  color: var(--gold);
}

.Annotation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.chip {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Sections */
.section {
  padding-block: 4.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.4rem;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  margin: 0.4rem 0 0.7rem;
  line-height: 1.15;
}

.section-sub {
  color: var(--text-muted);
  margin: 0;
}

/* Interactive X-Ray Tabs (search-hidden-content compliant: styles on .panel-inner, never display:none on [hidden="until-found"]) */
.tab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.tab-btn {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.7rem 1.2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.is-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}

.panel-inner {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 1.6rem;
}

.artifact-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.badge-gold {
  background: var(--gold-soft);
  color: var(--gold);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.legacy-columns,
.story-spread,
.heatmap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.legacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.legacy-list li {
  display: flex;
  align-items: baseline;
  padding-block: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.legacy-list .dots {
  flex: 1;
  border-bottom: 1px dotted #6b7280;
  margin-inline: 0.5rem;
}

.leak-item {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.leak-num {
  font-family: var(--font-mono);
  color: #f87171;
  font-weight: 700;
}

.leak-item p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Story Spread */
.spread-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.spread-section-head h4 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 0.15rem 0 1rem;
}

.story-item {
  padding: 0.95rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.9rem;
}

.story-item h5 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0.2rem 0 0.35rem;
}

.story-item p {
  margin: 0;
  font-size: 0.86rem;
  color: #d6d1c7;
}

.item-meta-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.golden-triangle-box {
  background: linear-gradient(160deg, #211b10, #15120c);
  border: 2px solid var(--gold);
  border-radius: 1rem;
  padding: 1.3rem;
  margin-bottom: 1rem;
  position: relative;
}

.gt-ribbon {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--gold);
  color: #09090c;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 0.35rem;
  margin-bottom: 0.5rem;
}

.gt-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #e5c358;
}

.golden-triangle-box h4 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  margin: 0.25rem 0 0.45rem;
}

.gt-upsell {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  font-size: 0.8rem;
  color: var(--gold);
  font-style: italic;
}

.scanpath-svg {
  width: 100%;
  height: auto;
  border-radius: 0.85rem;
}

.telemetry-list {
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.telemetry-list li {
  margin-bottom: 0.85rem;
}

/* Simulator Grid */
.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.sim-controls-card,
.sim-results-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 1.75rem;
}

.sim-results-card {
  border-color: var(--gold-border);
  background: linear-gradient(165deg, #1b1710, #121218);
}

.control-group {
  margin-bottom: 1.35rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.mono-val {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 600;
}

input[type='range'] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.sim-verdict-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.sim-big-number {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  color: #34d399;
  line-height: 1.15;
  margin-block: 0.5rem;
}

.sim-period {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sim-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-block: 1.35rem;
}

.sim-stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.sim-stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sim-stat-box strong {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #fff;
}

.formula-box {
  background: rgba(0, 0, 0, 0.38);
  border-radius: 0.65rem;
  padding: 0.75rem;
  font-size: 0.76rem;
}

.formula-title {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.formula-box code {
  font-family: var(--font-mono);
  color: var(--gold);
}

/* Protocol Accordion with intrinsic size transitions */
.protocol-accordion {
  display: grid;
  gap: 0.85rem;
}

.protocol-item {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  block-size: auto;
  block-size: calc-size(auto, size);
  transition: block-size 0.35s ease, border-color 0.2s ease;
}

.protocol-item[open] {
  border-color: var(--gold);
}

.protocol-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  list-style: none;
}

.protocol-summary::-webkit-details-marker {
  display: none;
}

.proto-step {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
}

.proto-heading {
  flex: 1;
  font-weight: 600;
  font-size: 1.05rem;
}

.proto-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.protocol-body {
  padding: 0 1.4rem 1.25rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.9rem;
}

/* Offer Section */
.offer-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2rem;
}

.offer-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.35rem;
  padding: 2rem;
}

.free-taste-card {
  border: 2px solid var(--gold);
  box-shadow: 0 24px 64px rgba(212, 175, 55, 0.12);
}

.offer-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--gold);
  color: #09090c;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.pill-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

.offer-card h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0.9rem 0 0.3rem;
}

.offer-price {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 0.9rem;
}

.offer-price span {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.offer-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.6rem;
}

.offer-list li {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.offer-list li span {
  color: var(--gold);
  font-weight: 700;
}

.teardown-form {
  display: grid;
  gap: 0.95rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.form-row label {
  display: block;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-row input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0d0d13;
  color: #fff;
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Mandatory prefers-reduced-motion safety per modern-web-guidance */
@media (prefers-reduced-motion: reduce) {
  *,
  .protocol-item,
  .btn,
  .tab-btn {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .legacy-columns,
  .story-spread,
  .heatmap-grid,
  .simulator-grid,
  .offer-grid {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }
}
