/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --lemon:      #FFF8CA;
  --blush:      #FFB8B9;
  --rosewood:   #6B0B0C;
  --rosewood-2: #8A1416;
  --coffee:     #2D120D;
  --botticelli: #CDE3E8;
  --paper:      #FFFDF6;

  --bg:         var(--lemon);
  --ink:        var(--coffee);
  --ink-mute:   rgba(45,18,13,0.62);
  --line:       rgba(45,18,13,0.14);
  --accent:     var(--rosewood);

  --serif: "Abel", "Arial Narrow", sans-serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 84px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 600; }
em { font-style: italic; }
ul { list-style: none; padding: 0; }
::selection { background: var(--rosewood); color: var(--lemon); }

:focus-visible {
  outline: 2px solid var(--rosewood);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 1.5rem; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--coffee); color: var(--lemon);
  border-radius: 8px; font-weight: 600; transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-size: .82rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--rosewood); margin-bottom: 1rem;
}
.kicker-on-dark { color: var(--blush); }
.body-lg { font-size: 1.1rem; line-height: 1.7; color: var(--ink); max-width: 52ch; margin-bottom: 1.3rem; }
.text-on-dark { color: rgba(255,248,202,0.86); }

/* =============================================================
   4. Typography
   ============================================================= */
.section-title { font-size: clamp(1.9rem, 4vw, 3.1rem); color: var(--rosewood); }
.section-title em { font-style: italic; font-weight: 500; }
.title-on-dark { color: var(--lemon); }
.section-head-center { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.section-head-center .kicker { display: block; }

.pull-quote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.35;
  color: var(--rosewood); border-left: 3px solid var(--rosewood);
  padding-left: 1.4rem; margin-top: 1.6rem; max-width: 44ch;
}

/* =============================================================
   5. Components — buttons, form, cards
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  background: var(--rosewood); color: var(--lemon);
  box-shadow: 0 4px 14px rgba(107,11,12,0.18), 0 1px 3px rgba(45,18,13,0.08);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s;
}
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(107,11,12,0.28), 0 10px 20px rgba(45,18,13,0.14);
}
.btn:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-light { background: var(--lemon); color: var(--coffee); }
.btn-nav-cta { padding: .75rem 1.35rem; font-size: .88rem; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
  transition: transform .8s var(--ease-soft);
}

/* form */
.cta-form {
  display: grid; gap: 1.2rem;
  background: rgba(255,248,202,0.06);
  border: 1px solid rgba(255,248,202,0.18);
  border-radius: 20px;
  padding: 2.2rem;
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-soft);
}
.cta-form.is-sent { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.field { position: relative; }
.field input, .field select {
  width: 100%; padding: 1.5rem 1rem .6rem; border-radius: 10px;
  border: 1px solid rgba(255,248,202,0.3);
  background: rgba(255,248,202,0.04); color: var(--lemon);
  font-family: var(--sans); font-size: 1rem;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--blush); background: rgba(255,248,202,0.08);
}
.field select { appearance: none; cursor: pointer; }
.field-select::after {
  content: "▾"; position: absolute; right: 1rem; top: 1.5rem; pointer-events: none; color: var(--blush);
}
.field label {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  pointer-events: none; transition: all .25s var(--ease-out);
  color: rgba(255,248,202,0.55); font-size: 1rem;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field-select label {
  top: .55rem; transform: none; font-size: .68rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.field-select select:invalid ~ label,
.field-select select:focus ~ label { color: var(--blush); }

.cta-submit { position: relative; justify-content: center; width: 100%; }
.cta-submit .cta-form-spinner {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none;
}
.cta-form.is-sending .cta-form-label { opacity: 0; }
.cta-form.is-sending .cta-form-spinner { opacity: 1; }
.cta-form-spinner::after {
  content: ""; width: 18px; height: 18px;
  border: 2px solid rgba(255,248,202,0.35); border-top-color: var(--lemon);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-hint { font-size: .8rem; color: rgba(255,248,202,0.5); text-align: center; }

.cta-success {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -40%); text-align: center; max-width: 360px;
  opacity: 0; pointer-events: none; color: var(--lemon);
  transition: opacity .8s var(--ease-out) .1s, transform .9s var(--ease-soft) .1s;
}
.cta-success.is-visible { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.cta-success-check {
  width: 52px; height: 52px; margin: 0 auto 1rem; color: var(--blush);
}
.cta-success-check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s var(--ease-out) .3s; }
.cta-success.is-visible .cta-success-check path { stroke-dashoffset: 0; }
.cta-success p { color: rgba(255,248,202,0.75); margin-top: .5rem; }

/* =============================================================
   6. Sections
   ============================================================= */
.section { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-quienes, .section-porque { background: var(--blush); }
.section-problema { background: var(--lemon); }
.section-como { background: var(--botticelli); }
.section-experiencias { background: var(--paper); }
.section-contacto { background: var(--rosewood); color: var(--lemon); }

.section-grid { display: grid; gap: 2.5rem; }
.section-label-col .section-title { margin-bottom: 0; }
.section-body-col { max-width: 640px; }

@media (min-width: 960px) {
  .section-grid { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; align-items: start; }
  .section-label-col { position: sticky; top: calc(var(--nav-h) + 2rem); }
}

.quienes-figure {
  border-radius: 20px; overflow: hidden; margin-bottom: 1.8rem;
  aspect-ratio: 16 / 10;
  box-shadow: 0 30px 60px -20px rgba(45,18,13,0.35);
}
.quienes-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-soft); }
.quienes-figure:hover img { transform: scale(1.06); }

.checklist { display: grid; gap: 1rem; margin-bottom: 1.8rem; }
.checklist li {
  position: relative; padding-left: 2.2rem; font-size: 1.08rem; color: var(--ink);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3rem; width: 20px; height: 20px;
  border: 1.6px solid var(--rosewood); border-radius: 50%;
}
.checklist li::after {
  content: ""; position: absolute; left: 6px; top: .62rem; width: 8px; height: 4px;
  border-left: 1.8px solid var(--rosewood); border-bottom: 1.8px solid var(--rosewood);
  transform: rotate(-45deg);
}
.problema-cierre { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--rosewood); max-width: 42ch; }

.steps { display: grid; gap: 2rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step {
  background: rgba(255,253,246,0.55);
  border: 1px solid rgba(45,18,13,0.1);
  border-radius: 20px; padding: 2.2rem 1.8rem;
}
.step-num { display: block; font-family: var(--serif); font-style: italic; font-size: 2.4rem; color: var(--rosewood); margin-bottom: .8rem; }
.step h3 { font-size: 1.25rem; margin-bottom: .7rem; color: var(--coffee); }
.step p { color: var(--ink-mute); }

/* bento */
.bento { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(12, 1fr); grid-auto-rows: 200px; }
  .bento-1 { grid-column: span 7; grid-row: span 2; }
  .bento-2 { grid-column: span 5; grid-row: span 1; }
  .bento-3 { grid-column: span 5; grid-row: span 1; }
  .bento-4 { grid-column: span 4; grid-row: span 1; }
  .bento-5 { grid-column: span 4; grid-row: span 1; }
  .bento-6 { grid-column: span 4; grid-row: span 1; }
  .bento-7 { grid-column: span 12; grid-row: span 1; }
}
.card {
  position: relative; border-radius: 20px; padding: 2rem;
  background: var(--lemon);
  border: 1px solid rgba(45,18,13,0.1);
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 4px 14px rgba(45,18,13,0.05);
  transition: box-shadow .45s var(--ease-soft);
}
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; color: var(--coffee); }
.card p { color: var(--ink-mute); font-size: .96rem; }
.card:hover { box-shadow: 0 40px 80px -24px rgba(45,18,13,0.28); }
.bento-1 { background: var(--rosewood); color: var(--lemon); }
.bento-1 h3, .bento-1 p { color: var(--lemon); }
.bento-1 h3 { font-size: 1.9rem; }
.bento-2, .bento-4, .bento-6 { background: var(--botticelli); }
.bento-3, .bento-5 { background: var(--blush); }
.bento-7 { background: var(--paper); border-style: dashed; }

/* marquee */
.marquee-band { background: var(--coffee); padding-block: 1.3rem; overflow: hidden; }
.marquee { overflow: hidden; position: relative; white-space: nowrap; }
.marquee-track {
  display: inline-flex; align-items: center; gap: 1.4rem; white-space: nowrap; will-change: transform;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 2rem);
  color: var(--lemon);
}
.marquee-track .dot { color: var(--blush); }

/* diff grid */
.diff-grid { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .diff-grid { grid-template-columns: repeat(2, 1fr); } }
.diff-card {
  background: var(--paper); border-radius: 20px; padding: 2.2rem;
  border: 1px solid rgba(45,18,13,0.08);
  transition: box-shadow .45s var(--ease-soft);
}
.diff-card:hover { box-shadow: 0 30px 60px -20px rgba(45,18,13,0.2); }
.diff-num { font-family: var(--serif); font-style: italic; color: var(--rosewood); font-size: 1.6rem; display: block; margin-bottom: .6rem; }
.diff-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.diff-card p { color: var(--ink-mute); }

/* contacto */
.section-contacto-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .section-contacto-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 4rem; } }
.contacto-email-line { font-size: 1rem; }
.contacto-email { text-decoration: underline; text-underline-offset: 4px; color: var(--lemon); font-weight: 600; }
.contacto-email:hover { color: var(--blush); }

/* =============================================================
   7. Navigation
   ============================================================= */
.nav {
  --nav-fg: var(--lemon);
  position: fixed; top: 0; inset-inline: 0; z-index: 500;
  height: var(--nav-h);
  color: var(--nav-fg);
  text-shadow: 0 1px 12px rgba(45,18,13,0.35);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), color .4s var(--ease-out);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 1.5rem; }
.nav.is-scrolled {
  --nav-fg: var(--rosewood);
  background: rgba(255,248,202,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(45,18,13,0.1); text-shadow: none;
}
.nav-links { display: none; gap: 2rem; margin-right: auto; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link { position: relative; font-size: .95rem; font-weight: 500; padding: .25rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-soft);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.btn-nav-cta { display: none; }
@media (min-width: 720px) { .btn-nav-cta { display: inline-flex; } }

.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
}
@media (min-width: 720px) { .nav-burger { display: none; } }
.nav-burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease-soft), opacity .3s, background .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 400;
  background: var(--rosewood); color: var(--lemon);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile nav { display: flex; flex-direction: column; align-items: center; gap: 1.8rem; }
.nav-mobile nav a { font-family: var(--serif); font-style: italic; font-size: 1.7rem; }

/* =============================================================
   8. Hero
   ============================================================= */
.hero { position: relative; background: var(--rosewood); overflow: clip; padding-block: clamp(7rem, 14vw, 10rem) clamp(4rem, 8vw, 6rem); }
.hero-inner {
  display: grid; gap: 2.5rem; align-items: center;
  color: var(--lemon);
}
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.3fr 0.9fr; gap: 3rem; } }
.hero-sub { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 34ch; margin-bottom: 1.3rem; color: var(--blush); font-family: var(--serif); font-style: italic; line-height: 1.1; }
.hero-support { max-width: 54ch; font-size: 1.05rem; color: rgba(255,248,202,0.85); margin-bottom: 2.2rem; }

.hero-art { justify-self: center; }
.hero-art img { width: 100%; max-width: 200px; height: auto; display: block; }
@media (min-width: 960px) { .hero-art img { max-width: 260px; } }

/* =============================================================
   9. Footer
   ============================================================= */
.footer { background: var(--coffee); color: rgba(255,248,202,0.8); padding-block: 3.5rem 2.5rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; }
.footer-logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--lemon); }
.footer-logo svg { width: 26px; height: 26px; }
.footer-logo span { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.footer-tag { font-size: .9rem; max-width: 40ch; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; font-size: .88rem; }
.footer-links a:hover { color: var(--lemon); }
.footer-credits { font-size: .78rem; opacity: .7; }
.footer-credits a { text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   10. Cursor
   ============================================================= */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  display: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px; background: var(--lemon); border-radius: 50%; }
.cursor-ring {
  width: 32px; height: 32px; margin: -16px; border: 1px solid var(--lemon); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out);
}
.cursor.is-interactive .cursor-ring { width: 50px; height: 50px; margin: -25px; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* =============================================================
   11. Reveal / tilt effects
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

.has-tilt {
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft);
}
.has-tilt:hover { transition-duration: .15s; }

/* =============================================================
   12. Responsive
   ============================================================= */
@media (min-width: 540px) { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

/* =============================================================
   13. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { display: none; }
}
