/* ==========================================================================
   Mario Valiente — Diseño, Desarrollo & Management.
   Stylesheet for the single-page profile. Plain CSS, no build step.
   ========================================================================== */

:root {
  --bg: #07070b;
  --surface: #121220;
  --surface-2: #171729;
  --surface-hi: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.18);
  --text: #f4f4fa;
  --text-dim: #a2a2ba;
  --text-faint: #808096; /* ~5.2:1 on --bg — #68687f measured ~3.7:1, below WCAG AA 4.5:1 for normal text */
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #ff5cb8;
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --grad-soft: linear-gradient(120deg, rgba(124, 92, 255, 0.16), rgba(34, 211, 238, 0.1));
  --radius: 20px;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  /* Third, utility role: spec-sheet / handoff-annotation register for reference marks,
     dates, and tags — grounded in the subject (20 years bridging design specs → dev
     handoff → production), not just a headline/body pairing. */
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Skip link: hidden until keyboard-focused, standard accessibility pattern */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Faint drafting grid, masked so it fades toward the bottom of the viewport */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* Film-grain overlay for a tactile, premium finish */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Fixed ambient glows — the ONLY source of color wash across the page. Nothing
   section-specific overlaps them, so there is never a hard seam between sections.
   They're deliberately large and vivid: this is what makes the hero feel like it
   has a real background, without giving any single section its own local one. */
.glow {
  position: fixed;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.5), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  top: -160px;
  left: -120px;
  animation: glow-breathe 9s ease-in-out infinite;
}
.glow.g2 {
  background: radial-gradient(circle, rgba(34, 211, 238, 0.36), transparent 70%);
  top: 28%;
  right: -280px;
  left: auto;
  animation-delay: -3s;
}
.glow.g3 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 92, 184, 0.24), transparent 70%);
  bottom: -220px;
  left: 8%;
  top: auto;
  animation-delay: -6s;
}
@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .glow {
    animation: none;
  }
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Breaks an element out of the padded/max-width <main> to span the full viewport width,
   without needing a second top-level <main> (only one main landmark is valid per page). */
/* margin: calc(-50vw + 50%) instead of left:50%+margin-left:-50vw — the latter
   resolves `left` against this element's containing block (main.wrap, which is
   padded and narrower than the viewport), not the true viewport, so it drifts
   out of alignment whenever a full-bleed element sits inside a padded ancestor
   (exactly our case: #ai and .marquee both live inside <main class="wrap">). */
.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

/* Perspective is scoped to <main>, never <body> — perspective/transform/filter on body
   would make it a containing block for position:fixed descendants (nav, glow, back-top),
   breaking their fixed positioning. */
main.wrap {
  perspective: 1800px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

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

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

::selection {
  background: var(--accent-1);
  color: #fff;
}

/* Visible keyboard focus (mouse/touch clicks don't trigger :focus-visible) —
   accent-2 against --bg measures ~11:1, well past the 3:1 WCAG 2.2 minimum. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- NAV (floating capsule) ---------- */
header.nav {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  /* Same horizontal inset as .wrap at every breakpoint, so the capsule's edges
     line up exactly with the section content below it instead of drifting. */
  padding: 0 14px;
}
.nav-inner {
  /* Same max-width as the page content (.wrap) so the floating capsule reads as
     part of the same grid, not a narrower, disconnected element. */
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 12px 12px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(12, 12, 20, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 44px -18px rgba(0, 0, 0, 0.65);
}
.logo {
  font-family: var(--font-head);
  font-weight: thin;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
nav.links {
  display: flex;
  gap: 30px;
  align-items: center;
}
nav.links a {
  font-size: 0.86rem;
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
nav.links a:not(.cta-btn):not(.nav-social)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--grad);
  transition: width 0.25s ease;
}
nav.links a:hover,
nav.links a.active {
  color: var(--text);
}
nav.links a:hover::after,
nav.links a.active::after {
  width: 100%;
}

.cta-btn {
  background: var(--grad);
  color: #0a0a0f;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  line-height: 1;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.6);
}
.cta-btn svg {
  flex-shrink: 0;
}

/* Compact icon-only social link — used where a full text pill would be too heavy,
   e.g. the nav. The full .cta-btn (icon + label) is used for the actual CTAs. */
.nav-social {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface-hi);
  color: var(--text);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
}
.nav-social:hover {
  background: var(--grad);
  border-color: transparent;
  color: #0a0a0f;
  transform: translateY(-2px);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.burger span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* ---------- SECTION SHELL ---------- */
/* Symmetric, conventional vertical rhythm shared by every content module.
   The hero and footer opt out with their own values (page start / page end). */
section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 18px;
}
/* Registration-mark glyph — the page's one recurring signature device, repeated
   quietly at the head of every section like a reference tick on a spec sheet. */
.section-tag::before {
  content: "+";
  font-size: 0.95em;
  line-height: 1;
}
.section-title {
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  margin-bottom: 12px;
  max-width: 760px;
  letter-spacing: -0.03em;
}
.section-sub {
  color: var(--text-dim);
  max-width: 600px;
  font-size: 1.02rem;
  margin-bottom: 0;
}

/* Section header: tag above title above (optional) sub, flush left. Unified across
   every module — this is the same pattern the AI section used, now shared by all. */
.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}
.section-head .section-tag {
  margin-bottom: 16px;
}
.section-head .section-sub {
  margin-top: 14px;
}

/* Motion (JS) drives the actual animation; this is just the pre-animation state
   so content doesn't flash visible before the script runs. */
.reveal {
  opacity: 0;
  will-change: transform, opacity;
}

.stage-3d {
  perspective: 1400px;
}
.tilt-el {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- HERO ---------- */
/* No section-local background here on purpose — the fixed .glow blobs are the only
   color source on the page, so the hero shares the exact same flat --bg as everything
   else and there is no seam where it ends. */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px 0 56px;
}
.hero-title {
  font-size: clamp(3.5rem, 7vw, 5rem);
  line-height: 1.03;
  max-width: 900px;
  margin-bottom: 26px;
  letter-spacing: -0.03em;
}
.hero-lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--text);
  max-width: 640px;
  margin-bottom: 16px;
  font-weight: 500;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 36px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  list-style: none;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface-hi);
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chip::before {
  content: "✦";
  color: var(--accent-1);
  font-size: 0.7rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-outline {
  border: 1px solid var(--border);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover {
  border-color: var(--accent-2);
  background: var(--surface-hi);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  max-width: 600px;
  list-style: none;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ---------- MARQUEE ---------- */
.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
  background: var(--surface-hi);
}
.marquee-track {
  display: flex;
  gap: 52px;
  width: max-content;
  animation: marquee 32s linear infinite;
  list-style: none;
}
.marquee-track li {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.marquee-track li::after {
  content: "✦";
  color: var(--accent-1);
  font-size: 0.7rem;
  opacity: 0.7;
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* ---------- ABOUT (editorial 2-column text) ---------- */
.about-columns {
  column-count: 2;
  column-gap: 56px;
}
.about-text {
  font-size: 1.08rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  break-inside: avoid;
}
.about-text:last-child {
  margin-bottom: 0;
}
.about-text strong {
  color: var(--text);
  font-weight: 600;
}
.about-text.big {
  font-size: 1.45rem;
  line-height: 1.4;
  margin-bottom: 28px;
}

/* ---------- EXPERIENCE ---------- */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 22px;
  list-style: none;
}
.tl-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -38.5px;
  top: 28px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-1);
}
.tl-item.current::before {
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.2);
}
.tl-item.current {
  border-color: rgba(124, 92, 255, 0.35);
}
.tl-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}
.tl-role {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
}
.tl-period {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.tl-company {
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 14px;
}
.tl-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.tl-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-bullets li {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.tl-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--grad);
}

/* ---------- OFFERINGS (bento) ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
}
.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}
.offer-card:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--surface-2);
}
.offer-card.hi {
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.12), rgba(34, 211, 238, 0.05)), var(--surface);
  border-color: rgba(124, 92, 255, 0.3);
}
/* Content-coded reference tag, not a step number — these three offerings run in
   parallel, not in sequence, so a spec-sheet abbreviation (UX / DEV / PM) says
   something true about each card instead of implying an order that isn't there. */
.offer-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.offer-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.offer-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- AI SECTION ---------- */
/* Header uses the shared .section-head (see SECTION SHELL) — no AI-specific
   header rules needed anymore; this band has a colored background, so keeping
   the header identical to every other section matters more here, not less. */
#ai {
  background: var(--grad-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 110px 0;
}

.ai-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Each column is a real card — same visual weight as .offer-card / .process-step,
   not a bare list floating on the section's tinted background. */
.ai-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}
.ai-panel:hover {
  border-color: rgba(124, 92, 255, 0.35);
}
.ai-panel.hi {
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.14), rgba(34, 211, 238, 0.05)), var(--surface);
  border-color: rgba(124, 92, 255, 0.32);
}
.ai-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
/* INPUT / OUTPUT, not 01 / 02 — the two panels are parallel categories (what feeds
   the work vs. what ships from it), not sequential steps. */
.ai-panel-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-hi);
}
.ai-panel-head h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ai-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}
.ai-list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 16px 18px;
  border-radius: 14px;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}
.ai-list-item:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(255, 255, 255, 0.055);
}
.ai-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.ai-list-item p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- PROCESS ---------- */
.process-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
}
.process-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  background: var(--surface);
  position: relative;
}
.process-step .n {
  font-family: var(--font-head);
  font-size: 2.3rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
  margin-bottom: 16px;
  display: block;
}
.process-step h3 {
  font-size: 1.04rem;
  margin-bottom: 8px;
}
.process-step p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- STACK ---------- */
.stack-block {
  margin-bottom: 40px;
}
.stack-block:last-child {
  margin-bottom: 0;
}
.stack-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.tag {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 9px 16px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition:
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
  display: inline-block;
}
.tag:hover {
  border-color: var(--accent-2);
  color: var(--text);
  transform: translateY(-3px);
}

/* ---------- FOOTER / CONTACT ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 100px 0 48px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
}
.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  margin-bottom: 70px;
}
.footer-cta h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  max-width: 640px;
  letter-spacing: -0.03em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.footer-col h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-col a,
.footer-col p {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--accent-2);
}
.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}
.back-top.show {
  opacity: 1;
  pointer-events: auto;
}
.back-top:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
}

/* ==========================================================================
   RESPONSIVE
   Breakpoints: 1040 (nav breathing room) → 880 (grids to 1-2 col) →
   720 (nav becomes a sheet, single-column content) → 480 (small phones).
   ========================================================================== */
@media (max-width: 880px) {
  section {
    padding: 72px 0;
  }
  /* No forced full-viewport height on mobile — content decides the height, so the
     hero doesn't leave a big empty gap above the marquee when it's vertically
     centered inside a min-height:100vh box that's taller than its content needs. */
  #hero {
    min-height: auto;
    padding: 132px 0 20px;
  }
  #ai {
    padding: 84px 0;
  }
  footer {
    padding: 72px 0 40px;
    margin-top: 32px;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .about-columns {
    column-count: 1;
  }
  .about-text.big {
    font-size: 1.08rem;
    margin-bottom: 20px;
  }
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .process-row {
    grid-template-columns: 1fr 1fr;
  }
  .ai-columns {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-stats {
    margin-top: 56px;
  }
  .footer-links {
    gap: 32px;
  }
  .offer-card,
  .process-step,
  .ai-panel {
    padding: 28px 24px;
  }
}

@media (max-width: 720px) {
  header.nav {
    top: 12px;
  }
  nav.links {
    position: fixed;
    top: 70px;
    left: 5px;
    right: 5px;
    bottom: auto;
    background: rgba(12, 12, 20, 0.94);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    flex-direction: column;
    padding: 22px;
    gap: 20px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }
  nav.links.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .burger {
    display: flex;
  }
  .process-row {
    grid-template-columns: 1fr;
  }
  .tl-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .footer-cta {
    gap: 20px;
  }
  .footer-links {
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 14px;
  }
  header.nav {
    padding: 0 14px;
  }
  section {
    padding: 56px 0;
  }
  #hero {
    padding: 104px 0 40px;
  }
  .hero-title {
    font-size: clamp(3rem, 9vw, 2.6rem);
  }
  #ai {
    padding: 64px 7px;
  }
  footer {
    padding: 56px 0 32px;
    margin-top: 24px;
  }
  .hero-stats {
    gap: 14px;
  }
  .timeline {
    padding-left: 24px;
  }
  .tl-item::before {
    left: -30.5px;
  }
  .tl-item,
  .offer-card,
  .process-step,
  .ai-panel {
    padding: 20px;
  }
  .cta-btn,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }
  .hero-actions {
    flex-direction: column;
  }
}
