/* =========================================================================
   Palanca — brand.css
   Colors, type, layout tokens. Mobile-first. No frameworks.
   ========================================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Tiempos Headline";
  src: url("/assets/fonts/TiemposHeadline-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tiempos Headline";
  src: url("/assets/fonts/TiemposHeadline-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #1D3557;
  --navy-90: rgba(29, 53, 87, 0.9);
  --copper: #B46A3C;
  --warm-white: #F8F6F0;
  --body: #2A2A2A;
  --muted: #5A5A5A;
  --rule: #E8DFD4;

  --ff-serif: "Tiempos Headline", Georgia, "IBM Plex Serif", serif;
  --ff-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 2rem);
  --fs-h3: 1.125rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;

  --measure: 62ch;
  --container: 72rem;
  --radius: 2px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--warm-white);
  color: var(--body);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--copper); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 2px; }

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0; padding: 0.75rem 1rem;
  background: var(--navy); color: var(--warm-white); font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: 2rem; }
h3 { font-size: var(--fs-h3); font-family: var(--ff-sans); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--navy); margin-top: 1.5rem; margin-bottom: 0.5rem; }
p { margin: 0 0 1rem 0; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.25rem; margin: 0 0 1rem 0; }
li { margin-bottom: 0.35rem; }
strong { color: var(--navy); font-weight: 600; }

.eyebrow {
  font-family: var(--ff-sans);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 0.75rem 0;
}
.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--navy);
  max-width: 45ch;
}
.tagline {
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--navy);
  font-size: 1.25rem;
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
hr.copper { border-top: 2px solid var(--copper); width: 3rem; margin: 1.5rem 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

main { padding-bottom: 4rem; }
section { padding: 3rem 0; }
@media (min-width: 640px) { section { padding: 4rem 0; } }
@media (min-width: 1024px) { section { padding: 5rem 0; } }

.section-navy { background: var(--navy); color: var(--warm-white); }
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy strong { color: var(--warm-white); }
.section-navy .eyebrow { color: var(--copper); }
.section-navy a { color: var(--warm-white); }
.section-navy a:hover { color: var(--copper); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--warm-white);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(4px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand-link { display: flex; align-items: center; text-decoration: none; }
.brand-link img { height: 1.75rem; width: auto; }
@media (min-width: 640px) { .brand-link img { height: 2.25rem; } }

.nav { display: none; }
@media (min-width: 768px) {
  .nav { display: flex; gap: 1.75rem; }
  .nav a {
    font-size: 0.95rem; font-weight: 500; color: var(--navy);
    text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent;
  }
  .nav a:hover { color: var(--navy); border-bottom-color: var(--copper); }
  .nav a.current { border-bottom-color: var(--copper); }
}
.mobile-toggle {
  display: flex; background: none; border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem; cursor: pointer; color: var(--navy);
  font-family: var(--ff-sans); font-size: 0.875rem; font-weight: 600;
  border-radius: var(--radius);
}
@media (min-width: 768px) { .mobile-toggle { display: none; } }
.nav-mobile {
  display: none; flex-direction: column; gap: 1rem;
  padding: 1rem 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.nav-mobile a { color: var(--navy); text-decoration: none; font-weight: 500; }
.nav-mobile.open { display: flex; }
@media (min-width: 768px) { .nav-mobile { display: none !important; } }

/* ---------- Hero ---------- */
.hero { padding: 4rem 0 3rem; }
@media (min-width: 1024px) { .hero { padding: 6rem 0 5rem; } }
.hero h1 { font-size: var(--fs-hero); max-width: 18ch; margin-bottom: 1.25rem; }
.hero .lede { margin-bottom: 2rem; }

/* ---------- Grid / cards ---------- */
.grid-2, .grid-3 { display: grid; gap: 2rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  padding: 2rem;
  background: var(--warm-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--navy);
  transition: all 150ms ease;
  line-height: 1.2;
}
.btn-primary { background: var(--navy); color: var(--warm-white); }
.btn-primary:hover { background: var(--copper); border-color: var(--copper); color: var(--warm-white); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--warm-white); }
.section-navy .btn-outline { border-color: var(--warm-white); color: var(--warm-white); }
.section-navy .btn-outline:hover { background: var(--warm-white); color: var(--navy); }

/* ---------- Service / program table rows ---------- */
.svc-row, .prog-row {
  display: grid; gap: 0.25rem 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.svc-row:last-child, .prog-row:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 768px) {
  .svc-row { grid-template-columns: 2fr 1fr 1fr; align-items: baseline; }
  .prog-row { grid-template-columns: 2fr 1fr 1fr; align-items: baseline; }
}
.svc-row .name, .prog-row .name { font-family: var(--ff-serif); font-weight: 500; font-size: 1.375rem; color: var(--navy); }
.svc-row .dek, .prog-row .dek { grid-column: 1 / -1; color: var(--muted); margin-top: 0.25rem; max-width: 70ch; }
.svc-row .price, .prog-row .price { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.svc-row .meta, .prog-row .meta { color: var(--muted); font-size: 0.95rem; }

/* ---------- Mark (decorative) ---------- */
.mark-inline { height: 2.25rem; width: auto; vertical-align: middle; display: inline-block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--warm-white); padding: 3rem 0 2rem; margin-top: 4rem; }
.site-footer a { color: var(--warm-white); text-decoration: none; }
.site-footer a:hover { color: var(--copper); }
.footer-top { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-logo img { height: 2.25rem; margin-bottom: 1rem; }
.footer-tagline { font-family: var(--ff-serif); font-style: italic; color: var(--warm-white); font-size: 1rem; opacity: 0.9; }
.footer-heading { font-family: var(--ff-sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--copper); margin-bottom: 0.75rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(248, 246, 240, 0.15);
  margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: var(--fs-small); color: rgba(248, 246, 240, 0.7);
}

/* ---------- Utility ---------- */
.flow > * + * { margin-top: 1rem; }
.flow-lg > * + * { margin-top: 2rem; }
.center-text { text-align: center; }
.max-measure { max-width: var(--measure); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.page-hero { padding: 3rem 0 1.5rem; }
@media (min-width: 768px) { .page-hero { padding: 4rem 0 2rem; } }
.page-hero h1 { max-width: 20ch; }
