/* =========================================================
   FinEst-IA — design tokens
   Palette: ink navy + ledger gold + financial teal
   Type: Fraunces (display) / IBM Plex Sans (body) / IBM Plex Mono (data)
   ========================================================= */

:root {
  --ink: #0E1526;
  --ink-soft: #17203A;
  --ink-softer: #1F2A4A;
  --paper: #F7F4EC;
  --paper-dim: #EDE8DA;
  --gold: #C69A3C;
  --gold-soft: #E0BE72;
  --teal: #3E7C7B;
  --teal-soft: #6FA9A6;
  --text: #EDEAE0;
  --text-muted: #A9AFC3;
  --text-on-paper: #23283A;
  --text-on-paper-muted: #5B6072;
  --rule: rgba(237, 234, 224, 0.14);
  --rule-strong: rgba(237, 234, 224, 0.28);

  --display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-w: 1080px;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-fade { animation: fadeUp 0.9s ease both; }
  .hero-fade.d2 { animation-delay: 0.12s; }
  .hero-fade.d3 { animation-delay: 0.24s; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 21, 38, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark-nav {
  width: 24px;
  height: auto;
  flex-shrink: 0;
}

.wordmark b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
}

.wordmark span {
  color: var(--gold-soft);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s ease;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold-soft);
  border-bottom-color: var(--gold-soft);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--rule-strong);
}

.mark {
  position: absolute;
  top: 64px;
  right: 28px;
  width: 96px;
  height: auto;
  opacity: 0.95;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-soft);
  margin: 0 0 20px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  max-width: 720px;
  color: var(--paper);
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-soft);
}

.hero p.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 36px;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
}
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }

/* ---------- Sections ---------- */

section { padding: 88px 0; }

.section-paper {
  background: var(--paper);
  color: var(--text-on-paper);
}

.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.section-paper .label { color: var(--teal); }
.hero + .section-paper, .section-dark .label { color: var(--teal-soft); }

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.pull {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-on-paper);
  border-left: 2px solid var(--gold);
  padding-left: 24px;
  margin: 0;
}

.body-col p { color: var(--text-on-paper-muted); margin: 0 0 18px; }
.body-col p:last-child { margin-bottom: 0; }

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 40px;
}

.service {
  background: var(--ink);
  padding: 32px 28px 36px;
}

.service .glyph {
  width: 34px;
  height: 34px;
  border: 1px solid var(--teal-soft);
  border-radius: 50%;
  margin-bottom: 20px;
  position: relative;
}
.service .glyph::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--teal-soft);
  opacity: 0.35;
}

.service h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--paper);
}

.service p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

/* Contact band */

.band {
  background: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 48px 28px;
}

.band h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-list a { text-decoration: none; color: var(--gold-soft); }

/* Footer */

footer {
  padding: 40px 0 56px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 22px; }
.footer-links a { text-decoration: none; color: var(--text-muted); }
.footer-links a:hover { color: var(--gold-soft); }

/* ---------- Simple content pages (contacto / privacidad / terminos) ---------- */

.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--rule);
}

.page-hero .eyebrow { margin-bottom: 16px; }

.page-hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 44px);
  color: var(--paper);
  margin: 0;
}

.doc {
  padding: 56px 0 96px;
  max-width: 760px;
  margin: 0 auto;
}

.doc h2 {
  font-size: 21px;
  color: var(--paper);
  margin: 40px 0 16px;
}
.doc h2:first-child { margin-top: 0; }

.doc p, .doc li {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}

.doc a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }

.doc .meta {
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-soft);
  margin-bottom: 8px;
}

.contact-card {
  background: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px;
  margin-top: 8px;
}

.contact-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  margin: 0;
}

.contact-card dt {
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-soft);
  align-self: center;
}

.contact-card dd {
  margin: 0;
  font-size: 16px;
  color: var(--paper);
}

.contact-card dd a { color: var(--gold-soft); text-decoration: none; }
.contact-card dd a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .nav-links { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .stamp { width: 92px; height: 92px; top: 32px; right: 20px; }
  .stamp-inner { font-size: 9px; }
  .band .wrap { flex-direction: column; align-items: flex-start; }
}
