@import url("assets/fonts/fonts.css");

@font-face {
  font-family: "PlayfairDisplayFallback";
  src: url("assets/fonts/PlayfairDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PlayfairDisplayFallback";
  src: url("assets/fonts/PlayfairDisplay-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PlayfairDisplayFallback";
  src: url("assets/fonts/PlayfairDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --midnight: #021d2b;
  --midnight-soft: #06283a;
  --midnight-deep: #01141e;
  --alice: #dcecf4;
  --alice-light: #edf5fa;
  --steel: #98b6c6;
  --white: #ffffff;
  --ivory: #f8f6f2;
  --cobalt: #01479c;
  --signal: #80cb41;
  --emerald: #178754;
  --brass: #b38a4c;
  --border-dark: rgba(255, 255, 255, 0.16);
  --border-light: rgba(2, 29, 43, 0.14);
  --font-serif: "Cormorant Garamond", "PlayfairDisplayFallback", Georgia, serif;
  --font-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-arch: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--midnight);
  color: var(--white);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--midnight);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.tabular {
  font-variant-numeric: lining-nums tabular-nums;
}

button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

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

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

button {
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 20px 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.4s var(--ease-arch), padding 0.4s var(--ease-arch), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background-color: rgba(2, 29, 43, 0.94);
  backdrop-filter: blur(14px);
  padding: 14px 5vw;
  border-bottom-color: rgba(152, 182, 198, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

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

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 2px;
}

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

.nav-anchor {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

.nav-anchor::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--alice);
  transition: width 0.35s var(--ease-arch);
}

.nav-anchor:hover {
  color: var(--white);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(152, 182, 198, 0.35);
  background: rgba(2, 29, 43, 0.65);
  padding: 2px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 5px 9px;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--alice);
  color: var(--midnight);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(152, 182, 198, 0.35);
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--alice);
  color: var(--midnight);
  z-index: 950;
  padding: 84px 8vw 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(-100%);
  transition: transform 0.45s var(--ease-arch);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 22px;
  right: 6vw;
  background: transparent;
  border: 1px solid rgba(2, 29, 43, 0.25);
  color: var(--midnight);
  padding: 8px 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-link {
  font-family: var(--font-serif);
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--midnight);
  border-bottom: 1px solid rgba(2, 29, 43, 0.12);
  padding-bottom: 10px;
}

/* ================= SIGNATURE DIMORA CONTROLS ================= */
.dimora-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.dimora-link .link-lines {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dimora-link .line-bar {
  height: 1px;
  width: 100%;
  background: currentColor;
  transform-origin: left center;
  transition: transform 0.35s var(--ease-arch);
}

.dimora-link .line-bar:nth-child(2) {
  width: 72%;
  opacity: 0.65;
}

.dimora-link:hover .line-bar:nth-child(2) {
  transform: scaleX(1.38);
  opacity: 1;
}

.frame-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.frame-btn::before,
.frame-btn::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(220, 236, 244, 0.28);
  pointer-events: none;
  transition: inset 0.3s var(--ease-arch), border-color 0.3s;
}

.frame-btn:hover {
  background: var(--alice);
  color: var(--midnight);
  border-color: var(--alice);
}

.frame-btn:hover::before,
.frame-btn:hover::after {
  inset: 0;
  border-color: var(--alice);
}

.frame-btn.dark {
  color: var(--midnight);
  border-color: rgba(2, 29, 43, 0.38);
}

.frame-btn.dark::before,
.frame-btn.dark::after {
  border-color: rgba(2, 29, 43, 0.2);
}

.frame-btn.dark:hover {
  background: var(--midnight);
  color: var(--white);
  border-color: var(--midnight);
}

.subheading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 14px;
}

.subheading.dark {
  color: var(--cobalt);
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 112px 5vw 36px;
  overflow: hidden;
  background: var(--midnight);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(2, 29, 43, 0.72) 0%, rgba(2, 29, 43, 0.42) 48%, rgba(2, 29, 43, 0.94) 100%),
    url("assets/photo_5.jpg");
  background-size: cover;
  background-position: center 42%;
  transform: scale(1.06);
  animation: heroZoom 2.2s var(--ease-arch) forwards;
  z-index: 0;
}

@keyframes heroZoom {
  from { transform: scale(1.12); opacity: 0.7; }
  to { transform: scale(1.0); opacity: 1; }
}

.hero-center {
  position: relative;
  z-index: 2;
  margin: auto 0;
  text-align: center;
  max-width: 1100px;
  align-self: center;
  padding: 36px 0 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--alice);
  padding: 7px 16px;
  border: 1px solid rgba(220, 236, 244, 0.3);
  background: rgba(2, 29, 43, 0.48);
  backdrop-filter: blur(8px);
  margin-bottom: 26px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(128, 203, 65, 0.22);
}

.hero-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--white);
  font-size: clamp(2.5rem, 6.2vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: 0.14em;
  text-shadow: 0 12px 42px rgba(2, 29, 43, 0.55);
}

.hero-title .hero-line {
  display: block;
}

.hero-title .hero-line.italic {
  font-style: italic;
  color: var(--alice);
  font-size: clamp(2.2rem, 5.1vw, 4.8rem);
  letter-spacing: 0.18em;
  margin-top: 6px;
}

.hero-sub {
  margin: 24px auto 34px;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.hero-kpi-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(152, 182, 198, 0.26);
  border-bottom: 1px solid rgba(152, 182, 198, 0.26);
  background: rgba(2, 29, 43, 0.72);
  backdrop-filter: blur(12px);
}

.hero-kpi {
  padding: 18px 22px;
  border-right: 1px solid rgba(152, 182, 198, 0.18);
}

.hero-kpi:last-child {
  border-right: 0;
}

.hero-kpi-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 6px;
}

.hero-kpi-val {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
}

.hero-kpi-val.accent {
  color: var(--signal);
}

.hero-kpi-sub {
  font-size: 11px;
  color: rgba(220, 236, 244, 0.78);
  margin-top: 4px;
}

/* ================= THESIS SECTION (DIMORA DESCRIPTION SECTION) ================= */
.thesis-section {
  padding: 110px 7vw 90px;
  background: var(--midnight);
  border-bottom: 1px solid rgba(152, 182, 198, 0.14);
}

.thesis-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: end;
}

.parallax-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 4.3rem);
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.03em;
}

.thesis-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 8px;
}

.thesis-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(220, 236, 244, 0.86);
}

/* ================= TRIPLE-FRAME SHOWCASE + BEFORE/AFTER + FLOORPLAN ================= */
.showcase-section {
  position: relative;
  padding: 96px 0 110px;
  background: var(--midnight);
  overflow: hidden;
}

.showcase-bg-word {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 12vw, 11rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(220, 236, 244, 0.045);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.showcase-header {
  max-width: 1320px;
  margin: 0 auto 38px;
  padding: 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.showcase-tabs {
  display: inline-flex;
  border: 1px solid rgba(152, 182, 198, 0.3);
  background: rgba(1, 20, 30, 0.6);
}

.showcase-tab {
  border: 0;
  background: transparent;
  color: var(--steel);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 12px 20px;
  transition: all 0.25s;
}

.showcase-tab.active {
  background: var(--alice);
  color: var(--midnight);
}

/* Asymmetric 3-column Dimora grid */
.grid-landing {
  position: relative;
  display: grid;
  grid-template-columns: 11vw minmax(0, 1fr) 11vw;
  gap: 2.2vw;
  align-items: stretch;
}

.side-crop {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(152, 182, 198, 0.16);
  min-height: 460px;
}

.side-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) brightness(0.65);
  transition: transform 0.9s var(--ease-arch), filter 0.5s;
}

.side-crop:hover img {
  transform: scale(1.05);
  filter: saturate(1) brightness(0.85);
}

.side-crop-caption {
  position: absolute;
  bottom: 14px;
  left: 10px;
  right: 10px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--alice);
  background: rgba(2, 29, 43, 0.78);
  padding: 6px 8px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.center-stage {
  position: relative;
  min-height: 520px;
}

.stage-panel {
  display: none;
  height: 100%;
}

.stage-panel.active {
  display: block;
}

/* Before/After pixel-aligned compare */
.compare-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  max-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(220, 236, 244, 0.24);
  background: var(--midnight-deep);
  touch-action: none;
  user-select: none;
}

.compare-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.compare-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--alice);
  box-shadow: 0 0 18px rgba(2, 29, 43, 0.75);
  z-index: 5;
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--alice);
  color: var(--midnight);
  border: 2px solid var(--midnight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  z-index: 6;
  cursor: ew-resize;
}

.compare-tag {
  position: absolute;
  top: 18px;
  z-index: 4;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(2, 29, 43, 0.78);
  color: var(--white);
  border: 1px solid rgba(220, 236, 244, 0.25);
  backdrop-filter: blur(6px);
}

.compare-tag.before { left: 18px; }
.compare-tag.after { right: 18px; background: rgba(1, 71, 156, 0.88); }

.compare-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mini-pill-btn {
  border: 1px solid rgba(152, 182, 198, 0.35);
  background: rgba(2, 29, 43, 0.85);
  color: var(--alice);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  transition: all 0.2s;
}

.mini-pill-btn:hover,
.mini-pill-btn.active {
  background: var(--alice);
  color: var(--midnight);
}

/* Plan panel */
.plan-frame {
  background: var(--alice-light);
  color: var(--midnight);
  border: 1px solid rgba(220, 236, 244, 0.4);
  padding: 24px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.plan-svg-wrap {
  width: 100%;
  background: var(--white);
  border: 1px solid rgba(2, 29, 43, 0.12);
  padding: 14px;
}

.room-rect {
  fill: #f6fafc;
  stroke: #021d2b;
  stroke-width: 2;
  transition: fill 0.2s;
  cursor: pointer;
}

.room-rect:hover,
.room-rect.selected {
  fill: #dcecf4;
}

.room-rect.wet {
  fill: #eaf2f8;
}

.plan-room-readout {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--midnight);
  color: var(--white);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Gallery panel */
.gallery-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-main {
  aspect-ratio: 16 / 9;
  min-height: 400px;
  max-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(220, 236, 244, 0.25);
  position: relative;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.gallery-thumb {
  border: 2px solid transparent;
  padding: 0;
  background: transparent;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  opacity: 0.65;
  transition: all 0.2s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--alice);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dimora overlapping .alice-blue spec card */
.floating-spec-card {
  position: relative;
  z-index: 10;
  max-width: 1060px;
  margin: 22px auto 0;
  background: var(--alice);
  color: var(--midnight);
  padding: 28px 36px;
  box-shadow: 0 28px 64px rgba(1, 12, 20, 0.55);
  border: 1px solid rgba(2, 29, 43, 0.1);
}

.spec-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(2, 29, 43, 0.14);
  padding-bottom: 18px;
}

.spec-title {
  font-family: var(--font-serif);
  font-size: 30px;
  margin: 0;
  font-weight: 600;
}

.spec-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin: 4px 0 0;
}

.spec-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0;
}

.spec-cell {
  padding: 10px 14px;
  border-right: 1px solid rgba(2, 29, 43, 0.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-cell:first-child { padding-left: 0; }
.spec-cell:last-child { border-right: 0; }

.spec-cell-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(2, 29, 43, 0.62);
}

.spec-cell-val {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--midnight);
}

.spec-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(2, 29, 43, 0.12);
}

.spec-reform-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--cobalt);
}

/* ================= NUMBERED LOCATION DRIVERS ("JOURNAL INDEX" STYLE) ================= */
.drivers-section {
  padding: 100px 6vw 110px;
  background: var(--midnight);
  border-top: 1px solid rgba(152, 182, 198, 0.12);
}

.section-intro {
  max-width: 1280px;
  margin: 0 auto 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 3.3rem);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  max-width: 780px;
}

.section-title.dark {
  color: var(--midnight);
}

.drivers-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
}

.driver-card {
  border-top: 1px solid rgba(220, 236, 244, 0.24);
  padding-top: 28px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: transform 0.35s var(--ease-arch);
}

.driver-card:hover {
  transform: translateY(-4px);
}

.order-heading {
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.78;
  color: var(--alice);
  margin: 0;
  flex-shrink: 0;
  min-width: 68px;
}

.driver-body h3 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--white);
}

.driver-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(220, 236, 244, 0.8);
}

/* ================= CHARTS SECTION (ALICE-BLUE DRAFTING CANVAS) ================= */
.charts-section {
  background: var(--alice);
  color: var(--midnight);
  padding: 100px 6vw 110px;
}

.charts-wrapper {
  max-width: 1320px;
  margin: 0 auto;
}

.charts-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.charts-subtitle {
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(2, 29, 43, 0.76);
  margin: 12px 0 0;
}

.filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  border: 1px solid rgba(2, 29, 43, 0.25);
  background: rgba(255, 255, 255, 0.6);
  color: var(--midnight);
  padding: 9px 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.chip-btn.active,
.chip-btn:hover {
  background: var(--midnight);
  color: var(--white);
  border-color: var(--midnight);
}

.charts-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.chart-panel {
  background: var(--white);
  border: 1px solid rgba(2, 29, 43, 0.12);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(2, 29, 43, 0.06);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 14px;
  height: 3px;
  display: inline-block;
}

.legend-swatch.dashed {
  border-top: 2px dashed var(--brass);
  height: 0;
}

.spline-stage {
  position: relative;
  width: 100%;
}

.spline-stage svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.spline-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spline-path.animate-draw {
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  animation: drawCurve 1.6s var(--ease-arch) forwards;
}

@keyframes drawCurve {
  to { stroke-dashoffset: 0; }
}

.scrub-readout {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--ivory);
  border: 1px solid rgba(2, 29, 43, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.year-pill {
  border: 1px solid rgba(2, 29, 43, 0.18);
  background: transparent;
  color: var(--midnight);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 10px;
}

.year-pill.active {
  background: var(--cobalt);
  color: var(--white);
  border-color: var(--cobalt);
}

/* District horizontal comparison bars */
.district-bars {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.dbar-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dbar-track {
  width: 100%;
  height: 11px;
  background: #edf2f6;
  overflow: hidden;
  position: relative;
}

.dbar-fill {
  height: 100%;
  transition: width 1s var(--ease-arch);
}

.dbar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(2, 29, 43, 0.65);
  margin-top: 4px;
}

/* ================= LIVE INTERACTIVE MAP SECTION ================= */
.map-section {
  background: var(--ivory);
  color: var(--midnight);
  padding: 96px 6vw 105px;
  border-top: 1px solid rgba(2, 29, 43, 0.08);
}

.map-container {
  max-width: 1320px;
  margin: 0 auto;
}

.map-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 24px;
  margin-top: 28px;
  align-items: stretch;
}

.map-canvas-wrap {
  position: relative;
  height: 580px;
  border: 1px solid rgba(2, 29, 43, 0.18);
  background: #dcebf2;
  overflow: hidden;
}

.map-basemap-switch {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 600;
  display: inline-flex;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(2, 29, 43, 0.22);
  box-shadow: 0 4px 16px rgba(2, 29, 43, 0.16);
}

.basemap-btn {
  border: 0;
  background: transparent;
  color: var(--midnight);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
}

.basemap-btn.active {
  background: var(--midnight);
  color: var(--white);
}

.map-zone-hud {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 600;
  background: rgba(2, 29, 43, 0.9);
  color: var(--white);
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  border-left: 3px solid var(--signal);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.zone-label-pill {
  display: inline-block;
  width: max-content;
  background: rgba(255, 255, 255, 0.94);
  color: var(--midnight);
  border: 1.5px solid var(--cobalt);
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(2, 29, 43, 0.2);
  pointer-events: none;
}

#gijonMap {
  width: 100%;
  height: 580px;
  background: #e9eff2;
}

.map-sidebar {
  background: var(--white);
  border: 1px solid rgba(2, 29, 43, 0.12);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  height: 580px;
  overflow: hidden;
}

.map-active-card {
  border-bottom: 1px solid rgba(2, 29, 43, 0.12);
  padding-bottom: 14px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.map-thumb {
  width: 100%;
  height: 136px;
  object-fit: cover;
  margin-bottom: 10px;
}

.map-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 4px;
}

.map-item {
  border: 1px solid rgba(2, 29, 43, 0.12);
  background: var(--ivory);
  padding: 10px 12px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.map-item:hover,
.map-item.active {
  border-color: var(--cobalt);
  background: var(--alice);
}

.map-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  border: 1.5px solid var(--white);
  box-shadow: 0 4px 12px rgba(2, 29, 43, 0.35);
  white-space: nowrap;
}

.map-pin-badge.target {
  background: var(--cobalt);
  border-color: var(--signal);
}

/* ================= INTERACTIVE QUIZ & PAYBACK CALCULATOR ================= */
.quiz-section {
  background: var(--midnight);
  color: var(--white);
  padding: 76px 6vw 90px;
}

.quiz-wrap {
  max-width: 1320px;
  margin: 0 auto;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.18fr;
  gap: 28px;
  margin-top: 26px;
  align-items: start;
}

.quiz-card {
  background: var(--midnight-soft);
  border: 1px solid rgba(152, 182, 198, 0.22);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
}

.quiz-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--alice);
}

.quiz-step-dots {
  display: flex;
  gap: 6px;
}

.q-dot {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(152, 182, 198, 0.36);
  background: transparent;
  color: var(--steel);
  font-size: 10.5px;
  font-weight: 700;
}

.q-dot.active {
  background: var(--alice);
  color: var(--midnight);
  border-color: var(--alice);
}

.quiz-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(152, 182, 198, 0.18);
  margin-bottom: 24px;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--signal);
  transition: width 0.35s var(--ease-arch);
}

.quiz-pane {
  display: none;
  flex: 1;
}

.quiz-pane.active {
  display: block;
}

.quiz-options.stack {
  flex-direction: column;
}

.quiz-options.stack .quiz-opt {
  width: 100%;
  text-align: left;
  padding: 13px 16px;
}

.quiz-nav-row {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(152, 182, 198, 0.18);
}

.benefit-strip {
  background: var(--white);
  border-left: 3px solid var(--emerald);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--midnight);
}

.benefit-alt-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cobalt);
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
}

.quiz-step {
  margin-bottom: 22px;
}

.quiz-step-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-opt {
  border: 1px solid rgba(152, 182, 198, 0.32);
  background: rgba(2, 29, 43, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  font-weight: 500;
  padding: 9px 13px;
  transition: all 0.2s;
}

.quiz-opt.active,
.quiz-opt:hover {
  background: var(--alice);
  color: var(--midnight);
  border-color: var(--alice);
  font-weight: 600;
}

.slider-group {
  border-top: 1px solid rgba(152, 182, 198, 0.18);
  padding-top: 20px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--alice);
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--alice);
  cursor: pointer;
}

.roi-dashboard {
  background: var(--alice);
  color: var(--midnight);
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.roi-profile-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(2, 29, 43, 0.14);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.roi-badge {
  background: var(--midnight);
  color: var(--signal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.roi-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.roi-kpi-box {
  background: var(--white);
  border: 1px solid rgba(2, 29, 43, 0.1);
  padding: 12px 15px;
}

.roi-kpi-box.highlight {
  background: var(--midnight);
  color: var(--white);
}

.roi-kpi-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.roi-kpi-num {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.08;
}

.quiz-summary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(152, 182, 198, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quiz-sum-pill {
  font-size: 10px;
  padding: 4px 8px;
  background: rgba(2, 29, 43, 0.72);
  border: 1px solid rgba(152, 182, 198, 0.28);
  color: var(--alice);
  cursor: pointer;
}

.quiz-sum-pill:hover {
  border-color: var(--signal);
}

.roi-kpi-box.highlight .roi-kpi-num {
  color: var(--signal);
}

.roi-kpi-note {
  font-size: 11px;
  opacity: 0.78;
  margin-top: 4px;
}

.roi-visuals {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 18px;
  align-items: stretch;
}

.roi-chart-box {
  background: var(--white);
  border: 1px solid rgba(2, 29, 43, 0.1);
  padding: 16px;
}

.roi-chart-box h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--midnight);
}

/* ================= CONTACT & FOOTER (DIMORA SPLIT CONTACT) ================= */
.contact-section {
  background: var(--white);
  color: var(--midnight);
  padding: 90px 6vw;
}

.contact-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border: 1px solid rgba(2, 29, 43, 0.15);
}

.contact-left {
  background: var(--midnight);
  color: var(--white);
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.contact-left h2 {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.08;
}

.contact-right {
  background: var(--alice);
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-right h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin: 0 0 12px;
}

.hairline-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(2, 29, 43, 0.35);
  padding: 12px 0;
  margin-bottom: 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--midnight);
  outline: none;
}

.hairline-input:focus {
  border-bottom-color: var(--cobalt);
}

.form-toast {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--midnight);
  color: var(--signal);
  font-size: 12px;
}

.form-toast.show {
  display: block;
}

.footer {
  background: var(--midnight-deep);
  color: var(--steel);
  padding: 40px 6vw;
  font-size: 11px;
  border-top: 1px solid rgba(152, 182, 198, 0.16);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .nav-center { display: none; }
  .menu-toggle { display: flex; }
  .thesis-grid,
  .charts-grid,
  .map-layout,
  .quiz-grid,
  .contact-grid,
  .roi-visuals {
    grid-template-columns: 1fr;
  }
  .grid-landing {
    grid-template-columns: 1fr;
    padding: 0 5vw;
  }
  .side-crop { display: none; }
  .floating-spec-card {
    margin: 24px 5vw 0;
    padding: 24px;
  }
  .spec-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .spec-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(2, 29, 43, 0.1);
    padding: 8px 0;
  }
  .drivers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .navbar { padding: 14px 4vw; }
  .navbar.scrolled { padding: 12px 4vw; }
  .brand-name { font-size: 16px; letter-spacing: 0.08em; }
  .brand-sub { font-size: 8px; letter-spacing: 0.14em; }
  .nav-right { gap: 8px; }
  .nav-right .mini-pill-btn { display: none; }
  .hero { padding-top: 86px; min-height: 100svh; }
  .hero-title { font-size: 2.05rem; letter-spacing: 0.08em; }
  .hero-title .hero-line.italic { font-size: 1.8rem; letter-spacing: 0.1em; }
  .hero-kpi-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-kpi:nth-child(2n) { border-right: 0; }
  .hero-kpi { border-bottom: 1px solid rgba(152, 182, 198, 0.15); padding: 14px; }
  .roi-kpis { grid-template-columns: 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-left, .contact-right { padding: 28px; }
  .chart-panel { padding: 20px 16px; }
}
