/* =============================================================
   CORPORACIÓN NEXUS — premium static site
   1. Tokens · 2. Reset · 3. Utilities · 4. Typography
   5. Components · 6. Sections · 7. Effects · 8. Responsive
   9. Reduced-motion
   ============================================================= */

/* ---------- Fonts (self-hosted, exact brand match) ---------- */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  /* Brand constants */
  --red: #ea4f50;
  --red-600: #d63e3f;
  --teal: #244c5b;          /* themeable accent (text/hover) */
  --teal-deep: #1a3a45;     /* fixed deep teal for big fills */
  --gray-brand: #43494f;

  /* Semantic — LIGHT */
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --fg: #1a1f24;
  --fg-strong: #10141a;
  --fg-muted: #687079;
  --border: #e6e8eb;
  --border-strong: #d4d8dd;
  --red-tint: #fdf2f2;
  --teal-tint: #eef3f5;
  --header-bg: rgba(255, 255, 255, 0.72);
  --net-line: 26, 31, 36;       /* rgb for canvas lines (dark on light) */
  --mark-opacity: 0.05;
  --grid-opacity: 0.5;
  --shadow-sm: 0 1px 2px rgba(16, 20, 26, 0.04), 0 6px 20px rgba(16, 20, 26, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 20, 26, 0.08), 0 2px 8px rgba(16, 20, 26, 0.05);

  /* Type */
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --maxw: 1200px;
  --header-h: 74px;
}

[data-theme="dark"] {
  --red: #f56364;
  --red-600: #ff7374;
  --teal: #5aa0b6;
  --teal-deep: #122e38;
  --gray-brand: #c7ccd1;

  --bg: #14171b;
  --bg-alt: #181c21;
  --surface: #1b1f25;
  --surface-2: #20252c;
  --fg: #e7ebf0;
  --fg-strong: #ffffff;
  --fg-muted: #98a2ad;
  --border: #2a3138;
  --border-strong: #39414a;
  --red-tint: #2a1b1c;
  --teal-tint: #15303a;
  --header-bg: rgba(20, 23, 27, 0.74);
  --net-line: 180, 196, 210;
  --mark-opacity: 0.07;
  --grid-opacity: 0.35;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.45);
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.06; letter-spacing: -0.025em; color: var(--fg-strong); font-weight: 600; }
:where(section)[id], :where(div)[id] { scroll-margin-top: calc(var(--header-h) + 14px); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 5px; }

/* =============================================================
   3. UTILITIES
   ============================================================= */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: fixed; top: -120px; left: 1rem; z-index: 9999;
  padding: 0.7rem 1.1rem; background: var(--red); color: #fff;
  border-radius: 8px; font-weight: 600; transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.1rem;
}
.eyebrow--red { color: var(--red); font-weight: 600; }

.section-title { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-title--lg { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; }
.section-lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--fg-muted); line-height: 1.7; max-width: 52ch; }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }

/* =============================================================
   4. COMPONENTS
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.35rem; border-radius: 11px;
  font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
              color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  will-change: transform;
}
.btn-lg { padding: 0.95rem 1.8rem; font-size: 1rem; border-radius: 12px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(234, 79, 80, 0.22); }
.btn-primary:hover { background: var(--red-600); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(234, 79, 80, 0.32); }
.btn-primary:active { transform: translateY(0) scale(0.985); }
.btn-ghost { color: var(--fg-strong); border-color: var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn-line { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-line:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; transform: translateY(-2px); }

/* Arrow link */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: var(--teal); margin-top: 0.4rem;
}
.link-arrow--red { color: var(--red); }
.link-arrow-ic { transition: transform 0.25s var(--ease-out); }
.link-arrow:hover .link-arrow-ic { transform: translateX(6px); }

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.8rem 0; }
.tag {
  padding: 0.5rem 0.95rem; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); font-size: 0.86rem; font-weight: 500; color: var(--fg);
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out), background-color 0.25s;
}
.tag:hover { border-color: var(--red); color: var(--red); transform: translateY(-3px); }

/* Custom cursor — single ring, snappy, hides native cursor */
.cursor { position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: 0; transition: opacity 0.25s var(--ease-out); }
.cursor.is-ready { opacity: 1; }
.cursor-ring {
  position: absolute; top: 0; left: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 1.6px solid var(--fg-muted); transform: translate3d(-100px, -100px, 0); margin: -11px 0 0 -11px;
  display: grid; place-items: center; will-change: transform, width, height;
  transition: width 0.2s var(--ease-out), height 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), margin 0.2s var(--ease-out);
}
.cursor-label { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; font-weight: 600; color: #fff; opacity: 0; transition: opacity 0.18s; }
.cursor.on-link .cursor-ring { width: 40px; height: 40px; border-color: var(--red); margin: -20px 0 0 -20px; }
.cursor.on-card .cursor-ring { width: 58px; height: 58px; background: var(--red); border-color: var(--red); margin: -29px 0 0 -29px; }
.cursor.on-card .cursor-label { opacity: 1; }

/* When the custom cursor is active (JS + fine pointer), hide the OS cursor */
.cursor-none, .cursor-none * { cursor: none !important; }

/* Header / nav */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-h); max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.nav-logo { display: inline-flex; align-items: center; }
.logo-img { height: 32px; width: auto; transition: filter 0.3s var(--ease-out); }
[data-theme="dark"] .nav-logo .logo-img { filter: brightness(0) invert(1); }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { position: relative; font-size: 0.92rem; font-weight: 500; color: var(--fg-muted); padding: 0.4rem 0; transition: color 0.2s var(--ease-out); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--red); border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--fg-strong); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--fg-strong); }

.nav-actions { display: flex; align-items: center; gap: 0.85rem; }
.lang-toggle { display: inline-flex; align-items: center; gap: 0.28rem; font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); letter-spacing: 0.02em; }
.lang-toggle span { transition: color 0.2s; }
.lang-toggle .is-active { color: var(--fg-strong); }
.lang-toggle .lang-sep { color: var(--border-strong); }
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); color: var(--fg); transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

.nav-burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--fg-strong); border-radius: 2px; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
.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); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 95;
  background: var(--bg); padding: 2rem var(--gutter) 3rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  border-top: 1px solid var(--border);
}
.mobile-drawer.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-drawer ul { display: flex; flex-direction: column; }
.mobile-drawer li a { display: block; padding: 1rem 0; font-size: 1.5rem; font-weight: 600; color: var(--fg-strong); border-bottom: 1px solid var(--border); }
.mobile-drawer .btn { margin-top: 1.6rem; align-self: flex-start; }

/* =============================================================
   5. SECTIONS
   ============================================================= */

/* HERO */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding-top: var(--header-h);
  background:
    radial-gradient(120% 90% at 80% -10%, var(--red-tint) 0%, transparent 45%),
    radial-gradient(90% 80% at 0% 110%, var(--teal-tint) 0%, transparent 50%),
    var(--bg);
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: var(--grid-opacity);
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(110% 90% at 50% 30%, #000 0%, transparent 72%);
  mask-image: radial-gradient(110% 90% at 50% 30%, #000 0%, transparent 72%);
}
.hero-mark {
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  width: min(58vw, 720px); z-index: 0; opacity: var(--mark-opacity); pointer-events: none;
  filter: grayscale(0);
}
.hero-inner { position: relative; z-index: 3; max-width: 880px; }
.hero-eyebrow { font-family: var(--mono); font-size: clamp(0.72rem, 1vw, 0.82rem); letter-spacing: 0.24em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
.hero-title span { display: block; }
.hero-title-accent { color: var(--red); }
.hero-subtitle { margin-top: 1.6rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--fg-muted); max-width: 44ch; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-muted); }
.hero-scroll-line { width: 1px; height: 38px; background: linear-gradient(to bottom, var(--fg-muted), transparent); animation: scrollPulse 2.4s var(--ease-soft) infinite; }
@keyframes scrollPulse { 0%, 100% { transform: scaleY(0.6); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* STATS */
.stats { background: var(--bg-alt); border-block: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; position: relative; }
.stat-num { font-family: var(--mono); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 600; color: var(--red); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.96rem; font-weight: 500; color: var(--teal); }
.stat-sub { font-size: 0.82rem; color: var(--fg-muted); }

/* ABOUT */
.about { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.about-copy { max-width: 60ch; }
.about-figure { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4 / 3; background: var(--bg-alt); }
.about-figure > img { width: 100%; height: 100%; object-fit: cover; object-position: 64% center; transition: transform 0.9s var(--ease-out); }
.about-figure:hover > img { transform: scale(1.04); }
.about-panel-grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(120% 100% at 70% 40%, #000, transparent 80%);
  mask-image: radial-gradient(120% 100% at 70% 40%, #000, transparent 80%);
}
.about-panel-mark { position: absolute; right: -16%; top: 50%; transform: translateY(-50%); width: 84%; height: auto; opacity: 0.12; filter: brightness(0) invert(1); transition: transform 0.9s var(--ease-out); }
.about-figure:hover .about-panel-mark { transform: translateY(-50%) scale(1.05) rotate(2deg); }
.about-panel-specs { position: absolute; top: 1.7rem; left: 1.6rem; display: flex; flex-direction: column; gap: 0.75rem; }
.about-panel-specs li { display: flex; align-items: center; gap: 0.6rem; }
.about-panel-specs li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }
.about-panel-specs b { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; color: #fff; font-weight: 600; }
.about-panel-specs span { font-family: var(--mono); font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
.about-figcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.5rem 1.2rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.92); background: linear-gradient(to top, rgba(10, 24, 30, 0.85), transparent); }
.about-figure-frame { position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; pointer-events: none; }

/* WORK GALLERY — Nexus en acción */
.work { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.work-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
.work-item { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow-sm); background: var(--bg-alt); border: 1px solid var(--border); }
.work-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.work-item:hover img { transform: scale(1.06); }
.work-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.7rem 1.3rem 1.1rem; background: linear-gradient(to top, rgba(8, 18, 24, 0.88), rgba(8, 18, 24, 0.1) 72%, transparent); }
.work-tag { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em; color: #fff; }
@media (min-width: 720px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }

/* SERVICES */
.services { padding: clamp(4.5rem, 10vw, 8rem) 0; background: var(--bg-alt); border-block: 1px solid var(--border); }
.svc-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.svc { position: relative; padding-bottom: 1.8rem; border-bottom: 1px solid var(--border-strong); transition: transform 0.35s var(--ease-out); }
.svc:hover { transform: translateY(-5px); }
.svc-num { display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--border-strong); margin-bottom: 1rem; transition: color 0.3s var(--ease-out); }
.svc:hover .svc-num { color: var(--red); }
.svc-title { font-size: 1.22rem; margin-bottom: 0.6rem; }
.svc-desc { font-size: 0.95rem; color: var(--fg-muted); line-height: 1.65; max-width: 42ch; }
.svc-rule { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(to right, var(--red), var(--teal)); transition: width 0.5s var(--ease-out); }
.svc:hover .svc-rule { width: 100%; }

/* EDUCATION */
.edu { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.edu-head { display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); align-items: end; }
.edu-aula {
  position: relative; overflow: hidden; padding: 1.8rem; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface-2); box-shadow: var(--shadow-sm);
}
.edu-aula-glow { position: absolute; inset: -40% -20% auto auto; width: 60%; height: 120%; background: radial-gradient(circle, rgba(234, 79, 80, 0.16), transparent 70%); pointer-events: none; }
.edu-aula-kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-bottom: 0.5rem; }
.edu-aula-note { font-size: 0.92rem; color: var(--fg-muted); margin-bottom: 1.3rem; line-height: 1.6; }
.edu-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; margin-bottom: 2.5rem; }
.edu-card { padding: 1.7rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--red); transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.edu-card-inst { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.7rem; }
.edu-card-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.edu-card-desc { font-size: 0.92rem; color: var(--fg-muted); line-height: 1.6; }

/* PROGRAMS / TOOLS PAGE */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 5.5rem)) 0 clamp(2.5rem, 6vw, 3.5rem);
  background:
    radial-gradient(120% 90% at 85% -20%, var(--red-tint) 0%, transparent 48%),
    radial-gradient(90% 80% at -10% 120%, var(--teal-tint) 0%, transparent 52%),
    var(--bg);
}
.page-hero-inner { position: relative; z-index: 3; max-width: 800px; }
.page-hero .hero-title { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
.page-hero .hero-subtitle { margin-top: 1.2rem; }

.tools { padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(5rem, 10vw, 8rem); }
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 0.9rem; padding: 2rem;
  border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tool-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--red-tint); color: var(--red); flex: none; }
.tool-ic svg { width: 24px; height: 24px; }
.tool-badge { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.34rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.tool-badge--live { color: var(--teal); background: var(--teal-tint); }
.tool-badge--soon { color: var(--fg-muted); background: var(--bg-alt); border: 1px solid var(--border); }
.tool-card h3 { font-size: 1.3rem; }
.tool-card p { color: var(--fg-muted); font-size: 0.95rem; line-height: 1.65; flex: 1; }
.tool-card .btn { align-self: flex-start; margin-top: 0.3rem; }
.tool-soon { align-self: flex-start; margin-top: 0.3rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }

/* Programs as a homepage section */
.tools-section { padding: clamp(4.5rem, 10vw, 8rem) 0; background: var(--bg-alt); border-block: 1px solid var(--border); }
.tools-section .tools-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 720px) { .tools-section .tools-grid { grid-template-columns: repeat(2, 1fr); } }

/* CONTACT (info + map) */
.contact { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.contact-info { max-width: 52ch; }
.contact-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.8rem 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 0.85rem; font-size: 0.98rem; color: var(--fg); }
.contact-list svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 2px; }
.contact-list a { transition: color 0.2s var(--ease-out); }
.contact-list a:hover { color: var(--red); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.contact-map { position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--bg-alt); }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-map-link { position: absolute; right: 0.8rem; bottom: 0.8rem; z-index: 2; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.85rem; border-radius: 9px; background: var(--surface); color: var(--fg-strong); font-size: 0.8rem; font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: color 0.2s, border-color 0.2s; }
.contact-map-link:hover { color: var(--red); border-color: var(--red); }
[data-theme="dark"] .contact-map iframe { filter: invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.95); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.05fr; } }

/* CTA */
.cta { position: relative; overflow: hidden; padding: clamp(5rem, 11vw, 9rem) 0; background: var(--teal-deep); text-align: center; }
.cta-bg { position: absolute; inset: 0; background: radial-gradient(60% 80% at 50% 0%, rgba(234, 79, 80, 0.2), transparent 60%); pointer-events: none; }
.cta-inner { position: relative; max-width: 720px; }
.cta-title { font-size: clamp(2rem, 5vw, 3.3rem); color: #fff; }
.cta-sub { margin-top: 1.1rem; font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, 0.72); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 2.2rem; }

/* FOOTER */
.site-footer { position: relative; background: var(--teal-deep); color: rgba(255, 255, 255, 0.72); }
.footer-rule { display: block; height: 3px; background: linear-gradient(to right, var(--red), var(--red) 30%, var(--teal-deep)); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding: clamp(3rem, 6vw, 4.5rem) var(--gutter); }
.footer-logo { height: 30px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-tagline { font-size: 0.92rem; max-width: 30ch; line-height: 1.6; }
.footer-col h4 { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a, .footer-contact li { font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-bottom { padding: 1.4rem var(--gutter); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom p { font-size: 0.8rem; color: rgba(255, 255, 255, 0.45); }

/* =============================================================
   6. EFFECTS
   ============================================================= */
/* One-time hero intro — pure CSS, no JS dependency (content-safe) */
.intro { animation: introUp 0.8s var(--ease-out) both; }
.hero-eyebrow.intro { animation-delay: 0.08s; }
.hero-title .intro:nth-child(1) { animation-delay: 0.18s; }
.hero-title .intro:nth-child(2) { animation-delay: 0.30s; }
.hero-subtitle.intro { animation-delay: 0.44s; }
.hero-actions.intro { animation-delay: 0.56s; }
@keyframes introUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Scroll reveals — only active when JS present (.has-js); content visible otherwise */
.has-js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.has-js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Defensive: split-text + reveal must never stay invisible */
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   7. RESPONSIVE
   ============================================================= */
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat + .stat::before { content: ""; position: absolute; left: -0.5rem; top: 50%; transform: translateY(-50%); width: 1px; height: 46px; background: var(--border-strong); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
  .edu-grid { grid-template-columns: repeat(3, 1fr); }
  .edu-head { grid-template-columns: 1.6fr 1fr; }
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.25fr 0.85fr; }
}
@media (max-width: 959px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
}
@media (min-width: 960px) {
  .nav-burger { display: none; }
  .mobile-drawer { display: none; }
}

/* =============================================================
   8. REDUCED-MOTION — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll-line { animation: none; }
  /* Intro + reveals keep gentle fade (functional, not intrusive) */
}

/* JS disabled: ensure cursor never blocks, reveals visible (handled by .has-js gate) */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
