:root {
  --teal: #0F5257;
  --teal-2: #16696F;
  --teal-3: #1C7C80;
  --deep: #0A3A3E;
  --ink: #12343A;
  --soft: #4E676A;
  --paper: #F3F7F6;
  --band: #E4EFED;
  --sun: #F4C542;
  --sun-2: #FFD95E;
  --mint: #A9D8D3;
  --line: #CFDEDC;
  --display: "Anybody", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --gutter: clamp(16px, 5vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { overflow-x: hidden; overflow-x: clip; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--sun); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); line-height: 1; letter-spacing: -.012em; }
h2 { font-stretch: 115%; font-weight: 850; font-size: clamp(34px, 5.6vw, 64px); margin-bottom: 18px; }
h3 { font-stretch: 108%; font-weight: 750; font-size: 21px; line-height: 1.15; margin-bottom: 6px; }
.intro { font-size: clamp(18px, 2vw, 21px); color: var(--soft); max-width: 36ch; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; transition: transform .25s var(--ease), background-color .2s, box-shadow .25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 -2px rgba(0, 0, 0, .18); }
.btn-sun:hover { background: var(--sun-2); box-shadow: 0 10px 0 -3px rgba(0, 0, 0, .18); }
.btn-ghost { border-color: currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.note { margin-top: 18px; color: var(--mint); font-size: 15px; }

/* ---------- Encabezado ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; color: #F2F7F5; transition: background-color .3s, box-shadow .3s; }
.top.solid { background: rgba(10, 58, 62, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.brand { font-family: var(--display); font-stretch: 120%; font-weight: 800; font-size: 19px; text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; color: var(--mint); font-weight: 500; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--sun); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }
.lang { display: inline-flex; border: 1.5px solid rgba(169, 216, 211, .5); border-radius: 999px; padding: 3px; }
.lang button { font: 700 13px var(--body); color: var(--mint); background: none; border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--mint); color: var(--deep); }
@media (max-width: 860px) { .nav { display: none; } }
@media (max-width: 520px) { .top-cta { display: none; } .brand { font-size: 17px; } .top-in { gap: 12px; } }

/* ---------- Portada ---------- */
.hero { position: relative; background: var(--teal); color: #F2F7F5; overflow: hidden; padding: 110px 0 64px; }
.sun { position: absolute; border-radius: 50%; background: var(--sun); pointer-events: none; transform: translate3d(0, var(--py, 0), 0); }
.stage .sun { width: 74%; aspect-ratio: 1; right: -8%; top: 2%; opacity: .95; }
.hero-in { position: relative; z-index: 1; display: grid; gap: 40px; }
.hello { font-family: var(--display); font-stretch: 118%; font-weight: 700; font-size: 17px; color: var(--sun); margin-bottom: 18px; }
h1 { font-weight: 850; font-stretch: 122%; font-size: clamp(44px, 9vw, 92px); line-height: .94; max-width: 11ch; }
h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
h1 .wi { display: inline-block; }
.hero .lead { font-size: clamp(19px, 2.3vw, 24px); color: var(--mint); margin-top: 24px; max-width: 32ch; }

.stage { position: relative; height: clamp(300px, 62vw, 560px); margin: 0 calc(var(--gutter) * -1); }
.stage img { position: absolute; border-radius: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); background: #fff; }
.s-main { width: 92%; left: 10%; top: 6%; transform: translate3d(0, var(--py, 0), 0) rotate(-5deg); }
.s-tab { width: 30%; left: 2%; top: 30%; transform: translate3d(0, var(--py, 0), 0) rotate(4deg); border: 5px solid #111; border-radius: 18px; }
.s-phone { width: 19%; right: 6%; top: 40%; transform: translate3d(0, var(--py, 0), 0) rotate(-2deg); border: 5px solid #111; border-radius: 22px; }
@media (min-width: 980px) {
  .hero { padding: 140px 0 90px; min-height: 100svh; }
  .hero-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .stage { height: 560px; margin: 0 calc(var(--gutter) * -1) 0 0; }
  .stage .sun { width: 80%; right: -14%; top: -4%; }
  .s-main { width: 112%; left: 4%; top: 18%; }
  .s-tab { width: 32%; left: -8%; top: 40%; }
  .s-phone { width: 21%; right: 2%; top: 50%; }
}

/* ---------- Flujo de energía (entre portada y servicios) ---------- */
.flow { background: var(--paper); margin-top: -1px; line-height: 0; position: relative; }
.f-bg { fill: var(--teal); }
.flow svg { display: block; width: 100%; height: clamp(110px, 14vw, 170px); }
.f-base, .f-pulse { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.f-base.f-m { stroke: rgba(169, 216, 211, .32); stroke-width: 1.4; }
.f-base.f-s { stroke: rgba(244, 197, 66, .28); stroke-width: 1.2; }
.f-pulse { stroke-width: 2.4; stroke-dasharray: 90 1900; stroke-dashoffset: 0; opacity: 0; }
.f-pulse.f-m { stroke: var(--mint); }
.f-pulse.f-s { stroke: var(--sun); }
.f-node { fill: var(--sun); transform-box: fill-box; transform-origin: center; }
.f-edge { fill: var(--paper); }

/* ---------- Servicios ---------- */
.services { padding: 110px 0 90px; }
.services-in { display: grid; gap: 40px; }
.services-head .aside { margin-top: 26px; font-size: 18px; }
.svcs { list-style: none; }
.svcs li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-top: 1px solid var(--line); transition: background-color .3s; }
.svcs li:last-child { border-bottom: 1px solid var(--line); }
.ico { width: 56px; height: 56px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-size: 25px; font-family: var(--emoji); transition: transform .4s var(--ease), background-color .3s; }
.svcs h3 { font-size: clamp(22px, 2.6vw, 30px); font-stretch: 112%; transition: font-stretch .4s var(--ease); }
.svcs p { color: var(--soft); max-width: 52ch; }
@media (hover: hover) {
  .svcs li:hover .ico { transform: scale(1.12) rotate(-8deg); background: var(--sun); }
  .svcs li:hover h3 { font-stretch: 125%; }
}
@media (min-width: 900px) {
  .services-in { grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: start; }
  .services-head { position: sticky; top: 110px; }
}

/* ---------- Trabajos ---------- */
.work { background: var(--deep); color: #EAF3F1; padding: 110px 0 60px; position: relative; }
.work .intro { color: var(--mint); }
.work-head { margin-bottom: 30px; }
.case { display: grid; gap: 36px; padding: 56px 0; border-top: 1px solid rgba(169, 216, 211, .18); }
.case-text .kind { display: inline-block; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 14px; color: var(--deep); background: var(--mint); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }
.case h3 { font-size: clamp(28px, 3.6vw, 42px); font-stretch: 112%; font-weight: 800; margin-bottom: 16px; }
.case-text > p { color: #D5E6E3; }
.case ul { list-style: none; margin: 20px 0 28px; }
.case li { position: relative; padding-left: 24px; margin-bottom: 9px; }
.case li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
.fine { margin-top: 14px; font-size: 14px; color: var(--mint); }
.case-media figure { transform: translate3d(0, var(--py, 0), 0); }
.case-media img { border-radius: 12px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.stack { display: grid; }
.stack figure:nth-child(2) { width: 70%; margin: -18% 0 0 auto; position: relative; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; max-width: 560px; }
.pair figure:nth-child(2) { margin-top: 18%; }
.pair img { border: 5px solid #111; border-radius: 18px; }
.device { position: relative; padding-bottom: 8%; }
.phone-shot { position: absolute; width: 27%; right: 4%; bottom: 0; }
.phone-shot img { border: 5px solid #111; border-radius: 20px; }
@media (min-width: 960px) {
  .case { grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; padding: 80px 0; }
  .case.flip .case-text { order: 2; }
  .case.flip .pair { justify-self: end; }
}

/* ---------- Pasos ---------- */
.steps-sec { padding: 110px 0; --p: 0; }
.track { position: relative; height: 4px; background: var(--line); border-radius: 4px; margin: 26px 0 30px; overflow: hidden; }
.track .fill { position: absolute; inset: 0; background: var(--sun); transform: scaleX(var(--p)); transform-origin: left; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 30px; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: var(--sun); font-family: var(--display); font-stretch: 120%; font-weight: 850; font-size: 22px; margin-bottom: 16px; }
.steps h3 { font-size: 22px; }
.steps p { color: var(--soft); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 36px; } }

/* ---------- Sobre mí ---------- */
.about { background: var(--band); padding: 110px 0; }
.about-in { display: grid; gap: 36px; align-items: center; }
.portrait { width: 200px; position: relative; }
.portrait::before { content: ""; position: absolute; inset: -14px -14px 14px 14px; border-radius: 50%; background: var(--sun); }
.portrait img { position: relative; border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.about p { max-width: 60ch; margin-bottom: 14px; font-size: 18px; }
@media (min-width: 860px) { .about-in { grid-template-columns: 300px 1fr; gap: 80px; } .portrait { width: 280px; } }

/* ---------- Contacto ---------- */
.contact { position: relative; background: var(--teal); color: #F2F7F5; padding: 120px 0; overflow: hidden; }
.sun-big { width: clamp(360px, 60vw, 760px); aspect-ratio: 1; left: -18vw; bottom: -30%; opacity: .14; }
.contact-in { position: relative; display: grid; gap: 44px; align-items: center; }
.contact .lead { color: var(--mint); font-size: clamp(19px, 2.2vw, 22px); max-width: 40ch; }
.phone-num { display: inline-block; margin-top: 26px; font-family: var(--display); font-stretch: 112%; font-weight: 850; font-size: clamp(34px, 6vw, 68px); color: var(--sun); text-decoration: none; line-height: 1; }
.qr { width: 210px; height: 210px; background: #fff; padding: 14px; border-radius: 16px; transform: rotate(3deg); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-box figcaption { margin-top: 14px; color: var(--mint); font-size: 14px; max-width: 210px; }
@media (min-width: 860px) { .contact-in { grid-template-columns: 1fr auto; } }
@media (pointer: coarse) and (max-width: 859px) { .qr-box { display: none; } }

.foot { background: var(--deep); color: var(--mint); font-size: 14px; padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); }

/* ---------- Botón flotante (celular) ---------- */
.float-wa { position: fixed; z-index: 30; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: 8px; background: var(--sun); color: var(--ink); font-weight: 700; text-decoration: none; padding: 12px 18px 12px 14px; border-radius: 999px; box-shadow: 0 12px 30px rgba(10, 58, 62, .35); transform: translateY(140%); transition: transform .45s var(--ease); }
.float-wa svg { width: 24px; height: 24px; }
.float-wa.show { transform: none; }
@media (max-width: 859px) { .float-wa { display: inline-flex; } }

/* ---------- Movimiento (solo con JS y sin "reducir movimiento") ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .8s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .curtain[data-reveal] { opacity: 1; transform: translate3d(0, var(--py, 0), 0); transition: none; }
  .js .curtain img { clip-path: inset(100% 0 0 0 round 12px); transform: scale(1.08); transition: clip-path 1.1s var(--ease) var(--d, 0s), transform 1.4s var(--ease) var(--d, 0s); }
  .js .curtain.in img { clip-path: inset(0 0 0 0 round 12px); transform: none; }
  .js .portrait[data-reveal] { transform: scale(.85) rotate(-6deg); }
  .js .portrait[data-reveal].in { transform: none; }

  .js h1.split .wi { transform: translateY(105%); font-stretch: 60%; }
  .js h1.split.play .wi { animation: word-in 1.1s var(--ease) calc(.08s * var(--i) + .1s) both; }
  @keyframes word-in {
    0% { transform: translateY(105%); font-stretch: 60%; }
    60% { transform: none; }
    100% { transform: none; font-stretch: 122%; }
  }
  .js .stage img { animation: float-in 1.2s var(--ease) both; }
  .js .stage .s-main { animation-delay: .35s; }
  .js .stage .s-tab { animation-delay: .55s; }
  .js .stage .s-phone { animation-delay: .7s; }
  @keyframes float-in { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
  .js .stage .sun { animation: sun-in 1.4s var(--ease) .2s both; }
  @keyframes sun-in { from { scale: .4; opacity: 0; } to { scale: 1; opacity: .95; } }
}
@media (prefers-reduced-motion: no-preference) {
  .f-pulse { opacity: .9; animation: flow var(--dur, 8s) linear var(--delay, 0s) infinite; }
  @keyframes flow { to { stroke-dashoffset: -1990; } }
  .f-node { animation: node 3.2s ease-in-out var(--delay, 0s) infinite; }
  @keyframes node { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.35); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
