@import url("./tokens.css");

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

html {
  scroll-behavior: smooth;
  background-color: var(--rm-bg);
  color: var(--rm-fg);
  font-family: var(--rm-font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--rm-bg);
  color: var(--rm-fg);
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

section[id] {
  scroll-margin-top: 84px;
}

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

a {
  color: var(--rm-brand-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--rm-brand-cta-hover);
}

code {
  font-family: var(--rm-font-mono);
  font-size: 0.9em;
  background: var(--rm-bg-subtle);
  padding: 1px 5px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius-xs);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 14px;
  background: var(--rm-fg);
  color: var(--rm-bg);
  font-family: var(--rm-font-mono);
  font-size: 12px;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Typography helpers --- */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--rm-font-display);
  color: var(--rm-fg);
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin: 0;
}

.prose {
  max-width: 65ch;
  color: var(--rm-fg-secondary);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-block;
  font-family: var(--rm-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rm-brand-text);
  margin-bottom: 12px;
}

.mono-meta {
  font-family: var(--rm-font-mono);
  font-size: 12px;
  color: var(--rm-fg-muted);
  font-variant-numeric: tabular-nums;
}

.mono-link {
  font-family: var(--rm-font-mono);
  font-size: 12px;
  color: var(--rm-brand-text);
  white-space: nowrap;
}

.tech-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-terracotta {
  color: var(--rm-brand);
}

.icon-moss {
  color: var(--rm-accent);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--rm-accent);
  flex-shrink: 0;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: var(--rm-radius-xs);
  font-family: var(--rm-font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--rm-brand);
  outline-offset: 2px;
}

.btn-mono {
  font-family: var(--rm-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.btn-xs {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 11px;
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.btn-icon .tech-icon {
  width: 18px;
  height: 18px;
}

.btn-cta {
  background: #C44B27;
  border-color: #C44B27;
  color: #FFFFFF;
}

.btn-cta:hover {
  background: #A83D1E;
  border-color: #A83D1E;
  color: #FFFFFF;
}

.btn-outline {
  background: var(--rm-bg);
  border-color: var(--rm-border-strong);
  color: var(--rm-fg);
}

html[data-theme="dark"] .btn-outline {
  background: #1A1A1F;
  border-color: #3E3E48;
  color: #F4F4F5;
}

.btn-outline:hover {
  border-color: var(--rm-fg);
  color: var(--rm-fg);
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--rm-bg);
  border-bottom: 1px solid var(--rm-border);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-wordmark-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
}

.brand-word-top {
  font-family: var(--rm-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--rm-brand-text);
}

.brand-word-bottom {
  font-family: var(--rm-font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--rm-fg);
}

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

.main-nav a {
  text-decoration: none;
  color: var(--rm-fg-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

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

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

.mobile-toggle {
  display: none;
}

.mobile-drawer {
  border-top: 1px solid var(--rm-border);
  background: var(--rm-bg-subtle);
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  padding-bottom: 16px;
}

.mobile-drawer-inner a {
  padding: 11px 0;
  text-decoration: none;
  color: var(--rm-fg);
  border-bottom: 1px solid var(--rm-border);
  font-size: 15px;
}

.mobile-drawer-cta {
  color: var(--rm-brand-text) !important;
  font-weight: 600;
  border-bottom: none !important;
}

/* --- Hero Natural (Zero Card / Integrated Animated Emblem) --- */

.hero-section {
  padding: 52px 0 56px;
}

.hero-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rm-border);
}

.hero-lockup {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.hero-emblem {
  width: 270px;
}

.hero-windmill-svg {
  width: 100%;
  height: auto;
}

.hero-title {
  font-size: clamp(2.6rem, 5.2vw, 4.35rem);
  font-weight: 800;
  max-width: 15ch;
  margin-bottom: 18px;
}

.accent-word {
  color: var(--rm-brand-cta);
}

html[data-theme="dark"] .accent-word {
  color: var(--rm-brand);
}

.hero-lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--rm-fg-secondary);
  max-width: 56ch;
  margin-bottom: 26px;
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Impact Band (Theme-Aware Light & Dark) --- */

.impact-band {
  background: var(--rm-bg-subtle);
  color: var(--rm-fg);
  border-top: 1px solid var(--rm-border-strong);
  border-bottom: 1px solid var(--rm-border-strong);
}

.facts-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-cell {
  padding: 26px 22px 26px 0;
  border-right: 1px solid var(--rm-border-strong);
}

.fact-cell:not(:first-child) {
  padding-left: 22px;
}

.fact-cell:last-child {
  border-right: none;
  padding-right: 0;
}

.fact-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.fact-tag {
  color: var(--rm-fg-muted);
  font-size: 11px;
}

.fact-val {
  display: block;
  font-family: var(--rm-font-mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--rm-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 8px;
}

.fact-desc {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--rm-fg-secondary);
}

/* --- Bands --- */

.band {
  padding: 72px 0;
  border-bottom: 1px solid var(--rm-border);
}

.band-subtle {
  background: var(--rm-bg-subtle);
}

.band-last {
  border-bottom: none;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.section-head-stack {
  margin-bottom: 34px;
}

/* --- 02 · Brand Swiss Grid (1/3 + 2/3) --- */

.swiss-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 44px;
  align-items: start;
}

.index-note {
  font-size: 15px;
  color: var(--rm-fg-secondary);
  margin-top: 12px;
  max-width: 34ch;
}

.metaphor-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rm-border);
}

.metaphor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.metaphor-item h3 {
  font-size: 17px;
}

.metaphor-item p {
  font-size: 15px;
  color: var(--rm-fg-secondary);
}

.diagram-plate {
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg-subtle);
  padding: 18px 20px 14px;
}

.diagram-plate svg {
  width: 100%;
  height: auto;
  color: var(--rm-fg);
}

.diagram-caption {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rm-border);
  font-family: var(--rm-font-mono);
  font-size: 11px;
  color: var(--rm-fg-muted);
}

/* --- 03 · Services Ledger + Color Accents --- */

.ledger {
  border-top: 1px solid var(--rm-border-strong);
  margin-bottom: 38px;
}

.ledger-row {
  display: grid;
  grid-template-columns: 96px minmax(220px, 1fr) minmax(0, 1.5fr);
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--rm-border);
}

.ledger-head-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ledger-icon-box {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
}

.ledger-icon-box.tone-terracotta {
  color: var(--rm-brand);
  border-color: var(--rm-brand);
}

.ledger-icon-box.tone-moss {
  color: var(--rm-accent);
  border-color: var(--rm-accent);
}

.ledger-idx {
  font-family: var(--rm-font-mono);
  font-size: 13px;
  color: var(--rm-fg-muted);
  font-variant-numeric: tabular-nums;
}

.ledger-title-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-name {
  font-family: var(--rm-font-display);
  font-size: 18px;
  font-weight: 700;
}

.ledger-desc {
  font-size: 15px;
  color: var(--rm-fg-secondary);
}

.commercial-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.commercial-box {
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
  padding: 26px;
}

.commercial-box h3 {
  font-size: 19px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rm-border);
}

.clean-list,
.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clean-list li,
.steps-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rm-border);
}

.clean-list li:last-child,
.steps-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.clean-list strong,
.steps-list strong {
  font-size: 15px;
  color: var(--rm-fg);
}

.clean-list span,
.steps-list span {
  font-size: 14px;
  color: var(--rm-fg-secondary);
}

.ai-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--rm-bg-subtle);
  border-left: 2px solid var(--rm-accent);
  font-size: 13.5px;
  color: var(--rm-fg-secondary);
}

/* --- 04 · Featured Cases (Framed Window Showcase + Interactive Thumbs) --- */

.featured-cases {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 52px;
}

.case-plate {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
}

.case-plate.is-reversed .case-visual {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--rm-border-strong);
}

.case-visual {
  background: var(--rm-bg-subtle);
  border-right: 1px solid var(--rm-border-strong);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shot-window {
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
}

.shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #18181B;
  color: #F4F4F5;
  border-bottom: 1px solid #2D2D35;
}

.shot-bar-title {
  font-family: var(--rm-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #F4F4F5;
}

.shot-bar-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--rm-font-mono);
  font-size: 10.5px;
  color: #4DB398;
}

.shot-bar-status .status-dot {
  background: #4DB398;
}

.shot-bar-compact {
  background: var(--rm-bg-subtle);
  color: var(--rm-fg);
  border-bottom: 1px solid var(--rm-border);
}

.shot-bar-compact .shot-bar-title {
  color: var(--rm-brand-text);
}

.shot-stage {
  background: #ECE7DC;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="dark"] .shot-stage {
  background: #121215;
}

.shot-stage img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  object-position: top center;
  border: 1px solid var(--rm-border);
}

.shot-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--rm-border);
  background: var(--rm-bg);
}

.shot-thumb {
  padding: 0;
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg-subtle);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  opacity: 0.72;
}

.shot-thumb:hover,
.shot-thumb.is-active {
  opacity: 1;
  border-color: var(--rm-brand);
  box-shadow: inset 0 0 0 1px var(--rm-brand);
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.case-content {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.case-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--rm-font-mono);
  font-size: 11px;
  color: var(--rm-brand-text);
  margin-bottom: 10px;
}

.case-title {
  font-size: 26px;
  margin-bottom: 10px;
}

.case-tagline {
  font-size: 15.5px;
  color: var(--rm-fg-secondary);
  margin-bottom: 16px;
}

.case-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--rm-border);
  border-bottom: 1px solid var(--rm-border);
  margin-bottom: 16px;
}

.metric-item strong {
  display: block;
  font-family: var(--rm-font-mono);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.metric-item span {
  font-size: 12px;
  color: var(--rm-fg-muted);
}

.case-backstage-box {
  padding: 12px 14px;
  background: var(--rm-bg-subtle);
  border-left: 2px solid var(--rm-brand);
}

.backstage-kicker {
  display: block;
  font-family: var(--rm-font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--rm-brand-text);
  margin-bottom: 4px;
}

.case-backstage-snippet {
  font-size: 13.5px;
  color: var(--rm-fg-secondary);
  line-height: 1.5;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* --- 2x2 Visual Grid for Cases 03-06 --- */

.cases-index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rm-border-strong);
  flex-wrap: wrap;
}

.cases-index-head h3 {
  font-size: 20px;
}

.cases-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.mini-case-card {
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
  display: flex;
  flex-direction: column;
}

.mini-case-media {
  border-bottom: 1px solid var(--rm-border-strong);
  background: var(--rm-bg-subtle);
}

.mini-shot-stage {
  padding: 12px;
  background: #ECE7DC;
}

html[data-theme="dark"] .mini-shot-stage {
  background: #121215;
}

.mini-shot-stage img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--rm-border);
}

.mini-schematic-stage {
  padding: 18px 14px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rm-bg-subtle);
}

.mini-schematic-stage svg {
  width: 100%;
  height: auto;
  color: var(--rm-fg);
}

.mini-case-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.mini-case-title {
  font-size: 20px;
}

.mini-case-tagline {
  font-size: 14.5px;
  color: var(--rm-fg-secondary);
}

.mini-case-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--rm-border);
  border-bottom: 1px solid var(--rm-border);
}

.kpi-chip {
  font-family: var(--rm-font-mono);
  font-size: 12px;
  color: var(--rm-fg-secondary);
  border-left: 2px solid var(--rm-accent);
  padding-left: 8px;
}

.kpi-chip strong {
  color: var(--rm-fg);
  font-weight: 500;
}

.mini-case-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- 05 · Founder (Strict 1:1 Square Frame) --- */

.founder-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.photo-frame {
  margin: 0;
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
}

.photo-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #121215;
}

.photo-square img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.photo-frame figcaption {
  padding: 14px 16px;
  border-top: 1px solid var(--rm-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-frame figcaption strong {
  font-family: var(--rm-font-display);
  font-size: 15px;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rm-border-strong);
}

.cred-col h3,
.stack-ledger h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.cred-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cred-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rm-border);
}

.cred-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cred-item .mono-meta {
  display: block;
  margin-bottom: 3px;
  color: var(--rm-brand-text);
}

.cred-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.cred-item p {
  font-size: 13.5px;
  color: var(--rm-fg-secondary);
}

.stack-ledger {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--rm-border);
}

.stack-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rm-border);
}

.stack-table th,
.stack-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--rm-border);
  text-align: left;
  vertical-align: baseline;
  font-size: 13.5px;
}

.stack-table th {
  width: 170px;
  font-family: var(--rm-font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--rm-fg-muted);
  padding-right: 16px;
}

/* --- 06 · FAQ & Explicit Contact Form --- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 44px;
  align-items: start;
}

.faq-list {
  margin-top: 20px;
  border-top: 1px solid var(--rm-border-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--rm-border);
  padding: 14px 0;
}

.faq-list summary {
  cursor: pointer;
  font-family: var(--rm-font-display);
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-list summary::after {
  content: "+";
  font-family: var(--rm-font-mono);
  font-size: 15px;
  color: var(--rm-brand-text);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--rm-fg-secondary);
  max-width: 58ch;
}

.direct-channels {
  margin-top: 28px;
}

.direct-channels h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

.direct-channels ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--rm-font-mono);
  font-size: 13px;
}

.direct-channels li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-panel {
  border: 1px solid var(--rm-border-strong);
  background: var(--rm-bg);
  padding: 28px;
}

.form-panel h3 {
  font-size: 21px;
  margin-bottom: 8px;
}

.form-intro {
  font-size: 14.5px;
  color: var(--rm-fg-secondary);
  margin-bottom: 22px;
}

.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rm-fg);
  margin-bottom: 6px;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--rm-font-sans);
  font-size: 16px;
  line-height: 1.45;
  background: var(--rm-bg-subtle);
  color: var(--rm-fg);
  border: 1px solid var(--rm-border-strong);
  border-radius: var(--rm-radius-xs);
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--rm-brand);
  outline: none;
}

.field-error {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--rm-danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.form-feedback {
  min-height: 20px;
  margin-top: 12px;
  font-family: var(--rm-font-mono);
  font-size: 12px;
  color: var(--rm-accent);
}

/* --- Footer (Monumental Editorial Footer with Background Animated Emblem) --- */

.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--rm-fg);
  background: var(--rm-bg-subtle);
  padding: 80px 0 36px;
}

.footer-windmill-bg {
  position: absolute;
  right: -40px;
  bottom: -44px;
  width: 540px;
  height: 540px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.09;
}

html[data-theme="dark"] .footer-windmill-bg {
  opacity: 0.085;
}

.footer-windmill-svg {
  width: 100%;
  height: 100%;
}

.site-footer .rm-rotor-spin {
  animation-duration: 48s;
}

.footer-shell {
  position: relative;
  z-index: 1;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.85fr));
  gap: 44px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rm-border-strong);
}

.footer-statement {
  font-family: var(--rm-font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 24ch;
  margin-bottom: 12px;
}

.footer-sub {
  font-size: 15px;
  color: var(--rm-fg-secondary);
  max-width: 48ch;
  margin-bottom: 22px;
}

.footer-col h3 {
  font-family: var(--rm-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rm-brand-text);
  margin-bottom: 14px;
}

.footer-col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer-col-list a {
  color: var(--rm-fg-secondary);
  text-decoration: none;
}

.footer-col-list a:hover {
  color: var(--rm-brand-text);
  text-decoration: underline;
}

.footer-monument {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--rm-border-strong);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  user-select: none;
}

.footer-monument-top {
  font-family: var(--rm-font-mono);
  font-size: clamp(1rem, 2.2vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.38em;
  color: var(--rm-brand-text);
  margin-bottom: 4px;
}

.footer-monument-bottom {
  font-family: var(--rm-font-display);
  font-size: clamp(3.2rem, 9.8vw, 8.2rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--rm-fg);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* --- Case Dossier Modal --- */

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.case-modal.is-open {
  display: flex;
}

.case-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 21, 0.72);
}

.case-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--rm-bg);
  color: var(--rm-fg);
  border: 1px solid var(--rm-border-strong);
  box-shadow: var(--rm-shadow-overlay);
}

.case-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--rm-bg);
  padding: 20px 26px;
  border-bottom: 1px solid var(--rm-border-strong);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.case-dialog-head h2 {
  font-size: 26px;
  margin-top: 4px;
}

.case-dialog-body {
  padding: 26px;
}

.modal-tagline {
  font-size: 17px;
  color: var(--rm-fg-secondary);
  margin-bottom: 20px;
  max-width: 65ch;
}

.modal-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--rm-border-strong);
  border-bottom: 1px solid var(--rm-border-strong);
  margin-bottom: 24px;
}

.modal-impact-cell {
  padding: 14px 16px 14px 0;
  border-right: 1px solid var(--rm-border);
}

.modal-impact-cell:not(:first-child) {
  padding-left: 16px;
}

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

.modal-impact-cell strong {
  display: block;
  font-family: var(--rm-font-mono);
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.modal-impact-cell span {
  font-size: 12.5px;
  color: var(--rm-fg-muted);
}

.modal-gallery {
  border: 1px solid var(--rm-border-strong);
  margin-bottom: 26px;
  background: var(--rm-bg-subtle);
}

.gallery-stage {
  background: var(--rm-bg-subtle);
  max-height: 460px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-stage img {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.schematic-box {
  width: 100%;
  padding: 24px;
}

.schematic-box svg {
  width: 100%;
  height: auto;
  color: var(--rm-fg);
}

.gallery-bar {
  padding: 10px 14px;
  border-top: 1px solid var(--rm-border);
  background: var(--rm-bg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.modal-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 30px;
}

.modal-text-block h3 {
  font-size: 17px;
  margin-top: 20px;
  margin-bottom: 8px;
}

.modal-text-block h3:first-child {
  margin-top: 0;
}

.modal-text-block p {
  font-size: 15px;
  color: var(--rm-fg-secondary);
}

.modal-text-block ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--rm-fg-secondary);
  font-size: 14.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-backstage {
  border: 1px solid var(--rm-border-strong);
  border-left: 2px solid var(--rm-brand);
  background: var(--rm-bg-subtle);
  padding: 16px;
}

.modal-backstage h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.modal-backstage p {
  font-size: 14px;
  color: var(--rm-fg-secondary);
}

.modal-stack {
  border-top: 1px solid var(--rm-border);
  padding-top: 16px;
}

.modal-stack h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

/* --- Responsive Breakpoints (1020px Tablet / Split, 720px Mobile) --- */

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

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-primary-cta {
    display: none;
  }

  .facts-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-lockup {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
  }

  .hero-emblem {
    width: 200px;
  }

  .fact-cell:nth-child(2) {
    border-right: none;
  }

  .fact-cell:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--rm-border-strong);
  }

  .fact-cell:nth-child(4) {
    border-top: 1px solid var(--rm-border-strong);
  }

  .swiss-grid,
  .case-plate,
  .founder-grid,
  .contact-grid,
  .footer-top-grid,
  .modal-columns {
    grid-template-columns: 1fr;
  }

  .footer-windmill-bg {
    width: 400px;
    height: 400px;
    right: -60px;
    bottom: -30px;
  }

  .case-plate.is-reversed .case-visual {
    order: 0;
    border-left: none;
  }

  .case-visual {
    border-right: none;
    border-bottom: 1px solid var(--rm-border-strong);
  }

  .ledger-row {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px 20px;
    align-items: start;
  }

  .ledger-desc {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .hero-section {
    padding: 32px 0 40px;
  }

  .hero-lockup {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-emblem {
    width: 140px;
  }

  .band {
    padding: 52px 0;
  }

  .site-footer {
    padding: 56px 0 28px;
  }

  .footer-windmill-bg {
    width: 320px;
    height: 320px;
    right: -80px;
    bottom: -24px;
  }

  .metaphor-split,
  .commercial-split,
  .cases-grid-4,
  .credentials-grid,
  .facts-strip {
    grid-template-columns: 1fr;
  }

  .fact-cell {
    padding: 18px 0 !important;
    border-right: none;
    border-top: 1px solid var(--rm-border-strong);
  }

  .fact-cell:first-child {
    border-top: none;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ledger-desc {
    grid-column: 1;
  }

  .shot-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-table th {
    display: block;
    width: auto;
    padding-bottom: 2px;
    border-bottom: none;
  }

  .stack-table td {
    display: block;
    padding-top: 2px;
  }
}

/* --- Theme visibility rules MUST sit at end of cascade --- */

.rm-only-dark {
  display: none !important;
}

html[data-theme="dark"] .rm-only-light {
  display: none !important;
}

html[data-theme="dark"] .rm-only-dark {
  display: block !important;
}
