/* ==========================================================================
   ФАРТДОМ · «ЗЕМЕЛЬНЫЙ ИНСТРУКТАЖ» — SUNLIT EDITORIAL SHOWREEL DESIGN SYSTEM
   100% Bright Daylight Palette · Zero Dark Backgrounds · Strict Grid Geometry
   ========================================================================== */

@property --inner-size {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 0px;
}

@property --outer-size {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --bg-white: #ffffff;
  --bg-meadow: #f2f8f4;
  --bg-sun: #faf8f2;
  --surface: #ffffff;
  --surface-soft: #f6faf7;

  --ink: #0f2218;
  --ink-body: #3d5346;
  --ink-muted: #6b8073;

  --emerald: #16a34a;
  --emerald-deep: #15803d;
  --emerald-bright: #22c55e;
  --emerald-tint: #dcfce7;
  --emerald-mist: #eefbf2;

  --sky: #0284c7;
  --sky-tint: #e0f2fe;
  --amber: #d97706;
  --amber-tint: #fef3c7;

  --border: rgba(15, 34, 24, 0.09);
  --border-strong: rgba(22, 163, 74, 0.26);

  --shadow-sm: 0 6px 20px rgba(15, 34, 24, 0.05);
  --shadow-md: 0 18px 48px rgba(15, 34, 24, 0.07);
  --shadow-lg: 0 28px 72px rgba(21, 128, 61, 0.11);
  --shadow-emerald: 0 14px 32px rgba(22, 163, 74, 0.28);

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-xl: 38px;

  --font-display: "Unbounded", system-ui, -apple-system, sans-serif;
  --font-sans: "Onest", system-ui, -apple-system, sans-serif;

  --container: 1240px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-white);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-white);
  color: var(--ink);
  line-height: 1.58;
  font-size: 16px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

[hidden] {
  display: none !important;
}

/* Top Scroll Progress Line */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--emerald-deep), var(--emerald-bright), var(--sky));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================================
   FLOATING PILL NAVIGATION
   ========================================================================== */
.topbar-wrap {
  position: sticky;
  top: 14px;
  z-index: 95;
  padding-inline: 16px;
  margin-top: 14px;
}

.topbar {
  max-width: var(--container);
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 34, 24, 0.09);
  border-radius: 999px;
  padding: 10px 14px 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 34px rgba(15, 34, 24, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald-deep));
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.25);
}

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

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 500;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-body);
  transition: color 0.2s ease;
}

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

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

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

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

.btn-sm {
  padding: 10px 18px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 16px 30px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
  color: #ffffff;
  box-shadow: var(--shadow-emerald);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(22, 163, 74, 0.36);
}

.btn-soft {
  background: var(--bg-meadow);
  color: var(--ink);
  border-color: rgba(22, 163, 74, 0.2);
}

.btn-soft:hover {
  background: var(--emerald-tint);
  border-color: rgba(22, 163, 74, 0.4);
}

.btn-outline {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--emerald);
  color: var(--emerald-deep);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--emerald-mist);
  border: 1px solid rgba(22, 163, 74, 0.22);
  color: var(--emerald-deep);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* ==========================================================================
   HERO: CENTERED SUNLIT EDITORIAL STAGE + 3D FLOATING ISLAND DIORAMA
   ========================================================================== */
.hero {
  position: relative;
  background: var(--bg-white);
  padding: 46px 0 64px;
  overflow: hidden;
}

/* Subtle warm daylight sky glow strictly at the top edge so the 3D island stage stays pure #FFFFFF */
.hero::before {
  content: "";
  position: absolute;
  inset: -120px auto auto 50%;
  transform: translateX(-50%);
  width: min(1100px, 95vw);
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(187, 247, 208, 0.55) 0%, rgba(224, 242, 254, 0.32) 45%, rgba(255, 255, 255, 0) 76%);
  pointer-events: none;
}

.hero-head {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.09;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-title .accent {
  background: linear-gradient(120deg, #15803d 0%, #16a34a 50%, #0284c7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (min-width: 560px) {
  .hero-title .accent {
    white-space: nowrap;
  }
}

.hero-sub {
  margin: 0;
  max-width: 700px;
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-body);
  line-height: 1.6;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

/* 3-Column Symmetric Stage: Left specs | Pure-White 3D Island | Right specs */
.hero-stage {
  position: relative;
  z-index: 2;
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, 540px) minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
}

.stage-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.spec-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  min-width: 0;
}

.spec-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.spec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-deep);
  margin-bottom: 8px;
}

.spec-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.spec-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-body);
  line-height: 1.5;
}

.island-viewport {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  min-width: 0;
}

.island-tilt {
  width: 100%;
  background: #ffffff;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.island-img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  filter: brightness(1.035) contrast(1.035);
  user-select: none;
  animation: floatGentle 6s ease-in-out infinite;
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.island-caption {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-body);
}

/* ==========================================================================
   SECTION COMMONS
   ========================================================================== */
.section {
  padding: 84px 0;
}

.section-meadow {
  background: var(--bg-meadow);
}

.section-white {
  background: var(--bg-white);
}

.section-sun {
  background: var(--bg-sun);
}

.section-header {
  max-width: 780px;
  margin: 0 auto 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-desc {
  margin: 0;
  font-size: 17px;
  color: var(--ink-body);
  max-width: 660px;
}

/* ==========================================================================
   PANORAMIC INTERACTIVE CADASTRAL SHOWCASE (hero_land.jpg)
   ========================================================================== */
.panorama-shell {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.panorama-screen {
  position: relative;
  border-radius: calc(var(--radius-xl) - 10px);
  overflow: hidden;
  aspect-ratio: 16 / 8.2;
  background: #e9f5ec;
}

.panorama-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.panorama-screen[data-layer="zouit"] img {
  transform: scale(1.035);
}

.panorama-screen[data-layer="srzu"] img {
  transform: scale(1.06);
}

.panorama-topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(15, 34, 24, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.25);
}

.panorama-dock {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: stretch;
}

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

.layer-btn {
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.layer-btn:hover {
  border-color: var(--border-strong);
  background: #ffffff;
}

.layer-btn.is-active {
  background: var(--emerald-mist);
  border-color: var(--emerald);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.12);
}

.layer-step {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-deep);
}

.layer-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.3;
}

.layer-readout {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.layer-readout-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--sky-tint);
  color: var(--sky);
  font-size: 12px;
  font-weight: 700;
}

.layer-readout h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

.layer-readout p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-body);
}

/* ==========================================================================
   INTERACTIVE SAVINGS CALCULATOR + PURE WHITE 3D LAPTOP (laptop_3d.jpg)
   ========================================================================== */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: center;
}

.calc-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.purpose-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: var(--bg-meadow);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 24px;
}

.purpose-btn {
  border: none;
  background: transparent;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.purpose-btn.is-active {
  background: #ffffff;
  color: var(--emerald-deep);
  box-shadow: var(--shadow-sm);
}

.slider-block {
  margin-bottom: 26px;
}

.slider-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.slider-label {
  font-weight: 700;
  color: var(--ink);
}

.slider-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--emerald-deep);
}

input[type="range"].land-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) 0%, var(--emerald-tint) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"].land-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--emerald);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.calc-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calc-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  min-width: 0;
}

.calc-box.highlight {
  background: var(--emerald-mist);
  border-color: rgba(22, 163, 74, 0.35);
}

.calc-box-label {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.calc-box-num {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: var(--ink);
}

.calc-box.highlight .calc-box-num {
  color: var(--emerald-deep);
}

.calc-saving-banner {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #dcfce7 0%, #e0f2fe 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calc-saving-banner strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--emerald-deep);
}

.laptop-visual-col {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  min-width: 0;
}

.laptop-3d-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  mix-blend-mode: multiply;
  filter: brightness(1.03) contrast(1.03);
}

.laptop-note {
  max-width: 430px;
  font-size: 14.5px;
  color: var(--ink-body);
  background: var(--surface-soft);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* ==========================================================================
   INTERACTIVE 4-STEP ROUTE SHOWCASE + SPOTLIGHT BENTO
   ========================================================================== */
.route-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: stretch;
}

.route-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.route-step-btn {
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.route-step-btn:hover {
  border-color: var(--border-strong);
}

.route-step-btn.is-active {
  border-color: var(--emerald);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.route-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-meadow);
  color: var(--emerald-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.route-step-btn.is-active .route-num {
  background: var(--emerald);
  color: #ffffff;
}

.route-step-body h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
}

.route-step-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-body);
}

.route-preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.route-photo-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-meadow);
}

.route-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-preview-meta {
  padding: 6px 8px 8px;
}

.route-preview-meta .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
}

.chip-sky {
  background: var(--sky-tint);
  color: var(--sky);
}

.route-preview-meta h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
}

.route-preview-meta p {
  margin: 0;
  color: var(--ink-body);
  font-size: 15px;
}

/* ==========================================================================
   EDITORIAL ASYMMETRIC BENTO WITH SPOTLIGHT REVEAL ENHANCEMENT
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.bento-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.bento-card:hover {
  --inner-size: 90px;
  --outer-size: 240px;
}

/* Decorative pointer-following radial glow mask (interactive-content-reveal) */
.bento-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(34, 197, 94, 0.16), rgba(2, 132, 199, 0.08));
  transition: --inner-size 0.25s ease-out, --outer-size 0.25s ease-out;
  -webkit-mask-image: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    black var(--inner-size, 0%),
    transparent var(--outer-size, 0%)
  );
  mask-image: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    black var(--inner-size, 0%),
    transparent var(--outer-size, 0%)
  );
  mask-repeat: no-repeat;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .bento-spotlight {
    transition: none !important;
  }
  .island-img {
    animation: none !important;
  }
}

.bento-span-7 {
  grid-column: span 7;
}

.bento-span-5 {
  grid-column: span 5;
}

.bento-card.emerald-soft {
  background: linear-gradient(145deg, #f0fdf4 0%, #ffffff 65%, #e0f2fe 100%);
  border-color: rgba(22, 163, 74, 0.25);
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
  display: grid;
  place-items: center;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}

.bento-card p {
  margin: 0;
  color: var(--ink-body);
  font-size: 15.5px;
}

.bento-mini-ui {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   CURRICULUM ACCORDION (12 VIDEO LESSONS — modern-web-guidance accordion)
   ========================================================================== */
.curriculum-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

[command="--toggle-all"][aria-expanded="true"] .expand,
[command="--toggle-all"][aria-expanded="false"] .collapse {
  display: none;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion > details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.accordion > details[open] {
  border-color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.accordion > details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

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

/* Marker directly before label text using CSS mask + smooth rotation */
.accordion > details > summary::before {
  content: "";
  inline-size: 18px;
  block-size: 18px;
  flex-shrink: 0;
  background-color: var(--emerald-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}

.accordion > details[open] > summary::before {
  rotate: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion > details > summary::before {
    transition: rotate 0.2s ease;
  }
}

.lesson-pill {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
  flex-shrink: 0;
}

.lesson-sum-title {
  flex: 1;
  font-size: 16px;
  line-height: 1.35;
  min-width: 0;
}

.lesson-dur {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-soft);
  padding: 5px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.accordion > details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.accordion > details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion > details::details-content {
    transition: block-size 0.28s ease-in-out, content-visibility 0.28s ease-in-out, display 0.28s ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.lesson-body {
  padding: 0 22px 20px 54px;
  color: var(--ink-body);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-bonus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 12px;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
  font-size: 13.5px;
  font-weight: 600;
}

/* ==========================================================================
   BOARDING-PASS OFFER CERTIFICATE CARD (twilight_valley_bg.jpg + Ticket)
   ========================================================================== */
.offer-ticket {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.offer-valley-banner {
  position: relative;
  height: 230px;
  overflow: hidden;
}

.offer-valley-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-valley-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 34, 24, 0.08) 0%, rgba(15, 34, 24, 0.48) 100%);
  display: flex;
  align-items: flex-end;
  padding: 26px 36px;
  color: #ffffff;
}

.offer-valley-overlay h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.offer-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
}

.offer-left {
  padding: 36px;
  border-right: 2px dashed rgba(22, 163, 74, 0.25);
  min-width: 0;
}

.offer-checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.offer-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 500;
}

.check-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--emerald-tint);
  color: var(--emerald-deep);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.offer-right {
  padding: 36px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.price-now {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.price-old {
  font-size: 20px;
  color: var(--ink-muted);
  text-decoration: line-through;
  font-weight: 600;
}

.offer-meta-note {
  font-size: 13.5px;
  color: var(--ink-body);
  line-height: 1.5;
}

/* ==========================================================================
   SUNLIT STUDENT LMS CABINET & AUTHOR ADMIN VIEWS
   ========================================================================== */
.app-view {
  padding: 36px 0 80px;
  background: var(--bg-meadow);
  min-height: 82vh;
}

.cabinet-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.cabinet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.player-card,
.playlist-card,
.admin-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.video-stage {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 100%);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
  min-height: 360px;
  max-height: 68vh;
}

.video-stage:has(video) {
  background: #0f2218;
}

.video-stage video {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #0f2218;
}

.video-placeholder {
  text-align: center;
  padding: 28px;
  max-width: 460px;
}

.playlist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 620px;
  overflow-y: auto;
}

.playlist-item {
  width: 100%;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.18s ease;
}

.playlist-item.is-current {
  background: var(--emerald-mist);
  border-color: var(--emerald);
}

.playlist-item.is-locked {
  opacity: 0.78;
  background: #f8faf9;
}

.playlist-item.is-locked:hover {
  border-color: rgba(217, 119, 6, 0.45);
  background: #fffdf7;
}

.lesson-pill.is-locked-pill {
  background: #fef3c7;
  color: #b45309;
}

.paywall-box {
  text-align: center;
  padding: 32px 26px;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.paywall-lock-circle {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  display: grid;
  place-items: center;
}

.btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  padding: 12px 15px;
  border-radius: 13px;
  border: 1px solid rgba(15, 34, 24, 0.16);
  background: #ffffff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* ==========================================================================
   NATIVE MODAL DIALOGS (modern-web-guidance dialog)
   ========================================================================== */
dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(15, 34, 24, 0.2);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(15, 34, 24, 0.38);
  backdrop-filter: blur(6px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-inner {
  padding: 28px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.icon-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--ink-body);
}

.status-msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 14px;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
}

.status-msg.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

/* ==========================================================================
   FOOTER (BRIGHT SUNLIT MEADOW — ZERO DARK FOOTER!)
   ========================================================================== */
.site-footer {
  background: var(--bg-meadow);
  border-top: 1px solid var(--border);
  padding: 44px 0;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-body);
}

.footer-links button {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-body);
  font-weight: 600;
  cursor: pointer;
}

.footer-links button:hover {
  color: var(--emerald-deep);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (ZERO CROOKED ELEMENTS · ZERO HORIZONTAL OVERFLOW)
   ========================================================================== */
@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }
  .hero-stage {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin-inline: auto;
  }
  .island-viewport {
    order: -1;
  }
  .stage-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panorama-dock,
  .calc-layout,
  .route-grid,
  .offer-body,
  .cabinet-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .offer-left {
    border-right: none;
    border-bottom: 2px dashed rgba(22, 163, 74, 0.25);
  }
  .bento-span-7,
  .bento-span-5 {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
  }
  .topbar {
    padding: 9px 12px;
  }
  .brand-sub {
    display: none;
  }
  .nav-actions .btn-outline {
    display: none;
  }
  .hero {
    padding: 28px 0 48px;
  }
  .hero-cta-row .btn {
    width: 100%;
  }
  .stage-col,
  .layer-tabs,
  .calc-results,
  .purpose-segmented {
    grid-template-columns: 1fr;
  }
  .panorama-screen {
    aspect-ratio: 16 / 11;
  }
  .panorama-topbar .glass-pill:last-child {
    display: none;
  }
  .section {
    padding: 58px 0;
  }
  .calc-card,
  .bento-card,
  .offer-left,
  .offer-right,
  .player-card,
  .playlist-card,
  .admin-card {
    padding: 22px 18px;
  }
  .accordion > details > summary {
    flex-wrap: wrap;
    padding: 15px 16px;
    gap: 10px;
  }
  .lesson-sum-title {
    flex: 1 1 100%;
    order: 3;
  }
  .lesson-body {
    padding: 0 16px 16px 16px;
  }
}

/* ==========================================================================
   PROMO VIDEO DIALOG & DYNAMIC LESSON MANAGER
   ========================================================================== */
dialog.dialog-video {
  width: min(760px, calc(100vw - 28px));
}

.promo-video-stage {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f2218;
  max-height: 68vh;
  display: grid;
  place-items: center;
}

.promo-video-stage video {
  width: 100%;
  max-height: 68vh;
  height: auto;
  object-fit: contain;
  display: block;
  background: #0f2218;
}

.promo-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 100%);
}

.promo-placeholder-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--emerald);
  color: #ffffff;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.28);
}

.admin-add-lesson-box {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(22, 163, 74, 0.45);
  background: #f0fdf4;
}

.admin-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-lesson-edit-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.admin-lesson-edit-details > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-deep);
  user-select: none;
}

.admin-lesson-edit-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

@media (max-width: 640px) {
  .admin-add-grid {
    grid-template-columns: 1fr;
  }
  .video-stage,
  .promo-video-stage {
    min-height: 240px;
    max-height: 62vh;
  }
  .video-stage video,
  .promo-video-stage video {
    max-height: 62vh;
  }
}

.footer-legal-meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-body);
}

.consent-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.inline-legal-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--emerald-deep);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

dialog.dialog-legal {
  width: min(680px, calc(100vw - 28px));
}

.legal-scroll-body {
  max-height: min(62vh, 460px);
  overflow-y: auto;
  padding-right: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-body);
  display: grid;
  gap: 12px;
}

.legal-scroll-body p {
  margin: 0;
}
