/* Agencia BAM · Facturas · Webs — shared stylesheet.
   Direction: warm, refined, quietly futuristic. Ivory paper and espresso ink,
   one warm "aurora" of light per hero, glass surfaces with a turning gradient
   edge, mono labels for the technical voice and a serif italic for emphasis.
   Fonts come from assets/fonts/fonts.css (self-hosted: Manrope, Cormorant
   Garamond, JetBrains Mono). 3D is plain CSS; main.js only feeds custom
   properties (--px/--py/--scroll for the hero, --tilt-x/--tilt-y/--gx/--gy for cards). */

/* ---------- Tokens ----------
   Two themes. Light is the default; dark applies when the visitor picks it (data-theme="dark" on
   <html>, saved by theme.js) or when the system prefers dark and nothing was saved.
   Light, on --bg #fbf6ef: ink 15:1, muted 6.2:1, copper 4.6:1 (large or bold text only),
   copper-ink 6.75:1, teal 5.85:1. --on-accent (white) on copper-ink 7.25:1, on teal 6.3:1.
   So light copper buttons are built on --copper-ink (--btn), never plain copper.
   Dark, on --bg #15100c: ink 16:1, muted 8.3:1, copper 7.4:1, copper-ink 9.2:1, teal 8.7:1.
   Dark buttons are bright fills with dark --on-accent text (7:1 or more). */
:root {
  color-scheme: light;
  --bg: #fbf6ef;
  --tint: #f5ecdf;
  --paper: #fffdf9;
  --ink: #2b1e17;
  --muted: #6b584b;
  --line: #e9dccb;
  --field: #8f7a69;
  --error: #a3261b;

  --copper: #b4532a; --copper-ink: #8f3f1e; --copper-tint: #f8e7db;
  --teal: #276b5b;   --teal-ink: #1d5246;   --teal-tint: #e2efe9;
  --amber: #f0b26b;  --rose: #eaa08c;       --peach: #f7cfb0;

  --accent: var(--ink); --accent-ink: var(--ink); --ring: rgba(43, 30, 23, .22);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --measure: 42rem; --wide: 72rem;
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2.5rem; --space-5: 4.5rem; --space-6: 7rem;
  --radius: 14px; --radius-lg: 22px;
  --nav-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --glass: rgba(255, 253, 249, .66);
  --shadow: 0 1px 2px rgba(43, 30, 23, .05), 0 12px 32px -14px rgba(83, 46, 24, .22);
  --shadow-lg: 0 2px 6px rgba(43, 30, 23, .05), 0 30px 70px -24px rgba(83, 46, 24, .34);
  /* Surfaces and details that change with the theme. */
  --on-accent: #fff;
  --nav-bg: rgba(251, 246, 239, .72); --nav-bg-solid: rgba(251, 246, 239, .97);
  --nav-border: rgba(233, 220, 203, .9); --nav-fade: rgba(251, 246, 239, 0);
  --chip-bg: rgba(255, 253, 249, .6); --chip-bg-strong: rgba(255, 253, 249, .8);
  --bubble-bg: rgba(255, 253, 249, .92);
  --glass-hi: rgba(255, 255, 255, .75); --glass-lo: rgba(255, 253, 249, .35); --edge: #e9dccb;
  --sheet-a: #fffdf9; --sheet-b: #fbf4ea; --sheet-line: #efe3d3;
  --warn-bg: #fde9cc; --warn-ink: #7a4600;
  --phone-border: #3a2a20;
  --grid-line: rgba(143, 63, 30, .13);
  --mark-hi: #fff;
  --tint-glow: rgba(247, 207, 176, .35);
  --aurora: .55; --grain: .045;
  --hover-wash: rgba(255, 255, 255, .6);
  --footer-bg: #2b1e17; --footer-border: transparent;
}
.p-facturas { --accent: var(--copper); --accent-ink: var(--copper-ink); --btn: var(--copper-ink); --btn-hover: #7a3518; --ring: rgba(180, 83, 42, .25); }
.p-web { --accent: var(--teal); --accent-ink: var(--teal-ink); --ring: rgba(39, 107, 91, .25); }

/* Dark theme: by choice, or by system preference when nothing was saved. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15100c; --tint: #1c1611; --paper: #211913;
  --ink: #f4ebdf; --muted: #bba997; --line: #3a2e24; --field: #8a7663; --error: #ff8f80;
  --copper: #e58c5c; --copper-ink: #f0a477; --copper-tint: #3a2519;
  --teal: #5cc2a6;   --teal-ink: #7fd3ba;   --teal-tint: #19302a;
  --rose: #e79a85;   --peach: #6b3f2a;
  --ring: rgba(244, 235, 223, .22);
  --glass: rgba(33, 25, 19, .66);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .65);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -24px rgba(0, 0, 0, .75);
  --on-accent: #1a130e;
  --nav-bg: rgba(21, 16, 12, .72); --nav-bg-solid: rgba(21, 16, 12, .97);
  --nav-border: rgba(58, 46, 36, .9); --nav-fade: rgba(21, 16, 12, 0);
  --chip-bg: rgba(33, 25, 19, .6); --chip-bg-strong: rgba(33, 25, 19, .85);
  --bubble-bg: rgba(42, 32, 24, .94);
  --glass-hi: rgba(255, 255, 255, .035); --glass-lo: rgba(255, 255, 255, 0); --edge: #3a2e24;
  --sheet-a: #2a2018; --sheet-b: #231a14; --sheet-line: #3d3027;
  --warn-bg: #3d2a12; --warn-ink: #f3c27a;
  --phone-border: #4a3a2e;
  --grid-line: rgba(229, 140, 92, .14);
  --mark-hi: #2e231b;
  --tint-glow: rgba(229, 140, 92, .08);
  --aurora: .3; --grain: .035;
  --hover-wash: rgba(255, 255, 255, .06);
  --footer-bg: #0e0a08; --footer-border: #2c221b;
}
[data-theme="dark"] .p-facturas { --btn-hover: var(--copper); }
[data-theme="dark"] .p-home { --btn-hover: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15100c; --tint: #1c1611; --paper: #211913;
    --ink: #f4ebdf; --muted: #bba997; --line: #3a2e24; --field: #8a7663; --error: #ff8f80;
    --copper: #e58c5c; --copper-ink: #f0a477; --copper-tint: #3a2519;
    --teal: #5cc2a6;   --teal-ink: #7fd3ba;   --teal-tint: #19302a;
    --rose: #e79a85;   --peach: #6b3f2a;
    --ring: rgba(244, 235, 223, .22);
    --glass: rgba(33, 25, 19, .66);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .65);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -24px rgba(0, 0, 0, .75);
    --on-accent: #1a130e;
    --nav-bg: rgba(21, 16, 12, .72); --nav-bg-solid: rgba(21, 16, 12, .97);
    --nav-border: rgba(58, 46, 36, .9); --nav-fade: rgba(21, 16, 12, 0);
    --chip-bg: rgba(33, 25, 19, .6); --chip-bg-strong: rgba(33, 25, 19, .85);
    --bubble-bg: rgba(42, 32, 24, .94);
    --glass-hi: rgba(255, 255, 255, .035); --glass-lo: rgba(255, 255, 255, 0); --edge: #3a2e24;
    --sheet-a: #2a2018; --sheet-b: #231a14; --sheet-line: #3d3027;
    --warn-bg: #3d2a12; --warn-ink: #f3c27a;
    --phone-border: #4a3a2e;
    --grid-line: rgba(229, 140, 92, .14);
    --mark-hi: #2e231b;
    --tint-glow: rgba(229, 140, 92, .08);
    --aurora: .3; --grain: .035;
    --hover-wash: rgba(255, 255, 255, .06);
    --footer-bg: #0e0a08; --footer-border: #2c221b;
  }
  :root:not([data-theme="light"]) .p-facturas { --btn-hover: var(--copper); }
  :root:not([data-theme="light"]) .p-home { --btn-hover: #fff; }
}

/* Lets the card edge gradient rotate smoothly where supported; elsewhere it stays still. */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--nav-h) + 32px);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: clip;
}
/* Fine paper grain over everything (decorative, never intercepts input). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.1; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); letter-spacing: -0.04em; line-height: 1.02; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; margin-bottom: var(--space-2); }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.005em; }
p, li { text-wrap: pretty; }
p + p { margin-top: var(--space-2); }
strong { font-weight: 600; }
a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
::selection { background: var(--peach); color: var(--ink); }

/* Serif italic emphasis: the elegant voice inside headings. */
.serif, h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }
h1 em { font-size: 1.12em; line-height: .9; }
.p-facturas h1, .p-web h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 em { font-size: 1.1em; }
.t-facturas { color: var(--copper); }
.t-web { color: var(--teal); }
.accent { color: var(--accent); }

.wrap { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }
.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: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.small { font-size: .875rem; color: var(--muted); }

/* ---------- Floating glass nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: .75rem .75rem 0; }
/* Soft fade behind the floating pill so content never peeks above it. */
.nav::before { content: ""; position: absolute; inset: 0 0 -1.25rem; z-index: -1; pointer-events: none; background: linear-gradient(var(--bg) 40%, var(--nav-fade)); }
.nav-inner {
  width: min(100%, var(--wide)); margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; gap: var(--space-3); padding: 0 .55rem 0 1.15rem;
  background: var(--nav-bg); border: 1px solid var(--nav-border); border-radius: 999px;
  box-shadow: 0 8px 30px -18px rgba(83, 46, 24, .35);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav-inner { background: var(--nav-bg-solid); } }
.brand { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.brand-group { display: flex; align-items: center; gap: .55rem; margin-right: auto; min-width: 0; white-space: nowrap; }
.brand-group .brand { margin-right: 0; }
.brand-dot {
  display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; margin-right: .5rem; vertical-align: .06em;
  background: conic-gradient(from 210deg, var(--copper), var(--amber), var(--teal), var(--copper));
  box-shadow: 0 0 12px rgba(240, 178, 107, .8);
}
/* Wordmark: small mono "agencia" + a three-letter BAM whose gradient runs across the letters.
   Each letter carries its own slice of one 300%-wide gradient, so the letters can move
   independently (hover pop) without the gradient breaking. */
.brand { display: inline-flex; align-items: center; }
.brand-logo { display: inline-flex; align-items: baseline; gap: .42rem; }
.brand-text { font-family: var(--mono); font-size: .62em; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-bam { display: inline-flex; font-size: 1.22em; font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.brand-bam i {
  display: inline-block; font-style: normal;
  background: linear-gradient(100deg, var(--copper-ink), var(--copper) 45%, var(--teal)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.brand-bam i:nth-child(2) { background-position: 50% 0; }
.brand-bam i:nth-child(3) { background-position: 100% 0; }
.brand-sub { margin-left: .5rem; font-weight: 500; opacity: .8; }
.footer .brand-text { color: #cdbaa8; }
.footer .brand-bam i { background-image: linear-gradient(100deg, var(--amber), #f0a477 45%, #7fd3ba); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .brand:hover .brand-bam i, .brand:focus-visible .brand-bam i { animation: bam-pop 560ms var(--ease) both; }
  .brand:hover .brand-bam i:nth-child(2), .brand:focus-visible .brand-bam i:nth-child(2) { animation-delay: 70ms; }
  .brand:hover .brand-bam i:nth-child(3), .brand:focus-visible .brand-bam i:nth-child(3) { animation-delay: 140ms; }
  .brand:hover .brand-dot { animation: bam-spin 700ms var(--ease); }
}
@keyframes bam-pop { 0% { transform: none; } 35% { transform: translateY(-.24em) scale(1.14) rotate(-4deg); } 70% { transform: translateY(.04em) scale(.97); } 100% { transform: none; } }
@keyframes bam-spin { to { rotate: 1turn; } }
.crumb { color: var(--field); }
.product-name { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.3rem; color: var(--accent); text-decoration: none; line-height: 1; display: inline-flex; align-items: center; min-height: 24px; }
.nav-links { display: flex; gap: var(--space-3); }
.nav-links a { position: relative; color: var(--muted); text-decoration: none; font-size: .92rem; transition: color 150ms ease-out; }
.nav-links a:hover { color: var(--ink); }
/* Underline that draws in from the left on hover and focus. */
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--copper), var(--teal)); transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease);
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
/* Theme toggle: shows the current theme's icon; aria-pressed says whether dark is on. */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition-property: background-color, border-color; transition-duration: 200ms; transition-timing-function: var(--ease);
}
.theme-toggle:hover { background: var(--tint); border-color: var(--field); }
.theme-toggle svg {
  grid-area: 1 / 1; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition-property: opacity, rotate, scale; transition-duration: 350ms; transition-timing-function: var(--ease);
}
.theme-toggle .i-moon, [data-theme="dark"] .theme-toggle .i-sun { opacity: 0; rotate: -45deg; scale: .6; }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; rotate: 0deg; scale: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { opacity: 0; rotate: -45deg; scale: .6; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 1; rotate: 0deg; scale: 1; }
}
@media (max-width: 479px) { .nav-inner { gap: var(--space-1); } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 320ms; }
@media (max-width: 820px) { .nav-links { display: none; } }
@media (max-width: 479px) { .brand-group .brand-text, .brand-group .crumb { display: none; } }

/* ---------- Buttons: pill, primary carries a sliding arrow ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px;
  padding: .75rem 1.5rem; border-radius: 999px; border: 1px solid var(--accent);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition-property: background-color, border-color, color, transform, box-shadow, translate; transition-duration: 200ms; transition-timing-function: var(--ease);
  translate: var(--mx, 0px) var(--my, 0px); /* magnetic pull, set by main.js on large primary buttons */
}
.btn-primary {
  color: var(--on-accent); border-color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)) , var(--btn, var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -12px var(--accent);
}
.btn-primary:hover { background-color: var(--btn-hover, var(--accent-ink)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 30px -12px var(--accent); }
.btn-primary:not(.btn-small)::after { content: "→"; transition: translate 200ms var(--ease); }
.btn-primary:not(.btn-small):hover::after { translate: 4px 0; }
.btn-secondary { background: transparent; color: var(--accent-ink); }
.btn-secondary:hover { background: var(--hover-wash); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 44px; padding: .5rem 1.15rem; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .65; cursor: default; transform: none; }
.btn[aria-disabled="true"]::after { content: none; }
.text-link { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-4); }

/* ---------- Labels ---------- */
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .76rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.eyebrow { margin-bottom: var(--space-3); padding: .35rem .85rem .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--chip-bg); }
.eyebrow::before, .kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--amber); }
.p-home .eyebrow::before, .p-home .kicker::before { background: var(--copper); }
.kicker { margin-bottom: var(--space-2); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--muted); margin-top: var(--space-3); max-width: 36rem; }
.note { margin-top: var(--space-2); font-size: .92rem; color: var(--muted); }
.section-intro { max-width: var(--measure); color: var(--muted); }

/* ---------- Hero + warm aurora ---------- */
.hero, .hero3d { position: relative; isolation: isolate; }
/* Full-bleed regardless of the hero's own width, so the light never ends in a hard edge. */
.aurora { position: absolute; top: -10%; bottom: -5%; left: 50%; width: 100vw; translate: -50% 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; opacity: var(--aurora); animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46vmax; height: 46vmax; left: 38%; top: -18%; background: radial-gradient(closest-side, rgba(240, 178, 107, .75), transparent); }
.aurora i:nth-child(2) { width: 38vmax; height: 38vmax; left: 62%; top: 22%; background: radial-gradient(closest-side, rgba(234, 160, 140, .55), transparent); animation-duration: 28s; animation-delay: -9s; }
.aurora i:nth-child(3) { width: 34vmax; height: 34vmax; left: 8%; top: 30%; background: radial-gradient(closest-side, rgba(247, 207, 176, .6), transparent); animation-duration: 25s; animation-delay: -4s; }
.p-web .aurora i:nth-child(3), .p-home .aurora i:nth-child(3) { background: radial-gradient(closest-side, rgba(120, 170, 150, .32), transparent); }
@keyframes drift { to { transform: translate3d(-6%, 8%, 0) scale(1.08); } }

.hero { padding-block: var(--space-6) var(--space-5); }
.hero3d { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-4); align-items: center; padding-block: var(--space-5) var(--space-4); }
.hero3d .lead { max-width: 34rem; }
@media (max-width: 900px) { .hero3d { grid-template-columns: 1fr; gap: var(--space-2); padding-top: var(--space-4); } }

/* ---------- 3D stage ---------- */
.stage { --px: 0; --py: 0; --scroll: 0; --k: .92; position: relative; height: 500px; perspective: 1100px; perspective-origin: 50% 35%; overflow: clip; }
.scene {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: scale(var(--k)) rotateX(calc(16deg - var(--py) * 7deg + var(--scroll) * 22deg)) rotateY(calc(-14deg + var(--px) * 12deg));
}
.scene > * { position: absolute; left: 50%; top: 50%; }
.floor {
  width: 820px; height: 820px; margin: -410px 0 0 -410px; transform: translateY(165px) rotateX(90deg);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 41px 41px;
  -webkit-mask-image: radial-gradient(closest-side, #000 28%, transparent); mask-image: radial-gradient(closest-side, #000 28%, transparent);
}
.halo {
  width: 520px; height: 520px; margin: -260px 0 0 -260px; transform: translateY(164px) rotateX(90deg); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 178, 107, .55), rgba(234, 160, 140, .18) 55%, transparent 72%);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .6; } }
.sheet {
  width: 190px; height: 250px; margin: -125px 0 0 -95px; padding: 16px 15px;
  display: flex; flex-direction: column; gap: 7px;
  background: linear-gradient(180deg, var(--sheet-a), var(--sheet-b)); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: .68rem; line-height: 1.3; color: var(--muted); font-family: var(--mono);
  animation: float 7s ease-in-out infinite;
}
.sheet b { color: var(--ink); font-family: var(--font); font-size: .78rem; letter-spacing: .14em; }
.sheet i { display: block; height: 6px; border-radius: 3px; background: var(--sheet-line); }
.sheet i.short { width: 58%; }
.sheet .sum { margin-top: auto; display: flex; justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.sheet .chip-s { align-self: flex-start; font-family: var(--font); font-size: .62rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.chip-ok { background: var(--teal-tint); color: var(--teal-ink); }
.chip-warn { background: var(--warn-bg); color: var(--warn-ink); }
.s1 { transform: translate3d(-150px, -40px, -130px) rotateZ(-7deg); animation-delay: -1s; }
.s2 { transform: translate3d(-20px, 5px, 0) rotateZ(2deg); animation-delay: -3s; }
.s3 { transform: translate3d(110px, -70px, 100px) rotateZ(8deg); animation-delay: -5s; }
.stage-solo .s1 { transform: translate3d(-120px, -30px, -110px) rotateZ(-7deg); }
.stage-solo .s3 { transform: translate3d(120px, -60px, 90px) rotateZ(8deg); }
.stamp {
  transform: translate3d(10px, 95px, 170px) rotateZ(-8deg);
  padding: .5rem 1rem; border-radius: 999px; color: var(--on-accent); font-weight: 600; font-size: .86rem; white-space: nowrap;
  background: linear-gradient(120deg, var(--copper), #c9692f); box-shadow: 0 14px 34px -10px rgba(180, 83, 42, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: float 6s ease-in-out -2s infinite;
}
.bubble {
  width: max-content; max-width: 200px; padding: .55rem .85rem;
  background: var(--bubble-bg); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px;
  font-size: .78rem; line-height: 1.35; color: var(--ink); box-shadow: var(--shadow-lg);
  animation: float 8s ease-in-out infinite;
}
.bubble.me { background: linear-gradient(135deg, var(--teal), var(--teal-ink)); border-color: transparent; color: var(--on-accent); border-radius: 16px 16px 4px 16px; }
.b1 { transform: translate3d(-260px, 105px, 70px); animation-delay: -2s; }
.b2 { transform: translate3d(0px, 160px, 120px); animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -12px; } }
/* Webs page: a browser window and a phone showing a small local-business site. */
.win, .phone { background: linear-gradient(180deg, var(--sheet-a), var(--sheet-b)); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: float 7s ease-in-out infinite; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.win { width: 300px; height: 220px; margin: -110px 0 0 -150px; border-radius: 12px; padding: 0 0 14px; transform: translate3d(-70px, -40px, -60px) rotateZ(-3deg); }
.win .bar { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .62rem; }
.win .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.win .bar span { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); }
.win b, .phone b { padding-inline: 14px; color: var(--ink); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.35rem; line-height: 1.1; }
.win .ln, .phone .ln { display: block; height: 6px; margin-inline: 14px; border-radius: 3px; background: var(--sheet-line); }
.win .ln.short, .phone .ln.short { width: 45%; }
.win .cta-row { display: flex; gap: 6px; padding-inline: 14px; margin-top: auto; }
.win .cta-row span, .phone .cta-row span { font-size: .62rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--teal); color: var(--on-accent); }
.win .cta-row span + span, .phone .cta-row span + span { background: var(--teal-tint); color: var(--teal-ink); }
.phone { width: 130px; height: 250px; margin: -125px 0 0 -65px; border-radius: 22px; padding: 22px 0 14px; border-width: 5px; border-color: var(--phone-border); transform: translate3d(130px, 10px, 90px) rotateZ(6deg); animation-delay: -3s; }
.phone b { font-size: 1.05rem; }
.phone .cta-row { display: flex; flex-direction: column; gap: 5px; padding-inline: 12px; margin-top: auto; }
.phone .cta-row span { text-align: center; }
.stage-web .stamp { transform: translate3d(-90px, 165px, 170px) rotateZ(-6deg); background: linear-gradient(120deg, var(--teal-ink), var(--teal)); box-shadow: 0 14px 34px -10px rgba(39, 107, 91, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }

@media (max-width: 900px) { .stage { height: 380px; --k: .82; } }
@media (max-width: 520px) { .stage { height: 330px; --k: .64; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-5); position: relative; }
.section-tint { background: radial-gradient(60rem 30rem at 85% 0%, var(--tint-glow), transparent 70%), var(--tint); }
.section > h2, .section .wrap > h2 { margin-top: 0; }
.label { margin-top: var(--space-3); font-weight: 600; font-size: .95rem; }
.subhead { margin-top: var(--space-4); margin-bottom: var(--space-1); }

/* Glass surface with a gradient edge that turns on hover. */
.glass, .card3d, .tile, .pipeline li, .price {
  /* Two padding-box layers (soft white over an opaque base) so the edge gradient never shows through the inside. */
  background:
    linear-gradient(160deg, var(--glass-hi), var(--glass-lo)) padding-box,
    linear-gradient(var(--paper), var(--paper)) padding-box,
    conic-gradient(from var(--angle, 0deg), var(--edge), var(--amber), var(--edge) 35%, var(--edge) 65%, var(--rose), var(--edge)) border-box;
  border: 1px solid transparent;
}
.card3d:hover, .tile:hover, .pipeline li:hover, .price:hover { animation: edge 4s linear infinite; }
@keyframes edge { to { --angle: 360deg; } }

/* ---------- Product cards (tilt + spotlight) ---------- */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-3); }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }
.card3d {
  --tilt-x: 0deg; --tilt-y: 0deg; --gx: 50%; --gy: 0%;
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition-property: transform, box-shadow; transition-duration: 350ms; transition-timing-function: var(--ease);
}
.card3d:hover { box-shadow: var(--shadow-lg); }
.card3d::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--c), var(--amber)); }
.card3d::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 300ms ease-out;
  background: radial-gradient(420px circle at var(--gx) var(--gy), var(--glow), transparent 65%);
}
.card3d:hover::after { opacity: 1; }
.card-facturas { --c: var(--copper); --c-ink: var(--copper-ink); --btn: var(--copper-ink); --glow: rgba(240, 178, 107, .2); }
.card-web { --c: var(--teal); --btn: var(--teal); --glow: rgba(120, 170, 150, .18); }
.card3d .for { font-weight: 600; font-size: .95rem; color: var(--c-ink, var(--c)); }
.card3d h3 { font-size: clamp(2rem, 3.6vw, 2.6rem); font-weight: 500; letter-spacing: -0.03em; }
.card3d h3 em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--c); }
.card3d p { color: var(--muted); }
.card3d .plain { color: var(--ink); }
.card3d .status {
  align-self: flex-start; margin-bottom: -.5rem; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-ink, var(--c)); background: var(--chip-bg-strong); border: 1px solid var(--line); padding: .25rem .65rem; border-radius: 999px;
}
.card3d .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); animation: blink 2.4s ease-in-out 3; }
@keyframes blink { 50% { opacity: .35; } }
.card-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin-top: auto; padding-top: var(--space-2); }
.card3d .btn-primary { --accent: var(--c); --accent-ink: var(--c); }
.card3d .btn-primary:hover { filter: brightness(.92); }
.card3d .text-link { color: var(--c-ink, var(--c)); }

/* ---------- Service catalog (grouped by audience) ---------- */
.section-lead { max-width: var(--measure); color: var(--muted); margin-top: var(--space-1); }
.catalog { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-3); margin-top: var(--space-3); align-items: start; }
@media (max-width: 860px) { .catalog { grid-template-columns: 1fr; } }
.audience { min-width: 0; }
.audience-t { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; font-weight: 600; margin-bottom: var(--space-2); }
.audience-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--d, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--d, var(--accent)) 18%, transparent); }
.svc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.audience:first-child .svc-list { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .audience:first-child .svc-list { grid-template-columns: 1fr; } }
.svc {
  --tilt-x: 0deg; --tilt-y: 0deg; --gx: 50%; --gy: 0%;
  position: relative; display: flex; flex-direction: column; gap: .5rem;
  padding: var(--space-3); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition-property: transform, box-shadow; transition-duration: 300ms; transition-timing-function: var(--ease);
}
.svc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 300ms ease-out; background: radial-gradient(260px circle at var(--gx) var(--gy), color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%); }
.svc:hover::after { opacity: 1; }
.svc:hover { box-shadow: var(--shadow-lg); }
.svc h4 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.svc p { color: var(--muted); font-size: .96rem; text-wrap: pretty; }
.svc-tag { align-self: flex-start; font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--copper-ink); background: var(--chip-bg-strong); border: 1px solid var(--line); padding: .22rem .6rem; border-radius: 999px; }
.svc-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem var(--space-2); margin-top: auto; padding-top: .4rem; }
.svc-pick {
  display: inline-flex; align-items: center; min-height: 40px; padding: .4rem 1rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: filter 150ms ease-out, translate 150ms var(--ease);
}
.svc-pick:hover { filter: brightness(.92); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .svc-pick:hover { translate: 0 -2px; } .svc:hover { box-shadow: var(--shadow-lg), 0 18px 42px -26px var(--accent); } }

/* ---------- Grids and tiles ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-3); }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; gap: var(--space-2); } }
.tile {
  --tilt-x: 0deg; --tilt-y: 0deg; --gx: 50%; --gy: 0%;
  position: relative; padding: var(--space-3); border-radius: var(--radius); box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition-property: translate, box-shadow, transform; transition-duration: 300ms; transition-timing-function: var(--ease);
}
/* Light that follows the pointer across the tile (main.js feeds --gx/--gy). */
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 300ms ease-out;
  background: radial-gradient(240px circle at var(--gx) var(--gy), color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
}
.tile:hover::after { opacity: 1; }
.tile:hover { translate: 0 -3px; box-shadow: var(--shadow-lg); }
.tile h3 { margin-bottom: .35rem; }
.tile p { color: var(--muted); font-size: .98rem; }
.tile .mark {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-bottom: var(--space-2); border-radius: 50%;
  font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--accent-ink);
  background: radial-gradient(circle at 30% 30%, var(--mark-hi), var(--copper-tint));
  box-shadow: inset 0 0 0 1px var(--line);
}
.p-web .pipeline li::before { background: linear-gradient(135deg, var(--teal-ink), var(--teal)); box-shadow: 0 8px 18px -8px rgba(39, 107, 91, .7); }
.p-web .tile .mark { background: radial-gradient(circle at 30% 30%, var(--mark-hi), var(--teal-tint)); }

/* ---------- Shared lists ---------- */
.steps { list-style: none; padding: 0; margin-block: var(--space-3); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--space-1); padding-block: var(--space-2); border-top: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font-family: var(--mono); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps p { color: var(--muted); }
.plain { padding-left: 1.2rem; }
.plain li + li { margin-top: .35rem; }
.plain li::marker { color: var(--accent); }

/* ---------- Invoice pipeline ---------- */
.pipeline { list-style: none; padding: 0; margin-top: var(--space-4); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); perspective: 1200px; counter-reset: pipe; }
.pipeline li {
  counter-increment: pipe; position: relative; padding: var(--space-3) var(--space-2); border-radius: var(--radius); box-shadow: var(--shadow);
  transform: rotateY(-4deg) rotateX(2deg);
  transition-property: transform, box-shadow; transition-duration: 400ms; transition-timing-function: var(--ease);
}
.pipeline li:hover { transform: rotateY(0) rotateX(0) translateZ(30px); box-shadow: var(--shadow-lg); }
.pipeline li::before {
  content: counter(pipe, decimal-leading-zero); display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; margin-bottom: var(--space-1);
  font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--on-accent);
  background: linear-gradient(135deg, var(--copper-ink), var(--copper)); box-shadow: 0 8px 18px -8px rgba(180, 83, 42, .7);
}
.pipeline li:not(:last-child)::after { content: "→"; position: absolute; left: 100%; margin-left: calc(var(--space-3) / 2); top: 50%; translate: -50% -50%; color: var(--accent); font-size: 1.2rem; }
/* Earlier steps sit above later ones so each arrow stays visible over the next tilted card. */
.pipeline li:nth-child(1) { z-index: 4; } .pipeline li:nth-child(2) { z-index: 3; } .pipeline li:nth-child(3) { z-index: 2; } .pipeline li:nth-child(4) { z-index: 1; }
.pipeline li:hover { z-index: 5; }
.pipeline h3 { margin-bottom: .3rem; }
.pipeline p { color: var(--muted); font-size: .95rem; }
.pipeline .mini { margin-top: var(--space-2); padding: .5rem .65rem; border-radius: 8px; background: var(--tint); font-family: var(--mono); font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--ink); }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr 1fr; } .pipeline li { transform: none; } .pipeline li::after { display: none; } }
@media (max-width: 520px) { .pipeline { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); margin-top: var(--space-3); max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-2) 2.5rem var(--space-2) 0; position: relative; font-weight: 600; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: calc(var(--space-2) - .1rem); display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  border: 1px solid var(--line); color: var(--accent); font-weight: 400; font-size: 1.1rem; line-height: 1; transition: rotate 250ms var(--ease), background-color 200ms;
}
.faq details[open] summary::after { rotate: 45deg; background: var(--paper); }
.faq details p { padding-bottom: var(--space-2); color: var(--muted); }
.more { margin-top: var(--space-3); font-size: .95rem; color: var(--muted); }

/* ---------- Form ---------- */
.form-wrap { max-width: 36rem; }
.form { margin-top: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (max-width: 520px) { .form { padding: var(--space-3) var(--space-2); } }
.form-hint { font-size: .9rem; color: var(--muted); margin-bottom: var(--space-2); }
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); min-height: 50px;
  border: 1px solid var(--field); border-radius: 12px; padding: .65rem .9rem;
  transition-property: border-color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out;
}
.field textarea { min-height: 5.5rem; resize: vertical; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.field input[aria-invalid="true"] { border-color: var(--error); }

/* Checkboxes: service choices + privacy consent */
.svc-field { border: 0; margin: 0 0 var(--space-2); padding: 0; min-inline-size: 0; }
.svc-field legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: .4rem; }
.svc-group-label { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: var(--space-2) 0 .35rem; }
.svc-group-label:first-of-type { margin-top: 0; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--field); border-radius: 12px; margin-bottom: .4rem; cursor: pointer; min-height: 44px; transition: border-color 150ms ease-out, background-color 150ms ease-out; }
.check:hover { border-color: var(--accent); }
.check:has(input:checked) { border-color: var(--accent); background: var(--tint); }
.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .14rem; accent-color: var(--accent); }
.check span { flex: 1; font-size: .96rem; line-height: 1.45; text-wrap: pretty; }
.check-field { margin-top: var(--space-2); }
.check-field .check { background: var(--paper); }
.field-error { color: var(--error); font-size: .9rem; margin-top: .3rem; }
.field-error:empty { display: none; }
.form-optional { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; margin-top: var(--space-1); }
.form-status { margin-top: var(--space-2); font-weight: 600; }
.form-status:empty { margin-top: 0; }
.form-status.ok { color: var(--teal-ink); }
.form-status.err { color: var(--error); }
.form .small { margin-top: var(--space-2); }

/* ---------- Footer: espresso band ---------- */
.footer { margin-top: 0; padding-block: var(--space-5) var(--space-4); background: radial-gradient(50rem 20rem at 10% 0%, rgba(180, 83, 42, .28), transparent 70%), var(--footer-bg); border-top: 1px solid var(--footer-border); color: #efe2d3; }
.footer-inner { display: grid; gap: var(--space-2); }
.footer .brand { color: #fff; font-size: 1.2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: .5rem var(--space-3); font-size: .95rem; }
.footer a { color: #f5d3ad; }
.footer nav a { padding-block: .2rem; }
.footer .small { color: #cdbaa8; }
.footer :focus-visible { outline-color: var(--amber); }

/* ---------- Extra depth and hover polish (motion-safe, hover-capable devices only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Reading progress: a thin gradient line along the top, driven by the scroll position (no JS). */
  @supports (animation-timeline: scroll()) {
    html::after {
      content: ""; position: fixed; inset: 0 0 auto; height: 3px; z-index: 101; pointer-events: none;
      background: linear-gradient(90deg, var(--copper), var(--amber), var(--teal)); transform: scaleX(0); transform-origin: left;
      animation: progress linear both; animation-timeline: scroll(root);
    }
    @keyframes progress { to { transform: scaleX(1); } }
    /* Nav condenses into a tighter pill over the first stretch of scroll (no JS). */
    .nav-inner {
      animation: nav-condense linear both; animation-timeline: scroll(root); animation-range: 0 140px;
    }
    @keyframes nav-condense {
      to { height: calc(var(--nav-h) - 8px); box-shadow: 0 10px 26px -14px rgba(83, 46, 24, .5); border-color: var(--field); }
    }
  }
  .stage .sheet, .stage .win, .stage .phone, .stage .bubble, .stage .stamp { transition: transform 600ms var(--ease); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* A light sweep crosses the big primary buttons on hover. */
  .btn-primary:not(.btn-small) { position: relative; overflow: hidden; isolation: isolate; }
  .btn-primary:not(.btn-small)::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 48%, transparent 66%);
    translate: -140% 0; transition: translate 650ms var(--ease);
  }
  .btn-primary:not(.btn-small):hover::before { translate: 140% 0; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* The hero scene "explodes" a little: pieces slide apart in depth when you hover it. */
  .stage:hover .s1 { transform: translate3d(-190px, -55px, -190px) rotateZ(-9deg); }
  .stage:hover .s2 { transform: translate3d(-20px, 5px, 30px) rotateZ(1deg); }
  .stage:hover .s3 { transform: translate3d(150px, -85px, 190px) rotateZ(10deg); }
  .stage-solo:hover .s1 { transform: translate3d(-160px, -40px, -170px) rotateZ(-9deg); }
  .stage-solo:hover .s3 { transform: translate3d(160px, -75px, 170px) rotateZ(10deg); }
  .stage:hover .stamp { transform: translate3d(10px, 105px, 240px) rotateZ(-6deg); }
  .stage-web:hover .stamp { transform: translate3d(-90px, 175px, 240px) rotateZ(-4deg); }
  .stage:hover .b1 { transform: translate3d(-285px, 100px, 130px); }
  .stage:hover .b2 { transform: translate3d(0px, 168px, 190px); }
  .stage:hover .win { transform: translate3d(-110px, -50px, -110px) rotateZ(-4deg); }
  .stage:hover .phone { transform: translate3d(160px, 5px, 160px) rotateZ(8deg); }
  /* Cards and tiles lift on a glow that matches their product colour. */
  .card3d:hover { box-shadow: var(--shadow-lg), 0 24px 60px -30px var(--c); }
  .tile:hover { box-shadow: var(--shadow-lg), 0 20px 46px -28px var(--accent); }
  .tile:hover .mark { scale: 1.12; rotate: -6deg; }
  .tile .mark { transition: scale 300ms var(--ease), rotate 300ms var(--ease); }
  .footer nav a { transition: translate 200ms var(--ease), color 150ms; }
  .footer nav a:hover { translate: 0 -2px; color: #fff; }
}

/* ---------- Reveal on scroll ----------
   A one-shot animation (fill: backwards), so once it ends the element's own transition,
   hover translate and 3D transform apply untouched. Uses `translate`, never `transform`.
   Without .js-live (main.js never ran) a timed animation shows everything after 2.5 s. */
.js .reveal { opacity: 0; }
.js:not(.js-live) .reveal { animation: reveal-fallback 0s 2.5s forwards; }
.js .reveal.in { opacity: 1; animation: reveal-in 800ms var(--ease) backwards; }
.js .reveal.in.d1 { animation-delay: 90ms; } .js .reveal.in.d2 { animation-delay: 180ms; } .js .reveal.in.d3 { animation-delay: 270ms; }
@keyframes reveal-in { from { opacity: 0; translate: 0 22px; } }
@keyframes reveal-fallback { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .btn:active { transform: none; }
  .js .reveal { opacity: 1; }
  .pipeline li:hover { transform: rotateY(-4deg) rotateX(2deg); }
  .tile:hover { translate: none; }
}
