/* =========================================================
   Fresca Agency — Home
   Sistema de medidas: 1u = 1px del mockup.
   Desktop: mockup de 1279px  ·  Mobile: mockup de 630px
   ========================================================= */

:root {
  --purple: #8c31f2;
  --purple-d: #792bdd;
  --orange: #ff4b00;
  --teal: #00c2c4;
  --aqua: #28e3de;
  --cream: #f1f2ed;
  --ink: #000;
  --u: calc(min(100vw, 1680px) / 1279);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (max-width: 760px) {
  :root { --u: calc(100vw / 630); }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  height: calc(180 * var(--u));
  color: #fff;
  transition: transform .5s var(--ease), background-color .3s;
}
/* El logo queda fijo en pantalla mientras se hace scroll (el resto del header sí se esconde).
   Al bajar se achica y cambia entre versión blanca y negra según el fondo que tiene detrás (ver js/fresca.js). */
.header__logo {
  position: fixed; z-index: 31; left: calc(82 * var(--u)); top: calc(52 * var(--u));
  width: calc(76 * var(--u)); height: calc(76 * var(--u));
  min-width: 52px; min-height: 52px;
  transition: transform .6s var(--ease), width .45s var(--ease), height .45s var(--ease), top .45s var(--ease);
}
.header__logo.is-small { width: calc(54 * var(--u)); height: calc(54 * var(--u)); min-width: 40px; min-height: 40px; top: calc(24 * var(--u)); }
.header__logo:hover { transform: rotate(-8deg) scale(1.06); }
.header__logo img { width: 100%; height: 100%; }
.header__logo.has-two { display: block; }
.header__logo.has-two img { position: absolute; inset: 0; transition: opacity .3s; }
.header__logo.has-two .lg-dark { opacity: 0; }
.header__logo.has-two.on-light .lg-light { opacity: 0; }
.header__logo.has-two.on-light .lg-dark { opacity: 1; }
.nav {
  position: absolute; left: calc(201 * var(--u)); top: calc(76 * var(--u));
  display: flex; gap: calc(31 * var(--u));
  font-size: max(11px, calc(12 * var(--u)));
  line-height: calc(22 * var(--u));
}
.nav a { position: relative; padding: 2px 0; font-weight: 400; letter-spacing: .01em; }
.nav a.is-active { font-weight: 700; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.btn-contact {
  position: absolute; right: calc(74 * var(--u)); top: calc(76 * var(--u));
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(27 * var(--u)); min-height: 28px;
  padding: 0 calc(13 * var(--u)); min-width: calc(93 * var(--u));
  background: #fff; color: #000; border-radius: 5px;
  font-size: max(11px, calc(11 * var(--u))); font-weight: 500;
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.btn-contact:hover { background: var(--aqua); }

.burger { display: none; }
.menu { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 2;
  height: calc(585 * var(--u));
  background: #8237ea;
  color: #fff; text-align: center;
}
.hero__bg {
  position: absolute; inset: -12% 0; z-index: 0;
  background: #8237ea url("../assets/trama.svg") center / 100% auto no-repeat; /* 100% del ancho: "fresca" ocupa toda la pantalla */
  will-change: transform;
}
.hero--orange .hero__bg { background-color: #ff5c25; } /* en las secciones naranjas todo el fondo es naranja (sin franjas violetas) */
.hero__bg--2 { display: none; } /* segunda capa de la trama: se superponía y duplicaba las letras */
.hero__title {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(195 * var(--u));
  display: flex; flex-direction: column; align-items: center;
  font-weight: 800; text-transform: uppercase;
  font-size: calc(128 * var(--u)); line-height: calc(130 * var(--u));
  letter-spacing: -.01em;
}
.hero__fixed { display: block; }
.hero__swap {
  display: block; overflow: hidden;
  padding-bottom: .14em; margin-bottom: -.14em;
}
.hero__word { display: inline-block; white-space: nowrap; }
.hero__word .ch { display: inline-block; will-change: transform; }
.hero__clip { position: absolute; inset: 0; overflow: hidden; z-index: 0; }

.cross {
  position: absolute; z-index: 5;
  left: calc(1103 * var(--u)); top: calc(546 * var(--u));
  width: calc(80 * var(--u)); height: calc(80 * var(--u));
  will-change: transform; pointer-events: none;
}

/* ---------- Propuesta de valor ---------- */
.value {
  position: relative; z-index: 1;
  background: var(--orange); color: #fff;
  height: calc(603 * var(--u));
  overflow: hidden;
}
.value__inner { position: relative; width: calc(1279 * var(--u)); height: 100%; margin: 0 auto; }
.value__eyebrow {
  position: absolute; left: 0; right: 0; top: calc(36 * var(--u));
  text-align: center; font-weight: 800; font-size: calc(32 * var(--u)); line-height: 1.3; letter-spacing: .02em;
}
.value__title {
  position: absolute; left: 0; right: 0; top: calc(96 * var(--u));
  text-align: center; font-weight: 400; font-size: calc(20 * var(--u)); line-height: 1.3;
  letter-spacing: .02em;
}
/* Desktop: las dos columnas son celdas de una misma grilla → siempre a la misma altura */
.lists {
  position: absolute; left: calc(107 * var(--u)); top: calc(196 * var(--u));
  display: grid; grid-template-columns: calc(310 * var(--u)) calc(311 * var(--u));
  column-gap: calc(80 * var(--u)); align-items: start;
}
.list { position: static; font-size: calc(18.5 * var(--u)); margin: 0; padding: 0; transform: none !important; } /* las columnas nunca se desplazan por separado */
.list li {
  display: flex; align-items: flex-end;
  height: calc(53.2 * var(--u)); padding: 0 0 calc(8 * var(--u)) calc(1 * var(--u));
  position: relative; line-height: 1.25;
}
.list li::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: #fff;
  transform-origin: left; transform: scaleX(var(--sx, 1));
}
.list li { transition: padding-left .4s var(--ease); }
.list li:hover { padding-left: calc(14 * var(--u)); }

.pineapple {
  position: absolute; left: calc(958 * var(--u)); top: calc(67 * var(--u));
  width: calc(307 * var(--u)); aspect-ratio: 596 / 1055; will-change: transform;
}
.pineapple__hover { position: absolute; left: 16.83%; top: 6.07%; width: 66.7%; will-change: transform; } /* envoltorio para el efecto hover (inclinación + rebote) */
.pineapple__img { display: block; width: 100%; height: auto; }
.pineapple__shadow { position: absolute; left: 6.53%; top: 81.28%; width: 71.3%; height: auto; opacity: .29; }

/* ---------- De la estrategia a los resultados ---------- */
.flow { background: #fff; padding-top: calc(52 * var(--u)); padding-bottom: calc(68 * var(--u)); text-align: center; }
/* Desktop: toda la sección (título + infinito + píldora + texto) se escala para entrar en el alto de la pantalla sin hacer scroll.
   725 = alto total de la sección en unidades del mockup; el piso evita que se vuelva ilegible en ventanas muy bajas. */
@media (min-width: 761px) {
  .flow { --u: max(.7px, min(calc(min(100vw, 1680px) / 1279), calc(100vh / 725))); }
}
.flow__title { font-weight: 800; font-size: calc(32 * var(--u)); line-height: 1.3; letter-spacing: -.005em; }
.flow__lead { margin-top: calc(10 * var(--u)); font-size: calc(16 * var(--u)); line-height: 1.5; }
.flow__foot { margin-top: calc(20 * var(--u)); font-size: calc(14.5 * var(--u)); line-height: calc(24 * var(--u)); }
.flow__lead, .flow__foot { padding: 0 4vw; }

.flow__stage {
  --g: calc(100cqw / 1178);
  --k: .4288;
  --v: calc(var(--k) * var(--g));
  --pl: calc(49.9 * var(--v)); --pt: calc(58.6 * var(--v));
  --fn: calc(37.23 * var(--v)); --ft: calc(40.33 * var(--v)); --fb: calc(34.4 * var(--v));
  --lh: calc(44.33 * var(--v));
  position: relative; container-type: inline-size;
  width: calc(1178 * var(--u)); aspect-ratio: 1178 / 346;
  margin: calc(37 * var(--u)) auto 0;
}
.infinity { position: absolute; left: calc(269 * var(--g)); top: calc(77 * var(--g)); width: calc(649 * var(--g)); }
.infinity__img { width: 100%; height: auto; }
.infinity__img--m { display: none; }
.infinity__txt {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-weight: 500; font-size: calc(14.5 * var(--g)); line-height: calc(24 * var(--g)); text-align: center;
}
.infinity__txt--1 { left: 24%; top: 48.8%; }
.infinity__txt--2 { left: 74%; top: 48.8%; }

.step { position: absolute; width: calc(478.13 * var(--v)); height: calc(308.79 * var(--v)); text-align: left; }
.step--1 { left: calc(0.6 * var(--g)); top: calc(0.6 * var(--g)); }
.step--2 { left: calc(0.8 * var(--g)); top: calc(213 * var(--g)); }
.step--3 { left: calc(971.3 * var(--g)); top: calc(0.4 * var(--g)); }
.step--4 { left: calc(972.8 * var(--g)); top: calc(214.2 * var(--g)); }
.tail {
  position: absolute; z-index: 0; overflow: visible; pointer-events: none; max-width: none;
  width: calc(874.53 * var(--v)); height: calc(498.34 * var(--v));
  left: calc(var(--cx) * var(--v) * -1); top: calc(var(--cy) * var(--v) * -1);
}
.tail[data-s="1"] { --cx: 66.99; --cy: 87.57; }
.tail[data-s="2"] { --cx: 331.19; --cy: 94.77; }
.tail[data-s="3"] { --cx: 37.75; --cy: 96.98; }
.tail[data-s="4"] { --cx: 311.98; --cy: 106.75; }
.tail--m { display: none; }
.card {
  position: relative; z-index: 1; width: 100%; min-height: 100%;
  background: var(--cream); border-radius: calc(31.91 * var(--v));
  padding: var(--pt) 0 calc(20 * var(--v)) var(--pl);
}
.card__n { display: block; font-weight: 800; font-size: var(--fn); line-height: var(--lh); }
.card h3 { font-weight: 800; font-size: var(--ft); line-height: var(--lh); }
.card p { font-weight: 500; font-size: var(--fb); line-height: var(--lh); color: #000; }
.card p br { display: inline; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  gap: calc(23 * var(--u)); margin-top: calc(17 * var(--u));
  height: calc(54 * var(--u)); width: calc(509 * var(--u));
  background: var(--aqua); color: #fff; border-radius: calc(10 * var(--u));
  font-weight: 800; font-size: calc(18.5 * var(--u)); letter-spacing: .005em;
}
.pill__arrow { width: calc(39 * var(--u)); height: calc(29 * var(--u)); color: #fff; }

/* ---------- Footer ---------- */
.footer {
  position: relative; background: var(--purple); color: #fff;
  height: calc(125 * var(--u));
}
.footer__mark { position: absolute; left: calc(62 * var(--u)); top: calc(35 * var(--u)); height: calc(55 * var(--u)); transition: transform .6s var(--ease); }
.footer__mark:hover { transform: rotate(-10deg) scale(1.08); }
.footer__mark img { height: 100%; width: auto; }
.footer__links {
  position: absolute; right: calc(50 * var(--u)); top: calc(46 * var(--u));
  display: flex; gap: calc(66 * var(--u));
  font-size: calc(16 * var(--u)); text-transform: uppercase; line-height: calc(26 * var(--u)); letter-spacing: .01em;
}
.footer__links a { position: relative; }
.footer__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.footer__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__line {
  position: absolute; left: calc(127 * var(--u)); right: calc(51 * var(--u)); top: calc(89 * var(--u));
  height: 1px; background: rgba(255, 255, 255, .55);
}

/* ---------- Páginas internas ---------- */
.hero--one .hero__title { top: calc(235 * var(--u)); }
.page-body {
  position: relative; z-index: 1; background: #fff;
  min-height: calc(420 * var(--u)); padding: calc(120 * var(--u)) 6vw calc(90 * var(--u));
  text-align: center;
}
.page-body__placeholder { color: #8a8a8a; font-size: max(14px, calc(16 * var(--u))); }

/* ---------- Volver arriba (desktop) ---------- */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 40;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #000; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s .4s, background-color .3s, color .3s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top.on-light { background: #000; color: #fff; }
.to-top:hover { transform: scale(1.1); }
.to-top:hover svg { animation: toTopBob .9s var(--ease) infinite; }
.to-top:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
@keyframes toTopBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (max-width: 760px) { .to-top { display: none; } }

/* ---------- Cursor: avioncito de papel ---------- */
.cursor { display: none; }
html.has-plane, html.has-plane * { cursor: none !important; }
html.has-plane textarea, html.has-plane input:not([type=range]) { cursor: text !important; }
html.has-plane :fullscreen, html.has-plane :fullscreen * { cursor: auto !important; } /* en pantalla completa el avión no se ve: vuelve el cursor normal */
html.has-plane .cursor { display: block; position: fixed; inset: 0; z-index: 1000; pointer-events: none; --pa: #fff; --pb: #d6d6d6; }
html.has-plane .cursor.on-light { --pa: #000; --pb: #4a4a4a; }
.cursor__plane { position: fixed; left: 0; top: 0; width: 34px; will-change: transform; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.cursor__plane svg { display: block; width: 100%; height: auto; overflow: visible; }
.cursor__plane .pl-a { fill: var(--pa); transition: fill .25s; }
.cursor__plane .pl-b { fill: var(--pb); transition: fill .25s; }

/* =========================================================
   MOBILE (mockup 630px)
   ========================================================= */
@media (max-width: 760px) {
  .header { height: calc(160 * var(--u)); }
  .header__logo { left: calc(43 * var(--u)); top: calc(48 * var(--u)); width: calc(90 * var(--u)); height: calc(90 * var(--u)); min-width: 54px; min-height: 54px; }
  .header__logo.is-small { top: calc(20 * var(--u)); width: calc(64 * var(--u)); height: calc(64 * var(--u)); min-width: 42px; min-height: 42px; }
  .nav, .btn-contact { display: none; }
  .burger {
    display: block; position: absolute; right: calc(35 * var(--u)); top: calc(56 * var(--u));
    width: 34px; height: 24px; background: none; border: 0; padding: 0; cursor: pointer;
  }
  .burger span { position: absolute; left: 0; right: 0; height: 2px; background: #fff; transition: transform .45s var(--ease), top .45s var(--ease); }
  .burger span:nth-child(1) { top: 6px; }
  .burger span:nth-child(2) { top: 15px; }
  .burger[aria-expanded="true"] span:nth-child(1) { top: 10px; transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { top: 10px; transform: rotate(-45deg); }
  .menu {
    display: flex; position: fixed; inset: 0; z-index: 25; background: var(--purple-d);
    align-items: center; justify-content: center; color: #fff;
    clip-path: circle(0 at calc(100% - 40px) 44px); visibility: hidden;
    transition: clip-path .7s var(--ease), visibility 0s .7s;
  }
  .menu.is-open { clip-path: circle(150% at calc(100% - 40px) 44px); visibility: visible; transition: clip-path .7s var(--ease); }
  .menu nav { display: flex; flex-direction: column; gap: 18px; text-align: center; font-weight: 800; font-size: 34px; }
  .menu__cta { margin-top: 12px; font-size: 16px; font-weight: 500; background: #fff; color: #000; padding: 12px 22px; border-radius: 6px; align-self: center; }
  body.menu-open { overflow: hidden; }
  body.menu-open .header { transform: none !important; }

  .hero { height: calc(468 * var(--u)); }
  .hero__bg { background-image: url("../assets/trama-mobile.svg"); background-size: 90% auto; } /* trama propia de mobile (otra proporción) */
  .hero__title { top: calc(168 * var(--u)); font-size: calc(76 * var(--u)); line-height: calc(80 * var(--u)); }
  .hero--one .hero__title { top: calc(196 * var(--u)); }
  .page-body { min-height: calc(380 * var(--u)); padding-top: calc(110 * var(--u)); }
  .cross { left: calc(362 * var(--u)); top: calc(444 * var(--u)); width: calc(48 * var(--u)); height: calc(48 * var(--u)); }

  .value { --lih: max(29px, calc(40 * var(--u))); height: calc(330 * var(--u) + 9 * var(--lih)); }
  .value__inner { width: 100%; }
  .value__eyebrow { left: calc(51 * var(--u)); right: auto; top: calc(78 * var(--u)); text-align: left; font-size: max(16px, calc(25 * var(--u))); }
  .value__title { left: calc(51 * var(--u)); right: auto; top: calc(125 * var(--u)); width: calc(285 * var(--u)); text-align: left; font-size: max(12px, calc(19 * var(--u))); line-height: 1.3; }
  .list { font-size: max(10.5px, calc(15 * var(--u))); }
  .list li { height: var(--lih); padding-bottom: calc(5 * var(--u)); }
  .lists { display: block; left: 0; top: 0; right: 0; bottom: 0; }
  .list { position: absolute; }
  .list--a { left: calc(57 * var(--u)); width: calc(232 * var(--u)); top: calc(253 * var(--u)); }
  .list--b {
    left: calc(57 * var(--u)); width: calc(518 * var(--u)); top: calc(268 * var(--u) + 6 * var(--lih));
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: calc(51 * var(--u));
  }
  .pineapple { left: calc(319 * var(--u)); top: calc(20 * var(--u)); width: calc(285 * var(--u)); }

  .flow { padding-top: calc(36 * var(--u)); padding-bottom: calc(34 * var(--u)); }
  .flow__title { font-size: max(17px, calc(23 * var(--u))); }
  .flow__lead { font-size: max(12px, calc(13 * var(--u))); margin-top: calc(10 * var(--u)); padding: 0 6vw; }
  .flow__foot { font-size: max(10.5px, calc(12.5 * var(--u))); line-height: 1.55; padding: 0 7vw; margin-top: calc(18 * var(--u)); }
  .flow__foot br { display: none; }

  .flow__stage {
    --g: calc(100cqw / 375);
    --k: .184;
    --pl: calc(9 * var(--g)); --pt: calc(7 * var(--g));
    --fn: calc(9 * var(--g)); --ft: calc(11.5 * var(--g)); --fb: calc(9.5 * var(--g)); --lh: calc(12.5 * var(--g));
    width: 100%; aspect-ratio: 375 / 385; margin-top: calc(26 * var(--u));
  }
  .infinity { left: calc(117 * var(--g)); top: calc(10 * var(--g)); width: calc(140 * var(--g)); }
  .infinity__img--d { display: none; }
  .infinity__img--m { display: block; }
  .infinity__txt { font-size: calc(9.5 * var(--g)); line-height: calc(13 * var(--g)); }
  .infinity__txt--1 { left: 50%; top: 24.6%; }
  .infinity__txt--2 { left: 50%; top: 75%; }

  .step--1 { left: calc(6 * var(--g)); top: calc(2 * var(--g)); }
  .step--2 { left: calc(281 * var(--g)); top: calc(105.7 * var(--g)); }
  .step--3 { left: calc(8 * var(--g)); top: calc(193.5 * var(--g)); }
  .step--4 { left: calc(275 * var(--g)); top: calc(308.2 * var(--g)); }
  .tail--d { display: none; }
  .tail--m { display: block; }
  .card { border-radius: calc(31.91 * var(--v)); padding-right: calc(5 * var(--g)); padding-bottom: calc(6 * var(--g)); }
  .card p br { display: none; }

  .pill { width: auto; max-width: 92vw; height: calc(42 * var(--u)); min-height: 34px; padding: 0 14px; gap: 14px; font-size: max(10px, calc(14.5 * var(--u))); border-radius: calc(10 * var(--u)); margin-top: calc(16 * var(--u)); }
  .pill__arrow { width: 22px; height: 16px; }

  .footer { height: calc(74 * var(--u)); min-height: 62px; }
  .footer__mark { left: 18px; top: calc(14 * var(--u)); height: calc(38 * var(--u)); min-height: 28px; }
  .footer__links { left: 52px; right: 12px; top: calc(18 * var(--u)); justify-content: space-between; gap: 6px; font-size: 9px; line-height: 18px; }
  .footer__line { left: 52px; right: 12px; top: calc(46 * var(--u)); }
}

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