/* ==========================================================================
   Habito — Public Website (habito.bervos.org)
   Visual Direction: "Warm Precision" + Natural Architectural Pigments
   Paper · Ink · Brass · Night · Terracotta · Mineral Sage
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/SpaceGrotesk-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light — Paper Sheet */
  --bg-page: #F5F2EB;
  --bg-sheet: #FDFBF7;
  --bg-warm: #EDE7DA;
  --bg-header: rgba(245, 242, 235, 0.88);

  --ink: #1B1A16;
  --text-secondary: #625C52;
  --text-tertiary: #7A7367;

  --rule: #E4DEC9;
  --rule-strong: #CEC6B4;

  /* Architectural Pigments */
  --brass: #A87B3F;
  --brass-hover: #916730;
  --brass-ink: #7A5626;
  --brass-soft: rgba(168, 123, 63, 0.12);
  --brass-border: rgba(168, 123, 63, 0.38);

  --clay: #A85D42;
  --clay-soft: rgba(168, 93, 66, 0.12);
  --clay-border: rgba(168, 93, 66, 0.34);

  --sage: #486455;
  --sage-soft: rgba(72, 100, 85, 0.12);
  --sage-border: rgba(72, 100, 85, 0.34);

  /* Contrast Band (Always Deep Night Studio) */
  --band-dark-bg: #171512;
  --band-dark-card: #23201B;
  --band-dark-ink: #F5F2EB;
  --band-dark-muted: #A9A294;
  --band-dark-rule: #322E27;
  --band-dark-brass: #CDA876;
  --band-dark-clay: #D88C70;
  --band-dark-sage: #8BB39C;

  --btn-text-on-brass: #171512;

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="night"] {
  --bg-page: #171512;
  --bg-sheet: #23201B;
  --bg-warm: #1D1B17;
  --bg-header: rgba(23, 21, 18, 0.88);

  --ink: #F5F2EB;
  --text-secondary: #ABA496;
  --text-tertiary: #8E877A;

  --rule: #2D2A24;
  --rule-strong: #433E36;

  --brass: #CDA876;
  --brass-hover: #DDBB8C;
  --brass-ink: #CDA876;
  --brass-soft: rgba(205, 168, 118, 0.14);
  --brass-border: rgba(205, 168, 118, 0.40);

  --clay: #D88C70;
  --clay-soft: rgba(216, 140, 112, 0.14);
  --clay-border: rgba(216, 140, 112, 0.38);

  --sage: #8BB39C;
  --sage-soft: rgba(139, 179, 156, 0.14);
  --sage-border: rgba(139, 179, 156, 0.38);

  --band-dark-bg: #11100D;
  --band-dark-card: #1D1B17;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  background-color: var(--bg-page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Header & Approved Lockup
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.2rem;
  gap: 1rem;
}

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

.brand-mark {
  width: 1.72rem;
  height: 1.72rem;
  display: block;
}

.brand-mark .mark-wall { fill: currentColor; }
.brand-mark .mark-dot { fill: var(--brass); }

.brand-wordmark-svg {
  height: 1.24rem;
  width: auto;
  display: block;
}

.brand-wordmark-svg .wm-ink { fill: currentColor; }
.brand-wordmark-svg .wm-dot { fill: var(--brass); }

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 160ms ease;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle,
.menu-toggle {
  appearance: none;
  background: var(--bg-sheet);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 160ms ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--brass);
}

.theme-swatch {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--brass);
}

.menu-toggle {
  display: none;
}

/* ==========================================================================
   Hero — Sculptural Headline + Interactive Sunlit Room Stage
   ========================================================================== */

.hero {
  padding: clamp(2.5rem, 5vw, 4.25rem) 0 clamp(3.5rem, 6.5vw, 5.5rem);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 6.2vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
}

/* Echoes the brass inhabitant dot & wordmark i-dot */
.hero-dot {
  color: var(--brass);
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.08rem, 1.55vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.55rem;
  background-color: var(--brass);
  color: var(--btn-text-on-brass);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 180ms ease, transform 180ms var(--ease);
}

.btn-primary:hover {
  background-color: var(--brass-hover);
  transform: translateY(-1px);
}

.concept-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-sheet);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.chip-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--brass);
}

/* Offset Architectural Echo Frame around Hero Stage (from ECO mark top+left outline) */
.hero-stage-wrap {
  position: relative;
  padding-top: 14px;
  padding-left: 14px;
}

.hero-stage-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 58%;
  height: 62%;
  border-top: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  opacity: 0.22;
  pointer-events: none;
}

.hero-stage-wrap::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  pointer-events: none;
}

/* Full-Width Interactive Hero Visual Stage */
.hero-stage {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  background: #171512;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(27, 26, 22, 0.14);
}

.hero-stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  display: block;
  transition: transform 600ms var(--ease), filter 400ms ease;
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 21, 18, 0.14) 0%, rgba(23, 21, 18, 0.04) 55%, rgba(23, 21, 18, 0.56) 100%);
  pointer-events: none;
}

/* Interactive Architectural Overlays on the Room Photo */
.stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: opacity 280ms var(--ease);
}

.hero-stage[data-view="clean"] .stage-overlay-scale,
.hero-stage[data-view="clean"] .stage-overlay-memory,
.hero-stage[data-view="scale"] .stage-overlay-memory,
.hero-stage[data-view="memory"] .stage-overlay-scale {
  opacity: 0;
}

/* Solid brass tape-verified wall line */
.measure-line-verified {
  position: absolute;
  left: 33%;
  right: 17%;
  top: 23%;
  height: 2px;
  background: #E2BE88;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.measure-line-verified::before,
.measure-line-verified::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 2px;
  height: 14px;
  background: #E2BE88;
}
.measure-line-verified::before { left: 0; }
.measure-line-verified::after { right: 0; }

.measure-tag {
  position: absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(23, 21, 18, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 190, 136, 0.55);
  color: #F5F2EB;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.measure-tag strong {
  color: #E2BE88;
  font-weight: 600;
}

/* Dashed scan estimate line */
.measure-line-estimate {
  position: absolute;
  left: 11%;
  width: 19%;
  top: 56%;
  border-top: 2px dashed rgba(245, 242, 235, 0.88);
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.5));
}

.measure-line-estimate .measure-tag {
  border-color: rgba(245, 242, 235, 0.35);
  top: -34px;
}

.measure-line-estimate .measure-tag strong {
  color: #D8D2C4;
}

/* Quiet Memory Pin overlay */
.memory-pin-marker {
  position: absolute;
  left: 39%;
  top: 64%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.memory-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #CDA876;
  border: 3px solid #F5F2EB;
  box-shadow: 0 0 0 8px rgba(205, 168, 118, 0.25), 0 6px 18px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.memory-pin-card {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: rgba(23, 21, 18, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(205, 168, 118, 0.45);
  color: #F5F2EB;
  max-width: 240px;
}

.memory-pin-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #D88C70;
  margin-bottom: 0.2rem;
}

.memory-pin-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.38;
}

/* Bottom Floating Controls Bar on Hero Photo */
.stage-bar {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stage-controls {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(23, 21, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 242, 235, 0.16);
}

.stage-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(245, 242, 235, 0.78);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.stage-btn[aria-pressed="true"] {
  background: #F5F2EB;
  color: #171512;
  font-weight: 600;
}

.stage-caption {
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  background: rgba(23, 21, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(245, 242, 235, 0.76);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Band 01 — Deep Night Visual Triptych (Rich Contrast + Color)
   ========================================================================== */

.band-dark {
  background-color: var(--band-dark-bg);
  color: var(--band-dark-ink);
  padding-block: clamp(4rem, 7.5vw, 6.5rem);
}

.band-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.band-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--band-dark-brass);
}

.band-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.band-sub {
  margin: 0;
  max-width: 38ch;
  font-size: 0.98rem;
  color: var(--band-dark-muted);
}

/* Architectural doorway-gap divider (exact 0.53..0.81 bottom-wall proportion) */
.doorway-rule {
  display: grid;
  grid-template-columns: 53% 28% 19%;
  align-items: center;
  height: 1px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.doorway-rule-left,
.doorway-rule-right {
  height: 1px;
  background: var(--rule-strong);
}

.band-dark .doorway-rule-left,
.band-dark .doorway-rule-right {
  background: var(--band-dark-rule);
}

.doorway-rule-gap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.doorway-rule-gap::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}

.band-dark .doorway-rule-gap::after {
  background: var(--band-dark-brass);
}

.triptych-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.story-card {
  position: relative;
  background: var(--band-dark-card);
  border: 1px solid var(--band-dark-rule);
  border-radius: 4px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: transform 280ms var(--ease), border-color 220ms ease;
}

/* Sharp ECO top-left echo bracket on each visual story card */
.story-card::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 28px;
  height: 28px;
  border-top: 2.5px solid var(--band-dark-brass);
  border-left: 2.5px solid var(--band-dark-brass);
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 220ms ease, width 240ms var(--ease), height 240ms var(--ease);
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(205, 168, 118, 0.5);
}

.story-card:hover::before {
  opacity: 1;
  width: 38px;
  height: 38px;
}

.story-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
  background: #12100E;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease);
}

.story-card:hover .story-media img {
  transform: scale(1.035);
}

.story-media-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.22rem 0.58rem;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(23, 21, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F5F2EB;
  border: 1px solid rgba(245, 242, 235, 0.16);
}

.tag-clay { color: var(--band-dark-clay); border-color: rgba(216, 140, 112, 0.42); }
.tag-sage { color: var(--band-dark-sage); border-color: rgba(139, 179, 156, 0.42); }
.tag-brass { color: var(--band-dark-brass); border-color: rgba(205, 168, 118, 0.42); }

.story-body {
  padding: 1.25rem 1.35rem 1.45rem;
}

.story-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--band-dark-ink);
}

.story-line {
  margin: 0;
  font-size: 0.92rem;
  color: var(--band-dark-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Band 02 — Interactive Architectural Studio (Timeline + Imagined vs Captured)
   ========================================================================== */

.band-paper {
  padding-block: clamp(4rem, 7.5vw, 6.5rem);
  border-bottom: 1px solid var(--rule);
}

.paper-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.paper-kicker::before,
.band-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  display: inline-block;
  flex-shrink: 0;
}

.band-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.band-dark .band-kicker::before {
  background: var(--band-dark-brass);
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.studio-panel {
  position: relative;
  background: var(--bg-sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
}

/* Sharp architectural corner marks (top-left & bottom-right) */
.studio-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 24px;
  height: 24px;
  border-top: 2.5px solid var(--ink);
  border-left: 2.5px solid var(--ink);
  opacity: 0.25;
  pointer-events: none;
}

.studio-panel::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  pointer-events: none;
}

.studio-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.studio-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.studio-canvas {
  background: var(--bg-warm);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.75rem;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orthographic Timeline SVG */
.timeline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.t-wall { fill: var(--ink); }
.t-echo { fill: var(--rule-strong); }
.t-item { fill: none; stroke: var(--brass); stroke-width: 2; transition: opacity 240ms ease; }
.t-item-clay { fill: var(--clay-soft); stroke: var(--clay); stroke-width: 1.8; transition: opacity 240ms ease; }
.t-item-sage { fill: var(--sage-soft); stroke: var(--sage); stroke-width: 1.8; transition: opacity 240ms ease; }
.t-label { font-family: var(--font-display); font-size: 11px; font-weight: 600; fill: var(--ink); }
.t-sub { font-family: var(--font-display); font-size: 9.5px; font-weight: 500; fill: var(--text-secondary); letter-spacing: 0.05em; }

.timeline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-page);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.28rem;
}

.year-btn {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.year-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg-page);
  font-weight: 600;
}

/* Captured vs Imagined Visual Toggle */
.proposal-canvas {
  padding: 0;
}

.proposal-canvas img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 360ms var(--ease);
}

.proposal-canvas[data-mode="proposal"] img {
  filter: sepia(0.16) saturate(1.18) contrast(1.02) brightness(0.98);
}

.proposal-stamp {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.32rem 0.72rem;
  border-radius: 4px;
  background: rgba(23, 21, 18, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F5F2EB;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(139, 179, 156, 0.45);
}

.proposal-canvas[data-mode="proposal"] .proposal-stamp {
  border-color: rgba(216, 140, 112, 0.65);
  color: #F6C5B2;
}

.studio-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Band 03 — Compact Situations Showcase + Expandable Full 20 Drawer
   ========================================================================== */

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.highlight-card {
  position: relative;
  background: var(--bg-sheet);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 180ms ease, transform 220ms var(--ease);
}

/* Crisp corner tick on each highlight card */
.highlight-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--brass);
  border-left: 2px solid var(--brass);
  opacity: 0.55;
  transition: opacity 180ms ease, width 200ms var(--ease), height 200ms var(--ease);
}

.highlight-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.highlight-card:hover::before {
  opacity: 1;
  width: 22px;
  height: 22px;
}

.highlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.highlight-num {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.highlight-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ink);
}

.highlight-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.52rem;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pilot { background: var(--sage-soft); color: var(--sage); border-color: var(--sage-border); }
.status-proposed { background: var(--brass-soft); color: var(--brass-ink); border-color: var(--brass-border); }
.status-later { background: var(--clay-soft); color: var(--clay); border-color: var(--clay-border); }
.status-research { background: var(--bg-warm); color: var(--text-secondary); border-color: var(--rule-strong); }

/* Expandable All-20 Drawer */
.drawer-toggle-wrap {
  display: flex;
  justify-content: center;
}

.drawer-toggle-btn {
  appearance: none;
  background: var(--bg-sheet);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.72rem 1.45rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.drawer-toggle-btn:hover {
  border-color: var(--brass);
}

.all-situations-drawer {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-sheet);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}

.all-situations-drawer[hidden] {
  display: none;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  appearance: none;
  background: var(--bg-page);
  border: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-page);
}

.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.5rem;
}

.compact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
}

.compact-row[hidden] {
  display: none;
}

.compact-row strong {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
}

.compact-row span.compact-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Band 04 — Four Commitments Strip (Deep Night + Logo Micro-Glyphs)
   ========================================================================== */

.principles-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--band-dark-rule);
}

.commitment-item {
  border-top: 2px solid var(--band-dark-brass);
  padding-top: 1.15rem;
}

.commitment-item:nth-child(2) { border-top-color: var(--band-dark-sage); }
.commitment-item:nth-child(3) { border-top-color: var(--band-dark-clay); }

.commitment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.commitment-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--band-dark-muted);
}

.commitment-glyph {
  width: 22px;
  height: 22px;
  display: block;
}

.commitment-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--band-dark-ink);
}

.commitment-line {
  margin: 0;
  font-size: 0.88rem;
  color: var(--band-dark-muted);
  line-height: 1.5;
}

.open-note {
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.84rem;
  color: var(--band-dark-muted);
}

.open-note strong {
  color: var(--band-dark-ink);
  font-weight: 500;
}

/* ==========================================================================
   BERVOS Project Footer (Exact Chessverse Pattern)
   ========================================================================== */

.site-footer {
  padding-block: 1.75rem;
  background-color: var(--bg-warm);
  border-top: 1px solid var(--rule);
}

.bervos-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem 2rem;
}

.bervos-footer-project {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-mark {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.footer-mark .mark-wall { fill: var(--ink); opacity: 0.72; }
.footer-mark .mark-dot { fill: var(--brass); }

.footer-wordmark-svg {
  height: 0.98rem;
  width: auto;
  display: block;
  opacity: 0.85;
}

.footer-wordmark-svg .wm-ink { fill: var(--ink); }
.footer-wordmark-svg .wm-dot { fill: var(--brass); }

.version-refresh-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.15rem 0.3rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
}

.version-refresh-btn:hover { color: var(--ink); }

.bervos-footer-divider {
  width: 1px;
  height: 1.15rem;
  background-color: var(--rule-strong);
}

.bervos-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.bervos-credit-label {
  font-family: var(--font-display);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.bervos-logo-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.76;
  transition: opacity 220ms ease, transform 220ms var(--ease);
}

.bervos-logo-link:hover {
  opacity: 1;
  transform: scale(1.04);
}

.bervos-logo-img {
  height: 1.55rem;
  width: auto;
  display: block;
  filter: brightness(0);
}

[data-theme="night"] .bervos-logo-img {
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
  .hero-top,
  .triptych-grid,
  .studio-grid,
  .highlights-grid,
  .principles-strip,
  .compact-list {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-sheet);
    border-bottom: 1px solid var(--rule-strong);
    padding: 1rem var(--gutter);
    display: none;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .stage-caption {
    display: none;
  }

  .stage-bar {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
    justify-content: center;
  }

  .stage-btn {
    padding: 0.36rem 0.68rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .measure-tag {
    font-size: 0.64rem;
    padding: 0.18rem 0.5rem;
    top: -28px;
  }

  .measure-line-estimate .measure-tag {
    left: 0;
    transform: none;
  }

  .memory-pin-marker {
    left: 10%;
    top: 42%;
  }

  .bervos-footer-bar {
    flex-direction: column;
    gap: 0.85rem;
  }

  .bervos-footer-divider {
    display: none;
  }
}
