/* ============================================================
   Terraforte — site stylesheet
   Brand palette per Manual de marca-Terraforte.pdf
   Typography: Raleway (primary) + Freehand-Regular (script display),
   self-hosted from /assets/fonts.
   One stylesheet, all pages.
   ============================================================ */

@font-face {
  font-family: "Raleway";
  src: url("assets/fonts/Raleway-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("assets/fonts/Raleway-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Freehand";
  src: url("assets/fonts/Freehand-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --royal-blue:    #003f77;  /* primary navy, from official logo SVG */
  --royal-blue-dk: #002a52;
  --sea-blue:      #3683c2;  /* PMS 2926 */
  --caribbean:     #4cced1;  /* turquoise accent, from logo SVG */
  --caribbean-lt:  #a3e6e7;
  --karstic:       #472914;  /* PMS 155 dark brown */
  --gold:          #d38e33;  /* PMS 144 colonial yellow */

  /* Background system */
  --cream:         #f5f1e8;
  --ivory:         #faf7f0;
  --sand:          #d4c9b2;
  --white:         #ffffff;

  /* Type system */
  --ink:           #1f2937;
  --ink-soft:      #2e3a4d;
  --muted:         #6b7280;
  --divider:       #d4c9b2;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--royal-blue); text-decoration: none; }
a:hover { color: var(--sea-blue); }

/* ============================================================
   Header / navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--royal-blue);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header .bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header a.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  letter-spacing: 0.32em;
  font-weight: 700;
  font-size: 14px;
}

.site-header a.logo .swatch {
  width: 22px; height: 22px;
  background: var(--caribbean);
  display: inline-block;
}

.site-header nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-header nav a {
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-header nav a:hover { color: var(--caribbean); }
.site-header nav a.cta {
  color: var(--royal-blue);
  background: var(--caribbean);
  padding: 8px 16px;
  border-radius: 2px;
}
.site-header nav a.cta:hover { background: var(--caribbean-lt); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: var(--royal-blue);
  color: var(--white);
  overflow: hidden;
  padding: 96px 32px 112px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(76, 206, 209, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(211, 142, 51, 0.10), transparent 60%);
  pointer-events: none;
}

.hero .inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  z-index: 1;
}

.eyebrow {
  font-family: "Freehand", "Caveat", "Brush Script MT", cursive;
  font-size: 24px;
  color: var(--caribbean);
  margin-bottom: 8px;
}

.eyebrow.uppercase {
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
}

.hero h1 {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.04;
  margin: 0 0 24px;
  letter-spacing: -0.005em;
  max-width: 900px;
}

.hero h1 em {
  font-style: normal;
  color: var(--caribbean);
  font-weight: 300;
}

.hero p.lede {
  font-size: clamp(18px, 1.8vw, 22px);
  max-width: 720px;
  color: rgba(255,255,255,0.88);
  margin: 0 0 36px;
  font-weight: 300;
  line-height: 1.55;
}

.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn.primary {
  background: var(--caribbean);
  color: var(--royal-blue);
}
.btn.primary:hover { background: var(--caribbean-lt); }
.btn.ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn.ghost:hover { border-color: var(--caribbean); color: var(--caribbean); }
.btn.gold {
  background: var(--gold);
  color: var(--white);
}
.btn.gold:hover { background: #b87623; }

/* Hero glyph word — script font in the corner */
.hero .glyph-word {
  position: absolute;
  right: 48px;
  bottom: 56px;
  font-family: "Freehand", "Caveat", cursive;
  font-size: 64px;
  color: rgba(76, 206, 209, 0.45);
  pointer-events: none;
}

/* ============================================================
   Section primitives
   ============================================================ */
section {
  padding: 96px 32px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.container.narrow {
  max-width: 880px;
}

.section-eyebrow {
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 16px;
}

h2 {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  margin: 0 0 32px;
  letter-spacing: -0.005em;
  color: var(--royal-blue);
  max-width: 860px;
}

h2 em {
  font-style: normal;
  color: var(--sea-blue);
  font-weight: 300;
}

h3 {
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--royal-blue);
  letter-spacing: -0.005em;
}

h4 {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
  color: var(--royal-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

.lede-prose {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 760px;
  font-weight: 300;
}

.gold-rule {
  width: 80px;
  height: 2px;
  background: var(--gold);
  margin: 0 0 28px;
}

.script-label {
  font-family: "Freehand", "Caveat", cursive;
  font-size: 42px;
  color: var(--caribbean);
  line-height: 1;
  margin-bottom: 12px;
  display: inline-block;
}

/* Alternating section backgrounds */
.bg-ivory  { background: var(--ivory); }
.bg-cream  { background: var(--cream); }
.bg-navy   { background: var(--royal-blue); color: var(--white); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy .section-eyebrow { color: var(--caribbean); }
.bg-sand   { background: var(--sand); }

.bg-navy h2 em { color: var(--caribbean); }

/* Two-column layouts */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) {
  .cols-2 { grid-template-columns: 1fr; gap: 36px; }
}

.cols-2.heading-left h2 { margin-bottom: 0; }

/* Sub-brand grid */
.subbrand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1000px) { .subbrand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .subbrand-grid { grid-template-columns: 1fr; } }

.subbrand-card {
  background: var(--white);
  border: 1px solid var(--sand);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.subbrand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px -22px rgba(0, 63, 119, 0.4);
  border-color: var(--caribbean);
}
.subbrand-card .latin {
  font-family: "Freehand", "Caveat", cursive;
  font-size: 22px;
  color: var(--sea-blue);
  margin-bottom: 6px;
}
.subbrand-card h3 {
  font-weight: 300;
  font-size: 26px;
  margin: 0 0 14px;
  color: var(--royal-blue);
}
.subbrand-card p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 24px;
  flex: 1;
}
.subbrand-card .arrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.subbrand-card.soft-launch::before {
  content: "Soft launch · Q4 2026";
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  background: rgba(211, 142, 51, 0.08);
  padding: 4px 8px;
  border: 1px solid rgba(211, 142, 51, 0.3);
}

/* Principles list */
.principles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-top: 32px;
}
@media (max-width: 980px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .principles { grid-template-columns: 1fr; } }

.principle {
  border-top: 2px solid var(--gold);
  padding-top: 22px;
}
.principle .num {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: 40px;
  color: var(--sea-blue);
  display: block;
  line-height: 1;
  margin-bottom: 12px;
}
.principle h4 {
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: 10px;
  color: var(--royal-blue);
}
.principle p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Bonafides */
.bona-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 980px) { .bona-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .bona-list { grid-template-columns: 1fr; } }

.bona {
  padding-top: 20px;
  border-top: 1px solid var(--sand);
}
.bona .glyph {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 10px;
}
.bona h4 {
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  margin-bottom: 8px;
}
.bona p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* Flywheel stations */
.flywheel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
@media (max-width: 980px) { .flywheel { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .flywheel { grid-template-columns: 1fr; } }

.station {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 28px 24px;
}
.station .step {
  font-family: "Freehand", "Caveat", cursive;
  font-size: 22px;
  color: var(--caribbean);
  margin-bottom: 4px;
}
.station h4 {
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 10px;
  color: var(--white);
}
.station p { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.78); }

/* Pull-quote / call-out */
.callout {
  border-left: 3px solid var(--gold);
  padding: 14px 28px;
  margin: 28px 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
  font-weight: 300;
  max-width: 760px;
}
.bg-navy .callout { color: rgba(255,255,255,0.92); border-color: var(--caribbean); }

/* Service list */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
}
@media (max-width: 800px) { .service-grid { grid-template-columns: 1fr; } }

.service {
  padding-top: 18px;
  border-top: 1px solid var(--sand);
}
.service h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--royal-blue);
}
.service p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

/* Ecosystem cards (cross-brand callout) */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}
@media (max-width: 900px) { .ecosystem-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .ecosystem-grid { grid-template-columns: 1fr; } }

.eco-card {
  border: 1px solid var(--sand);
  background: var(--white);
  padding: 22px 22px 24px;
}
.eco-card h4 {
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--royal-blue);
  margin-bottom: 8px;
}
.eco-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* Inline list rows */
.tight-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tight-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.tight-list li:first-child { padding-top: 0; }
.tight-list li:last-child { border-bottom: none; }
.tight-list li strong {
  display: block;
  color: var(--royal-blue);
  font-weight: 700;
  margin-bottom: 4px;
}

/* Inventory feature blocks (Expedita) */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 32px;
}
@media (max-width: 780px) { .inventory-grid { grid-template-columns: 1fr; } }
.inventory {
  background: var(--white);
  border: 1px solid var(--sand);
  padding: 26px 28px;
}
.inventory .marker {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.inventory h4 {
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.inventory p { font-size: 15px; color: var(--ink-soft); }

/* Footer */
footer.site-footer {
  background: var(--royal-blue-dk);
  color: rgba(255,255,255,0.78);
  padding: 64px 32px 32px;
  font-size: 14px;
}
footer.site-footer .grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) {
  footer.site-footer .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  footer.site-footer .grid { grid-template-columns: 1fr; }
}

footer.site-footer h5 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 16px;
}
footer.site-footer ul { list-style: none; padding: 0; margin: 0; }
footer.site-footer ul li { margin-bottom: 10px; }
footer.site-footer a { color: rgba(255,255,255,0.78); }
footer.site-footer a:hover { color: var(--caribbean); }
footer.site-footer .brand {
  letter-spacing: 0.36em;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  font-size: 14px;
}
footer.site-footer .copy {
  max-width: 1280px;
  margin: 48px auto 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* Page header for sub-brand pages */
.page-hero {
  background: var(--royal-blue);
  color: var(--white);
  padding: 80px 32px 96px;
  position: relative;
  overflow: hidden;
}
.page-hero .crumb {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
}
.page-hero .crumb a { color: rgba(255,255,255,0.7); }
.page-hero .crumb a:hover { color: var(--caribbean); }
.page-hero h1 {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: clamp(40px, 5.5vw, 72px);
  margin: 0 0 18px;
  line-height: 1.05;
  letter-spacing: -0.005em;
}
.page-hero .latin {
  font-family: "Freehand", "Caveat", cursive;
  font-size: 26px;
  color: var(--caribbean);
  margin-bottom: 8px;
}
.page-hero p.svc-line {
  font-size: 16px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.82);
  max-width: 820px;
  margin: 0;
  line-height: 1.55;
}

/* Closing CTA */
.cta-block {
  background: var(--ivory);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  padding: 80px 32px;
  text-align: center;
}
.cta-block h2 { margin: 0 auto 22px; }
.cta-block p { max-width: 600px; margin: 0 auto 28px; color: var(--ink-soft); }
.cta-block .actions { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cta-block .actions .btn.primary { background: var(--gold); color: var(--white); }
.cta-block .actions .btn.primary:hover { background: #b87623; }
.cta-block .actions .btn.ghost { color: var(--royal-blue); border-color: var(--royal-blue); }
.cta-block .actions .btn.ghost:hover { background: var(--royal-blue); color: var(--white); }

/* Soft-launch banner (Mercatus page) */
.notice {
  background: var(--ivory);
  border: 1px solid var(--gold);
  padding: 16px 22px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.notice strong { color: var(--gold); }

/* Tiered pricing (Civis) */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }
.tier {
  border: 1px solid var(--sand);
  background: var(--white);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.tier.featured {
  border-color: var(--gold);
  background: var(--ivory);
}
.tier .tier-name {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.tier .price {
  font-family: "Raleway", sans-serif;
  font-weight: 300;
  font-size: 32px;
  color: var(--royal-blue);
  line-height: 1;
  margin-bottom: 6px;
}
.tier .per { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.tier ul { padding: 0; list-style: none; margin: 0 0 22px; }
.tier ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--sand);
  font-size: 14px;
  color: var(--ink-soft);
}
.tier ul li:last-child { border-bottom: none; }
.tier .target { font-size: 13px; color: var(--muted); font-style: italic; }

/* Utilities */
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Tiny hidden anchor offset for sticky nav */
section[id]::before {
  content: "";
  display: block;
  height: 72px;
  margin-top: -72px;
  visibility: hidden;
  pointer-events: none;
}
