/* ==========================================================================
   THEBESTPLANNER 2027 — Awwwards Swiss-Editorial Design System
   ImproBears Brandbook V5.1 (Lienzo Claro + Cobalt #0D2540 + Action #FF7A00)
   + Dedicated Midnight OLED Cinema Chapter (#0B0E14)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-warm: #f6f5f1;
  --surface: #f4f7fb;
  --ink: #0d2540;
  --ink-body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-warm: #e6e2d8;
  --cobalt: #426eae;
  --sky: #4c9de6;
  --orange: #ff7a00;
  --orange-hover: #e56c00;

  --oled-bg: #0b0e14;
  --oled-surface: #131924;
  --oled-surface-2: #1a2231;
  --oled-line: #242f42;
  --oled-ink: #f1f5f9;
  --oled-muted: #94a3b8;

  --font-display: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 22px 60px -18px rgba(13, 37, 64, 0.14);
  --shadow-device: 0 36px 90px -24px rgba(11, 14, 20, 0.34), 0 10px 28px -8px rgba(11, 14, 20, 0.14);
  --container: 1280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle tactile editorial paper grain overlay (zero clutter) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ---------- Scroll Progress Hairline ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--orange);
  z-index: 1000;
  transition: width 0.08s linear;
}

/* ---------- Sticky Editorial Navigation ---------- */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 1340px);
  z-index: 500;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(13, 37, 64, 0.09);
  border-radius: 999px;
  padding: 9px 12px 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 12px 34px -16px rgba(13, 37, 64, 0.16);
  transition: background 0.35s var(--ease-expo), border-color 0.35s var(--ease-expo);
}

.nav.is-dark-section {
  background: rgba(15, 20, 30, 0.82);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav.is-dark-section .brand-mark,
.nav.is-dark-section .nav-links a,
.nav.is-dark-section .lang-btn {
  color: var(--oled-ink);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-bar {
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: var(--orange);
}

.brand-year {
  font-family: var(--font-mono);
  color: #C25300;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-body);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s var(--ease-expo);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 37, 64, 0.06);
  border-radius: 999px;
  padding: 3px;
  gap: 1px;
}

.nav.is-dark-section .lang-switch {
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.25s var(--ease-expo);
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.nav.is-dark-section .lang-btn.active {
  background: var(--orange);
  color: #0b0e14;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 14px 26px;
  transition: transform 0.3s var(--ease-expo), background 0.25s ease, box-shadow 0.3s var(--ease-expo), color 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--orange);
  color: #0D2540;
  box-shadow: 0 12px 28px -10px rgba(255, 122, 0, 0.58);
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -10px rgba(255, 122, 0, 0.65);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #16375c;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-nav {
  padding: 10px 20px;
  font-size: 0.8rem;
}

/* ---------- Editorial Section Headers ---------- */
.chapter {
  padding: clamp(80px, 10vw, 136px) 0;
  position: relative;
  scroll-margin-top: 96px;
}

.chapter-warm {
  background: var(--bg-warm);
}

.chapter-oled {
  background: var(--oled-bg);
  color: var(--oled-ink);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}

.kicker::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--orange);
}

.h1-hero {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.85rem, 5.8vw, 5.2rem);
  line-height: 0.99;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.h1-hero em,
.h2-section em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cobalt);
}

.chapter-oled .h2-section em {
  color: var(--orange);
}

.h2-section {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.8vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 820px;
}

.chapter-oled .h2-section {
  color: var(--oled-ink);
}

.lead {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.65;
  color: var(--ink-body);
  max-width: 600px;
}

.chapter-oled .lead {
  color: var(--oled-muted);
}

/* ---------- Organic Curve Dividers (Brandbook V5.1) ---------- */
.curve-divider {
  display: block;
  width: 100%;
  height: clamp(36px, 5vw, 72px);
  overflow: hidden;
  line-height: 0;
}

.curve-divider svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- CHAPTER 01: EDITORIAL CINEMA HERO ---------- */
.hero {
  padding: clamp(120px, 13vw, 152px) 0 clamp(64px, 7vw, 96px);
  background:
    radial-gradient(900px 560px at 88% 12%, rgba(66, 110, 174, 0.07), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f9f8f5 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  gap: clamp(32px, 4.5vw, 68px);
  align-items: center;
}

.hero-copy .lead {
  margin-top: 24px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-compat {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* Sculpted Video Stage */
.cinema-stage {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #10151e;
  box-shadow: var(--shadow-device);
  border: 1px solid rgba(13, 37, 64, 0.12);
  aspect-ratio: 16 / 10;
  contain: layout size;
}

.cinema-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cinema-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
}

.cinema-btn {
  background: rgba(13, 20, 30, 0.76);
  backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, transform 0.2s ease;
}

.cinema-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* Verified Telemetry Strip */
.metrics-strip {
  margin-top: clamp(48px, 6vw, 76px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-warm);
  border-bottom: 1px solid var(--line-warm);
}

.metric-cell {
  padding: 26px 20px 26px 0;
  border-right: 1px solid var(--line-warm);
  padding-left: 24px;
}

.metric-cell:first-child {
  padding-left: 0;
}

.metric-cell:last-child {
  border-right: none;
}

.metric-val {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.05;
}

.metric-val span {
  color: var(--orange);
}

.metric-lbl {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- CHAPTER 02: LIVE INTERACTIVE PAGE INSPECTOR ---------- */
.inspector-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
}

.edition-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edition-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-body);
  transition: all 0.25s var(--ease-expo);
}

.edition-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.edition-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.inspector-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.device-stage {
  position: relative;
  background: url('assets/studio/backdrop_flatlay.jpg') center/cover no-repeat;
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 40px);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line-warm);
}

.tablet-bezel {
  position: relative;
  background: #14171d;
  border-radius: 22px;
  padding: clamp(10px, 1.4vw, 18px);
  box-shadow: var(--shadow-device);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin: 0 auto;
  transition: max-width 0.45s var(--ease-expo);
}

.tablet-bezel.is-portrait {
  max-width: 560px;
}

.tablet-bezel.is-remarkable {
  background: #e2e0da;
  border-color: #c9c6be;
  padding-bottom: clamp(22px, 2.8vw, 34px);
}

.tablet-screen-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0f131a;
}

.tablet-screen-wrap img.insp-slide {
  width: 100%;
  height: auto;
  display: none;
}

.tablet-screen-wrap img.insp-slide.active {
  display: block;
}

/* Interactive Anatomy Hotspots */
.hotspot {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(13, 37, 64, 0.45);
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: transform 0.25s var(--ease-expo);
}

.hotspot::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 122, 0, 0.6);
  animation: ring-ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ring-ping {
  0% { transform: scale(0.85); opacity: 0.9; }
  80%, 100% { transform: scale(1.65); opacity: 0; }
}

.hotspot:hover,
.hotspot.active {
  transform: translate(-50%, -50%) scale(1.18);
}

.hotspot-tooltip {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: rgba(13, 25, 42, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  border-left: 4px solid var(--orange);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  z-index: 6;
  font-size: 0.88rem;
}

.hotspot-tooltip strong {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 0.78rem;
  display: block;
  margin-bottom: 2px;
}

/* Right Index Rail */
.page-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-tab-btn {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.24s var(--ease-expo);
}

.page-tab-btn:hover {
  border-color: var(--ink);
  transform: translateX(3px);
}

.page-tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.page-tab-title {
  font-weight: 700;
  font-size: 0.85rem;
}

.page-tab-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 700;
}

.inspector-note {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--ink-body);
  line-height: 1.5;
}

/* ---------- CHAPTER 03: OLED CURTAIN COMPARATOR ---------- */
.comparator-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}

.comp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comp-tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--oled-muted);
  border: 1px solid var(--oled-line);
  background: var(--oled-surface);
  transition: all 0.25s var(--ease-expo);
}

.comp-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.comp-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #0b0e14;
}

.curtain-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #141820;
  border: 1px solid var(--oled-line);
  box-shadow: 0 40px 100px -25px rgba(0, 0, 0, 0.75);
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  aspect-ratio: 1188 / 840;
}

.curtain-layer {
  position: absolute;
  inset: 0;
}

.curtain-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.curtain-light {
  clip-path: inset(0 50% 0 0);
}

.curtain-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--orange);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.curtain-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--orange);
  color: #0b0e14;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 12px 32px rgba(255, 122, 0, 0.55);
  border: 3px solid #fff;
}

.curtain-tag {
  position: absolute;
  bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  z-index: 8;
  pointer-events: none;
}

.curtain-tag-left {
  left: 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.curtain-tag-right {
  right: 20px;
  background: rgba(15, 19, 26, 0.92);
  color: var(--orange);
  border: 1px solid rgba(255, 122, 0, 0.45);
}

/* ---------- CHAPTER 04: 84 SMART TILES + 16 LUXURY COVERS STUDIO ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 48px;
}

.studio-video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--oled-line);
  background: var(--oled-surface);
  box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.65);
}

.studio-video-wrap video {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.tiles-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tile-thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--oled-line);
  background: var(--oled-surface);
  cursor: pointer;
  transition: transform 0.25s var(--ease-expo), border-color 0.25s ease;
}

.tile-thumb:hover {
  transform: translateY(-3px);
  border-color: var(--orange);
}

.tile-thumb img {
  width: 100%;
  aspect-ratio: 1188 / 840;
  object-fit: cover;
}

.tile-thumb span {
  display: block;
  padding: 7px 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--oled-muted);
  text-align: center;
}

/* Interactive Cover Swapper */
.cover-studio-box {
  background: var(--oled-surface);
  border: 1px solid var(--oled-line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
}

.cover-preview-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1188 / 840;
  background: #0f131a;
  box-shadow: 0 28px 65px -16px rgba(0, 0, 0, 0.72);
  transition: transform 0.4s var(--ease-expo);
}

.cover-preview-stage:hover {
  transform: perspective(1000px) rotateY(-3deg) rotateX(2deg) scale(1.015);
}

.cover-preview-stage .cover-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s var(--ease-expo);
  pointer-events: none;
}

.cover-preview-stage .cover-slide.active {
  opacity: 1;
}

.cover-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.cover-btn {
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid var(--oled-line);
  background: var(--oled-surface-2);
  color: var(--oled-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.22s var(--ease-expo);
}

.cover-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #0b0e14;
}

.icons-dock {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--oled-line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.icons-dock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.icons-dock-row img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease-expo);
}

.icons-dock-row img:hover {
  transform: translateY(-4px) scale(1.08);
}

/* ---------- CHAPTER 05: ERGONOMICS & ALL-DEVICE SHOWCASE ---------- */
.ergo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px);
  margin-top: 48px;
}

.ergo-item {
  display: flex;
  flex-direction: column;
}

.ergo-frame {
  border-radius: 26px 8px 26px 8px; /* Asymmetric organic Brandbook V5.1 corner rhythm */
  overflow: hidden;
  border: 1px solid var(--line-warm);
  background: #fff;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-image: url('assets/studio/backdrop_light.jpg');
  background-size: cover;
  background-position: center;
}

.ergo-frame img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(13, 37, 64, 0.28);
  transition: transform 0.45s var(--ease-expo);
}

.ergo-item:hover .ergo-frame img {
  transform: scale(1.035);
}

.ergo-tag {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.08em;
}

.ergo-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ergo-desc {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--ink-body);
  line-height: 1.6;
}

/* ---------- CHAPTER 06: SWISS ENGINEERING BENCHMARK TABLE ---------- */
.bench-table-wrap {
  margin-top: 44px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.bench-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.92rem;
}

.bench-table th,
.bench-table td {
  padding: 18px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.bench-table thead th {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg-warm);
}

.bench-table thead th.col-win {
  background: var(--ink);
  color: #fff;
}

.bench-table tbody td.col-win {
  background: #f5f9ff;
  font-weight: 700;
  color: var(--ink);
}

.bench-table tbody tr:last-child td {
  border-bottom: none;
}

.yes-dot {
  color: #15803d;
  font-weight: 800;
}

.no-dot {
  color: #94a3b8;
}

/* ---------- CHAPTER 07: PRICING & INSTANT CHECKOUT ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  align-items: stretch;
}

.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s var(--ease-expo), box-shadow 0.35s var(--ease-expo);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.price-card.featured {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 32px 76px -22px rgba(13, 37, 64, 0.45);
}

.price-tier {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

.price-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.price-card.featured .price-name {
  color: #fff;
}

.price-figure {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-now {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}

.price-card.featured .price-now {
  color: #fff;
}

.price-was {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: line-through;
}

.price-card.featured .price-was {
  color: #8aa3bf;
}

.price-sub {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.price-card.featured .price-sub {
  color: #b8cbe0;
}

.price-list {
  list-style: none;
  margin: 26px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
}

.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.price-list li::before {
  content: '✓';
  color: var(--orange);
  font-weight: 900;
  flex-shrink: 0;
}

.price-card .btn {
  width: 100%;
}

/* ---------- CHAPTER 08: FAQ & FOOTER ---------- */
.faq-list {
  margin-top: 38px;
  max-width: 860px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--ink);
}

.faq-q span {
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 1.3rem;
  transition: transform 0.25s var(--ease-expo);
}

.faq-item.open .faq-q span {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-expo), padding 0.35s ease;
  color: var(--ink-body);
  font-size: 0.94rem;
  line-height: 1.68;
}

.faq-item.open .faq-a {
  max-height: 260px;
  padding-bottom: 22px;
}

.footer {
  padding: 54px 0 64px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

/* ---------- CHECKOUT MODAL & LIGHTBOX ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(10px);
  z-index: 1200;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  width: min(100%, 540px);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.38);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: var(--ink);
  color: #fff;
}

.checkout-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.channel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: all 0.22s var(--ease-expo);
  text-align: left;
}

.channel-btn:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.channel-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.channel-btn small {
  display: block;
  font-size: 0.76rem;
  opacity: 0.76;
  margin-top: 2px;
}

/* ---------- Scroll Reveal Choreography ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-expo), transform 0.75s var(--ease-expo);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1024px) {
  .hero-grid,
  .inspector-shell,
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .page-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .page-tab-btn {
    flex-shrink: 0;
  }
  .ergo-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-cell:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 1120px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav {
    width: calc(100% - 16px);
    padding: 7px 8px 7px 12px;
    gap: 6px;
  }
  .brand-mark {
    font-size: 0.70rem;
    gap: 5px;
    letter-spacing: 0.03em;
  }
  .brand-bar {
    width: 4px;
    height: 15px;
  }
  .brand-year {
    font-size: 0.66rem;
  }
  .btn-nav {
    display: none;
  }
  .lang-switch {
    padding: 2px;
    gap: 0;
  }
  .lang-btn {
    font-size: 0.60rem;
    padding: 4px 5.5px;
  }
  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
  .metric-cell {
    padding: 18px 12px;
  }
  .tiles-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .icons-dock {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Signature 7-Style Atelier Gallery Strip ---------- */
.styles-atelier {
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid rgba(13, 37, 64, 0.08);
}
.styles-atelier-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.styles-atelier-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.styles-atelier-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--cobalt);
}
.styles-atelier-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.styles-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.style-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #f8fafc;
  border: 1.5px solid rgba(13, 37, 64, 0.09);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s var(--ease-expo), border-color 0.25s ease, box-shadow 0.25s ease;
}
.style-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 18px 34px -18px rgba(13, 37, 64, 0.28);
}
.style-card img {
  width: 100%;
  aspect-ratio: 1188 / 840;
  object-fit: cover;
}
.style-card-meta {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.style-card-meta strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}
.style-card-meta span {
  font-size: 0.74rem;
  color: var(--muted);
}
@media (max-width: 1040px) {
  .styles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .styles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- BESPOKE PLATFORM BRAND LOGOS & ARCHITECTURAL SVG ICONS ---------- */
.brand-logos-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  min-height: 28px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(13, 37, 64, 0.11);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(13, 37, 64, 0.04);
}
.brand-chip > [data-logo] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.tbp-logo { width: 16px; height: 16px; display: block; flex-shrink: 0; }
.tbp-logo-wide { width: 54px; height: 22px; display: block; }
.tbp-ico { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; flex-shrink: 0; }

/* ---------- STRIPE CHECKOUT MODAL ENHANCEMENTS ---------- */
.stripe-box {
  background: #f8fafc;
  border: 1.5px solid rgba(99, 91, 255, 0.25);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stripe-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stripe-sec-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
}
.stripe-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
}
.stripe-input:focus { border-color: #635bff; }
.stripe-pay-btn { width: 100%; text-align: left; }
.stripe-status {
  margin: 0;
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.45;
}
.brand-badge-sq {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-badge-sq .tbp-logo { width: 24px; height: 24px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  font-weight: 600;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--orange); }

/* ---------- Interactive 1 / 3 / All-In Product Picker inside Checkout Modal ---------- */
.picker-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
}
.picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 9px;
}
.picker-head strong {
  font-family: var(--font-mono);
  background: var(--orange);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.picker-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.picker-opt:hover { border-color: var(--blue); }
.picker-opt.active {
  border-color: var(--orange);
  background: #fff7ed;
}
.picker-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  flex-shrink: 0;
  color: #fff;
}
.picker-opt.active .picker-check {
  background: var(--orange);
  border-color: var(--orange);
}
.picker-opt .tbp-logo { width: 17px; height: 17px; flex-shrink: 0; }
.upsell-strip {
  margin-top: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px dashed var(--orange);
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
  color: #7c2d12;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.upsell-strip:hover { background: #ffedd5; }
.upsell-cta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--orange);
}
.gift-banner {
  background: #ecfdf5;
  border: 1.5px solid #86efac;
  color: #166534;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}


