/* Ciudad Perdida del Agua — investor site design system
   Palette (Rob's direction): dark blue ground, light blue (turquoise) accent, jungle green secondary.
   Display: Palatino serif · Body: system sans. Dark = deep water (default), light = river mist. */

:root {
  --abyss: #062436;
  --deep: #0b3149;
  --panel: #0e3a55;
  --river: #145d82;
  --turq: #4cc9e0;
  --turq-strong: #2fb3ce;
  --jungle: #2f7d53;
  --leaf: #8fd1a8;
  --mist: #dce9ee;
  --mist-dim: #9fb8c4;
  --rule: #1b4a67;
  --ground: var(--abyss);
  --ink: var(--mist);
  --ink-dim: var(--mist-dim);
  --card: var(--deep);
  --accent: var(--turq);
  --accent-ink: #06222e;
  --green-label: var(--leaf);
  --shadow: 0 18px 50px -20px rgba(1, 10, 18, 0.75);
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #eef5f7;
    --ink: #0b3149;
    --ink-dim: #47626f;
    --card: #ffffff;
    --rule: #cfe0e7;
    --accent: #157f96;
    --accent-ink: #ffffff;
    --green-label: #22684a;
    --shadow: 0 14px 40px -22px rgba(11, 49, 73, 0.35);
  }
}
:root[data-theme="dark"] {
  --ground: var(--abyss);
  --ink: var(--mist);
  --ink-dim: var(--mist-dim);
  --card: var(--deep);
  --rule: #1b4a67;
  --accent: var(--turq);
  --accent-ink: #06222e;
  --green-label: var(--leaf);
  --shadow: 0 18px 50px -20px rgba(1, 10, 18, 0.75);
}
:root[data-theme="light"] {
  --ground: #eef5f7;
  --ink: #0b3149;
  --ink-dim: #47626f;
  --card: #ffffff;
  --rule: #cfe0e7;
  --accent: #157f96;
  --accent-ink: #ffffff;
  --green-label: #22684a;
  --shadow: 0 14px 40px -22px rgba(11, 49, 73, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.serif { font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif; }
h1, h2, h3, .brand-name { font-family: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.06; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { max-width: 68ch; }
.eyebrow {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-label); margin-bottom: 0.85rem;
}
.lede { font-size: 1.13rem; color: var(--ink-dim); }
.lede strong, .lede em { color: var(--ink); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0.8rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.06rem; font-weight: 700; line-height: 1.1; }
.brand-tag { display: block; font-family: -apple-system, "Segoe UI", sans-serif; font-size: 0.62rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; }
.nav-links { display: flex; gap: 1.35rem; align-items: center; list-style: none; }
.nav-links a { color: var(--ink-dim); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.nav-links a.btn, .nav-links a.btn:hover { color: var(--accent-ink); }
.nav-links a.btn[aria-current="page"] { border-bottom: 0; padding-bottom: 0.72rem; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; padding: 0.72rem 1.4rem; border-radius: 3px;
  border: 0; font-size: 0.95rem; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--rule);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); color: var(--ink);
  border-radius: 3px; padding: 0.4rem 0.6rem; font-size: 1.05rem; cursor: pointer; }
.theme-toggle { background: none; border: 1px solid var(--rule); color: var(--ink-dim); border-radius: 3px;
  padding: 0.4rem 0.6rem; cursor: pointer; font-size: 0.9rem; }
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--rule); padding: 0.5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.7rem 0; }
}

/* ── Breadcrumbs ─────────────────────────────────────── */
.crumbs { border-bottom: 1px solid var(--rule); font-size: 0.82rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem;
  max-width: 1200px; margin: 0 auto; padding: 0.55rem 1.25rem; }
.crumbs li { color: var(--ink-dim); display: flex; align-items: center; gap: 0.35rem; }
.crumbs li + li::before { content: "›"; color: var(--ink-dim); }
.crumbs a { color: var(--ink-dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ── Hero ─────────────────────────────────────────────── */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,36,54,0.15) 0%, rgba(6,36,54,0.35) 45%, rgba(6,36,54,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 6rem 1.25rem 3.5rem; color: #eaf4f7; }
.hero-content .eyebrow { color: #9fe0c0; }
.hero-content .lede { color: #c6dbe4; }
.hero-sub { max-width: 60ch; font-size: 1.15rem; margin-top: 1.1rem; color: #c6dbe4; }
.hero-ctas { display: flex; gap: 0.9rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero .btn-ghost { color: #eaf4f7; border-color: rgba(234,244,247,0.45); }
.hero .btn-ghost:hover { border-color: var(--turq); color: var(--turq); }
.hero-small { min-height: 46vh; }

/* ── Sections / layout ───────────────────────────────── */
.section { max-width: 1200px; margin: 0 auto; padding: 4.5rem 1.25rem; }
.section-tight { padding-top: 3rem; padding-bottom: 3rem; }
.section-head { max-width: 760px; margin-bottom: 2.6rem; }
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--ink-dim); font-size: 0.97rem; }
.card .num {
  font-family: Palatino, Georgia, serif; font-size: 0.95rem; color: var(--accent);
  letter-spacing: 0.12em; display: block; margin-bottom: 0.7rem;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.4rem; }
.stat { border-left: 3px solid var(--accent); padding-left: 1rem; }
.stat b { display: block; font-family: Palatino, Georgia, serif; font-size: 1.9rem; line-height: 1.15;
  font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-dim); font-size: 0.9rem; }

.figure { margin: 0; }
.figure img { border-radius: 4px; box-shadow: var(--shadow); }
.figure figcaption { font-size: 0.85rem; color: var(--ink-dim); margin-top: 0.65rem; }
.split { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 940px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.rev > .figure { order: 2; }
}

.band { background: var(--deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
:root[data-theme="light"] .band { background: #e2eef2; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .band { background: #e2eef2; } }

.checklist { list-style: none; display: grid; gap: 0.85rem; max-width: 68ch; }
.checklist li { padding-left: 1.9rem; position: relative; color: var(--ink-dim); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--leaf); font-weight: 700; }
.checklist li strong { color: var(--ink); }

.notice {
  border: 1px solid var(--rule); border-left: 4px solid var(--jungle);
  background: var(--card); border-radius: 4px; padding: 1.1rem 1.4rem;
  font-size: 0.92rem; color: var(--ink-dim); max-width: none;
}

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); }
th { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); }
tr:last-child td { border-bottom: 0; }
td b { font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.22rem 0.65rem; border-radius: 99px; }
.pill-green { background: rgba(47,125,83,0.18); color: var(--green-label); border: 1px solid rgba(47,125,83,0.5); }
.pill-blue { background: rgba(76,201,224,0.14); color: var(--accent); border: 1px solid rgba(76,201,224,0.45); }

/* timeline */
.timeline { list-style: none; position: relative; padding-left: 1.8rem; display: grid; gap: 2rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -1.8rem; top: 0.45rem; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--ground); }
.timeline h3 { margin-bottom: 0.35rem; }
.timeline p { color: var(--ink-dim); font-size: 0.97rem; }
.timeline .phase-label { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green-label); font-weight: 700; }

/* forms */
form.lead { display: grid; gap: 1rem; max-width: 560px; }
form.lead label { font-size: 0.85rem; font-weight: 600; color: var(--ink-dim); display: grid; gap: 0.4rem; }
form.lead input, form.lead select, form.lead textarea {
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px;
  padding: 0.7rem 0.85rem; font: inherit; width: 100%;
}
form.lead input:focus, form.lead select:focus, form.lead textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.form-status { font-size: 0.95rem; min-height: 1.4em; }
.form-status.ok { color: var(--leaf); }
.form-status.err { color: #e08a8a; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* footer */
footer { border-top: 1px solid var(--rule); margin-top: 3rem; }
.foot-inner { max-width: 1200px; margin: 0 auto; padding: 3rem 1.25rem 2.2rem;
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot-inner h4 { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim);
  margin-bottom: 0.8rem; }
.foot-inner ul { list-style: none; display: grid; gap: 0.45rem; }
.foot-inner a { color: var(--ink-dim); text-decoration: none; font-size: 0.94rem; }
.foot-inner a:hover { color: var(--accent); }
.foot-brand p { color: var(--ink-dim); font-size: 0.92rem; max-width: 34ch; }
.foot-legal { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem 2rem; color: var(--ink-dim);
  font-size: 0.8rem; }
.foot-legal p { max-width: none; }

/* focus visibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; }
