/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --ocean-900: #0B2C4A;
  --ocean-700: #123F66;
  --ocean-500: #3E5670;
  --sand-500:  #C9A26B;
  --sand-700:  #A9834C;
  --sand-100:  #F3EADB;
  --mist-100:  #F2F2F0;
  --white:     #FFFFFF;
  --line:      #D8DDE3;
  --ink:       #0B2C4A;
  --ink-soft:  #3E5670;
  --on-ocean:  #E7EDF3;
  --sans: "Lexend", "Montserrat", Arial, sans-serif;
  --r-sm: 4px; --r-md: 10px; --r-lg: 22px; --r-pill: 999px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 7.5rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--sans); font-size: 17px; font-weight: 300; line-height: 1.65;
  color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { 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; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.1; }
strong { font-weight: 500; }
::selection { background: var(--sand-500); color: var(--ocean-900); }
:focus-visible { outline: 2px solid var(--sand-500); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--sand-500); color: var(--ocean-900); border-radius: var(--r-md); font-weight: 500; }
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow { font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--sand-700); margin-bottom: .9rem; }
.eyebrow-light { color: var(--sand-500); }
.h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 22ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; }
.smile-rule { display: block; width: 48px; height: 10px; margin: 1.2rem 0 2.6rem;
  background: no-repeat center/48px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 10'%3E%3Cpath d='M2 2 A22 6 0 0 0 46 2' fill='none' stroke='%23A9834C' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.smile-rule-light { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 10'%3E%3Cpath d='M2 2 A22 6 0 0 0 46 2' fill='none' stroke='%23C9A26B' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1.2rem; border-radius: var(--r-pill); font-weight: 500; font-size: .95rem; line-height: 1.2;
  transition: transform .35s var(--ease-out), background-color .25s, box-shadow .35s var(--ease-out), color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-sand { background: var(--sand-500); color: var(--ocean-900); box-shadow: 0 6px 18px -8px rgba(201,162,107,.7); }
.btn-sand:hover { background: #D4B17E; box-shadow: 0 12px 26px -10px rgba(201,162,107,.8); }
.btn-ghost { color: var(--white); border: 1.5px solid rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.06); }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { width: 26px; height: 32px; }
.brand-mark .trazo { stroke: var(--white); }
.brand-mark .sonrisa { stroke: var(--sand-500); }
.brand-mark .flecha { fill: var(--white); stroke: var(--white); stroke-width: 2; stroke-linejoin: round; }
.brand-name { font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; color: var(--white); }

/* Nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.is-solid { background: rgba(11,44,74,.96); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
@supports (backdrop-filter: blur(12px)) { .nav.is-solid { background: rgba(11,44,74,.82); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); } }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-links { display: none; }
.nav-links a { color: var(--on-ocean); font-size: .93rem; font-weight: 400; position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--sand-500); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-cta { display: none; }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-pill); padding: 2px; }
.lang button { color: var(--on-ocean); font-size: .75rem; font-weight: 500; letter-spacing: .06em; padding: .3rem .55rem; border-radius: var(--r-pill); transition: background-color .25s, color .25s; }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--ocean-900); }
.menu-toggle { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-md); }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 1.8px; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .2s; }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.nav.is-open .nav-links { display: flex; flex-direction: column; gap: 1.1rem; position: absolute; top: var(--nav-h); left: 0; right: 0;
  padding: 1.5rem var(--gutter) 2rem; background: var(--ocean-900); border-top: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.nav.is-open .nav-links a { font-size: 1.1rem; }
.nav.is-open { background: var(--ocean-900); }
.nav-cta-mobile { margin-top: .4rem; align-self: flex-start; }
.nav-links a.btn { color: var(--ocean-900); }
html:not(.js) .menu-toggle, html:not(.js) .lang { display: none; }

/* Form */
.form { background: var(--white); color: var(--ink); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem); display: grid; gap: 1rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 500; color: var(--ocean-500); }
.field input, .field textarea { font: inherit; font-weight: 300; color: var(--ink); width: 100%; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--mist-100); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sand-500); background: var(--white); box-shadow: 0 0 0 3px rgba(201,162,107,.25); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #B4483A; }
.section-ocean .form .form-error { color: #B4483A; font-size: .9rem; }
.section-ocean .form .form-note { font-size: .82rem; color: var(--ocean-500); text-align: center; }

/* =============================================================
   6. Sections
   ============================================================= */
.section { padding-block: var(--section); }
.section-mist { background: var(--mist-100); }
.section-sand { background: var(--sand-100); }
.section-ocean { background: var(--ocean-900); color: var(--white); }
.section-ocean .lead, .section-ocean p { color: var(--on-ocean); }

/* Hero */
.hero { position: relative; isolation: isolate; background: var(--ocean-900); color: var(--white);
  min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 3rem) 0 4rem; overflow: clip; }
.hero-glow { position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 520px at var(--mx, 72%) var(--my, 38%), rgba(201,162,107,.32) 0%, transparent 60%),
    radial-gradient(circle 760px at calc(var(--mx, 72%) - 30%) calc(var(--my, 38%) + 30%), rgba(18,63,102,.95) 0%, transparent 65%),
    var(--ocean-900);
  filter: blur(30px); transition: background-position .4s; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0); } to { transform: translate3d(2%, 2%, 0); } }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-title { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.04; letter-spacing: -.035em; max-width: 14ch; margin-bottom: 1.4rem; }
.hero-title em { font-style: normal; color: var(--sand-500); }
.hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--on-ocean); max-width: 38rem; margin-bottom: 2.2rem; }
.hero-for { font-size: .95rem; color: var(--on-ocean); max-width: 38rem; margin: -1rem 0 2rem; padding-left: .9rem; border-left: 2px solid var(--sand-500); }
.hero-for strong { color: var(--white); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.6rem; }
.hero-slogan, .footer-slogan { font-size: .95rem; letter-spacing: .03em; color: var(--on-ocean); }
.hero-slogan span, .footer-slogan span { color: var(--sand-500); font-weight: 500; }
.hero-photo { position: relative; justify-self: center; width: min(calc(100% - 28px), 380px); margin-left: 14px; }
.hero-photo img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 620/784; object-fit: cover; background: #ECE4D8; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.hero-photo::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 2px solid var(--sand-500); border-radius: calc(var(--r-lg) + 6px); z-index: -1; opacity: .7; }
.hero-photo figcaption { position: absolute; left: -10px; bottom: 22px; background: var(--white); color: var(--ocean-900); padding: .7rem 1rem; border-radius: var(--r-md); display: grid; line-height: 1.3; box-shadow: 0 16px 30px -18px rgba(0,0,0,.6); }
.hero-photo figcaption strong { font-size: .98rem; }
.hero-photo figcaption span { font-size: .78rem; color: var(--sand-700); font-weight: 500; letter-spacing: .04em; }

/* Pain */
.pain-grid { display: grid; gap: 1rem; }
.pain { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.5rem; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s; }
.pain:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(11,44,74,.45); border-color: transparent; }
.pain-num { display: block; font-size: .8rem; font-weight: 500; color: var(--sand-700); margin-bottom: 1.2rem; letter-spacing: .1em; }
.pain h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.pain p { color: var(--ink-soft); font-size: .97rem; }
.pain-close { margin-top: 2.6rem; font-size: clamp(1.15rem, 2vw, 1.45rem); max-width: 40ch; }
.pain-close strong { color: var(--sand-700); }

/* Services (accordion rows) */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.4rem; padding: 1.6rem 0; }
.svc summary::-webkit-details-marker { display: none; }
.svc-num { font-size: .85rem; font-weight: 500; color: var(--sand-700); letter-spacing: .1em; }
.svc-head { display: grid; gap: .2rem; }
.svc-tag { font-size: .85rem; color: var(--ocean-500); letter-spacing: .02em; }
.svc-tag::after { content: "."; color: var(--sand-700); }
.svc-name { font-size: clamp(1.3rem, 2.8vw, 2rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; transition: color .25s; }
.svc summary:hover .svc-name { color: var(--ocean-700); }
.svc-icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: background-color .3s, border-color .3s, transform .4s var(--ease-out); }
.svc-icon::before, .svc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.6px; background: var(--ocean-900); transform: translate(-50%, -50%); transition: transform .4s var(--ease-out), background-color .3s; }
.svc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc[open] .svc-icon { background: var(--ocean-900); border-color: var(--ocean-900); transform: rotate(180deg); }
.svc[open] .svc-icon::before, .svc[open] .svc-icon::after { background: var(--white); }
.svc[open] .svc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.svc-body { padding: 0 0 1.9rem; display: grid; gap: 1.2rem; }
.svc-body p { color: var(--ink-soft); max-width: 60ch; }
.svc-body ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.svc-body li { font-size: .88rem; padding: .4rem .85rem; border-radius: var(--r-pill); background: var(--sand-100); color: var(--ocean-900); }

/* Solutions */
.sol-grid { display: grid; gap: 1rem; }
.sol { background: var(--white); border-radius: var(--r-lg); padding: 1.7rem 1.5rem; transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.sol:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -30px rgba(11,44,74,.5); }
.sol-ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--ocean-900); fill: none; stroke: var(--sand-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1.2rem; transition: transform .4s var(--ease-out); }
.sol:hover .sol-ico { transform: rotate(-6deg) scale(1.06); }
.sol h3 { font-size: 1.15rem; margin-bottom: .45rem; }
.sol p { color: var(--ink-soft); font-size: .96rem; }
.sol-ex { margin-top: .8rem; font-size: .92rem; font-style: italic; color: var(--sand-700) !important; line-height: 1.5; }
.sol-list { display: grid; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.sol-list li { position: relative; padding-left: 1.1rem; font-size: .88rem; color: var(--ocean-500); line-height: 1.45; }
.sol-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--sand-500); }

/* Steps */
.steps { display: grid; gap: 1.6rem; counter-reset: s; }
.step { position: relative; padding-left: 4rem; }
.step-num { position: absolute; left: 0; top: -.2rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--sand-100); color: var(--ocean-900); font-weight: 500; font-size: 1.05rem; }
.step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.step p { color: var(--ink-soft); font-size: .97rem; max-width: 34ch; }

/* Case */
.case-grid { display: grid; gap: 1.2rem; }
.case-col { border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 1.8rem 1.6rem; }
.case-col-solve { background: var(--ocean-700); border-color: transparent; }
.case-col h3 { font-size: 1.15rem; margin-bottom: 1.2rem; color: var(--white); }
.case-list { display: grid; gap: .9rem; }
.case-list li { position: relative; padding-left: 1.6rem; color: var(--on-ocean); font-size: .98rem; }
.case-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--on-ocean); opacity: .7; }
.case-list-check li::before { width: 12px; height: 7px; top: .45em; border: 0; border-left: 2px solid var(--sand-500); border-bottom: 2px solid var(--sand-500); border-radius: 0; transform: rotate(-45deg); opacity: 1; }

/* About */
.about-grid { display: grid; gap: 2.6rem; align-items: center; }
.about-photo { width: min(100%, 320px); }
.about-photo img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 310/392; object-fit: cover; }
.about-copy > p { color: var(--ink-soft); margin-bottom: 1rem; max-width: 58ch; }
.about-copy > .lead { color: var(--ink); }
.values { display: grid; gap: .8rem; margin-top: 1.8rem; }
.values li { display: grid; gap: .1rem; padding-left: 1rem; border-left: 2px solid var(--sand-500); }
.values strong { font-size: 1rem; }
.values span { color: var(--ink-soft); font-size: .93rem; }

/* FAQ */
.faq { display: grid; gap: .7rem; }
.faq details { background: var(--white); border-radius: var(--r-md); border: 1px solid var(--line); transition: border-color .25s; }
.faq details[open] { border-color: var(--sand-500); }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 3rem 1.15rem 1.3rem; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 1.3rem; top: 50%; width: 9px; height: 9px; border-right: 1.8px solid var(--sand-700); border-bottom: 1.8px solid var(--sand-700); transform: translateY(-70%) rotate(45deg); transition: transform .35s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 1.3rem 1.3rem; color: var(--ink-soft); }

/* Contact */
.contact-grid { display: grid; gap: 2.6rem; align-items: start; }
.big-mail { display: inline-block; margin: 1.8rem 0 1.4rem; font-size: clamp(1.5rem, 3.6vw, 2.4rem); font-weight: 500; letter-spacing: -.02em; color: var(--white);
  background: linear-gradient(var(--sand-500), var(--sand-500)) left bottom / 0% 2px no-repeat; padding-bottom: 4px; transition: background-size .5s var(--ease-out), color .3s; }
.big-mail:hover { background-size: 100% 2px; color: var(--sand-100); }
.contact-list { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; color: var(--on-ocean); }
.contact-list a { border-bottom: 1px solid rgba(255,255,255,.25); transition: border-color .25s, color .25s; }
.contact-list a:hover { border-color: var(--sand-500); color: var(--white); }

/* Footer */
.footer { background: #08223A; color: var(--on-ocean); padding: 2.4rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between; }
.footer-brand { display: grid; gap: .5rem; }
.footer-meta { font-size: .85rem; }
.footer-meta a { border-bottom: 1px solid rgba(255,255,255,.25); }

/* Legal page */
.legal { padding: calc(var(--nav-h) + 3rem) 0 var(--section); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .6rem; }
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: .7rem; max-width: 68ch; }
.legal ul { list-style: disc; padding-left: 1.2rem; }
.legal .updated { font-size: .9rem; color: var(--ocean-500); }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
.legal a { color: var(--ocean-700); border-bottom: 1px solid var(--sand-500); }

/* =============================================================
   7. Effects
   ============================================================= */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .pain-grid, .sol-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1.6rem; }
}
@media (min-width: 720px) {
  .case-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 320px 1fr; gap: 4rem; }
  .values { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .nav-links { display: flex; gap: 1.6rem; align-items: center; }
  .nav-cta-mobile, .menu-toggle { display: none; }
  .nav-cta { display: inline-flex; }
  .nav.is-open .nav-links { position: static; flex-direction: row; padding: 0; background: none; border: 0; box-shadow: none; }
  .hero-grid { grid-template-columns: 1.25fr .75fr; gap: 4rem; }
  .hero-photo { justify-self: end; margin-left: 0; }
  .pain-grid { grid-template-columns: repeat(4, 1fr); }
  .sol-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); position: relative; }
  .steps::before { content: ""; position: absolute; top: 1.2rem; left: 1.4rem; right: 12%; height: 1px; background: var(--line); z-index: -1; }
  .step { padding-left: 0; padding-top: 4.2rem; }
  .step-num { top: 0; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* =============================================================
   9. Reduced motion (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
}
