/* ===== Metro Capital — graphite monochrome + coral ===== */
:root {
  --bg: #161719;
  --surface: #1F2124;
  --text: #F2F3F5;
  --accent: #FF6B4A;
  --muted: #8B8F94;
  --hairline: rgba(242, 243, 245, .09);
  --hairline-strong: rgba(242, 243, 245, .16);

  --font-head: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --step-1: clamp(2.1rem, 6vw, 3.6rem);
  --step-2: clamp(1.6rem, 4vw, 2.6rem);
  --step-3: clamp(1.25rem, 3vw, 1.6rem);

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 72px;
  --sp-7: 96px;

  --radius: 2px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

p { margin: 0 0 var(--sp-2); }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--sp-3);
}

.section { padding-block: var(--sp-6); }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--sp-2);
}

.muted { color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-height: 52px;
  padding: 0 var(--sp-4);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), transform .1s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #e85f40;
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(255, 107, 74, .25);
}
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(22, 23, 25, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.brand span { color: var(--accent); }
.site-header .btn { min-height: 42px; padding: 0 var(--sp-3); font-size: .9rem; }

/* ===== Hero ===== */
.hero {
  position: relative;
  border-bottom: 1px solid var(--hairline);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.hero-media {
  position: relative;
  min-height: 46vh;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.05);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 23, 25, .1), rgba(22, 23, 25, .85));
}
.hero-text {
  padding: var(--sp-6) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.hero-text h1 { font-size: var(--step-1); max-width: 16ch; }
.hero-text .lead { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.hero-note { color: var(--muted); font-size: .85rem; margin: 0; }
.hero-cta { display: flex; }

/* ===== Bento — sectors ===== */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: var(--sp-4);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
  z-index: 0;
}
.tile-body { position: relative; z-index: 1; }
.tile h3 { font-size: var(--step-3); margin-bottom: var(--sp-1); }
.tile p { color: var(--muted); margin: 0; font-size: .95rem; }
.tile::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s var(--ease);
  z-index: 2;
}
.tile:hover::after { transform: scaleX(1); }

/* ===== Coral inverse band ===== */
.band {
  background: var(--accent);
  color: var(--bg);
  border-block: 1px solid rgba(22, 23, 25, .15);
  overflow: hidden;
}
.band-inner {
  padding-block: var(--sp-6);
  clip-path: inset(0 100% 0 0);
}
.band.is-visible .band-inner {
  animation: bandWipe .45s var(--ease) forwards;
}
@keyframes bandWipe { to { clip-path: inset(0 0 0 0); } }
.band h2 { font-size: var(--step-2); max-width: 18ch; margin-bottom: var(--sp-2); }
.band p { max-width: 60ch; color: rgba(22, 23, 25, .82); margin: 0; }

/* ===== Steps ===== */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--hairline);
  align-items: start;
}
.step:first-child { border-top: none; }
.step-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--accent);
  line-height: 1;
}
.step h3 { font-size: var(--step-3); margin-bottom: var(--sp-1); }
.step p { color: var(--muted); margin: 0; }

/* ===== Two columns — share = floor ===== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
}
.split-media {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-text h2 { font-size: var(--step-2); margin-bottom: var(--sp-3); }
.split-text p { color: var(--muted); }

/* ===== Facts (count-up) ===== */
.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.fact {
  padding: var(--sp-4);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.fact:nth-child(-n+2) { border-top: none; }
.fact:nth-child(odd) { border-left: none; }
.fact-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.fact p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ===== FAQ ===== */
.faq { border-top: 1px solid var(--hairline); }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.1rem;
  text-align: left;
  padding: var(--sp-3) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  cursor: pointer;
}
.faq-sign {
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  transition: transform .2s var(--ease);
  flex: none;
}
.faq-item.open .faq-sign { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  color: var(--muted);
  transition: max-height .28s var(--ease), opacity .28s var(--ease);
  opacity: 0;
}
.faq-item.open .faq-a { max-height: 360px; opacity: 1; }
.faq-a p { padding-bottom: var(--sp-3); margin: 0; max-width: 62ch; }

/* ===== Form ===== */
.form-wrap {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(var(--sp-4), 5vw, var(--sp-6));
}
.form-wrap h2 { font-size: var(--step-2); margin-bottom: var(--sp-2); }
.form-wrap > p { color: var(--muted); max-width: 56ch; margin-bottom: var(--sp-4); }

.field { margin-bottom: var(--sp-4); position: relative; }
.field label {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .04em;
  margin-bottom: var(--sp-1);
  transition: color .16s var(--ease);
}
.field:focus-within label { color: var(--text); }

.control {
  position: relative;
}
.field input,
.field select {
  width: 100%;
  background: var(--bg);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 14px;
  min-height: 52px;
  appearance: none;
  outline: none;
}
.field select { cursor: pointer; }
.field input::placeholder { color: #565a5f; }
/* filled coral bottom line grows on focus */
.field input:focus ~ .ctl-line,
.field select:focus ~ .ctl-line { transform: scaleX(1); }
.ctl-line {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .16s var(--ease);
  pointer-events: none;
}
.select-wrap { position: relative; }
.select-wrap svg {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

.error-msg {
  display: block;
  color: var(--accent);
  font-size: .82rem;
  margin-top: 6px;
  min-height: 1em;
}
.field.invalid input,
.field.invalid select { box-shadow: inset 0 -2px 0 var(--accent); }
.field.shake { animation: shake .2s var(--ease); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

.consent {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.consent a { color: var(--accent); text-decoration: underline; }

.form-wrap .btn-primary { width: 100%; }
.form-wrap .btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--sp-5);
  background: var(--bg);
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.footer-brand .brand { font-size: 1.25rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin: var(--sp-1) 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer { color: var(--muted); font-size: .8rem; max-width: 70ch; margin-bottom: var(--sp-2); }
.footer-copy { color: var(--muted); font-size: .8rem; margin: 0; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  clip-path: inset(12% 0 0 0);
  transform: translateY(10px);
  transition: opacity .26s var(--ease), transform .26s var(--ease), clip-path .26s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: none;
}
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.stagger.is-visible > * { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .section { padding-block: var(--sp-7); }
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .hero-media { min-height: 82vh; border-bottom: none; border-right: 1px solid var(--hairline); }
  .hero-text { padding: var(--sp-7) var(--sp-5); text-align: right; align-items: flex-end; }
  .hero-text h1, .hero-text .lead { margin-left: auto; }

  .bento {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-auto-flow: dense;
  }
  .tile-wide { grid-column: 1; grid-row: 1; }
  .tile-tall { grid-column: 2; grid-row: 1 / span 2; min-height: 100%; }
  .tile-a { grid-column: 1; grid-row: 2; }

  .split { grid-template-columns: 1fr 1.1fr; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .fact { border-top: none; }
  .fact:first-child { border-left: none; }
  .fact:not(:first-child) { border-left: 1px solid var(--hairline); }

  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .tile-wide { grid-column: 1 / span 2; grid-row: 1; }
  .tile-tall { grid-column: 3; grid-row: 1 / span 2; }
  .tile-a { grid-column: 1; grid-row: 2; }
  .tile-b { grid-column: 2; grid-row: 2; }
}

/* ===== Mobile refinements (≤ 640px) ===== */
@media (max-width: 640px) {
  /* Even container padding, safe against overflow */
  .container { padding-inline: var(--sp-2); }

  /* Bento: strictly one clean column, uniform tile height */
  .bento { grid-template-columns: 1fr; gap: var(--sp-2); }
  .tile { width: 100%; min-height: 180px; }
  .tile-wide, .tile-tall, .tile-a, .tile-b {
    grid-column: auto;
    grid-row: auto;
    min-height: 180px;
  }

  /* Hero: media above, text below, no bleed */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { min-height: 42vh; }
  .hero-text { padding: var(--sp-5) var(--sp-2); text-align: left; align-items: stretch; }
  .hero-text h1, .hero-text .lead { margin-left: 0; max-width: 100%; }
  .hero-cta .btn { width: 100%; }

  /* Coral band: single column, disable clip that can leave gap */
  .band-inner { padding-block: var(--sp-5); }
  .band h2, .band p { max-width: 100%; }

  /* Steps: keep number + text but tighter */
  .step { gap: var(--sp-2); padding-block: var(--sp-3); }

  /* Two columns → stacked */
  .split { grid-template-columns: 1fr; gap: var(--sp-4); }

  /* Facts: single column, clean borders */
  .facts { grid-template-columns: 1fr; }
  .fact { border-left: none; }
  .fact:first-child { border-top: none; }
  .fact:not(:first-child) { border-top: 1px solid var(--hairline); }

  /* Full-width controls & touch targets */
  .field input,
  .field select { width: 100%; min-height: 52px; }
  .form-wrap .btn-primary { width: 100%; }
  .consent input { width: 22px; height: 22px; }
  .faq-q { padding-block: var(--sp-3); min-height: 48px; }

  /* Media never overflows */
  img { max-width: 100%; height: auto; }
  .hero-media img,
  .tile img,
  .split-media img { height: 100%; }

  /* Footer links wrap comfortably, larger tap area */
  .footer-links a { padding-block: 4px; }

  /* Header: keep brand + CTA on one row without overflow */
  .site-header .container { gap: var(--sp-2); }
  .site-header .btn {
    padding: 0 var(--sp-2);
    font-size: .82rem;
    white-space: nowrap;
    min-height: 44px;
  }
  .brand { font-size: 1.05rem; white-space: nowrap; }
}

/* Very narrow phones (≤ 380px): shorten header CTA space */
@media (max-width: 380px) {
  .site-header .btn { padding: 0 12px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .stagger > * { opacity: 1; transform: none; clip-path: none; }
  .band-inner { clip-path: none; }
}
