/* ==========================================================================
   MathsHawk — design tokens
   Palette: warm parchment paper, hawk-gold + feather-teal accents,
   muted rust as a rare third voice. Deliberately not the cream+terracotta
   default: gold/teal do the work terracotta usually does.
   ========================================================================== */

:root {
  /* color */
  --paper:        #FBF4E6;
  --paper-card:   #FFFCF6;
  --ink:          #2A2118;
  --ink-soft:     #5C5041;
  --gold:         #C98A2B;
  --gold-dark:    #A5701F;
  --teal:         #2F5D53;
  --teal-dark:    #234840;
  --rust:         #A85C32;
  --line:         #E6D9BF;
  --cream-on-teal: #F4ECD8;

  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* scale */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px -12px rgba(42, 33, 24, 0.18);
  --max-width: 1160px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--teal-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.8vw, 4.1rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-block;
  margin-bottom: 0.9em;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 88px 0;
}
.section--tight { padding: 56px 0; }

.section--teal {
  background: var(--teal);
  color: var(--cream-on-teal);
}
.section--teal h2, .section--teal h3 { color: #fff; }
.section--teal p { color: rgba(244, 236, 216, 0.86); }
.section--teal .eyebrow { color: var(--gold); }

/* -------------------- buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 100px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--teal);
  color: #fff;
}
.btn--primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--gold {
  background: var(--gold);
  color: var(--ink);
}
.btn--gold:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal-dark);
}
.btn--outline:hover { background: var(--teal); color: #fff; }

/* -------------------- nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 244, 230, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 46px; height: auto; display: block; flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.brand-plus {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.6em;
  vertical-align: -0.1em;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--teal-dark);
  border-color: var(--gold);
}
.nav-cta { display: none; }
@media (min-width: 760px) {
  .nav-cta { display: inline-flex; }
}
.nav-toggle {
  display: inline-flex;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
@media (min-width: 760px) {
  .nav-toggle { display: none; }
}
.nav-links {
  display: none;
}
@media (min-width: 760px) {
  .nav-links { display: flex; }
}
.nav-links.is-open { display: flex; }
@media (max-width: 759px) {
  .nav-links.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 28px 18px;
  }
  .nav-links.is-open li { width: 100%; }
  .nav-links.is-open a { display: block; padding: 12px 0; }
}

/* -------------------- hero -------------------- */
.hero {
  padding: 64px 0 60px;
}
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-copy p.lede {
  font-size: 1.18rem;
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.hero-visual {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}

/* hero icon: simple fade + scale in — smoother and less fussy than a stroke draw */
.hero-icon-anim {
  opacity: 0;
  transform-origin: 150px 150px;
  transform: scale(0.94);
  animation: icon-in 0.8s cubic-bezier(.2,.8,.2,1) 0.1s forwards;
}
@keyframes icon-in {
  to { opacity: 1; transform: scale(1); }
}

/* -------------------- mission strip -------------------- */
.mission {
  display: grid;
  gap: 40px;
}
@media (min-width: 880px) {
  .mission { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}
.mission blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

/* -------------------- cards -------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--2 { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
}
.card a.card-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card a.card-link:hover { color: var(--rust); }

/* -------------------- hero: solo (no side visual) -------------------- */
.hero-grid--solo {
  grid-template-columns: 1fr;
}
.hero-grid--solo .hero-copy {
  max-width: 680px;
}

/* -------------------- values -------------------- */
.value-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .value-grid { grid-template-columns: repeat(4, 1fr); }
}
.value-card {
  --icon-bg: #F4ECD8;
  --icon-stroke: #2F5D53;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.value-card:hover,
.value-card:focus-within {
  --icon-bg: rgba(255, 255, 255, 0.18);
  --icon-stroke: #ffffff;
  background: var(--teal);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  outline: none;
}
.value-card h3 { transition: color 0.2s ease; }
.value-card p { transition: color 0.2s ease; margin-bottom: 0; }
.value-card:hover h3, .value-card:focus-within h3 { color: #fff; }
.value-card:hover p, .value-card:focus-within p { color: rgba(244, 236, 216, 0.9); }

/* -------------------- steps -------------------- */
.steps {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
  position: relative;
  padding-top: 8px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 10px;
}

/* -------------------- testimonials -------------------- */
.quote-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.quote-card p { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.quote-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* -------------------- cta band -------------------- */
.cta-band {
  text-align: center;
}
.cta-band h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }

/* -------------------- page header (inner pages) -------------------- */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 0.6em; }
.page-hero p.lede { font-size: 1.1rem; max-width: 60ch; }

.two-col {
  display: grid;
  gap: 44px;
}
@media (min-width: 860px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}
.two-col--wide-left {
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .two-col--wide-left { grid-template-columns: 1.3fr 0.9fr; }
}

.list-check {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-check li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--ink-soft);
}
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  mask: none;
}
.list-check li::after {
  content: "\2713";
  position: absolute;
  left: 3px;
  top: 3px;
  font-size: 0.7rem;
  color: var(--ink);
  font-weight: 700;
}

.info-panel {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.info-panel dl { margin: 0; }
.info-panel dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rust);
  margin-top: 16px;
}
.info-panel dt:first-child { margin-top: 0; }
.info-panel dd { margin: 4px 0 0; color: var(--ink-soft); }

/* -------------------- form -------------------- */
.form-panel {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* -------------------- footer -------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(251, 244, 230, 0.78);
  padding: 56px 0 30px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 36px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a {
  color: rgba(251, 244, 230, 0.78);
  text-decoration: none;
}
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(251, 244, 230, 0.15);
  padding-top: 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* -------------------- utility -------------------- */
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.stack-sm > * + * { margin-top: 12px; }

/* -------------------- hero: faded hawk-eye watermark -------------------- */
.hero { position: relative; overflow: hidden; }
.hero-watermark {
  position: absolute;
  top: 56%;
  right: 20px;
  transform: translateY(-50%);
  width: 740px;
  max-width: 72vw;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.hero-grid, .hero-copy { position: relative; z-index: 1; }
@media (max-width: 699px) {
  .hero-watermark { display: none; }
}

/* -------------------- about page: portrait + old photo -------------------- */
.about-portrait {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 6 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  justify-self: center;
}
.about-figure {
  margin: 36px 0 0;
  padding: 0;
}
.about-figure img {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}
.about-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 480px;
}

/* -------------------- contact form status -------------------- */
.form-status {
  display: none;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-weight: 500;
  line-height: 1.5;
}
.form-status.is-success {
  background: rgba(47, 93, 83, 0.08);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.form-status.is-success::before {
  content: "✓";
  display: inline-block;
  margin-right: 10px;
  font-weight: 700;
  color: var(--teal);
}
.form-status.is-error {
  background: rgba(168, 92, 50, 0.08);
  border-color: var(--rust);
  color: var(--rust);
}

/* -------------------- membership badge -------------------- */
.ta-badge {
  display: inline-block;
  margin-top: 26px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.ta-badge img { width: 240px; height: auto; display: block; }
.ta-badge:hover { transform: translateY(-2px); }
.ta-badge:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
