/* Antares EP — Design tokens (Hallmark · theme: antares-indigo · design-system: design.md) */
:root {
  color-scheme: light;
  /* ---- Colors — antares-indigo, LIGHT (design.md) ----
     Dual-accent discipline preserved:
       --color-accent      = lavender #9F9BB3 — DECORATIVE only (rules, dots, starfield, the mark). Fails WCAG as text.
       --color-accent-text = brand deep indigo #3D3A54 — ACCESSIBLE (text, links, button fill). 10.25:1 on paper. */
  --color-bg-primary: #3D3A54;          /* dark bands (hero/footer/cta) — brand deep indigo, not neutral #333 */
  --color-bg-primary-deeper: #2A2838;   /* trust band — deepest indigo */
  --color-bg-primary-lift: #4A4664;     /* hover lift on indigo bands (panels/pillars) */
  --color-bg-secondary: #F8F8FA;        /* paper — soft neutral off-white, never pure #fff */
  --color-bg-surface: #F8F8FA;          /* cards on light */
  --color-bg-subtle: #F4F4F7;           /* faint lift off paper */
  --color-bg-subtle-2: #EFEFF3;         /* paper-2 */
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-muted: #C9C7D4;  /* muted on indigo bands — 6.52:1 on #3D3A54 */
  --color-text-on-light: #26242F;       /* ink — near-black indigo, never pure #000 (14.4:1 on paper) */
  --color-text-on-light-muted: #5A5766; /* ink-2 — 6.62:1 on paper */
  --color-text-muted: #9F9BB3;
  --color-border: #E2E0E8;              /* rule — hairlines */
  --color-border-dark: rgba(255,255,255,0.14);
  --color-accent: #9F9BB3;         /* lavender — DECORATIVE ONLY (rules, dots, starfield glow, borders, the mark). Fails WCAG AA on light, so never use for text/CTA fills on light. */
  --color-accent-hover: #8d899f;
  --color-accent-soft: rgba(159,155,179,0.14);
  /* Accessible accent for TEXT and primary BUTTON FILLS on light surfaces — brand deep indigo.
     #3D3A54 → 10.25:1 on paper, 9.48:1 on paper-2; white text on the fill = 10.87:1 (all pass WCAG AAA). */
  --color-accent-text: #3D3A54;
  --color-accent-text-hover: #2F2D42;  /* darker hover for button fills */

  /* Typography — Direction B: Schibsted Grotesk headings/UI + Source Serif 4 body + Spline Sans Mono figures */
  --font-display: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;  /* display / headings / UI / eyebrows */
  --font-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;        /* body / long-form */
  --font-mono:    'Spline Sans Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; /* figures / stats — tabular */
  --font-sans: var(--font-display);   /* back-compat alias: legacy rules using --font-sans get the grotesque */
  --fw-light: 400;     /* grotesque has no 300 weight here; floor at 400 (light display reads as 400) */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Type scale */
  --text-display: clamp(2.5rem, 5vw, 4.75rem);  /* display anchor (design.md) */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  --fs-6xl: 3.75rem;
  --fs-7xl: 4.5rem;

  /* Motion — named easings (design.md); the live site had none, only ad-hoc 220ms */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Line heights */
  --lh-tight: 1.12;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;

  /* Tracking */
  --tr-label: 0.14em;
  --tr-eyebrow: 0.2em;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;
  --sp-32: 8rem;
  --sp-40: 10rem;

  /* Radii */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(31,31,31,0.04), 0 1px 3px rgba(31,31,31,0.06);
  --shadow-md: 0 4px 16px rgba(31,31,31,0.06), 0 2px 4px rgba(31,31,31,0.04);
  --shadow-lg: 0 24px 48px -12px rgba(31,31,31,0.12);

  /* Layout */
  --container: 1280px;
  --container-narrow: 960px;
  --nav-h: 76px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--color-text-on-light);
  background: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold); letter-spacing: -0.015em; line-height: var(--lh-tight); text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.25rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.875rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p  { margin: 0; text-wrap: pretty; }

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

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-8); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--sp-8); }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--color-accent-text);
}

.lede { font-size: var(--fs-xl); font-weight: var(--fw-light); line-height: var(--lh-snug); color: var(--color-text-on-light-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
  background: var(--color-accent-text);
  color: #fff;
}
.btn:hover { background: var(--color-accent-text-hover); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--color-accent-text); outline-offset: 2px; }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--color-text-on-light);
  border-color: var(--color-text-on-light);
}
.btn-ghost:hover { background: var(--color-text-on-light); color: var(--color-bg-secondary); transform: translateY(-1px); }
.btn-ghost-dark {
  background: transparent;
  color: var(--color-text-on-dark);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost-dark:hover { background: var(--color-text-on-dark); color: var(--color-text-on-light); }

.btn .arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Skip to content ---------- */
.skip {
  position: absolute;
  left: var(--sp-4);
  top: -120px;
  z-index: 200;
  background: var(--color-accent-text);
  color: #fff;
  padding: 10px 18px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  transition: top 160ms ease;
}
.skip:focus { top: var(--sp-4); outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  background: rgba(51,51,51,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 220ms ease;
}
.nav-inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}
.nav-logo { height: 26px; display: block; }
.nav-logo img { height: 100%; width: auto; }
.nav-links { display: flex; gap: var(--sp-8); align-items: center; }
.nav-links a {
  font-family: var(--font-display);
  color: rgba(255,255,255,0.78);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  padding: 6px 0;
  position: relative;
  transition: color 180ms var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--color-accent);
}
.nav-right { display: flex; align-items: center; gap: var(--sp-6); }
.lang-toggle {
  display: inline-flex;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-label);
  color: rgba(255,255,255,0.6);
  font-weight: var(--fw-semibold);
  gap: 4px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 10px;
}
.lang-toggle span { padding: 0 3px; }
.lang-opt {
  padding: 0 3px;
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: color 180ms ease;
}
.lang-opt.on { color: #fff; }
.lang-opt:hover { color: rgba(255,255,255,0.92); }
.lang-opt:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.lang-toggle:hover { border-color: rgba(255,255,255,0.4); }

/* Mobile hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 240ms ease, opacity 180ms ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: absolute;
  top: var(--nav-h);
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  background: rgba(25,25,28,0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: var(--sp-2) var(--sp-8) var(--sp-6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
}
.nav[data-open="true"] .nav-mobile { opacity: 1; visibility: visible; transform: none; }
.nav-mobile a {
  font-family: var(--font-display);
  color: rgba(255,255,255,0.82);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  padding: 15px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 180ms ease;
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a:hover, .nav-mobile a.active { color: #fff; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (min-width: 901px) {
  .nav-mobile { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-primary);
  color: var(--color-text-on-dark-muted);
  padding: var(--sp-24) 0 var(--sp-8);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-16);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  color: var(--color-accent);
  margin-bottom: var(--sp-6);
  font-weight: var(--fw-semibold);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-3); font-family: var(--font-display); }
.footer-col a:hover { color: #fff; }
.footer-brand .footer-mark { height: 28px; margin-bottom: var(--sp-6); }
.footer-brand p { color: var(--color-text-on-dark-muted); max-width: 360px; line-height: var(--lh-relaxed); }
.footer-legal {
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
  color: rgba(255,255,255,0.4);
  font-size: var(--fs-xs);
  flex-wrap: wrap;
}
.footer-legal a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Section utilities ---------- */
.section { padding: var(--sp-32) 0; }
.section-sm { padding: var(--sp-24) 0; }
.section-dark { background: var(--color-bg-primary); color: var(--color-text-on-dark); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lede { color: var(--color-text-on-dark-muted); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.section-label .dot {
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

.rule { height: 1px; background: var(--color-border); border: 0; margin: 0; }
.rule-dark { height: 1px; background: rgba(255,255,255,0.1); border: 0; margin: 0; }

/* Confidentiality strip — seller trust band (Dueños + Contacto) */
.confid-strip {
  background: var(--color-bg-subtle-2);
  border-bottom: 1px solid var(--color-border);
}
.confid-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-8);
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-3) var(--sp-5); flex-wrap: wrap;
}
.confid-lock {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  color: var(--color-accent-text);
}
.confid-lock svg { width: 18px; height: 18px; display: block; }
.confid-points {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  font-family: var(--font-display);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  letter-spacing: 0.01em; color: var(--color-text-on-light);
}
.confid-points li { display: inline-flex; align-items: center; gap: var(--sp-5); }
.confid-points li:not(:first-child)::before {
  content: ''; flex: 0 0 auto;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--color-accent);
}
@media (max-width: 640px) {
  .confid-inner { padding: var(--sp-3) var(--sp-6); }
  .confid-points { flex-direction: column; gap: var(--sp-2); text-align: center; }
  .confid-points li { gap: 0; }
  .confid-points li:not(:first-child)::before { display: none; }
}

/* Stat bar */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--color-border-dark); border-bottom: 1px solid var(--color-border-dark); }
.stat { padding: var(--sp-8) var(--sp-6); border-right: 1px solid var(--color-border-dark); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; font-size: clamp(2rem, 4vw, 3rem); font-weight: var(--fw-medium); color: #fff; line-height: 1; letter-spacing: -0.01em; }
.stat .num .unit { color: var(--color-accent); font-weight: var(--fw-regular); }
.stat .label { font-family: var(--font-display); margin-top: var(--sp-3); color: rgba(255,255,255,0.62); font-size: var(--fs-sm); letter-spacing: 0.02em; }
.stats-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--color-border-dark); }
  .stat:last-child { border-bottom: 0; }
}

/* Placeholder photo block — no fake imagery */
.placeholder {
  position: relative;
  background: linear-gradient(135deg, #2a2a30 0%, #3a3a45 50%, #2a2a30 100%);
  overflow: hidden;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  font-weight: var(--fw-semibold);
}
.placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.4) 100%);
}
.placeholder-light {
  background: linear-gradient(135deg, #f3f2f5 0%, #e6e4ec 100%);
  color: #a8a5b0;
}
.placeholder-light::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.placeholder-light::after { display: none; }

.placeholder .ph-label {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.25);
}
.placeholder-light .ph-label {
  border-color: rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.6);
}

/* Portfolio brand visuals */
.portfolio-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 8vw, 72px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #24242a 0%, #34343e 100%);
}
.portfolio-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.55;
}
.portfolio-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.18), transparent 48%),
    linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0.34));
}
.portfolio-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: min(78%, 360px);
  max-height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 18px 38px rgba(0,0,0,0.26));
}
.portfolio-visual--corotos { background: linear-gradient(135deg, #3c66a0 0%, #4b76ad 100%); }
.portfolio-visual--seven { background: linear-gradient(135deg, #f3f5f6 0%, #ffffff 100%); }
.portfolio-visual--sam { background: linear-gradient(135deg, #f7f8f8 0%, #ffffff 100%); }
.portfolio-visual--almomento { background: linear-gradient(135deg, #071f79 0%, #102f9b 100%); }
.portfolio-visual--seven::before,
.portfolio-visual--sam::before {
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
}
.portfolio-visual--seven::after,
.portfolio-visual--sam::after {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(154,150,170,0.16), transparent 52%),
    linear-gradient(to bottom, rgba(255,255,255,0), rgba(154,150,170,0.14));
}

/* Reveal on scroll — progressive enhancement: only hide when JS is confirmed
   (via the `js` class on <html>), so content is visible if JS fails to load. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* Utility */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-8); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--sp-8); }
}

/* Accent color variants (set via data attr for Tweaks) */
[data-accent="purple"] { --color-accent: #9a96aa; --color-accent-hover: #8a8799; --color-accent-soft: rgba(154,150,170,0.12); }
[data-accent="navy"]   { --color-accent: #1E3A5F; --color-accent-hover: #16304f; --color-accent-soft: rgba(30,58,95,0.1); }
[data-accent="brass"]  { --color-accent: #B08D4A; --color-accent-hover: #96763a; --color-accent-soft: rgba(176,141,74,0.12); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
  min-width: 260px;
  display: none;
  font-family: var(--font-sans);
}
.tweaks-panel.on { display: block; }
.tweaks-panel h5 {
  margin: 0 0 var(--sp-4) 0;
  font-size: var(--fs-xs);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--color-text-on-light);
}
.tweak-row { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.tweak-row > span { font-size: var(--fs-xs); color: var(--color-text-on-light-muted); }
.swatch-row { display: flex; gap: var(--sp-2); }
.swatch {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: all 150ms ease;
}
.swatch.active { border-color: var(--color-text-on-light); transform: scale(1.08); }
.swatch[data-acc="purple"] { background: #9a96aa; }
.swatch[data-acc="navy"]   { background: #1E3A5F; }
.swatch[data-acc="brass"]  { background: #B08D4A; }

/* ============================================================
   DARK THEME (night mode)
   Applied via [data-theme="dark"] on <html>.
   Token overrides flip the light surfaces; explicit overrides
   below catch the few hardcoded #fff/#fafafa backgrounds in the
   per-page <style> blocks (attribute specificity wins over them).
   ============================================================ */
[data-theme="dark"] {
  /* antares-indigo, DARK (design.md) — warmer/more-purple than the live neutral charcoals */
  --color-bg-primary: #121117;        /* hero / footer / cta — paper (deepest base) */
  --color-bg-primary-deeper: #0C0B10; /* trust band — below paper */
  --color-bg-primary-lift: #20202A;   /* hover lift on dark bands */
  --color-bg-secondary: #15141B;      /* body (was white) — lifted indigo */
  --color-bg-surface: #212029;        /* cards — lightest panel */
  --color-bg-subtle: #121117;
  --color-bg-subtle-2: #1A1922;       /* paper-2 */
  --color-text-on-light: #ECEDF2;     /* ink — now light (16:1 on paper) */
  --color-text-on-light-muted: #A6A4B2; /* ink-2 — 7.67:1 on paper */
  --color-text-muted: #9F9BB3;
  --color-border: #2A2933;            /* rule */
  --color-accent-soft: rgba(159,155,179,0.18);
  /* Decorative lavender stays #9F9BB3 (passes on dark surfaces); the ACCESSIBLE
     accent lightens to #B8B4CC so text/links/CTA labels clear AA on dark (9.33:1 on paper). */
  --color-accent: #9F9BB3;
  --color-accent-hover: #aeaabf;
  --color-accent-text: #B8B4CC;
  --color-accent-text-hover: #cecada;
  color-scheme: dark;
}

/* The preview/host injects `html, body { background: transparent }`; paint the
   themed surface on html itself with higher specificity so dark mode isn't
   revealed as browser-default white through a transparent body. */
html[data-theme] { background: var(--color-bg-secondary); }

/* Former-white section backgrounds → match body charcoal */
[data-theme="dark"] .approach,
[data-theme="dark"] .referral,
[data-theme="dark"] .carousel,
[data-theme="dark"] .intro,
[data-theme="dark"] .pillar-big,
[data-theme="dark"] .close-cta,
[data-theme="dark"] .bio,
[data-theme="dark"] .contact-grid,
[data-theme="dark"] .portfolio-preview { background: var(--color-bg-secondary); }

/* Former-white panels/cards → lifted surface */
[data-theme="dark"] .criteria-card,
[data-theme="dark"] .pp-card,
[data-theme="dark"] .p-slide,
[data-theme="dark"] .cf-option,
[data-theme="dark"] .modal,
[data-theme="dark"] .c-btn,
[data-theme="dark"] .chip,
[data-theme="dark"] .tweaks-panel { background: var(--color-bg-surface); }

/* Portfolio logos are charcoal monochrome PNGs — invert to a light tone so they read on dark cards */
[data-theme="dark"] .pp-logo-well img { filter: invert(1) brightness(1.12); opacity: 0.9; }
[data-theme="dark"] .pp-card:hover .pp-logo-well img { opacity: 1; }

[data-theme="dark"] .criteria-card:hover { background: #26262e; }
[data-theme="dark"] .c-btn:hover:not(:disabled) { background: var(--color-accent); }
[data-theme="dark"] .cf-option.selected { background: var(--color-accent-soft); }

/* Dark-fill buttons that hardcode white text: in dark mode the
   --color-text-on-light fill turns light, so flip their label dark
   to keep contrast (mirrors the .btn-ghost:hover handling). */
[data-theme="dark"] .cf-btn,
[data-theme="dark"] .modal button.primary,
[data-theme="dark"] .bio-social a:hover { color: var(--color-bg-secondary); }
[data-theme="dark"] .cf-btn:hover { background: #ffffff; color: var(--color-bg-secondary); }

/* Primary .btn fill becomes light-lavender (--color-accent-text) in dark mode,
   so its hardcoded white label would fail — flip the label to paper (9.33:1). */
[data-theme="dark"] .btn { color: var(--color-bg-primary); }
[data-theme="dark"] .btn:focus-visible { outline-color: var(--color-accent-text); }
[data-theme="dark"] .btn-ghost { color: var(--color-text-on-light); border-color: var(--color-text-on-light); }
[data-theme="dark"] .btn-ghost:hover { background: var(--color-text-on-light); color: var(--color-bg-secondary); }

/* Light placeholder blocks → dark so they don't glare */
[data-theme="dark"] .placeholder-light {
  background: linear-gradient(135deg, #1f1f25 0%, #2a2a32 100%);
  color: #6a6775;
}
[data-theme="dark"] .placeholder-light::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
}
[data-theme="dark"] .placeholder-light .ph-label {
  border-color: rgba(255,255,255,0.12); background: rgba(0,0,0,0.25);
}

/* Theme-aware transitions (enabled only after first paint to avoid load flash) */
.theme-ready body, .theme-ready .site-footer, .theme-ready .hero, .theme-ready .approach,
.theme-ready .referral, .theme-ready .carousel, .theme-ready .intro,
.theme-ready .pillar-big, .theme-ready .close-cta, .theme-ready .bio,
.theme-ready .contact-grid, .theme-ready .portfolio-preview,
.theme-ready .criteria-card, .theme-ready .p-slide, .theme-ready .cf-option,
.theme-ready .modal, .theme-ready .c-btn, .theme-ready .chip,
.theme-ready .tweaks-panel, .theme-ready .nav {
  transition: background-color 360ms ease, color 360ms ease, border-color 360ms ease;
}

/* ============================================================
   DAY (light) MODE — make day genuinely bright.
   Base hero/trust/page-hero are dark (brand + no-JS fallback);
   these flip them light when day mode is active so day ≠ night.
   ============================================================ */

/* --- Home hero --- */
[data-theme="light"] .hero {
  background: linear-gradient(165deg, #ffffff 0%, #f5f4f7 55%, #ece9f1 100%);
  color: var(--color-text-on-light);
}
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse at 78% 24%, rgba(154,150,170,0.24), transparent 46%),
    radial-gradient(ellipse at 14% 82%, rgba(154,150,170,0.12), transparent 55%);
}
/* Starfield renders in light mode too (the Antares metaphor is the default,
   not a dark-mode easter egg); the canvas JS draws dark dots on the light gradient. */
/* On the light hero gradient, accent-coloured TEXT (eyebrow, headline emphasis)
   uses the ACCESSIBLE indigo (10:1), not the decorative lavender (which only
   reads on the dark base). The hairline before the eyebrow stays decorative lavender. */
[data-theme="light"] .hero h1 em { color: var(--color-accent-text); }
[data-theme="light"] .hero-eyebrow { color: var(--color-accent-text); }
[data-theme="light"] .hero-sub { color: var(--color-text-on-light-muted); }
[data-theme="light"] .hero-meta { border-color: var(--color-border); color: var(--color-text-on-light-muted); }
[data-theme="light"] .hero-meta span { color: var(--color-text-on-light-muted); }
[data-theme="light"] .hero-meta strong { color: var(--color-text-on-light); }
[data-theme="light"] .hero-scroll { color: var(--color-text-on-light-muted); }
[data-theme="light"] .hero-scroll::after { background: linear-gradient(to bottom, rgba(51,51,51,0.45), transparent); }
[data-theme="light"] .hero .btn-ghost-dark { color: var(--color-text-on-light); border-color: var(--color-text-on-light); }
[data-theme="light"] .hero .btn-ghost-dark:hover { background: var(--color-text-on-light); color: #fff; }

/* --- Home CRITERIA band (Stat-Led centerpiece) ---
   Stays the deep indigo band in BOTH themes: a deliberate dark editorial
   statement against the light page (section colour-shift, not equal whitespace),
   so the oversized mono figures read as the page's load-bearing proof.
   In light mode it uses the brand deep indigo #3D3A54; in dark it inherits the
   dark-theme --color-bg-primary-deeper. All trust-head/figure text already uses
   on-dark tokens, so no per-element light override is needed. */
[data-theme="light"] .trust {
  background: var(--color-bg-primary);   /* brand deep indigo #3D3A54 */
  color: var(--color-text-on-dark);
}

/* --- Inner-page heroes --- */
[data-theme="light"] .page-hero {
  background: linear-gradient(165deg, #ffffff 0%, #f5f4f7 60%, #ece9f1 100%);
  color: var(--color-text-on-light);
}
[data-theme="light"] .page-hero::before {
  background: radial-gradient(ellipse at 76% 30%, rgba(154,150,170,0.22), transparent 50%);
}
[data-theme="light"] .page-hero h1 { color: var(--color-text-on-light); }
[data-theme="light"] .page-hero .lede { color: var(--color-text-on-light-muted); }

/* ---------- Theme toggle (in nav) ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0;
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 180ms ease;
}
.theme-toggle:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .ic-sun { display: none; }
.theme-toggle .ic-moon { display: block; }
[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
