/* Self-hosted fonts — no third-party font CDN is contacted by the browser. */
@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/newsreader-latin-wght-normal.woff2")
    format("woff2-variations");
}
@font-face {
  font-family: "Newsreader Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/newsreader-latin-wght-italic.woff2")
    format("woff2-variations");
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2")
    format("woff2-variations");
}

/* Minimal modern reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
ul[class],
ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-family-display);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-surface-dark);
  color: var(--color-text-inverse);
  padding: var(--space-2xs) var(--space-sm);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

.wrap {
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--content-padding-inline);
}

/* Layout primitives: 12-column grid + section rhythm (Home v1 SPEC).
   Combine with .wrap for a centred, guttered grid (e.g. class="wrap
   grid-12"). Spans below are only the ones a Home v1 section actually
   uses; more are added when a real consumer needs them. */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}
.col-span-2 {
  grid-column: span 2;
}
.col-span-3 {
  grid-column: span 3;
}
.col-span-4 {
  grid-column: span 4;
}
.col-span-5 {
  grid-column: span 5;
}
.col-span-7 {
  grid-column: span 7;
}
.col-span-12 {
  grid-column: span 12;
}
@media (max-width: 40rem) {
  .grid-12 {
    grid-template-columns: 1fr;
  }
  /* A collapsed 1-column track doesn't clamp a child's span: e.g.
     grid-column: span 5 still asks for 5 columns and the grid creates
     implicit tracks to satisfy it, overflowing horizontally. Force every
     direct child to the single column instead, overriding col-span-*
     (equal specificity, this rule wins on source order). */
  .grid-12 > * {
    grid-column: 1 / -1;
  }
}

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

.site-header {
  padding-block: var(--space-sm);
  border-bottom: var(--border-width-hairline) solid var(--color-border-subtle);
}
@media (min-width: 60rem) {
  .site-header {
    padding-block: var(--space-md);
  }
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2xs);
  font-family: var(--font-family-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 1.875rem);
  font-weight: 500;
  color: var(--brand-aubergine);
}
.brand-dot {
  width: 0.5rem;
  height: 0.5rem;
  align-self: center;
  border-radius: 50%;
  background: var(--color-accent-primary);
  flex-shrink: 0;
}

/* --color-border-strong is ~1.8:1 on warm white, below the 3:1 non-text
   AA guideline (same alpha as the Home v1 reference's own control
   borders) — reported, not fixed here; see the branch report. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: var(--border-width-hairline) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--brand-aubergine);
  cursor: pointer;
}
.nav-toggle .icon-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.site-nav a:hover {
  color: var(--color-accent-text);
}

@media (max-width: 40rem) {
  .nav-toggle:not([hidden]) {
    display: inline-flex;
  }
  /* Only set once JS runs (nav-toggle.js); without JS the nav has no
     [data-expanded] attribute and stays visible/usable. */
  .site-nav[data-expanded="false"] {
    display: none;
  }
}

.hero {
  padding-block: var(--space-3xl) var(--space-2xl);
}
.hero-grid {
  align-items: center;
  row-gap: var(--space-2xl);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.hero-kicker {
  display: block;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-text);
}
.hero-title {
  margin: 0;
  font-size: var(--font-size-display-hero);
  line-height: var(--line-height-display-tight);
  letter-spacing: var(--letter-spacing-display-tight);
}
.hero-title-em {
  font-style: italic;
  color: var(--color-accent-primary);
}
.hero-lead {
  margin: 0;
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-panel {
  position: relative;
  aspect-ratio: 520 / 580;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--brand-sand);
}
.hero-panel svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-path-label {
  font-family: var(--font-family-display);
  font-style: italic;
  fill: var(--brand-aubergine);
  fill-opacity: 0.6;
}
.hero-path-label-clarity {
  fill: var(--color-accent-text-strong);
  fill-opacity: 1;
}
.hero-node-label {
  font-family: var(--font-family-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  fill: var(--brand-aubergine);
}

/* Hero text stagger + SVG path animation both play once on load (not on
   scroll), so they key off .js-reveal on <html> directly rather than
   [data-reveal]/.is-visible, which is reserved for below-the-fold,
   scroll-triggered sections. Without .js-reveal (no JS, or reduced
   motion), none of this applies and everything renders in final state. */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.js-reveal .hero [data-stagger] {
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.js-reveal .hero [data-stagger="1"] {
  animation-delay: 0s;
}
.js-reveal .hero [data-stagger="2"] {
  animation-delay: 0.15s;
}
.js-reveal .hero [data-stagger="3"] {
  animation-delay: 0.3s;
}
.js-reveal .hero [data-stagger="4"] {
  animation-delay: 0.45s;
}

@keyframes hero-path-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.hero-path-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
}
.js-reveal .hero-path-draw {
  stroke-dashoffset: 1000;
  animation: hero-path-draw 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes hero-node-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.hero-node {
  transform-box: fill-box;
  transform-origin: center;
}
.js-reveal .hero-node {
  animation: hero-node-in 0.4s ease-out both;
}
.js-reveal .hero-node-1 {
  animation-delay: 1s;
}
.js-reveal .hero-node-2 {
  animation-delay: 1.3s;
}
.js-reveal .hero-node-3 {
  animation-delay: 1.6s;
}
.js-reveal .hero-node-4 {
  animation-delay: 1.9s;
}

@keyframes hero-node-pulse {
  from {
    transform: scale(1);
    opacity: 0.55;
  }
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}
.hero-node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.js-reveal .hero-node-pulse {
  animation: hero-node-pulse 1.2s ease-out 2.3s forwards;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 3rem;
  padding: 0 var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 700;
  border: 1.5px solid transparent;
  transition:
    background-color var(--motion-duration-base) var(--motion-easing-standard),
    color var(--motion-duration-base) var(--motion-easing-standard),
    border-color var(--motion-duration-base) var(--motion-easing-standard);
}
.button .arrow {
  transition: transform var(--motion-duration-fast)
    var(--motion-easing-standard);
}
.button:hover .arrow,
.button:focus-visible .arrow {
  transform: translateX(5px);
}

.button-primary {
  background: var(--color-accent-text);
  color: var(--color-text-inverse);
}
.button-primary:hover {
  background: var(--color-accent-text-strong);
}

.button-secondary {
  border-color: var(--brand-aubergine);
  color: var(--brand-aubergine);
  font-weight: 600;
}
.button-secondary:hover {
  background: var(--brand-aubergine);
  color: var(--color-text-inverse);
}

.section-heading {
  margin: 0;
  font-size: var(--font-size-display-section);
  line-height: var(--line-height-display-tight);
  letter-spacing: var(--letter-spacing-display);
  color: var(--brand-aubergine);
}
.section-heading em {
  font-style: italic;
  color: var(--color-accent-primary);
}

.trust-strip {
  border-block: var(--border-width-hairline) solid var(--color-border-subtle);
}
.trust-strip-grid {
  padding-block: var(--space-md);
  row-gap: var(--space-sm);
}
.trust-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}
.trust-numeral {
  flex-shrink: 0;
  font-family: var(--font-family-display);
  font-style: italic;
  font-size: 1.375rem;
  color: var(--color-accent-text);
}
.trust-text {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--brand-aubergine);
}

.bento-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}
.bento-intro {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-xl);
}
.bento-intro-text {
  margin: 0;
  max-width: 24rem;
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-sm);
  border: var(--border-width-hairline) solid transparent;
  text-decoration: none;
  transition:
    background-color var(--motion-duration-base) var(--motion-easing-standard),
    border-color var(--motion-duration-base) var(--motion-easing-standard);
}
@media (min-width: 40.0625rem) {
  .tile {
    min-height: 21rem;
  }
}
.tile .arrow {
  transition: transform var(--motion-duration-base)
    var(--motion-easing-standard);
}
.tile:hover .arrow,
.tile:focus-visible .arrow {
  transform: translateX(8px);
}
.tile-eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}
.tile-heading {
  font-family: var(--font-family-display);
  font-size: 1.75rem;
  line-height: 1.05;
  color: var(--brand-aubergine);
}
.tile-description {
  font-size: var(--font-size-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.tile-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.tile-dark {
  background: var(--color-surface-dark);
  color: var(--color-text-inverse);
}
.tile-dark:hover,
.tile-dark:focus-visible {
  background: color-mix(in srgb, var(--brand-aubergine) 85%, white 15%);
}
.tile-dark .tile-eyebrow,
.tile-dark .tile-cta {
  color: var(--brand-sand);
}
.tile-dark .tile-heading {
  font-size: 2.25rem;
  color: var(--color-text-inverse);
}

.tile-light {
  background: var(--color-background-primary);
  border-color: var(--color-border-strong);
}
.tile-light:hover,
.tile-light:focus-visible {
  background: var(--color-surface-warm);
}

.tile-sand {
  background: var(--brand-sand);
}
.tile-sand:hover,
.tile-sand:focus-visible {
  background: color-mix(
    in srgb,
    var(--brand-sand) 85%,
    var(--brand-aubergine) 15%
  );
}
.tile-sand .tile-eyebrow {
  color: var(--brand-aubergine);
}
.tile-sand .tile-description {
  color: var(--color-text-secondary-on-sand);
}

.tile-terracotta {
  border-color: var(--color-accent-primary);
  border-width: 1.5px;
}
.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.tile-tag {
  padding: var(--space-2xs) var(--space-sm);
  border: var(--border-width-hairline) solid var(--color-border-strong);
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--brand-aubergine);
}
.tile-terracotta .tile-cta {
  color: var(--brand-aubergine);
}

.tile-svg {
  width: 100%;
  height: auto;
  color: var(--brand-aubergine);
}
/* Mirrors the general .js-reveal [data-reveal] pattern: fully drawn by
   default (no JS / reduced motion / not yet revealed with JS off), only
   reset to hidden once .js-reveal is present and #servicios hasn't
   entered the viewport yet, then animated in once it has (reuses the
   hero's draw keyframe). */
.tile-svg-flow {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
}
.js-reveal #servicios .tile-svg-flow {
  stroke-dashoffset: 600;
}
.js-reveal #servicios.is-visible .tile-svg-flow {
  animation: hero-path-draw 1.4s var(--motion-easing-standard) forwards;
}

.tile-split {
  padding: 0;
  overflow: hidden;
}
@media (min-width: 40.0625rem) {
  .tile-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.tile-split-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
}
.tile-image {
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(50, 38, 58, 0.07) 0 1px,
      transparent 1px 14px
    ),
    color-mix(in srgb, var(--brand-sand) 70%, var(--brand-aubergine) 15%);
}
@media (max-width: 40rem) {
  .tile-image {
    order: -1;
  }
}

.editorial-section {
  background: var(--color-surface-warm);
}
.editorial-grid {
  align-items: center;
  row-gap: var(--space-xl);
}
.editorial-image {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(50, 38, 58, 0.07) 0 1px,
      transparent 1px 14px
    ),
    color-mix(in srgb, var(--brand-sand) 70%, var(--brand-aubergine) 15%);
}
.editorial-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}
.editorial-statement {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: var(--font-size-display-section);
  line-height: 1.15;
  letter-spacing: var(--letter-spacing-display);
  color: var(--brand-aubergine);
}
.editorial-statement em {
  font-style: italic;
  color: var(--color-accent-text-strong);
}
.editorial-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: var(--border-width-hairline) solid var(--color-border-strong);
}
@media (max-width: 40rem) {
  .editorial-principles {
    grid-template-columns: 1fr;
  }
}
.editorial-principle {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.editorial-principle-label {
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-text-strong);
}
.editorial-principle-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary-on-sand);
}

.section-placeholder {
  padding-block: var(--space-2xl);
  border-top: var(--border-width-hairline) solid var(--color-border-subtle);
  scroll-margin-top: var(--space-lg);
}
.section-placeholder h2 {
  font-size: var(--font-size-display-sm);
  margin-bottom: var(--space-sm);
}
.todo-marker {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* Footer as a dark surface per Brief §7 ("major dark sections... footer")
   and the Home v1 reference. */
.site-footer {
  background: var(--color-surface-dark);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-columns {
  padding-block: var(--space-xl) var(--space-lg);
  row-gap: var(--space-lg);
}
.footer-brand {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: 2rem;
  font-weight: 500;
}
.footer-tagline {
  margin: var(--space-sm) 0 0;
  max-width: 22rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-inverse-muted);
}
.footer-heading {
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-sand);
}
.footer-nav-group .nav-list {
  flex-direction: column;
  gap: var(--space-xs);
}
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.footer-contact-list .todo-marker {
  color: var(--color-text-inverse-muted);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-md);
  padding-block: var(--space-md) var(--space-lg);
  border-top: var(--border-width-hairline) solid
    var(--color-border-inverse-subtle);
  font-size: var(--font-size-xs);
  color: var(--color-text-inverse-muted);
}

.legal-page {
  padding-block: var(--space-2xl);
  max-width: 40rem;
}
.legal-page h1 {
  margin-bottom: var(--space-md);
}
.legal-page p + p {
  margin-top: var(--space-sm);
}

/* Reveal-on-scroll primitive (reveal.js adds/removes .js-reveal on <html>;
   see that file for why). No section opts in yet — this lands unused
   until slice 2 marks real elements [data-reveal]. Without JS, or with
   prefers-reduced-motion, [data-reveal] elements are never hidden: the
   final state is the only state. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
