/* ZommIA — homepage (dirección oscura cinemática, aprobada)
   Tokens y valores según handoff de diseño: design_handoff_zommia_brand/README.md */

:root {
  --bg: #101010;
  --text: #FFFDF9;
  --muted: #9C8FB4;
  --hairline: #403F3F;
  --band: #495764;
  --violet: #7C4DFF;
  --chip-body: #07070A;
  --trace-guide: #6F879C;
  --trace-base: #402684;
  --pad: #C9B6FF;
  --focus-ring: #C9B6FF;

  --container: 1440px;
  --gutter: 40px;
  --rhythm: 108px;
  --ease: cubic-bezier(.52, .01, 0, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, p, figure { margin: 0; }

/* Text selection and the browser's "scroll-to-text" highlight (the
   yellow band a shared link with a #:~:text= fragment paints on
   arrival) default to a stock yellow that clashes with the dark
   palette. Tint both to the brand violet instead. */
::selection { background: rgba(124, 77, 255, .38); color: var(--text); }
::target-text { background: rgba(124, 77, 255, .45); color: var(--text); }

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

a {
  color: var(--text);
  text-decoration: none;
  border: 0;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
a:hover { color: var(--muted); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.display,
.h1, .h2, .h3, .metric {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--text);
  border-radius: 5px;
  padding: 12px 20px;
}
.btn:hover { border-color: var(--muted); }

.btn-text {
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  padding: 12px 0;
}
.btn-text:hover { color: var(--text); }

.btn-nav {
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--text);
  border-radius: 5px;
  padding: 9px 15px;
}
.btn-nav:hover { border-color: var(--muted); }

/* ---------- Header ---------- */

.site-header {
  padding-top: 26px;
  padding-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

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

.brand-word {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 60px var(--gutter) var(--rhythm);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-lockup {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0 56px;
}
.hero-lockup svg {
  width: min(820px, 100%);
  height: auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(46px, 8.4vw, 105px);
  line-height: 1.01;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lead {
  max-width: 440px;
  font-size: 22px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.hero-lead { margin-top: 56px; }

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* The PCB canvas renders behind these two — a solid-only outline
   lets the circuit traces show through and reads as visual noise.
   A translucent scrim (not a brand-rule "filled button") separates
   them from the background without adding color.
   No backdrop-filter: blurring a live-animating canvas behind it is
   a well-known trigger for stutter/scaling glitches on mobile
   Safari/Chrome during scroll — a plain solid-ish scrim gets the
   same legibility without touching the compositor that hard. */
.hero-actions .btn {
  background: rgba(16, 16, 16, .88);
}

.hero-actions .btn-text {
  position: relative;
  z-index: 0;
}
.hero-actions .btn-text::before {
  content: "";
  position: absolute;
  inset: -6px -12px;
  z-index: -1;
  border-radius: 5px;
  background: rgba(16, 16, 16, .72);
}

/* ---------- Rows (ecosistema / proceso) ---------- */

.rows { border-top: 1px solid var(--hairline); }

.row {
  display: grid;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}

.row--eco {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.row--proceso {
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr) minmax(0, 440px);
  align-items: baseline;
}

.row--trabajo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}

.row-title {
  font-size: clamp(28px, 3.4vw, 33px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.row-body {
  max-width: 440px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

.row-label {
  font-size: 17px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-heading {
  font-size: 33px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Section generic */

section { padding-top: 0; padding-bottom: var(--rhythm); }
.section-lead { margin-bottom: 56px; }

/* ---------- Control band ---------- */

.band {
  background: var(--band);
  padding-top: var(--rhythm);
  padding-bottom: var(--rhythm);
}

.band-title {
  font-size: clamp(40px, 7.4vw, 105px);
  line-height: 1.01;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 56px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  border-top: 1px solid var(--hairline);
  padding-top: 40px;
}

.metric {
  font-size: 56px;
  line-height: 1.13;
  letter-spacing: -0.01em;
}

.metric-caption {
  font-size: 18px;
  line-height: 1.5;
  margin-top: 7px;
}

/* ---------- Trabajo ---------- */

.work-service {
  font-size: 20px;
  color: var(--muted);
  padding-top: 20px;
}

.work-metric {
  font-size: 56px;
  line-height: 1.13;
  letter-spacing: -0.01em;
}

/* ---------- Contacto ---------- */

.contact-title {
  font-size: clamp(40px, 7.4vw, 105px);
  line-height: 1.01;
  letter-spacing: -0.02em;
  max-width: 16ch;
  margin-bottom: 40px;
}

.contact-lead { margin-bottom: 40px; }

.contact-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.site-footer { padding-bottom: 40px; }

.footer-row {
  border-top: 1px solid var(--hairline);
  margin-top: 15px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

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

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Medium screens ---------- */

/* .row--proceso mixes two fixed-max tracks (120px, 440px) with one
   1fr track for the heading. Non-flexible tracks claim their max
   before the 1fr track gets what's left, so between ~640-960px the
   heading track collapses to a few px and its text visually overlaps
   the body column. Stack the row (like the mobile layout) before
   that happens instead of letting the columns fight for space. */
@media (max-width: 960px) {
  .row--proceso { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 20px; --rhythm: 72px; }
  .site-nav { gap: 18px; }
}
