/* ==========================================================================
   Aurora Logic — Stylesheet
   Design system: warm ivory paper tones, deep petroleum teal, copper/champagne
   metallic accents. Premium, sober, corporate-technological. Mobile-first.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,340;9..144,440;9..144,540;9..144,600&family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------------------------------------------------------------------- *
 * 1. Design tokens
 * ---------------------------------------------------------------------- */
:root {
  /* Color — neutrals (warm paper, not pure white) */
  --ivory-50: #fbfaf6;
  --ivory-100: #f7f4ec;
  --paper-100: #f1ece0;
  --paper-200: #e9e2d2;
  --line-200: #e2dccb;
  --line-300: #d3cbb4;

  /* Color — petroleum teal (primary brand) */
  --teal-950: #071c20;
  --teal-900: #0a2a2f;
  --teal-800: #0e3d45;
  --teal-700: #135059;
  --teal-600: #1a6771;
  --teal-500: #257e88;
  --teal-400: #4a99a1;

  /* Color — copper / champagne (secondary brand) */
  --copper-700: #7c5c3c;
  --copper-600: #9c7449;
  --copper-500: #b78e5e;
  --copper-400: #cca578;
  --champagne-300: #e2cda3;
  --champagne-200: #ede0c4;

  /* Color — hero ribbon flow sequence (petróleo → petróleo oscuro → beige → arena),
     sampled directly from the logo's own vectorized palette (not the generic
     site tokens) so the animated ribbon always reads as the same logo. */
  --flow-1: #156b74;
  --flow-2: #0a2b32;
  --flow-3: #e4c7ad;
  --flow-4: #9e826b;

  /* Color — ink (text) */
  --ink-900: #181d1a;
  --ink-700: #3d453f;
  --ink-500: #656e66;
  --ink-on-dark: #f2efe6;
  --ink-on-dark-soft: rgba(242, 239, 230, 0.72);

  --surface-0: var(--ivory-100);
  --surface-1: var(--ivory-50);
  --surface-2: var(--paper-100);
  --surface-dark: var(--teal-950);
  --surface-dark-2: var(--teal-900);

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --section-pad-y: clamp(3.5rem, 3rem + 3vw, 7rem);
  --container-w: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 26px;

  --shadow-soft: 0 1px 2px rgba(15, 30, 28, 0.04), 0 12px 32px -16px rgba(15, 30, 28, 0.18);
  --shadow-card: 0 1px 1px rgba(15, 30, 28, 0.05), 0 20px 48px -24px rgba(15, 30, 28, 0.24);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 900ms;
}

/* ---------------------------------------------------------------------- *
 * 2. Reset & base
 * ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html:focus-within { scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 540;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

::selection { background: var(--champagne-300); color: var(--teal-950); }

/* Focus visibility (never removed without replacement) */
:focus-visible {
  outline: 2.5px solid var(--copper-500);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--champagne-300); }

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

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  z-index: 999;
  background: var(--teal-950);
  color: var(--ink-on-dark);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

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

/* ---------------------------------------------------------------------- *
 * 3. Typography helpers
 * ---------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(0.9375rem, 0.87rem + 0.28vw, 1.0625rem);
  letter-spacing: 0.035em;
  color: var(--copper-700);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--copper-500);
  display: inline-block;
}
.on-dark .eyebrow { color: var(--champagne-300); }
.on-dark .eyebrow::before { background: var(--champagne-300); }

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-8);
}
.section-head h2 {
  font-size: clamp(1.9rem, 1.55rem + 1.6vw, 2.75rem);
  margin-top: var(--space-3);
}
.section-head p {
  margin-top: var(--space-4);
  font-size: 1.0625rem;
  color: var(--ink-700);
  max-width: 40rem;
}

/* ---------------------------------------------------------------------- *
 * 4. Buttons
 * ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal-900);
  color: var(--ink-on-dark);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--teal-800); box-shadow: 0 14px 30px -14px rgba(10, 42, 47, 0.45); }

.btn-ghost {
  border: 1.5px solid var(--line-300);
  color: var(--ink-900);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--teal-700); background: rgba(14, 61, 69, 0.05); }

.on-dark .btn-ghost { border-color: rgba(242,239,230,0.32); color: var(--ink-on-dark); }
.on-dark .btn-ghost:hover { border-color: var(--champagne-300); background: rgba(242,239,230,0.06); }

.btn-copper {
  background: linear-gradient(135deg, var(--copper-400), var(--copper-600));
  color: var(--teal-950);
  box-shadow: 0 14px 28px -14px rgba(124, 92, 60, 0.55);
}
.btn-copper:hover { filter: brightness(1.06); }

.btn-sm { padding: 0.65rem 1.25rem; font-size: 0.875rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--teal-800);
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out), gap var(--dur-fast) var(--ease-out);
}
.link-arrow:hover { border-color: currentColor; gap: 0.6rem; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.on-dark .link-arrow { color: var(--champagne-300); }

/* ---------------------------------------------------------------------- *
 * 5. Header
 * ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-200);
  box-shadow: 0 8px 24px -20px rgba(10, 30, 34, 0.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.brand img { height: 34px; width: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--teal-950);
}
.brand-word span {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--copper-700);
  font-weight: 700;
  margin-top: 2px;
}

.primary-nav { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: var(--space-6); }
.primary-nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-700);
  position: relative;
  padding: 0.3rem 0.05rem;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--copper-500);
  transition: right var(--dur-med) var(--ease-out);
}
.primary-nav a:hover { color: var(--teal-900); }
.primary-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: var(--space-4); }

.lang-switch {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line-300);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch a {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.55rem 0.75rem;
  min-width: 2.35rem;
  text-align: center;
  border-radius: 999px;
  color: var(--ink-500);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch a[aria-current="true"] {
  background: var(--teal-950);
  color: var(--ink-on-dark);
}
.lang-switch a:not([aria-current="true"]):hover { color: var(--teal-900); }

.header-cta { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line-300);
}
.menu-toggle svg { width: 19px; height: 19px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  /* Absolute (not fixed): the header's backdrop-filter makes it the containing
     block of fixed children, which collapsed the menu to a 0px-tall box. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  z-index: 99;
  background: var(--ivory-100);
  padding: var(--space-6) var(--container-pad) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility var(--dur-med);
  overflow-y: auto;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: var(--space-2); }
.mobile-nav ul a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line-200);
  color: var(--teal-950);
}
.mobile-nav .header-cta.is-visible { display: inline-flex; width: fit-content; }

@media (min-width: 960px) {
  .primary-nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ---------------------------------------------------------------------- *
 * 6. Hero
 * ---------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 2rem + 5vw, 6rem);
  padding-bottom: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  overflow: hidden;
  background: var(--ivory-100);
}
.hero-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 {
  font-size: clamp(2.25rem, 1.7rem + 3.1vw, 3.9rem);
  color: var(--teal-950);
  max-width: 16ch;
}
.hero-copy .hero-subtitle {
  margin-top: var(--space-5);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--ink-700);
  max-width: 42ch;
}
.hero-actions {
  margin-top: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.hero-visual .mark-wrap {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 2621 / 1418; /* matches the traced mark's viewBox */
}
.hero-visual svg, .hero-visual img { width: 100%; height: auto; }

/* Glow is masked to the mark's own silhouette (via the flat mono SVG as
   an alpha mask), so the bloom always hugs the ribbon's actual shape —
   never a visible rectangular "window" around it. */
.hero-visual .mark-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  -webkit-mask-image: url('/img/aurora-mark-mono.svg');
  mask-image: url('/img/aurora-mark-mono.svg');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(183, 142, 94, 0.4), rgba(19, 80, 89, 0.28) 70%, transparent 100%);
  filter: blur(22px);
  opacity: 0.75;
}

.mark-graphic-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: saturate(0.9) brightness(0.94) contrast(0.94);
}
.mark-piece { transform-box: fill-box; transform-origin: center; }

/* --------------------------------------------------------------------
 * Ribbon colour flow — the symbol's geometry never moves. Two masked
 * layers (one per infinity loop, faded into each other through the
 * centre crossing) each hold a repeating conic gradient centred on
 * that loop's own midpoint, cycling petróleo → petróleo oscuro →
 * beige → arena (sampled from the logo's own palette). Only the
 * gradient's start angle animates (a JS-driven custom property), so
 * the ribbon's outline is pixel-identical to the static logo at every
 * frame. mix-blend-mode:soft-light lets the flowing colour actually
 * tint the ribbon (a flatter, more matte mix than a hard "color" blend,
 * which left the artwork's own glossy highlight facets untouched and
 * reading as stray white streaks) while still keeping enough of the
 * underlying shading for the crossing's depth illusion.
 * -------------------------------------------------------------------- */
.mark-flow-color {
  position: absolute;
  inset: 0;
  isolation: isolate;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

.mark-flow-color .flow-left,
.mark-flow-color .flow-right {
  position: absolute;
  inset: 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.mark-flow-color .flow-right {
  mix-blend-mode: lighten;
}

.mark-flow-color .flow-left {
  -webkit-mask-image: url('/img/aurora-mark-mask-left.svg');
  mask-image: url('/img/aurora-mark-mask-left.svg');
  background: repeating-conic-gradient(from var(--angle-left, 0deg) at 23.6% 48.9%,
    var(--flow-1) 0%, var(--flow-2) 8.33%, var(--flow-3) 16.67%, var(--flow-4) 25%, var(--flow-1) 33.33%);
}
.mark-flow-color .flow-right {
  -webkit-mask-image: url('/img/aurora-mark-mask-right.svg');
  mask-image: url('/img/aurora-mark-mask-right.svg');
  background: repeating-conic-gradient(from var(--angle-right, 0deg) at 75.8% 50.1%,
    var(--flow-1) 0%, var(--flow-2) 8.33%, var(--flow-3) 16.67%, var(--flow-4) 25%, var(--flow-1) 33.33%);
}

/* "The logo draws itself": each ribbon segment starts hidden and
   scales/fades in with a per-piece delay. Fails open — fully visible
   by default; only armed once JS confirms it can run the sequence. */
body.reveal-on .mark-piece {
  opacity: 0;
  transform: scale(0.86) translateY(6px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--i) * 55ms);
}
body.reveal-on #hero-mark-wrap.is-built .mark-piece {
  opacity: 1;
  transform: none;
}
body.reveal-on .mark-glow,
body.reveal-on .mark-flow-color { opacity: 0; transition: opacity 0.8s var(--ease-out) 0.9s; }
body.reveal-on #hero-mark-wrap.is-built .mark-glow { opacity: 0.75; }
body.reveal-on #hero-mark-wrap.is-built .mark-flow-color { opacity: 0.85; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--space-6); }
}

/* ---------------------------------------------------------------------- *
 * 7. Services
 * ---------------------------------------------------------------------- */
.services { padding-block: var(--section-pad-y); background: var(--surface-0); }

.service-row {
  border-top: 1px solid var(--line-200);
  padding-block: var(--space-7);
}
.service-row:last-child { border-bottom: 1px solid var(--line-200); }

.service-row-head {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}
.service-number {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.5rem + 1.1vw, 2.5rem);
  color: var(--copper-500);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}
.service-row-head h3 {
  font-size: clamp(1.4rem, 1.25rem + 0.7vw, 1.85rem);
  margin-top: var(--space-2);
  color: var(--teal-950);
}
.service-summary {
  color: var(--ink-700);
  font-size: 1.02rem;
  max-width: 62ch;
  margin-top: var(--space-3);
}

.service-panel {
  padding-top: var(--space-6);
  display: grid;
  gap: var(--space-6);
}

.detail-text { color: var(--ink-700); max-width: 62ch; font-size: 1rem; }

/* Service detail content used to hide behind a "Conocer más" click; now
   the whole .service-panel simply reveals itself (via the existing
   [data-reveal] mechanism) as the visitor scrolls to it, and its own
   subservice cards / area tags cascade in one by one after that,
   staggered by the --i each item carries. Fails open exactly like the
   rest of the reveal system: fully visible unless body.reveal-on. */
body.reveal-on .service-panel .subservice-item,
body.reveal-on .service-panel .area-tags li {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
body.reveal-on .service-panel.is-visible .subservice-item,
body.reveal-on .service-panel.is-visible .area-tags li {
  opacity: 1;
  transform: none;
}

.area-tags { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.area-tags li {
  border: 1px solid var(--line-300);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-800);
  background: var(--ivory-50);
}

.subservice-list { display: grid; gap: var(--space-5); }
@media (min-width: 720px) {
  .subservice-list { grid-template-columns: repeat(2, 1fr); }
  .subservice-list.count-3 { grid-template-columns: repeat(3, 1fr); }
}
.subservice-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-950);
}
.subservice-item p { margin-top: var(--space-2); font-size: 0.9375rem; color: var(--ink-700); }

/* Featured blocks: Dashboard IA / RegulaHub */
.featured-block {
  margin-top: var(--space-6);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1.4rem + 1.8vw, 3rem);
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--space-6);
  background: linear-gradient(150deg, var(--teal-950) 0%, var(--teal-800) 100%);
  color: var(--ink-on-dark);
  box-shadow: var(--shadow-card);
}
.featured-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(650px 320px at 88% -10%, rgba(226, 205, 163, 0.22), transparent 60%);
  pointer-events: none;
}
.featured-block .eyebrow { color: var(--champagne-300); }
.featured-block .eyebrow::before { background: var(--champagne-300); }
.featured-block h4 {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  margin-top: var(--space-3);
  color: var(--ink-on-dark);
}
.featured-block .featured-desc {
  margin-top: var(--space-4);
  color: var(--ink-on-dark-soft);
  max-width: 52ch;
  font-size: 1.02rem;
}
.featured-bullets { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.featured-bullets li {
  display: flex;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--ink-on-dark);
}
.featured-bullets svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; color: var(--copper-400); }

.featured-block.regulahub {
  background: linear-gradient(150deg, var(--teal-950) 0%, #21322f 55%, var(--copper-700) 145%);
}
.featured-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-2); }
.external-note { font-size: 0.8rem; color: var(--ink-on-dark-soft); }

/* Dashboard IA preview mockup — illustrative only, no real client data.
   Sits alongside the copy in a two-column layout on wider screens. */
.featured-block.has-preview { position: relative; z-index: 1; }
@media (min-width: 780px) {
  .featured-block.has-preview {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: var(--space-7);
  }
}

.dashboard-preview {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
  background: linear-gradient(165deg, rgba(242, 239, 230, 0.09), rgba(242, 239, 230, 0.03));
  border: 1px solid rgba(242, 239, 230, 0.14);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 28px 54px -30px rgba(3, 10, 12, 0.65);
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(242, 239, 230, 0.12);
}
.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(242, 239, 230, 0.22);
}
.preview-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-on-dark-soft);
}
.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper-400);
  box-shadow: 0 0 0 0 rgba(204, 165, 120, 0.55);
  animation: status-pulse-ring 2.4s var(--ease-out) infinite;
}
@keyframes status-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(204, 165, 120, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(204, 165, 120, 0); }
  100% { box-shadow: 0 0 0 0 rgba(204, 165, 120, 0); }
}

.preview-chart { display: grid; gap: var(--space-2); }
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 92px;
  padding-inline: 0.15rem;
}
.chart-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--copper-400), var(--copper-700));
  opacity: 0.92;
  transform-origin: bottom;
}
.chart-caption {
  font-size: 0.7rem;
  color: var(--ink-on-dark-soft);
  letter-spacing: 0.02em;
}

.preview-chat { display: grid; gap: var(--space-3); margin-top: var(--space-1); }
.chat-bubble {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 92%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.42;
}
.chat-bubble svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; color: var(--copper-400); }

/* Dashboard IA mockup: the whole block reveals first (data-reveal on
   .dashboard-preview), then its bars grow up and its chat bubbles land
   one after another, staggered by the --i each carries. */
body.reveal-on .dashboard-preview .chart-bars span {
  transform: scaleY(0);
  transition: transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
body.reveal-on .dashboard-preview .chat-bubble {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(0.4s + var(--i, 0) * 220ms);
}
body.reveal-on .dashboard-preview.is-visible .chart-bars span { transform: scaleY(1); }
body.reveal-on .dashboard-preview.is-visible .chat-bubble { opacity: 1; transform: none; }
.chat-user {
  justify-self: end;
  background: rgba(242, 239, 230, 0.09);
  color: var(--ink-on-dark);
  border-radius: var(--radius-sm) var(--radius-sm) 3px var(--radius-sm);
}
.chat-assistant {
  justify-self: start;
  background: linear-gradient(135deg, rgba(204, 165, 120, 0.16), rgba(204, 165, 120, 0.06));
  color: var(--ink-on-dark);
  border: 1px solid rgba(204, 165, 120, 0.18);
  border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 3px;
}

/* ---------------------------------------------------------------------- *
 * 8. About
 * ---------------------------------------------------------------------- */
.about {
  padding-block: var(--section-pad-y);
  background: var(--surface-dark);
  color: var(--ink-on-dark);
}
.about-grid { display: grid; gap: var(--space-7); }
.about-copy p {
  color: var(--ink-on-dark-soft);
  font-size: 1.05rem;
  max-width: 60ch;
}
.about-copy p + p { margin-top: var(--space-5); }
.about .section-head h2 { color: var(--ink-on-dark); }

.about-mark {
  justify-self: center;
  align-self: center;
  width: min(260px, 60vw);
  opacity: 0.92;
}

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.3fr 0.7fr; align-items: start; }
}

/* ---------------------------------------------------------------------- *
 * 9. Contact
 * ---------------------------------------------------------------------- */
.contact { padding-block: var(--section-pad-y); background: var(--surface-0); }
.contact-grid { display: grid; gap: var(--space-8); }

.contact-info { display: grid; gap: var(--space-5); align-content: start; }
.info-card {
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--ivory-50);
}
.info-card h3 { font-size: 1.05rem; margin-bottom: var(--space-4); color: var(--teal-950); }
.info-row { display: flex; flex-direction: column; gap: 0.2rem; padding-block: var(--space-3); border-top: 1px solid var(--line-200); }
.info-row:first-of-type { border-top: none; padding-top: 0; }
.info-row dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink-500); text-transform: uppercase; }
.info-row dd a, .info-row dd span { font-size: 0.98rem; color: var(--ink-900); font-weight: 600; }
.info-row dd .pending { color: var(--ink-500); font-weight: 500; font-style: italic; }

.form-card {
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 1.4vw, 2.75rem);
  background: var(--ivory-50);
  box-shadow: var(--shadow-soft);
}
.form-grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px) {
  .form-grid.two-col { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--ink-900); }
.field .req { color: var(--copper-700); }
.field input, .field textarea, .field select {
  border: 1.5px solid var(--line-300);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--ivory-100);
  font-size: 0.98rem;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-500); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3.5px rgba(19, 80, 89, 0.14);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field-error {
  font-size: 0.82rem;
  color: #9c3b2c;
  min-height: 1.1em;
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #b0503e; }

/* Form fields cascade in one by one as the card scrolls into view,
   instead of the whole card appearing as a single flat block. */
body.reveal-on .form-card .field,
body.reveal-on .form-card .form-footer {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
body.reveal-on .form-card.is-visible .field,
body.reveal-on .form-card.is-visible .form-footer {
  opacity: 1;
  transform: none;
}

.consent-row { display: flex; gap: 0.7rem; align-items: flex-start; }
.consent-row input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--teal-800); flex-shrink: 0; }
.consent-row label { font-size: 0.85rem; color: var(--ink-700); font-weight: 500; }

.form-footer { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; margin-top: var(--space-2); }
.form-status { font-size: 0.9rem; }
.form-status[data-state="error"] { color: #9c3b2c; }
.form-status[data-state="success"] { color: var(--teal-700); }

.spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(247,244,238,0.4);
  border-top-color: var(--ink-on-dark);
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn[data-loading="true"] .spinner { display: inline-block; }
.btn[data-loading="true"] .btn-label { opacity: 0.85; }
.btn[disabled] { opacity: 0.75; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-7) var(--space-4);
}
.form-success.is-visible { display: block; }
.form-card.is-success form { display: none; }
.form-success .check-badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-800);
  color: var(--ink-on-dark);
  display: flex; align-items: center; justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}
.form-success h3 { font-size: 1.3rem; color: var(--teal-950); }
.form-success p { margin-top: var(--space-3); color: var(--ink-700); max-width: 34ch; margin-inline: auto; }
.form-success .btn { margin-top: var(--space-6); }
.form-success .form-success-alt { font-size: 0.85rem; color: var(--ink-500); }
.form-success .form-success-alt a { color: var(--teal-700); font-weight: 600; }

@media (min-width: 980px) {
  .contact-grid { grid-template-columns: 0.85fr 1.3fr; }
}

/* ---------------------------------------------------------------------- *
 * 10. Footer
 * ---------------------------------------------------------------------- */
.site-footer {
  background: var(--teal-950);
  color: var(--ink-on-dark);
  padding-block: var(--space-8) var(--space-6);
}
.footer-grid {
  display: grid;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(242,239,230,0.14);
}
.footer-brand img { height: 30px; }
.footer-brand p { margin-top: var(--space-4); color: var(--ink-on-dark-soft); font-size: 0.9rem; max-width: 30ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--champagne-300);
  font-weight: 700;
  margin-bottom: var(--space-4);
}
.footer-col ul { display: grid; gap: var(--space-3); }
.footer-col a, .footer-col span { font-size: 0.9rem; color: var(--ink-on-dark-soft); }
.footer-col a:hover { color: var(--ink-on-dark); }

.footer-bottom {
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(242,239,230,0.55);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------- *
 * 11. Scroll reveal & motion
 * ---------------------------------------------------------------------- */
/* Fails open by design: [data-reveal] elements are fully visible by
   default. Only once JS confirms IntersectionObserver is available (and
   the user has not requested reduced motion) does it arm the ".reveal-on"
   state on <body> and hide elements just-in-time for their entrance. This
   way, if JS is slow, blocked, or absent, content is never stuck hidden. */
[data-reveal] { opacity: 1; transform: none; }
body.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
body.reveal-on [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-group] > * { transition-delay: calc(var(--reveal-index, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .mark-piece { opacity: 1 !important; transform: none !important; }
  .hero-visual .mark-glow { opacity: 0.3; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------- *
 * 12. Misc
 * ---------------------------------------------------------------------- */
.divider-fade {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-300), transparent);
}

.on-dark { color: var(--ink-on-dark); }

.section-kicker-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }

@media (min-width: 640px) { .container { padding-inline: var(--container-pad); } }
