/* =========================================================
   Gradient — Design System
   A restrained, editorial system built from the brand palette:
   ink (near-black), charcoal (cinza), cream (bege), paper, white.
   ========================================================= */

:root {
  --ink: #17151b;
  --charcoal: #544a52;
  --charcoal-60: rgba(84, 74, 82, 0.78);
  --cream: #e0ddcf;
  --cream-soft: #eeecdf;
  --paper: #faf8f4;
  --white: #ffffff;

  --line: rgba(23, 21, 27, 0.12);
  --line-strong: rgba(23, 21, 27, 0.28);
  --line-on-dark: rgba(250, 248, 244, 0.22);

  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --section-pad: clamp(4.5rem, 9vw, 8rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.section--dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--paper);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  z-index: 200;
  transition: top 0.2s var(--ease);
  font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }
.section--cream { background: var(--cream-soft); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--border-top { border-top: 1px solid var(--line); }
.section--dark .hairline { border-color: var(--line-on-dark); }

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Typography ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.section--dark .kicker { color: var(--cream); }
.kicker::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: 1.03;
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.3;
}
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.6;
  color: var(--charcoal);
  max-width: 42rem;
}
.section--dark .lede { color: var(--cream); }
p.body-text { max-width: 62ch; color: var(--charcoal); }
.section--dark p.body-text { color: rgba(250, 248, 244, 0.78); }

.eyebrow-space { margin-bottom: 1.5rem; }
.measure { max-width: 42rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--charcoal); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section--dark .btn-primary { background: var(--paper); color: var(--ink); }
.section--dark .btn-primary:hover { background: var(--cream); }
.section--dark .btn-ghost { border-color: var(--line-on-dark); color: var(--paper); }
.section--dark .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  font-weight: 500;
}
.text-link:hover { border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line-strong); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5.25rem;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 26px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0s;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.75rem);
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}
.mobile-nav a[aria-current="page"] { color: var(--charcoal); }
.mobile-nav-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--charcoal);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4rem, 11vw, 8rem) clamp(3.5rem, 8vw, 6rem);
}
.hero-inner { max-width: 54rem; }
.hero h1 { margin-block: 1.5rem 1.75rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- Editorial index list (numbered rows) ---------- */
.index-list { border-top: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--line);
}
.index-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--charcoal-60);
  padding-top: 0.2rem;
}
.index-content h3 { margin-bottom: 0.6rem; }
.index-content p { max-width: 44rem; }
@media (max-width: 640px) {
  .index-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ---------- Two column editorial ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}
.stack { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 2.75rem); }

/* ---------- Pull quote / statement ---------- */
.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.625rem, 3.4vw, 2.375rem);
  line-height: 1.4;
  max-width: 46rem;
}
.statement em {
  font-style: italic;
  color: var(--charcoal);
}
.section--dark .statement em { color: var(--cream); }

/* ---------- Values / principles list ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.principle {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.principle .index-num { display: block; margin-bottom: 1rem; }
.principle h3 { margin-bottom: 0.6rem; }
@media (max-width: 640px) {
  .principles { grid-template-columns: 1fr; }
}

/* ---------- Event rows ---------- */
.event-list { border-top: 1px solid var(--line); }
.event-row {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.event-date {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding-top: 0.3rem;
}
.event-body h3 { margin-bottom: 0.5rem; }
.event-meta {
  font-size: 0.875rem;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}
.event-status {
  align-self: start;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  white-space: nowrap;
}
.event-status--upcoming { border-color: var(--ink); color: var(--ink); }
@media (max-width: 780px) {
  .event-row { grid-template-columns: 1fr; }
  .event-status { justify-self: start; }
}

/* ---------- Cards used sparingly (about/contact detail blocks) ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.detail-block h3 { margin-bottom: 0.5rem; }
.detail-block p { color: var(--charcoal); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.75rem; max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.field input, .field textarea {
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 0.7rem 0.1rem;
  font-size: 1rem;
  color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: var(--charcoal-60); }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 8rem; }
.form-note { font-size: 0.8125rem; color: var(--charcoal); }
.form-success {
  display: none;
  font-size: 0.9375rem;
  color: var(--ink);
  border-left: 2px solid var(--ink);
  padding-left: 0.9rem;
}
.form-success.is-visible { display: block; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand img { height: 24px; margin-bottom: 1.5rem; }
.footer-brand p { color: rgba(250, 248, 244, 0.7); max-width: 26rem; }
.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { text-decoration: none; color: rgba(250, 248, 244, 0.82); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--paper); }

.link-list { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.75rem;
  font-size: 0.8125rem;
  color: rgba(250, 248, 244, 0.55);
}
@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Reveal on scroll ----------
   Hidden-then-revealed state only applies once JS confirms it can
   run the reveal (html.js). Without JS, content is visible from the start. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.center-text { text-align: center; margin-inline: auto; }
.mt-0 { margin-top: 0; }

/* ---------- Not-found page ---------- */
.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
