/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0d130e;   /* warm-cool near-black, never pure #000 */
  --bg-2:      #141c15;
  --bg-3:      #1c281d;   /* card */
  --cream:     #f2ede0;   /* text on dark — never pure white */
  --cream-2:   #ddd6c2;
  --cream-3:   #8b9686;   /* metadata, mossy gray */
  --accent:    #4f7a56;   /* forest green */
  --accent-2:  #345239;
  --gold:      #c9a961;   /* matches the emblem gold */
  --gold-soft: rgba(201,169,97,0.35);
  --line:      rgba(242,237,224,.12);

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --glyph: "Noto Serif JP", var(--serif);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--cream-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -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 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; color: var(--cream); }
em { font-style: italic; color: var(--gold); font-weight: 500; }
::selection { background: var(--accent); color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container { max-width: 1180px; margin-inline: auto; padding-inline: 1.5rem; }

/* =============================================================
   3. Reveal-on-scroll (defensive: visible by default)
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Safety net: if JS never runs, content must still show */
.no-js .reveal, .reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 1.1rem 0;
  transition: background .4s var(--ease-out), padding .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13,19,14,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: .7rem 0;
  border-color: var(--line);
}
.nav-inner {
  max-width: 1180px; margin-inline: auto; padding-inline: 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.nav-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: .12em;
  color: var(--cream); margin-right: auto;
}
.nav-logo { border-radius: 50%; }
.nav-links { display: none; gap: 1.8rem; font-size: .92rem; letter-spacing: .02em; }
.nav-links a { position: relative; padding-block: .2rem; color: var(--cream-2); transition: color .3s var(--ease-out); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--gold); transition: right .35s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: none; }
.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px;
}
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: flex; flex-direction: column; gap: 0;
  max-height: 0; overflow: hidden;
  background: rgba(13,19,14,0.97);
  transition: max-height .4s var(--ease-out);
}
.nav-mobile.is-open { max-height: 320px; border-top: 1px solid var(--line); }
.nav-mobile a { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); font-size: 1rem; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .nav-mobile { display: none; }
}

/* =============================================================
   5. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  font-size: .95rem; font-weight: 500; letter-spacing: .01em;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s var(--ease-out), border-color .3s var(--ease-out);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--cream);
  border: 1px solid var(--gold-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79,122,86,0.35); }
.btn-ghost {
  background: rgba(242,237,224,0.04);
  border: 1px solid var(--line);
  color: var(--cream-2);
}
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--cream); transform: translateY(-2px); }
.btn-lg { padding: 1.1rem 2.2rem; font-size: 1.02rem; }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  padding: 7rem 1.5rem 4rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%;
}
.hero-tint { position: absolute; inset: 0; background: rgba(13,19,14,0.5); }
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(13,19,14,0.55) 78%, rgba(13,19,14,0.92) 100%),
    linear-gradient(180deg, rgba(13,19,14,0.75) 0%, transparent 32%, transparent 62%, rgba(13,19,14,0.85) 100%);
}
.hero-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay; pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%25" height="100%25" filter="url(%23n)"/></svg>');
}
.video-toggle {
  position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(13,19,14,0.55); border: 1px solid var(--line);
  color: var(--cream); font-size: 1rem;
  backdrop-filter: blur(8px);
}

.hero-inner { position: relative; z-index: 2; max-width: 46rem; }
.kicker {
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.1rem; font-weight: 500;
}
.kicker.center { text-align: center; }
.hero-glyph {
  display: block; font-family: var(--glyph); font-size: 2.2rem;
  color: var(--cream-2); opacity: .7; margin-bottom: .6rem;
}
.hero-glyph.small { font-size: 1.6rem; margin-inline: auto; }
.hero-title {
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  letter-spacing: .04em; line-height: .95;
  text-shadow: 0 4px 40px rgba(0,0,0,.6);
  margin-bottom: .8rem;
}
.hero-sub {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--cream-2); margin-bottom: 1.3rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.hero-line {
  max-width: 34rem; margin-inline: auto 1.8rem;
  color: var(--cream-2); font-size: 1.02rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: .4rem; }

.hero-float-card {
  position: absolute; right: 2rem; bottom: 6.5rem; z-index: 2;
  max-width: 15rem; padding: 1.1rem 1.3rem; border-radius: 14px;
  background: rgba(20,28,21,0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  text-align: left; display: none;
}
.hero-float-card p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--cream); margin-bottom: .4rem; }
.hero-float-card span { font-size: .74rem; letter-spacing: .06em; color: var(--cream-3); }
@media (min-width: 960px) { .hero-float-card { display: block; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.8rem; transform: translateX(-50%); z-index: 2;
  width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 999px;
}
.scroll-cue span {
  display: block; width: 4px; height: 8px; margin: 6px auto 0; border-radius: 999px;
  background: var(--gold);
  animation: scrollCue 1.8s ease-in-out infinite;
}
@keyframes scrollCue { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(12px); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

/* =============================================================
   7. Sections (shared)
   ============================================================= */
.section { position: relative; padding: 6rem 0; }
.section-halo {
  position: absolute; inset: -20% -10% -20% -10%; z-index: 0; pointer-events: none;
  background: radial-gradient(45% 40% at 50% 30%, rgba(79,122,86,0.16), transparent 72%);
  filter: blur(80px);
}
.split {
  position: relative; z-index: 1;
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 960px) {
  .split { grid-template-columns: 1.05fr .95fr; gap: 4.5rem; }
  .split-reverse { grid-template-columns: .95fr 1.05fr; }
  .split-reverse .split-figure { order: -1; }
}
.split-text .kicker { margin-bottom: .8rem; }
.split-text h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 1.3rem; }
.split-text p { margin-bottom: 1.1rem; font-size: 1.02rem; color: var(--cream-2); }
.split-text p:last-child { margin-bottom: 0; }

.split-figure {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
}
.split-figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split-figure figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(0deg, rgba(13,19,14,0.88), transparent);
  font-size: .82rem; font-style: italic; color: var(--cream-3);
}
.autor-figure img { aspect-ratio: 3/4; object-position: center 22%; }

/* =============================================================
   8. Conseguir / Recursos (centered CTA sections)
   ============================================================= */
.conseguir-inner { position: relative; z-index: 1; max-width: 42rem; margin-inline: auto; text-align: center; }
.center { text-align: center; }
h2.center, .split-text h2.center { margin-inline: auto; }
.lead { font-size: 1.08rem; color: var(--cream-2); margin-bottom: 1rem; max-width: 38rem; margin-inline: auto; }
.conseguir h2, .recursos h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 1.2rem; }
.conseguir-actions { display: flex; justify-content: center; margin-top: 1.6rem; margin-bottom: 2.2rem; }

.pay-cards { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.pay-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem 1.6rem; border-radius: 14px;
  background: var(--bg-3); border: 1px solid var(--line);
  min-width: 12rem;
}
.pay-card-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pay-card-value { font-family: var(--serif); font-size: 1.2rem; color: var(--cream); cursor: pointer; }
.pay-card-value::after { content: " ⧉"; font-size: .8rem; color: var(--cream-3); }
.pay-card-value.is-copied::before { content: "Copiado — "; color: var(--accent); font-size: .78rem; font-family: var(--sans); }

.recursos { background: var(--bg-2); border-top: 1px solid var(--line); }

/* =============================================================
   9. Footer
   ============================================================= */
.footer { padding: 3.5rem 0 2.5rem; border-top: 1px solid var(--line); text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.footer-logo { border-radius: 50%; opacity: .85; margin-bottom: .4rem; }
.footer-title { font-family: var(--serif); font-size: 1.1rem; color: var(--cream); }
.footer-title span { color: var(--cream-3); font-size: .95rem; }
.footer-meta { font-size: .82rem; color: var(--cream-3); }
.footer-link { font-size: .85rem; color: var(--gold); margin-top: .4rem; }
.footer-link:hover { text-decoration: underline; }

/* =============================================================
   10. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .pay-cards { flex-wrap: nowrap; }
}
@media (min-width: 720px) {
  .hero-line { font-size: 1.08rem; }
}
@media (min-width: 1280px) {
  .container { padding-inline: 2rem; }
}

/* =============================================================
   11. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .video-toggle { display: flex; }
}
