/* ──────────────────────────────────────────────────────────────────
   SUMERA C.A. — stylesheet
   Industrial and sober: flat ink surfaces, hairline rules, and each
   device's own system font (SF Pro on Apple, Segoe UI on Windows, Roboto
   on Android) with tabular figures for numbers. Brand red = R&A, blue = SUMERA,
   used as thin accents rather than glows (owner feedback 2026-09-27: the
   site looked like a stock AI template).
   ────────────────────────────────────────────────────────────────── */

:root {
  /* Ink surfaces (neutral so red and blue both read) */
  --ink:        #0e1116;
  --ink-deep:   #090b0f;
  --surface:    #161a21;
  --surface-2:  #1d222b;
  --surface-3:  #262c37;

  /* Brand accents — SUMERA C.A. = blue, R&A C.A. = red */
  --blue:       #3b82f6;
  --blue-dark:  #2563eb;
  --blue-400:   #7aa9ff;
  --red:        #ef4444;
  --red-dark:   #dc2626;
  --red-light:  #ff8385;
  --success:    #2e9e5b;

  /* Foreground */
  --fg:        #f4f7fb;
  --fg-2:      #c5d0de;
  --fg-muted:  #8a97a8;
  --fg-subtle: #5e6b7d;

  /* Lines */
  --line:      rgba(255,255,255,0.08);
  --line-soft: rgba(255,255,255,0.05);
  --line-hi:   rgba(255,255,255,0.14);

  /* Type */
  /* The platform's own type (owner feedback 2026-10-05: the client did not
     like IBM Plex). Nothing to download, so text paints without waiting on
     a font server; -apple-system switches between SF Pro Text and Display
     by size on its own. */
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadow */
  --shadow-md: 0 1px 2px rgba(0,0,0,0.30), 0 2px 6px 2px rgba(0,0,0,0.16);

  /* Text that sits on an accent fill (buttons) */
  --on-accent: #ffffff;
}

/* Per-accent theming. The attribute names predate the red/blue palette:
   "green" = SUMERA (blue), "gold" = R&A (red). */
[data-accent="green"] {
  --accent: var(--blue);
  --accent-dark: var(--blue-dark);
  --accent-bright: var(--blue-400);
  --accent-text: #9cc0ff;
  --accent-soft: rgba(59,130,246,0.14);
  --accent-line: rgba(59,130,246,0.42);
}
[data-accent="gold"] {
  --accent: var(--red);
  --accent-dark: var(--red-dark);
  --accent-bright: var(--red-light);
  --accent-text: #ff9da0;
  --accent-soft: rgba(239,68,68,0.14);
  --accent-line: rgba(239,68,68,0.44);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* iOS inflates text in landscape unless told not to. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  background: var(--ink);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Form controls do not inherit the page font by default; the path cards are
   <button>s and rendered their names in the browser's Arial without this. */
button, input, select, textarea { font-family: inherit; }

#root { min-height: 100vh; }

a { color: inherit; }

::selection { background: var(--accent, var(--blue)); color: var(--on-accent); }

/* Focus visibility — accessibility */
:focus-visible {
  outline: 2px solid var(--accent, var(--blue));
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; }

/* ── Material Symbols icon font ───────────────────────────────── */
.msym {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1;
  display: inline-block;
  letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle; user-select: none; flex: none;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--r-md);
  padding: 13px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: filter .2s var(--ease), background .2s var(--ease);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--accent-dark, var(--accent));
  color: var(--on-accent);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { filter: brightness(0.95); }
/* Apple-style pills: a filled primary and a frosted secondary over photos. */
.btn-pill { border-radius: var(--r-full); padding: 14px 24px; }
.btn-glass {
  color: #ffffff; background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-glass:hover { background: rgba(255,255,255,0.22); }
/* Feedback on press, not on release: controls give a little under the finger. */
.btn:active, .topbar__quote:active, .topbar__home:active, .prefs__opt:active,
.localnav__links a:active, .detail-toggle:active { transform: scale(0.97); }
.path-card:active { transform: scale(0.995); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ── SPLASH ────────────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink-deep);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Belt and braces: nothing here should be wider than the screen
     (e2e/mobile-splash.spec.js measures it), but a phone must never be
     able to drag this layer sideways. */
  overflow-x: hidden;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.splash.leaving { opacity: 0; transform: scale(1.02); pointer-events: none; }

.splash__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  position: relative; z-index: 2;
}
.splash__inner {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 8px clamp(20px, 5vw, 56px) 44px;
  position: relative; z-index: 2;
}
/* The hero is tall on purpose: the particle mark is sized from its box and
   sits behind the title (script.js, markBox). */
.splash__hero {
  padding: clamp(36px, 6vw, 84px) 0;
  margin-bottom: clamp(14px, 2.5vw, 28px);
}
.splash__title {
  font-size: clamp(36px, 5.4vw, 64px);
  max-width: 13ch;
  margin-bottom: 18px;
  color: var(--fg);
  text-wrap: balance;
}
.splash__subtitle {
  max-width: 46ch; color: var(--fg-2); font-size: clamp(15px, 1.5vw, 18px);
  text-wrap: pretty;
}
/* A soft halo in the page colour keeps the text legible where it crosses
   the particles. */
.splash__title, .splash__subtitle {
  text-shadow: 0 0 22px var(--ink-deep), 0 0 8px var(--ink-deep), 0 0 2px var(--ink-deep);
}
.splash__mark {
  position: absolute; top: 0; left: 0; z-index: 0;
  display: block;
  width: 100%;
  height: 640px;               /* replaced from script.js to end past the hero */
  pointer-events: none;
  /* Dust fades out instead of stopping at a hard edge above the cards. */
  /* Only the last 64px fade, and script.js ends the canvas 80px below the
     logo, so the logo itself never fades. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
}

/* The two business lines as index rows: no boxes, hairlines between rows,
   an accent bar that grows on hover/focus. The solid background hides the
   tail of the particle canvas behind the rows. */
.path-cards {
  width: 100%;
  border-top: 1px solid var(--line-hi);
  background: var(--ink-deep);
}
.path-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.2fr) 40px;
  grid-template-areas: "num head desc go";
  align-items: start;
  gap: 8px 28px;
  width: 100%;
  text-align: left;
  color: var(--fg);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-hi);
  padding: clamp(22px, 3vw, 32px) 12px;
  cursor: pointer;
  transition: background .25s var(--ease);
}
.path-card::before {
  content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: top;
  transition: transform .3s var(--ease);
}
.path-card:hover { background: var(--surface); }
.path-card:hover::before, .path-card:focus-visible::before { transform: scaleY(1); }
.path-card__num {
  grid-area: num; padding-top: 9px;
  font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.path-card__head { grid-area: head; display: flex; flex-direction: column; gap: 8px; }
/* The division is the row's title (owner feedback 2026-10-05: bigger
   division names, no company name in the row). */
.path-card__sector {
  font-family: var(--display); font-weight: 600; line-height: 1.12;
  font-size: clamp(22px, 2.6vw, 32px); letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--accent-text); text-wrap: balance;
}
.path-card__meta { font-family: var(--body); font-size: 13px; color: var(--fg-muted); }
.path-card__desc {
  grid-area: desc; padding-top: 6px; max-width: 46ch;
  color: var(--fg-2); font-size: 15.5px; line-height: 1.55;
}
.path-card__go {
  grid-area: go; justify-self: end; padding-top: 6px;
  color: var(--fg-muted);
  transition: transform .25s var(--ease), color .25s var(--ease);
}
.path-card:hover .path-card__go { color: var(--accent-bright); transform: translateX(4px); }

.splash__seeall {
  margin-top: clamp(20px, 3vw, 28px); align-self: flex-start;
  background: none; border: none; cursor: pointer;
  color: var(--fg-muted); font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 0;
  transition: color .2s var(--ease);
}
.splash__seeall:hover { color: var(--fg); }
/* Foot of the splash: legal name and the language / appearance override. */
.splash__foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 56px) 96px;   /* clear of the WhatsApp button */
  font-size: 12.5px; color: var(--fg-muted);
}

/* ── Language / appearance: quiet text controls at the foot ───── */
.prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 12.5px; color: var(--fg-muted); }
.prefs__group { display: inline-flex; align-items: center; flex-wrap: wrap; }
.prefs__label { margin-right: 4px; }
.prefs__opt {
  background: none; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--fg-muted);
  padding: 4px 6px; border-radius: 4px;
  transition: color .2s var(--ease);
}
.prefs__opt + .prefs__opt::before { content: "·"; margin: 0 8px 0 -4px; color: var(--fg-muted); }
.prefs__opt:hover { color: var(--fg); }
.prefs__opt[aria-pressed="true"] { color: var(--fg); font-weight: 600; }

/* ── Logo mark ────────────────────────────────────────────────── */
.logo {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 19px; color: var(--fg); display: inline-flex; align-items: center; gap: 9px;
}
.logo__mark { height: 26px; width: auto; flex: none; }

/* ── TOPBAR ───────────────────────────────────────────────────── */
/* Apple-like global bar: logo (home) left, the lines as plain text links
   centred, one action right. No pills, no toggles. */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px 16px;
  padding: 10px clamp(16px, 4vw, 44px);
  background: rgba(9, 11, 15, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__home {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer; padding: 6px 4px 6px 0;
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  color: var(--fg);
}
.topbar__home .logo__mark { height: 24px; }
.pathnav { display: flex; justify-content: center; gap: clamp(18px, 2.6vw, 34px); }
.pathnav button {
  position: relative;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  font-size: 13.5px; font-weight: 500; color: var(--fg-2);
  padding: 8px 0;
  transition: color .2s var(--ease);
}
.pathnav button:hover { color: var(--fg); }
.pathnav button[data-active="true"] { color: var(--fg); }
/* The active line is underlined in its colour, on the bar's bottom edge. */
.pathnav button[data-active="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 2px;
  background: var(--accent);
}
.pathnav button[data-tab="todo"][data-active="true"]::after { background: var(--fg); }
/* "Cotizar": a filled pill in the line's colour, visible at every width. */
.topbar__quote {
  justify-self: end;
  display: inline-flex; align-items: center; flex: none;
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--on-accent); background: var(--accent-dark);
  padding: 8px 16px; border-radius: var(--r-full);
  transition: filter .2s var(--ease);
}
.topbar__quote:hover { filter: brightness(1.1); }

/* ── Page shell ───────────────────────────────────────────────── */
/* clip, not hidden: hidden would make .page a scroll container and break
   the sticky local nav inside it. */
.page { position: relative; overflow: hidden; overflow: clip; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 44px); }

/* ── Cinematic path hero (after apple.com product pages) ──────── */
.cine {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: min(calc(100vh - var(--topbar-h, 60px)), 820px);
  min-height: min(calc(100svh - var(--topbar-h, 60px)), 820px);
  /* Behind the photo while it loads; also the colour the contrast audit
     composites the hero text against. */
  background-color: #0b0e13;
  color: #f4f7fb;
}
.cine__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.cine__media picture, .cine__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cine__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(9,11,15,0.94) 0%, rgba(9,11,15,0.72) 30%, rgba(9,11,15,0.18) 64%, rgba(9,11,15,0.4) 100%),
    linear-gradient(to right, rgba(9,11,15,0.55), transparent 65%);
}
.cine__inner {
  width: 100%;
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 24px 40px;
  padding-top: 120px; padding-bottom: clamp(32px, 6vw, 64px);
}
.cine__copy { max-width: 880px; }
.cine__kicker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  font-family: var(--body); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-text);
}
.cine__dot { width: 8px; height: 8px; background: var(--accent); flex: none; }
/* The company name wraps as a unit: "SUMERA" / "C.A." split looked broken. */
.cine__org { white-space: nowrap; color: rgba(244,247,251,0.72); }
.cine__title {
  font-size: clamp(38px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -0.03em;
  margin: 16px 0 18px; color: #ffffff; max-width: 19ch; text-wrap: balance;
}
.cine__tagline { font-size: clamp(16px, 1.9vw, 21px); color: rgba(244,247,251,0.86); max-width: 52ch; }
.cine__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Local section nav: translucent like the topbar, sticky on wide screens. */
.localnav {
  position: relative; z-index: 40;
  background: rgba(9,11,15,0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
}
.localnav__inner { display: flex; align-items: center; gap: 24px; min-height: 52px; }
.localnav__name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; flex: none; }
.localnav__links {
  display: flex; gap: 2px; margin-left: auto; padding: 8px 0;
  overflow-x: auto; scrollbar-width: none;
}
.localnav__links::-webkit-scrollbar { display: none; }
.localnav__links a {
  font-size: 13.5px; color: var(--fg-2); text-decoration: none; white-space: nowrap;
  padding: 6px 12px; border-radius: var(--r-full);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.localnav__links a:hover { color: var(--fg); }
.localnav__links a[aria-current="true"] { color: var(--fg); background: rgba(255,255,255,0.08); }
@media (min-width: 941px) {
  .localnav { position: sticky; top: var(--topbar-h, 60px); }
}

/* Jump targets clear the sticky topbar and local nav (set by script.js). */
.section[id], .contact { scroll-margin-top: calc(var(--topbar-h, 60px) + var(--localnav-h, 0px) + 12px); }

/* Hard facts under the hero: big figures, Apple-style. */
.facts {
  list-style: none; padding: 0; margin: clamp(32px, 5vw, 56px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fact { display: flex; flex-direction: column; gap: 6px; padding: 4px 20px 4px 0; }
.fact + .fact { padding-left: 20px; border-left: 1px solid var(--line); }
.fact__value {
  font-family: var(--body); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(36px, 5.4vw, 64px); color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.fact__label { font-size: 14px; color: var(--fg-muted); line-height: 1.35; }

/* Typographic chapter: a statement, then the intro with its key phrases
   lighting up in turn once the paragraph is in view. */
.chapter { text-align: center; padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); }
.chapter__eyebrow {
  font-family: var(--body); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 18px;
}
.chapter__title {
  font-size: clamp(34px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.03em;
  max-width: 16ch; margin: 0 auto 28px; text-wrap: balance;
}
.chapter__body {
  font-size: clamp(19px, 2.4vw, 28px); line-height: 1.45; font-weight: 500; letter-spacing: -0.01em;
  color: var(--fg-muted); max-width: 40ch; margin: 0 auto; text-wrap: pretty;
}
.chapter__body .hl { transition: color .9s var(--ease); transition-delay: calc(var(--i, 0) * 260ms); }
.chapter__body.is-lit .hl { color: var(--fg); }

/* Full-bleed band behind a section, without leaving the .wrap: the shadow
   paints the sides and clip-path keeps it to the section's height. */
.band {
  --bg: var(--surface);
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface);
  clip-path: inset(0 -100vmax);
}

/* ── Section heads ────────────────────────────────────────────── */
.section { position: relative; padding: clamp(40px, 6vw, 80px) 0; z-index: 1; }
.section.band { padding: clamp(56px, 8vw, 104px) 0; }
.section__head { margin-bottom: clamp(20px, 3vw, 30px); }
.section__title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.section__sub { color: var(--fg-muted); font-size: 16px; max-width: 60ch; }
.section__note { color: var(--fg-muted); font-size: 14.5px; max-width: 64ch; margin-top: 32px; }
.intro-lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--fg-2); max-width: 64ch; line-height: 1.55; }

/* ── Cards / grid ─────────────────────────────────────────────── */
/* Unboxed: items sit on the page, separated by space and hairlines rather
   than framed in cards (owner feedback 2026-10-04). Photo items lead with
   the photo; text items open with a rule. */
.grid { display: grid; gap: 44px 32px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { position: relative; }
.card--plain { border-top: 1px solid var(--line-hi); padding-top: 20px; }
.card__icon { display: inline-flex; color: var(--accent-text); margin-bottom: 12px; }
.card__title { font-size: 19px; margin-bottom: 8px; }
.card--featured .card__title { font-size: 21px; }
.card__text { color: var(--fg-2); font-size: 15px; line-height: 1.55; max-width: 48ch; }

/* ── Detail accordion ─────────────────────────────────────────── */
.detail-toggle {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 6px 0;
  font-weight: 600; font-size: 13.5px; color: var(--accent-text);
}
.detail-toggle .chev { transition: transform .3s var(--ease); display: inline-flex; }
.detail-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.detail-body { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.detail-group + .detail-group { margin-top: 18px; }
.detail-group__label {
  font-family: var(--body); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 12px;
}
.dense-list { list-style: none; padding: 0; display: grid; gap: 9px; }
.dense-list--cols { grid-template-columns: 1fr 1fr; gap: 9px 24px; }
.dense-list li {
  position: relative; padding-left: 18px; color: var(--fg-2); font-size: 14px; line-height: 1.5;
}
.dense-list li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 7px; height: 1px; background: var(--accent);
}

/* ── Projects sub-blocks (inside accordion) ───────────────────── */
.proj-block + .proj-block { margin-top: 22px; }
.proj-block__title { font-size: 15px; font-weight: 600; color: var(--fg); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.proj-block__num { font-family: var(--body); font-weight: 500; color: var(--accent-text); font-size: 13px; }

/* ── Supporting lines (collapsed rows) ────────────────────────── */
.support-row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.grid + .support-row { margin-top: 44px; }
.support-row:last-child { border-bottom: 1px solid var(--line); }
.support-row__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.support-tag {
  font-family: var(--body); font-size: 11.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--fg-muted);
}
.support-row__title { font-weight: 600; font-size: 16px; color: var(--fg-2); }
.support-row__blurb { color: var(--fg-muted); font-size: 14px; margin-top: 4px; flex-basis: 100%; }
.support-row__toggle {
  margin-left: auto; background: none; border: none; cursor: pointer; color: var(--fg-muted);
  font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 7px;
}
.support-row__toggle .chev { transition: transform .3s var(--ease); }
.support-row__toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* ── R&A: "why work with us" as a numbered rail ───────────────── */
.rail {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
}
.rail__step { position: relative; padding-top: 50px; }
.rail__num {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--body); font-size: 12.5px; font-weight: 500;
  color: var(--accent-text); background: var(--bg, var(--ink)); border: 1px solid var(--accent-line);
  font-variant-numeric: tabular-nums;
}
/* Connector from this step's number to the next one. */
.rail__step::before {
  content: ""; position: absolute; top: 17px; left: 42px; right: -16px; height: 1px;
  background: linear-gradient(to right, var(--accent-line), var(--line));
}
.rail__step:last-child::before { display: none; }
.rail__title { font-size: 17px; margin-bottom: 8px; }
.rail__text { color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }

/* ── R&A: supply lines ────────────────────────────────────────── */
.line-card { display: flex; flex-direction: column; gap: 10px; }
.line-card__top { display: flex; align-items: baseline; gap: 12px; }
.line-card__num { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--accent-text); flex: none;  font-variant-numeric: tabular-nums; }
.line-card__title { font-size: 18px; }
.line-card__text { color: var(--fg-2); font-size: 14.5px; line-height: 1.55; }

/* ── Integrated services accordion list ───────────────────────── */
.acc { border-top: 1px solid var(--line-hi); border-bottom: 1px solid var(--line-hi); }
.acc__item + .acc__item { border-top: 1px solid var(--line); }
.acc__head {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px; padding: 20px 0;
  color: var(--fg); transition: color .2s var(--ease);
}
.acc__head:hover { color: var(--accent-text); }
.acc__head .chev { margin-left: auto; transition: transform .3s var(--ease); color: var(--fg-muted); }
.acc__head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc__dot { width: 7px; height: 7px; background: var(--accent); flex: none; }
.acc__title { font-weight: 600; font-size: 16px; }
.acc__body { padding: 0 0 20px 21px; max-width: 70ch; color: var(--fg-2); font-size: 15px; line-height: 1.6; }

/* ── Divider between paths (todo mode) ────────────────────────── */
.path-divider {
  display: flex; align-items: center; gap: 18px; margin: clamp(40px,6vw,72px) 0 0; padding: 0 clamp(20px,5vw,44px);
  max-width: 1120px; margin-left: auto; margin-right: auto;
}
.path-divider::before, .path-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.path-divider span { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }

/* ── Contact ──────────────────────────────────────────────────── */
.contact { position: relative; padding: clamp(56px, 8vw, 104px) 0; z-index: 1; background: var(--surface); border-top: 1px solid var(--line); }
.contact__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact__info { display: flex; flex-direction: column; gap: 4px; }
.contact__heading { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.contact__intro { color: var(--fg-2); font-size: 16px; margin-bottom: 30px; max-width: 42ch; }
.cinfo-item { padding: 14px 0; border-top: 1px solid var(--line); }
.cinfo-item:first-of-type { border-top: none; }
.cinfo-label { font-family: var(--body); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 5px; }
.cinfo-value { font-size: 15.5px; color: var(--fg); text-decoration: none; }
.cinfo-value:hover { color: var(--accent-text); }
.cinfo-addr { font-size: 14px; color: var(--fg-2); line-height: 1.5; }

/* No container box: the fields themselves are the only frames. */
.form { border-top: 1px solid var(--line-hi); padding-top: 24px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--fg-2); margin-bottom: 7px; }
.field .req { color: var(--accent-text); }
/* 16px minimum: iOS Safari zooms into smaller fields on focus and leaves
   the page zoomed (e2e/mobile-splash.spec.js). */
.field input, .field select, .field textarea {
  width: 100%; font-size: 16px; color: var(--fg);
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-subtle); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; cursor: pointer; }
.form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form__mailto { font-size: 13.5px; color: var(--fg-muted); text-decoration: none; border-bottom: 1px solid var(--line-hi); padding-bottom: 2px; }
.form__mailto:hover { color: var(--fg); }
.form__success {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(46,158,91,0.10); border: 1px solid rgba(46,158,91,0.34);
  border-radius: var(--r-lg); padding: 20px; margin-top: 18px;
}
.form__success .check { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-weight: 700; }
.form__success h4 { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.form__success p { color: var(--fg-2); font-size: 14px; }

/* ── Footer ───────────────────────────────────────────────────── */
/* Extra room at the bottom so the WhatsApp button never sits on the footer. */
.footer { border-top: 1px solid var(--line-soft); padding: 40px 0 112px; position: relative; z-index: 1; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy { color: var(--fg-muted); font-size: 13.5px; }
.footer__end { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.footer__tag { color: var(--fg-muted); font-size: 13px; }
.footer__legal { color: var(--fg-muted); font-size: 11.5px; margin-top: 10px; max-width: 52ch; line-height: 1.5; }

/* Reveal on scroll (script.js setupMotion adds .reveal only to what starts
   below the fold, then .is-in as it enters). */
.reveal {
  opacity: 0;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal--rise { transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .splash, .splash.leaving { transition: opacity .2s linear; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── PHOTO MOMENTS ─────────────────────────────────────────────── */
/* Photos are plain rectangles with a small radius: no frame, no tint. */
.card__media, .line-card__media {
  position: relative; margin: 0 0 16px; aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: var(--r-sm); background: var(--surface);
}
.line-card__media { margin-bottom: 6px; }
.card__media img, .line-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
}
/* One row needs ~620px (logo, three links, "Cotizar"); below 720px the
   links move to their own row under the logo and the action. */
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; grid-template-areas: "home quote" "nav nav"; padding-bottom: 0; }
  .topbar__home { grid-area: home; }
  .topbar__quote { grid-area: quote; }
  .pathnav { grid-area: nav; justify-content: space-between; gap: 12px; padding-bottom: 2px; }
  .pathnav button { padding: 10px 0 12px; }
  .pathnav button[data-active="true"]::after { bottom: -1px; }
  .footer__end { align-items: flex-start; }
}
@media (max-width: 760px) {
  .path-card {
    grid-template-columns: 30px minmax(0, 1fr) 28px;
    grid-template-areas: "num head go" ". desc desc";
    gap: 12px 12px;
    padding: 22px 6px 24px 10px;
  }
  .path-card__desc { padding-top: 0; font-size: 15px; }
  .path-card__go { padding-top: 2px; }
  .rail { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rail__step { padding: 5px 0 0 52px; min-height: 34px; }
  .rail__step::before { top: 40px; bottom: -18px; left: 17px; right: auto; width: 1px; height: auto; background: var(--line); }
  .cine { min-height: min(calc(100svh - var(--topbar-h, 100px)), 680px); }
  .cine__inner { padding-top: 96px; }
  .cine__actions { width: 100%; }
  .cine__actions .btn { flex: 1 1 auto; justify-content: center; }
  .localnav__name { display: none; }
  .localnav__links { margin-left: 0; }
}
@media (max-width: 620px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .dense-list--cols { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .pathnav button { font-size: 13px; }
  .fact { padding-right: 10px; }
  .fact + .fact { padding-left: 10px; }
  /* Shorter photos on phones: nine of them stack in one column. */
  .card__media, .line-card__media { aspect-ratio: 16 / 9; }
  .grid { row-gap: 36px; }
}

/* ── WhatsApp quote button ────────────────────────────────────── */
/* A page-coloured pill with the green WhatsApp badge: recognisable, and the
   label keeps AA contrast (white text on WhatsApp green would not). On
   phones only the badge shows. Above the splash too (z-index 100). */
.wa-float {
  position: fixed; z-index: 120;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 18px 6px 6px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line-hi);
  color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.38);
  transition: border-color .2s var(--ease);
}
.wa-float:hover { border-color: #25d366; }
.wa-float:active { transform: scale(0.97); }
.wa-float__badge {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #ffffff;
}
.wa-float__badge svg { width: 24px; height: 24px; }
@media (max-width: 520px) {
  .wa-float { padding: 5px; }
  .wa-float__label { display: none; }
  .wa-float__badge { width: 50px; height: 50px; }
  .wa-float__badge svg { width: 28px; height: 28px; }
  /* The hero's full-width buttons end above the button's corner. */
  .cine__inner { padding-bottom: 92px; }
}

/* ──────────────────────────────────────────────────────────────────
   LIGHT THEME — clean corporate paper, AA contrast.
   ────────────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --ink: #eef1f6;
  --ink-deep: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #eef2f7;
  --fg: #101c30;
  --fg-2: #3c4a5e;
  --fg-muted: #586475;
  --fg-subtle: #8b97a8;
  --line: rgba(16,28,48,0.12);
  --line-soft: rgba(16,28,48,0.07);
  --line-hi: rgba(16,28,48,0.22);
  --shadow-md: 0 4px 14px rgba(16,28,48,0.08);
}
[data-theme="light"] [data-accent="green"] {
  --accent-bright: #1d4ed8; --accent-text: #1d4ed8;
  --accent-soft: rgba(59,130,246,0.12);
  --accent-line: rgba(37,99,235,0.32);
}
[data-theme="light"] [data-accent="gold"] {
  --accent-bright: #c62828; --accent-text: #b71c1c;
  --accent-soft: rgba(239,68,68,0.12);
  --accent-line: rgba(198,40,40,0.30);
}
[data-theme="light"] body { background: var(--ink); }
[data-theme="light"] .wa-float { box-shadow: 0 8px 24px rgba(16,28,48,0.18); }
[data-theme="light"] .topbar {
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .localnav { background: rgba(255,255,255,0.86); border-bottom-color: var(--line); }
[data-theme="light"] .localnav__links a[aria-current="true"] { background: rgba(16,28,48,0.06); }

/* The cinematic hero always sits on a dark photo, so its accents keep the
   dark-theme values in the light theme too (after the light rules on purpose). */
.page .cine[data-accent="gold"] { --accent-text: #ff9da0; }
.page .cine[data-accent="green"] { --accent-text: #9cc0ff; }

/* ──────────────────────────────────────────────────────────────────
   VANILLA PORT — collapsible state (detail bodies render in the DOM
   and are toggled by a class; replaces React conditional rendering).
   ────────────────────────────────────────────────────────────────── */
.detail-body { display: none; }
.card.is-open > .detail-body { display: block; }

.acc__body { display: none; }
.acc__item.is-open .acc__body { display: block; }

.support-row__detail { display: none; padding-top: 16px; }
.support-row.is-open .support-row__detail { display: block; }

/* ── SEO fallback (server-side crawlable content shown before script.js
   runs and replaces #root; styled so the brief pre-hydration flash reads
   cleanly on the ink background). ── */
.seo-fallback { max-width: 900px; margin: 0 auto; padding: 56px clamp(20px, 5vw, 44px); }
.seo-fallback h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 44px); margin-bottom: 16px; }
.seo-fallback h2 { font-family: var(--display); font-size: clamp(20px, 3vw, 28px); margin: 32px 0 12px; color: var(--fg); }
.seo-fallback p { color: var(--fg-2); margin-bottom: 12px; max-width: 70ch; }
.seo-fallback ul { color: var(--fg-2); padding-left: 20px; margin-bottom: 12px; }
.seo-fallback li { margin-bottom: 6px; }
.seo-fallback a { color: var(--blue-400); }
