/* ==========================================================================
   Ditaen - portafolio v2 - styles.css
   Dark brand system: near-black green, neon green #5CFF66, off-white.
   Display: Hagrid (local files) -> Young Serif fallback. Body: DM Sans.
   Mobile-first. Native scroll. Reduced-motion gates only intrusive motion.
   ========================================================================== */

/* ---------- Fonts (Hagrid: coloca los archivos en assets/fonts/, ver LEEME.txt) ---------- */
@font-face {
  font-family: "Hagrid";
  src: url("assets/fonts/Hagrid-Regular.woff2") format("woff2"),
       url("assets/fonts/Hagrid-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hagrid";
  src: url("assets/fonts/Hagrid-Bold.woff2") format("woff2"),
       url("assets/fonts/Hagrid-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #070C09;
  --bg-2: #0B120E;
  --surface: #0F1913;
  --surface-2: #142219;
  --ink: #F2F1EA;
  --ink-2: #C7CBC3;
  --muted: #8C958D;
  --green: #5CFF66;
  --green-2: #3BE24C;
  --green-ink: #06110A;
  --green-glow: rgba(92, 255, 102, .35);
  --line: rgba(242, 241, 234, .10);
  --line-strong: rgba(242, 241, 234, .22);
  --wa: #25D366;

  --font-display: "Hagrid", "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --radius: 22px;
  --radius-sm: 14px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  --step--1: clamp(.8rem, .78rem + .1vw, .875rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.05rem + .5vw, 1.45rem);
  --step-2: clamp(1.55rem, 1.25rem + 1.4vw, 2.3rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 3.8rem);
  --step-4: clamp(2.7rem, 1.6rem + 5.4vw, 6rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--green); color: var(--green-ink); }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }

/* ---------- Type ---------- */
.display { font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: -.01em; }
.display em { font-style: normal; color: var(--green); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--green); }
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: 36ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 999px;
  font-weight: 600; font-size: var(--step-0); line-height: 1; white-space: nowrap;
  transition: transform .35s var(--ease-out), background .25s, color .25s, box-shadow .35s var(--ease-out), border-color .25s;
  will-change: transform;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-wa { background: var(--green); color: var(--green-ink); box-shadow: 0 10px 34px -12px var(--green-glow); }
.btn-wa:hover { background: #7BFF83; transform: translateY(-2px); box-shadow: 0 18px 40px -14px var(--green-glow); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }
.btn-lg { padding: 18px 28px; font-size: var(--step-1); }
.btn-sm { padding: 12px 16px; font-size: var(--step--1); }

/* ---------- Intro: TT liquido se convierte en el isotipo, sobre blanco puro ---------- */
.intro { display: none; }
html.js:not(.no-intro) .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: #FFFFFF;
  transition: transform .85s var(--ease-in-out), visibility 0s .85s;
}
html.intro-done .intro { transform: translateY(-100%); visibility: hidden; }
html.no-intro .intro { display: none !important; }
.intro-video { width: min(100%, 1100px); max-height: 76vh; object-fit: contain; background: #FFFFFF; }
.intro-brand { position: absolute; left: 50%; bottom: clamp(34px, 8vh, 72px); transform: translate(-50%, 10px); width: clamp(110px, 13vw, 170px); opacity: 0; transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
.intro.is-branded .intro-brand { opacity: 1; transform: translate(-50%, 0); }
.intro-hint { position: absolute; left: 50%; bottom: clamp(12px, 3vh, 26px); transform: translateX(-50%); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(7,12,9,.4); white-space: nowrap; }
.intro-bar { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: rgba(7,12,9,.06); }
.intro-bar i { display: block; height: 100%; width: 0; background: var(--green); animation: intro-load 6s linear forwards; }
@keyframes intro-load { to { width: 100%; } }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.nav.is-scrolled { background: rgba(7, 12, 9, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; }
.brand .brand-iso { height: 24px; }
.nav-links { display: none; gap: 30px; }
.nav-links a { position: relative; font-size: var(--step--1); letter-spacing: .04em; font-weight: 500; color: var(--ink-2); padding: 6px 0; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease-out); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-burger { display: inline-flex; flex-direction: column; gap: 5px; padding: 10px; margin-right: -10px; position: relative; z-index: 60; }
.nav-burger span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .2s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease-out), visibility 0s .35s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease-out); }
.menu .menu-link { font-family: var(--font-display); font-size: clamp(2.4rem, 10vw, 3.8rem); line-height: 1.1; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu .menu-link:hover { color: var(--green); }
.menu .btn { margin-top: 32px; align-self: flex-start; }
body.menu-open { overflow: hidden; }
@media (min-width: 900px) { .nav-links, .nav-cta { display: inline-flex; } .nav-burger, .menu { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(76px + clamp(36px, 7vw, 90px)); padding-bottom: clamp(56px, 8vw, 110px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,12,9,.35) 0%, rgba(7,12,9,.7) 55%, var(--bg) 100%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; }
.aurora.a1 { width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; right: -18vw; top: -22vw; background: radial-gradient(closest-side, rgba(92,255,102,.45), transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.aurora.a2 { width: 40vw; height: 40vw; max-width: 520px; max-height: 520px; left: -14vw; bottom: -10vw; background: radial-gradient(closest-side, rgba(59,226,76,.25), transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6%, 8%) scale(1.12); } }
.hero-grid { position: relative; display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-4); max-width: 11ch; margin-top: 22px; }
.hero .lede { margin-top: 22px; }
.hero-lines { margin-top: 26px; display: grid; gap: 8px; }
.hero-lines li { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }
.hero-lines li::before { content: ""; width: 34px; height: 1px; background: var(--green); flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-visual { position: relative; max-width: 520px; margin-inline: auto; width: 100%; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(92,255,102,.08), 0 30px 120px -50px var(--green-glow); background: var(--surface); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,12,9,.85) 100%); }
.chip { position: absolute; left: 18px; bottom: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: rgba(7,12,9,.72); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); font-size: var(--step--1); font-weight: 500; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green-glow); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--green-glow); } 100% { box-shadow: 0 0 0 12px rgba(92,255,102,0); } }

/* TT decorative forms */
.tt { position: absolute; pointer-events: none; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); will-change: transform; }
.tt-hero { top: -12%; right: -18%; width: 72%; z-index: 4; animation: float 7s ease-in-out infinite; }
.tt-video {
  filter: contrast(1.14) brightness(1.02); mix-blend-mode: screen; aspect-ratio: 1 / 1; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%);
}
.tt-works { top: -40px; right: 0; width: clamp(110px, 16vw, 200px); z-index: 0; animation: float 8s ease-in-out infinite; opacity: .95; }
.tt-services { right: -4%; top: -60px; width: clamp(120px, 18vw, 230px); animation: float 9s ease-in-out infinite reverse; }
.tt-statement { left: -2%; bottom: 18px; width: clamp(110px, 16vw, 210px); animation: float 8.5s ease-in-out infinite; }
@media (max-width: 639px) {
  /* Telefono: menos adornos, tipografia mas fina y brillos de marca en las tarjetas */
  .tt-services, .tt-process { display: none; }
  .tt-works { width: 84px; top: -26px; opacity: .85; }
  .tt-statement { width: 84px; opacity: .7; }
  .kicker { font-size: .68rem; letter-spacing: .12em; }
  .kicker::before { width: 16px; }
  .hero h1 { letter-spacing: -.02em; line-height: .98; }
  .hero-lines li { font-size: 1.05rem; }
  .marquee-track span { font-size: 1.15rem; gap: 18px; padding-right: 18px; }
  .marquee-track span img { width: 18px; }
  .head h2 { letter-spacing: -.015em; }
  .service, .step, .ia-card, .stat, .work-cta { box-shadow: 0 24px 60px -34px rgba(92,255,102,.35); }
  .service p, .step p { font-size: .92rem; }
  .work-title { font-size: 1.35rem; }
  .work-title small { font-size: .66rem; }
  .tags li { font-size: .7rem; padding: 6px 10px; }
  .stat b { font-size: 2.2rem; }
  .stat span { font-size: .68rem; }
  .contact h2 { letter-spacing: -.02em; }
}
.tt-contact { right: 2%; top: 8%; width: clamp(140px, 22vw, 300px); animation: float 7.5s ease-in-out infinite reverse; }
.tt-process { left: 55%; top: -50px; width: clamp(110px, 15vw, 190px); animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
  .hero h1 { margin-top: 26px; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 16px 0; overflow: hidden; background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 26px; padding-right: 26px; font-family: var(--font-display); font-size: var(--step-2); white-space: nowrap; color: var(--ink); }
.marquee-track span img { width: 26px; height: auto; opacity: .9; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.head { display: grid; gap: 16px; margin-bottom: clamp(36px, 6vw, 72px); position: relative; z-index: 1; }
.head h2 { font-size: var(--step-3); max-width: 18ch; margin-top: 14px; }
.head p { color: var(--ink-2); max-width: 46ch; }
@media (min-width: 900px) { .head { grid-template-columns: 1.2fr .8fr; align-items: end; } .head p { justify-self: end; margin-bottom: 8px; } }

/* ---------- Statement / about ---------- */
.statement { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); z-index: 2; }
.statement h2 { font-size: var(--step-3); max-width: 22ch; margin-top: 16px; }
.statement-grid { display: grid; gap: 32px; margin-top: clamp(32px, 5vw, 56px); }
.statement-body { display: grid; gap: 16px; color: var(--ink-2); max-width: 56ch; font-size: var(--step-0); }
.statement-body strong { color: var(--ink); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: start; }
.stat { padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(15,25,19,.6); }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); line-height: 1; color: var(--green); }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: var(--step--1); letter-spacing: .06em; text-transform: uppercase; }
@media (min-width: 900px) { .statement-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }

/* ---------- Works (accordion) ---------- */
.works { position: relative; }
.work-list { display: grid; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.work { border-bottom: 1px solid var(--line); }
.work-toggle { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 24px 0; text-align: left; transition: padding-left .4s var(--ease-out); }
.work-toggle:hover { padding-left: 8px; }
.work-num { font-family: var(--font-display); font-size: var(--step-1); color: var(--muted); }
.work-title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.05; display: grid; gap: 6px; }
.work-title small { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.work.is-open .work-title { color: var(--green); }
.work-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: transform .5s var(--ease-out), background .25s, border-color .25s; }
.work-arrow::before { content: ""; width: 10px; height: 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
.work.is-open .work-arrow { transform: rotate(180deg); background: var(--green); border-color: var(--green); color: var(--green-ink); }
.work-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.work.is-open .work-body { grid-template-rows: 1fr; }
html.no-js .work-body { grid-template-rows: 1fr; }
.work-inner { overflow: hidden; }
.work-content { display: grid; gap: 22px; padding: 6px 0 36px; }
.work-info { display: grid; gap: 14px; align-content: start; }
.work-info p { color: var(--ink-2); max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tags li { font-size: .78rem; letter-spacing: .04em; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
@media (min-width: 900px) { .work-content { grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 64px); align-items: start; } .work-toggle { gap: 28px; padding: 28px 0; } }

.work-media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; }
.media-stack { aspect-ratio: 4 / 3; }
.media-stack .shot-desk { position: absolute; inset: 9% auto auto 6%; width: 72%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(0,0,0,.9); background: #0b0b0b; }
.media-stack .shot-phone { position: absolute; right: 7%; bottom: -6%; width: 27%; aspect-ratio: 9 / 19; border-radius: 26px; border: 5px solid #0b0b0b; overflow: hidden; box-shadow: 0 40px 70px -28px rgba(0,0,0,.9); background: #0b0b0b; }
.media-stack .shot-phone img { border-radius: 20px; object-position: top; }
.media-stack .shot-desk img { object-position: top; }
.media-split { aspect-ratio: 4 / 3; display: grid; grid-template-columns: 1.1fr .9fr; gap: 10px; padding: 10px; }
.media-split > div { border-radius: 14px; overflow: hidden; background: #1a1a1a; }
.media-stories { aspect-ratio: 4 / 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; align-items: center; }
.media-stories > div { border-radius: 14px; overflow: hidden; aspect-ratio: 9 / 16; box-shadow: 0 20px 40px -24px rgba(0,0,0,.8); }
.media-stories > div:nth-child(2) { transform: translateY(-4%) scale(1.04); z-index: 2; }
.media-pairs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
.pair { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 5; }
.pair .before { position: absolute; left: 8px; top: 8px; width: 34%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.6); z-index: 2; }
.pair .before::after { content: "Foto de la clienta"; position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; font-size: .55rem; line-height: 1.1; text-align: center; background: rgba(7,12,9,.85); color: var(--ink); letter-spacing: .04em; }
.pair .after-label { position: absolute; right: 8px; bottom: 8px; z-index: 2; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--green); color: var(--green-ink); font-weight: 700; }
.media-pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
.media-pages > div { border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: #1a1a1a; }
.media-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
.media-videos > div { border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: #000; position: relative; }
.media-videos .ia-tag { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: rgba(7,12,9,.8); border: 1px solid var(--line-strong); }
@media (max-width: 599px) {
  .media-pairs, .media-pages, .media-videos { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px; }
  .pair .before::after { display: none; }
}

.work-cta { margin-top: clamp(40px, 7vw, 80px); padding: clamp(26px, 5vw, 52px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 22px; position: relative; overflow: hidden; }
.work-cta::before { content: ""; position: absolute; right: -10%; top: -60%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(92,255,102,.22), transparent 70%); pointer-events: none; }
.work-cta h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.05; max-width: 22ch; position: relative; }
.work-cta p { color: var(--ink-2); max-width: 46ch; position: relative; }
@media (min-width: 900px) { .work-cta { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Services ---------- */
.services-grid { display: grid; gap: 12px; position: relative; z-index: 1; }
.service {
  position: relative; padding: 26px 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15,25,19,.55);
  display: grid; gap: 14px; align-content: start; overflow: hidden;
  transition: border-color .3s, transform .5s var(--ease-out), background .3s;
}
.service::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at var(--mx, 50%) var(--my, 0%), rgba(92,255,102,.12), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.service:hover { border-color: rgba(92,255,102,.45); transform: translateY(-4px); background: rgba(20,34,25,.8); }
.service:hover::after { opacity: 1; }
.service-icon { width: 64px; height: 64px; display: grid; place-items: center; }
.service-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); transition: transform .6s var(--ease-back); }
.service:hover .service-icon img { transform: translateY(-6px) rotate(-6deg) scale(1.08); }
.service h3 { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.1; }
.service p { color: var(--ink-2); font-size: var(--step--1); line-height: 1.5; }
.service small { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.services-note { margin-top: 22px; color: var(--muted); font-size: var(--step--1); }

/* ---------- Brillos de marca en el fondo de las secciones ---------- */
.glow-tr::before, .glow-bl::before {
  content: ""; position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(92,255,102,.14), transparent 70%); filter: blur(30px); pointer-events: none; z-index: 0;
}
.glow-tr::before { right: -25vw; top: -20vw; }
.glow-bl::before { left: -28vw; bottom: -22vw; }
.glow-tr > .wrap, .glow-bl > .wrap { position: relative; z-index: 1; }

/* ---------- IA: automatizaciones y creatividad ---------- */
.ia-grid { display: grid; gap: 14px; }
.ia-card {
  position: relative; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20,34,25,.85), rgba(15,25,19,.6)); display: grid; gap: 14px; align-content: start; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(92,255,102,.22);
  transition: border-color .3s, transform .5s var(--ease-out);
}
.ia-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 260px at var(--mx, 50%) var(--my, 0%), rgba(92,255,102,.12), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.ia-card:hover { border-color: rgba(92,255,102,.45); transform: translateY(-4px); }
.ia-card:hover::after { opacity: 1; }
.ia-icon { width: 96px; height: 96px; display: grid; place-items: center; }
.ia-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 26px rgba(0,0,0,.65)); animation: float 7s ease-in-out infinite; }
.ia-card small { color: var(--green); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.ia-card h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.08; max-width: 18ch; }
.ia-card p { color: var(--ink-2); max-width: 52ch; }
.ia-list { display: grid; gap: 10px; margin-top: 6px; }
.ia-list li { position: relative; padding-left: 22px; color: var(--ink); font-size: var(--step--1); font-weight: 500; }
.ia-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green-glow); }
.ia-video { margin-top: 10px; border-radius: 16px; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; border: 1px solid rgba(255,255,255,.35); }
.ia-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) { .ia-grid { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }

/* ---------- Marcas ---------- */
.brands { background: var(--bg-2); }
.brand-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; position: relative; z-index: 1; }
.brand-item {
  min-height: 92px; display: grid; place-items: center; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(7,12,9,.5); transition: border-color .3s, transform .5s var(--ease-out), background .3s;
}
.brand-item:hover { border-color: rgba(92,255,102,.45); transform: translateY(-3px); background: rgba(15,25,19,.8); }
.brand-item img { max-width: 130px; max-height: 40px; width: auto; height: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .92; }
.brand-text { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); color: var(--ink); opacity: .92; letter-spacing: .01em; text-align: center; }
@media (min-width: 640px) { .brand-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .brand-row { grid-template-columns: repeat(4, 1fr); gap: 14px; } .brand-item img { max-width: 150px; max-height: 44px; } }

/* ---------- Process ---------- */
.process { background: var(--bg-2); }
.steps { display: grid; gap: 12px; position: relative; z-index: 1; }
.step { padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,12,9,.5); display: grid; gap: 12px; transition: border-color .3s, transform .5s var(--ease-out); }
.step:hover { border-color: rgba(92,255,102,.4); transform: translateY(-3px); }
.step-n { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: var(--green); }
.step h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -.01em; }
.step p { color: var(--ink-2); font-size: var(--step--1); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding-block: clamp(90px, 15vw, 190px); background: radial-gradient(1200px 600px at 20% 100%, rgba(92,255,102,.16), transparent 60%), var(--bg); }
.contact .wrap { position: relative; z-index: 1; }
.contact h2 { font-size: clamp(3rem, 1.6rem + 8.5vw, 8.5rem); margin-top: 18px; line-height: .98; max-width: 10ch; }
.contact .lede { margin-top: 22px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; align-items: center; }
.contact-rows { display: grid; gap: 14px; margin-top: clamp(40px, 7vw, 72px); border-top: 1px solid var(--line); padding-top: 24px; }
.contact-row small { display: block; color: var(--muted); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.contact-row b { font-weight: 600; font-size: var(--step-0); }
.contact-row a:hover { color: var(--green); }
@media (min-width: 760px) { .contact-rows { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: var(--step--1); color: var(--muted); background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.footer .brand img { height: 20px; }
.footer-links { display: flex; gap: 20px; }
.footer a:hover { color: var(--green); }

/* ---------- TT buddy (mascota que acompana) ---------- */
.tt-buddy { position: fixed; right: 14px; bottom: 14px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tt-btn { position: relative; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; transition: transform .4s var(--ease-back); }
.tt-btn:hover { transform: scale(1.06); }
.tt-forms { position: relative; width: 84px; height: 84px; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 14px 22px rgba(0,0,0,.65)); }
.tt-forms img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(.45) rotate(-20deg); filter: blur(8px); transition: opacity .55s var(--ease-out), transform .7s var(--ease-back), filter .55s var(--ease-out); }
.tt-forms img.is-active { opacity: 1; transform: none; filter: blur(0); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.tt-hint {
  position: absolute; right: 100%; top: 50%; transform: translate(6px, -50%); white-space: nowrap;
  padding: 8px 12px; border-radius: 999px; background: var(--ink); color: var(--green-ink); font-size: .8rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .4s, transform .5s var(--ease-out);
}
.tt-hint::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; background: var(--ink); transform: translateY(-50%) rotate(45deg); }
.tt-buddy.show-hint .tt-hint { opacity: 1; transform: translate(-4px, -50%); }
.tt-bubble {
  width: min(300px, calc(100vw - 28px)); padding: 18px 18px 16px; border-radius: 18px 18px 4px 18px;
  background: var(--ink); color: var(--green-ink); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  opacity: 0; transform: translateY(12px) scale(.96); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-back);
}
.tt-bubble p { font-size: var(--step--1); line-height: 1.45; margin-bottom: 12px; }
.tt-bubble b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); display: block; margin-bottom: 4px; }
.tt-bubble .btn-wa { background: var(--green-ink); color: var(--green); box-shadow: none; }
.tt-bubble .btn-wa:hover { background: #10261A; }
.tt-buddy.is-open .tt-bubble { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 900px) { .tt-buddy { right: 22px; bottom: 22px; } .tt-btn { width: 112px; height: 112px; } .tt-forms { width: 104px; height: 104px; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
html.no-js .reveal, html.reveal-fallback .reveal { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; } .reveal-d3 { transition-delay: .24s; }

/* Hero entrance: arranca cuando la pantalla de carga se va (html.intro-done) */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
html.intro-done:not(.no-intro) .hero [data-intro] { animation: rise .9s var(--ease-out) .35s both; }
html.intro-done:not(.no-intro) .hero [data-intro]:nth-child(2) { animation-delay: .45s; }
html.intro-done:not(.no-intro) .hero [data-intro]:nth-child(3) { animation-delay: .55s; }
html.intro-done:not(.no-intro) .hero [data-intro]:nth-child(4) { animation-delay: .65s; }
html.intro-done:not(.no-intro) .hero [data-intro]:nth-child(5) { animation-delay: .75s; }
html.intro-done:not(.no-intro) .hero-visual { animation: rise 1.2s var(--ease-out) .6s both; }
html.no-intro .hero [data-intro], html.no-intro .hero-visual { animation: none; }

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

/* ---------- Reduced motion: gate the intrusive only ---------- */
@media (prefers-reduced-motion: reduce) {
  /* Pantalla de carga corta y sin transicion larga */
  html.js:not(.no-intro) .intro { transition-duration: .3s; }
  .intro-bar i { animation-duration: 1s; }
  html.intro-done:not(.no-intro) .hero [data-intro], html.intro-done:not(.no-intro) .hero-visual { animation-delay: 0s; animation-duration: .4s; }
  .aurora { animation: none; }
  .marquee-track { animation-duration: 100s; }
  .tt, .tt-forms { animation: none; }
}
