/* AQURO Soluciones Legales — every token and component below is documented in /DESIGN.md. Keep both in sync. */

:root {
  /* Paper (hero, 404) */
  --paper: #f5efe4;
  --paper-hi: #fbf8f1;
  --paper-lo: #ebe0cb;
  --ink: #16130f;
  --ink-soft: #4b4439;

  /* Ink bands — warm blacks, never blue */
  --ink-0: #0b0a08;
  --ink-1: #100e0c;
  --ink-2: #161410;
  --ink-3: #1d1a15;
  --bone: #efe7d7;
  --bone-body: rgba(239, 231, 215, .74);
  --bone-muted: rgba(239, 231, 215, .5);
  --line: rgba(239, 231, 215, .13);

  /* Gold */
  --gold: #c9963a;
  --gold-bright: #ecc977;
  --gold-deep: #80581a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1rem/1.7 var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* Film grain over everything: kills the flat "rendered" look */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .085;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 19px 28px;
  font: 500 .78rem/1 var(--font-sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper-hi);
  background: var(--ink);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.btn:hover { background: var(--gold); color: var(--ink); }
.btn__rule { width: 22px; height: 1px; background: currentColor; opacity: .45; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font: 500 .78rem/1 var(--font-sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  transition: gap .4s var(--ease), color .3s;
}
.link-arrow svg { width: 15px; height: 15px; }
.link-arrow:hover { gap: 16px; }

/* ---------- Nav (floats over the hero, scrolls away) ---------- */
.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  max-width: var(--container);
  height: 88px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__logo { height: 40px; width: auto; }
.nav__name { font: 600 1.05rem/1 var(--font-display); letter-spacing: .22em; }
.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__links > a { position: relative; font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.nav__links > a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links > a:hover::after { transform: scaleX(1); transform-origin: left; }
.lang { display: inline-flex; align-items: center; padding: 0; font: 500 .74rem/1 var(--font-sans); letter-spacing: .14em; color: var(--ink); background: none; border: 0; cursor: pointer; }
.lang__opt { position: relative; padding: 12px 7px; opacity: .38; transition: opacity .3s; }
.lang__opt.is-active { opacity: 1; }
.lang__opt.is-active::after { content: ''; position: absolute; left: 7px; right: 7px; bottom: 6px; height: 1px; background: var(--gold); }
.lang:hover .lang__opt { opacity: 1; }
.lang__sep { opacity: .3; }
@media (max-width: 760px) {
  .nav { height: 72px; }
  .nav__links > a { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  background:
    radial-gradient(110% 80% at 0% 0%, var(--paper-hi), transparent 60%),
    linear-gradient(172deg, var(--paper) 35%, var(--paper-lo));
}
.hero__glow {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}
.hero__glow--a { width: 60vmax; height: 60vmax; left: -18vmax; top: -16vmax; background: radial-gradient(closest-side, rgba(214, 160, 62, .3), transparent); }
.hero__glow--b { width: 44vmax; height: 44vmax; left: 26%; top: 34%; background: radial-gradient(closest-side, rgba(22, 19, 15, .09), transparent); animation-duration: 28s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translate(12vmax, 9vmax) scale(1.12); } }

.hero__content { position: relative; width: 100%; max-width: var(--container); margin: auto; padding: 150px var(--gutter) 22vh; }
.hero__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: .76rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.hero__dash { width: 30px; height: 1px; background: currentColor; opacity: .6; }
.hero__title { margin-top: 30px; font-size: clamp(3.4rem, min(10vw, 17svh), 9.6rem); line-height: .88; letter-spacing: -.03em; color: var(--ink); }
.hero__honorific { display: block; margin-bottom: .2em; font-size: .3em; font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--gold-deep); }
.hero__line { display: block; }
.hero__tag { max-width: 31ch; margin-top: 32px; font: italic 400 clamp(1.3rem, 2vw, 1.8rem)/1.3 var(--font-display); color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 36px; margin-top: 44px; }

/* Entrance: lines rise in sequence */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
.hero__kicker, .hero__title > span, .hero__tag, .hero__actions { animation: rise 1.2s var(--ease) both; }
.hero__title > span:nth-child(1) { animation-delay: .12s; }
.hero__title > span:nth-child(2) { animation-delay: .22s; }
.hero__title > span:nth-child(3) { animation-delay: .32s; }
.hero__tag { animation-delay: .48s; }
.hero__actions { animation-delay: .62s; }

/* Animated ink & gold art (SVG + SMIL, generated — see DESIGN.md › Hero art) */
.hero__art { position: absolute; inset: 0; z-index: -1; }
.hero__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stop-ink1 { stop-color: var(--ink-1); }
.stop-ink3 { stop-color: var(--ink-3); }
.art__tide { fill: var(--ink-1); }
.art__thread { fill: none; stroke-width: 1.4; opacity: .6; }
.art__ink-thread { fill: none; stroke-width: 1; opacity: .22; }
.art__crest { fill: none; stroke: var(--gold); stroke-width: 1.6; opacity: .75; }
.art__spark { fill: none; stroke: #f8e2a4; stroke-width: 2.4; stroke-linecap: round; }

.hero__scroll {
  position: absolute;
  left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  bottom: 26px;
  width: 1px;
  height: 56px;
  overflow: hidden;
  background: rgba(239, 231, 215, .22);
}
.hero__scroll::after { content: ''; position: absolute; inset: 0; background: var(--gold-bright); transform: translateY(-100%); animation: cue 2.6s var(--ease) infinite; }
@keyframes cue { 60%, 100% { transform: translateY(100%); } }

/* Portrait screens: text first, the art fills whatever height is left (tide lands on the fold) */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .hero__content { margin: 0; padding: 104px var(--gutter) 0; }
  .hero__title { margin-top: 22px; font-size: clamp(3.1rem, 14.5vw, 6.4rem); }
  .hero__tag { margin-top: 24px; }
  .hero__actions { margin-top: 32px; gap: 18px 28px; }
  .hero__art { position: relative; inset: auto; flex: 1 1 0; min-height: 240px; margin-top: 20px; }
}
@media (max-width: 520px) {
  .hero__kicker { flex-direction: column; align-items: flex-start; gap: 4px; font-size: .7rem; letter-spacing: .2em; }
  .hero__dash { display: none; }
}

/* ---------- Ink sections ---------- */
.section { position: relative; isolation: isolate; overflow: clip; padding: clamp(5.5rem, 10vw, 8.5rem) 0; color: var(--bone-body); }
.section--ink-1 { background: var(--ink-1); }
.section--ink-2 { background: var(--ink-2); }
/* A slow gold light drifting inside each band */
.section::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 72vmax;
  height: 72vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201, 150, 58, .11), transparent);
  pointer-events: none;
  animation: drift 30s ease-in-out infinite alternate;
}
#about::before { right: -32vmax; bottom: -44vmax; }
#services::before { left: -36vmax; top: -26vmax; animation-duration: 36s; }
#services { padding-bottom: clamp(4rem, 7vw, 6rem); } /* shorter: the paper band's ink-2 wave carries the band on */
#alliance::before { right: -24vmax; top: -34vmax; animation-direction: alternate-reverse; }
#contact::before { left: 8%; bottom: -50vmax; animation-duration: 40s; }

.section__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
.section__aside {
  grid-column: 1 / span 3;
  position: sticky;
  top: 48px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 210px;
  padding-top: 16px;
  border-top: 1px solid var(--gold);
}
.section__num { font: italic 400 2.1rem/1 var(--font-display); color: var(--gold); }
.section__label { font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-muted); }
.section__main { grid-column: 4 / -1; }
.section__title { font-size: clamp(2.7rem, 6.4vw, 5.6rem); line-height: .95; letter-spacing: -.025em; color: var(--bone); }
@media (max-width: 900px) {
  .section__grid { display: block; }
  .section__aside { position: static; flex-direction: row; align-items: baseline; gap: 16px; max-width: none; margin-bottom: 30px; padding-top: 14px; }
}

/* About */
.about__lead { max-width: 28em; margin-top: clamp(32px, 4vw, 52px); font: 500 clamp(1.45rem, 2.5vw, 2.15rem)/1.3 var(--font-display); color: var(--bone); }
.about__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(28px, 4vw, 56px); max-width: 920px; margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); }
.about__cols p { line-height: 1.8; }

/* Services — a typographic index, not icon cards */
.services { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 4vw, 64px); margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; }
.service { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); padding: 30px 0 36px; border-top: 1px solid var(--line); }
.service::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.service:hover::before { transform: scaleX(1); }
.service__num { font: italic 400 1.3rem/1.15 var(--font-display); color: var(--gold); }
.service__title { font-size: clamp(1.45rem, 2vw, 1.8rem); line-height: 1.12; color: var(--bone); transition: transform .6s var(--ease), color .4s; }
.service:hover .service__title { transform: translateX(6px); color: var(--gold-bright); }
.service__desc { max-width: 36ch; margin-top: 12px; font-size: .95rem; line-height: 1.65; color: var(--bone-muted); }

/* About — credentials in the margin, three pillars (wording taken verbatim from the About copy) */
.facts { list-style: none; display: grid; gap: 10px; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.4; color: var(--bone-body); }
.facts li { display: flex; align-items: baseline; gap: 10px; }
.facts li::before { content: ''; flex: none; width: 10px; height: 1px; background: var(--gold); transform: translateY(-.3em); }
.pillars { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 3vw, 44px); max-width: 920px; margin: clamp(52px, 6vw, 84px) 0 0; padding: 0; }
.pillar { position: relative; padding-top: 22px; border-top: 1px solid var(--line); }
.pillar::before { content: ''; position: absolute; left: 0; top: -1px; width: 56px; height: 1px; background: var(--gold); transform-origin: left; transition: transform 1.2s var(--ease) .35s; }
.js .pillar:not(.is-in)::before { transform: scaleX(0); }
.pillar__num { display: block; font: italic 400 1.35rem/1 var(--font-display); color: var(--gold); }
.pillar__title { margin-top: 18px; font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.02em; color: var(--bone); }
.pillar__text { max-width: 26ch; margin-top: 12px; font-size: .95rem; line-height: 1.6; color: var(--bone-muted); }

/* Services — closing link */
.services__cta { margin-top: clamp(36px, 4vw, 52px); color: var(--gold); }

/* Paper band (Alliance) — the page's second light surface, framed by ink waves */
.section--paper {
  padding: clamp(9.5rem, 16vw, 14rem) 0;
  color: var(--ink-soft);
  background:
    radial-gradient(90% 70% at 100% 0%, var(--paper-hi), transparent 60%),
    linear-gradient(185deg, var(--paper) 40%, var(--paper-lo));
}
.section--paper::before { background: radial-gradient(closest-side, rgba(214, 160, 62, .26), transparent); }
.section--paper .section__aside { border-top-color: var(--gold-deep); }
.section--paper .section__num { color: var(--gold-deep); }
.section--paper .section__label { color: rgba(22, 19, 15, .62); }
.section--paper .section__title { color: var(--ink); }
.section--paper .link-arrow { color: var(--ink); }
.wave { position: absolute; left: 0; width: 100%; height: clamp(64px, 9vw, 150px); pointer-events: none; }
.wave--top { top: -1px; }
.wave--bottom { bottom: -1px; }
.wave__ink2 { fill: var(--ink-2); }
.wave__ink1 { fill: var(--ink-1); }
.wave__crest { fill: none; stroke: var(--gold); stroke-width: 1.4; opacity: .8; }

/* Alliance — partner lockup: AQURO × Constructora Luxus (their logo, unaltered) */
.ally { display: block; max-width: 920px; margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid rgba(22, 19, 15, .14); }
.ally__lockup { display: flex; flex-wrap: wrap; align-items: center; gap: 18px clamp(20px, 3vw, 40px); }
.ally__us { display: inline-flex; align-items: center; gap: 16px; font: 600 clamp(1.3rem, 2.3vw, 1.85rem)/1 var(--font-display); letter-spacing: .22em; color: var(--ink); }
.ally__us img { height: clamp(56px, 7vw, 92px); width: auto; }
.ally__x { font: italic 400 clamp(2.2rem, 4vw, 3.4rem)/1 var(--font-display); color: var(--gold-deep); }
.ally__logo { width: clamp(220px, 30vw, 380px); height: auto; }
.ally__desc { max-width: 52ch; margin-top: clamp(28px, 3vw, 40px); font-size: 1.05rem; line-height: 1.75; }
.ally .link-arrow { margin-top: 30px; }

/* Contact — Costa Rica map (Guanacaste highlighted) under the margin label */
#contact .section__main { grid-row: 1 / span 2; }
.map { grid-column: 1 / span 3; grid-row: 2; align-self: end; max-width: 240px; margin: 48px 0 0; }
.map__svg { display: block; width: 100%; height: auto; overflow: visible; }
.map__prov { fill: rgba(239, 231, 215, .035); stroke: rgba(239, 231, 215, .32); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map__prov--on { fill: rgba(201, 150, 58, .24); stroke: var(--gold); stroke-width: 1.3; }
.map__caption { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--bone-muted); }
.map__caption span { font: italic 400 1.5rem/1 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--gold); }
@media (max-width: 900px) {
  .facts { display: none; }
  .map { max-width: 300px; margin: 56px auto 0; }
}

/* Contact — big rows, the whole row is the link */
.contact { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.contact__row { position: relative; display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; align-items: baseline; gap: 10px 32px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.contact__row::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.contact__row:hover::after { transform: scaleX(1); }
.contact__label { font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.contact__value { font: 500 clamp(1.7rem, 3.4vw, 2.6rem)/1.08 var(--font-display); letter-spacing: -.01em; text-wrap: balance; color: var(--bone); transition: transform .6s var(--ease); }
.contact__value--email { font-size: clamp(1.3rem, 3vw, 2.4rem); overflow-wrap: anywhere; }
.contact__row:hover .contact__value { transform: translateX(6px); }
.contact__go { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-muted); transition: color .4s; }
.contact__go svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.contact__row:hover .contact__go { color: var(--gold-bright); }
.contact__row:hover .contact__go svg { transform: translate(3px, -3px); }

@media (max-width: 760px) {
  .about__cols, .services, .pillars { grid-template-columns: 1fr; }
  .contact__row { grid-template-columns: minmax(0, 1fr) auto; padding: 26px 0; }
  .contact__label { grid-column: 1 / -1; }
  .contact__go > span { display: none; }
}

/* ---------- Footer ---------- */
.footer { display: grid; justify-items: center; gap: 14px; padding: 64px var(--gutter) 44px; text-align: center; color: var(--bone-muted); background: var(--ink-0); border-top: 1px solid var(--line); }
.footer__logo { height: 52px; width: auto; }
.footer__name { margin-right: -.34em; font: 600 1.05rem/1 var(--font-display); letter-spacing: .34em; color: var(--bone); }
.footer p { font-size: .78rem; letter-spacing: .04em; }

/* ---------- Scroll reveal (JS adds .is-in; no JS = everything visible) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
