/* ============================================================
   The Odegard Foundation — Design System
   ============================================================ */

:root {
  --ink: #14181d;
  --ink-soft: #3a4149;
  --ink-mute: #6b7480;
  --line: #e3e1da;
  --line-soft: #efede6;
  --paper: #faf8f3;
  --paper-2: #f4f1ea;
  --white: #ffffff;
  --accent: #1f5c4a;        /* deep evergreen */
  --accent-2: #c9a24b;      /* muted gold */
  --accent-deep: #163f33;
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(20,24,29,.04), 0 12px 40px rgba(20,24,29,.06);
}

*, *::before, *::after { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-optical-sizing: auto; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p { margin: 0 0 1.1em; color: var(--ink-soft); }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: var(--accent-2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,243,.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 500; }
.brand span { color: var(--ink-mute); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 2.1rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: .92rem;
  color: var(--ink-soft);
  letter-spacing: .01em;
  position: relative;
  padding: .3rem 0;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.cta {
  border: 1px solid var(--ink);
  border-radius: 100px;
  padding: .55rem 1.3rem;
  transition: all .25s;
}
.nav-links a.cta:hover { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 11vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(31,92,74,.07), transparent 70%),
    radial-gradient(40% 40% at 5% 90%, rgba(201,162,75,.06), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 14ch; }
.hero .lede {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 500;
  padding: .85rem 1.7rem;
  border-radius: 100px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: all .25s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Stats strip ---------- */
.stats {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 2.6rem var(--gutter);
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--serif); font-size: clamp(2rem,3vw,2.8rem); color: var(--accent); line-height: 1; }
.stat .lab { font-size: .82rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .1em; margin-top: .7rem; }

/* ---------- Section ---------- */
section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 3.2rem; }
.section-head p { font-size: 1.12rem; }

/* ---------- Focus cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--paper);
  padding: 2.4rem 2.1rem;
  transition: background .3s;
  position: relative;
}
.card:hover { background: var(--white); }
.card .ix { font-family: var(--serif); font-size: .95rem; color: var(--accent-2); margin-bottom: 1.4rem; }
.card h3 { margin-bottom: .6rem; }
.card p { font-size: .96rem; margin-bottom: 1.2rem; }
.card a.more { font-size: .85rem; font-weight: 600; color: var(--accent); letter-spacing: .03em; }
.card a.more::after { content: " →"; }

/* ---------- Feature split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split.alt { background: var(--paper-2); }
.figure {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Quote / pull ---------- */
.pull {
  background: var(--accent-deep);
  color: var(--paper);
}
.pull .wrap { text-align: center; max-width: 940px; }
.pull blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.28;
  margin: 0 0 1.6rem;
  color: var(--paper);
}
.pull cite { font-style: normal; color: rgba(250,248,243,.7); font-size: .95rem; letter-spacing: .03em; }

/* ---------- Listing rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding .25s;
}
.row:hover { padding-left: .6rem; }
.row .yr { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: .9rem; }
.row h3 { font-size: 1.2rem; margin: 0; }
.row .meta { font-size: .82rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- CTA band ---------- */
.band {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.band h2 { color: var(--paper); }
.band p { color: rgba(250,248,243,.72); max-width: 50ch; margin-inline: auto; }
.band .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); margin-top: 1.6rem; }
.band .btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: clamp(3rem,6vw,4.5rem) 0 2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.foot-grid h4 {
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .6rem; }
.foot-grid a { font-size: .92rem; color: var(--ink-soft); transition: color .2s; }
.foot-grid a:hover { color: var(--accent); }
.foot-brand p { font-size: .92rem; max-width: 34ch; margin-top: 1rem; }
.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.8rem;
  font-size: .82rem;
  color: var(--ink-mute);
}
.foot-bottom a { color: var(--ink-mute); }
.foot-bottom a:hover { color: var(--accent); }
.foot-legal-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Article / legal pages ---------- */
.page-hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2rem,4vw,3rem);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.6rem; font-size: 1.7rem; }
.prose h3 { margin-top: 2rem; font-size: 1.25rem; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { font-size: .85rem; color: var(--ink-mute); letter-spacing: .03em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.prose th, .prose td { text-align: left; padding: .8rem; border: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper-2); font-family: var(--sans); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin-bottom: .5rem; }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.office { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.office h4 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: .3rem; }
.office p { font-size: .92rem; margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed;
  bottom: 1.2rem; left: 1.2rem; right: 1.2rem;
  max-width: 560px;
  margin-inline: auto;
  background: var(--ink);
  color: var(--paper);
  padding: 1.4rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  z-index: 200;
  transform: translateY(150%);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.cookie.show { transform: none; }
.cookie p { color: rgba(250,248,243,.82); font-size: .88rem; margin: 0 0 1rem; }
.cookie p a { color: var(--accent-2); text-decoration: underline; }
.cookie-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.cookie button {
  font-family: var(--sans); font-size: .85rem; font-weight: 500;
  padding: .6rem 1.2rem; border-radius: 100px; cursor: pointer; border: 1px solid rgba(250,248,243,.4);
  background: transparent; color: var(--paper); transition: all .2s;
}
.cookie button.accept { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cookie button:hover { opacity: .85; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .split { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: flex-start;
    background: var(--paper); padding: 1.5rem var(--gutter);
    border-bottom: 1px solid var(--line); gap: 1.2rem;
    transform: translateY(-120%); transition: transform .35s ease; height: auto;
  }
  .nav-links.open { transform: none; }
  .nav-toggle { display: block; }
  .row { grid-template-columns: 1fr; gap: .3rem; }
  .row .yr { order: -1; }
  .foot-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
