/* =========================================================
   Margin & Method - site stylesheet
   Plain CSS, no framework, no build step.
   ========================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--navy-soft);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0 0 1em 0; }
ul { padding-left: 1.2em; }

/* ---- Design tokens ---- */
:root {
  --navy: #0A1E37;
  --navy-soft: #1C2B3A;
  --olive: #5A6744;
  --olive-bright: #9AAE72;
  --bg: #FAF9F6;
  --card-bg: #E7E5DF;
  --white: #FFFFFF;

  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 10px;
  --container-max: 1120px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; letter-spacing: -0.005em; }
p { max-width: 68ch; }
.full-width { max-width: none; }
.lede { font-size: 1.15rem; color: var(--navy-soft); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

/* ---- Layout ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
section { padding: var(--space-5) 0; }
section.tight { padding: var(--space-4) 0; }
.divider {
  border: none;
  border-top: 1px solid var(--card-bg);
  margin: 0;
}
.section-bg {
  background: var(--card-bg);
}
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Header / nav ---- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-mark { height: 34px; width: 34px; border-radius: 8px; }
.brand-text {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.15rem;
  white-space: nowrap;
}
@media (max-width: 400px) {
  .brand-text { font-size: 0.95rem; }
  .brand-mark { height: 28px; width: 28px; }
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--navy);
  border-radius: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
}
.nav-toggle { flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); }

.main-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--card-bg);
}
.main-nav.open { display: flex; }
.main-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--navy-soft);
  border-top: 1px solid var(--card-bg);
}
.main-nav a:hover { color: var(--olive); }
.main-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    gap: var(--space-2);
  }
  .main-nav a {
    border-top: none;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
  }
  .main-nav a[aria-current="page"] {
    border-bottom-color: var(--olive);
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: var(--white); opacity: 1; }

/* ---- Hero ---- */
.hero {
  padding: var(--space-6) 0 var(--space-5);
}
.hero h1 { max-width: 18ch; }
.hero h1.full-width { max-width: none; }
.hero .lede { max-width: 62ch; }
.hero .lede.full-width { max-width: none; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* Split hero: copy left, image right (home) */
.hero-split .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}
.hero-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
@media (min-width: 900px) {
  .hero-split .container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

/* Narrow, centered content column (interior page heroes + body) */
.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Slightly wider centered column, for heroes whose lede needs more room on one line */
.narrow-wide {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card-white {
  background: var(--white);
  border: 1px solid var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.card-white p:last-child { margin-bottom: 0; }

/* Equal-height cards in a grid */
.grid > .card,
.grid > .card-white {
  display: flex;
  flex-direction: column;
}

/* Services track card: meta row separated by a rule */
.track-meta {
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--card-bg);
  margin-bottom: 0;
}

/* ---- Badges (Illustrative / Demonstration) ---- */
.badge {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 0.6em;
}
.badge-illustrative,
.badge-demonstration,
.badge-experience { color: var(--olive); }

/* Badge pinned to the bottom of a template card */
.badge-footer {
  margin-top: auto;
  padding-top: var(--space-3);
  margin-bottom: 0;
}

/* ---- Portfolio blurbs ---- */
.blurb {
  border: 1px solid var(--card-bg);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--white);
  margin-bottom: var(--space-3);
}
.blurb h3 { margin-bottom: 0.6em; font-size: 1.3rem; }
.blurb p { max-width: none; margin-bottom: 0.8em; }
.blurb p:last-child { margin-bottom: 0; }
.blurb p strong { color: var(--navy); }
.blurb-label {
  display: block;
  font-family: var(--font-heading);
  color: var(--olive);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.3em;
}
.blurb p + .blurb-label { margin-top: 0.5em; }

/* Founder photo (about) */
.person {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: start;
}
.person-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
}
.person-body p:last-child { margin-bottom: 0; }
@media (min-width: 700px) {
  .person {
    grid-template-columns: 140px 1fr;
    gap: var(--space-4);
  }
}

/* Values list (about) - bold lead-in paragraphs, no bullets */
.values p { margin-bottom: 1em; }
.values p strong { color: var(--navy); }

/* ---- Callout ---- */
.callout {
  border: 1px solid var(--olive);
  background: rgba(90, 103, 68, 0.08);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-3) 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---- Lists with checks/x ---- */
.plain-list { list-style: none; padding-left: 0; }
.plain-list li {
  padding-left: 1.4em;
  position: relative;
  margin-bottom: 0.6em;
}
.plain-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--olive);
}

/* ---- Forms ---- */
.form-field { margin-bottom: var(--space-3); }
.form-field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.4em;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  min-height: 44px;
  border: 1px solid var(--card-bg);
  border-radius: 6px;
  background: var(--white);
  font-size: 1rem;
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
}
.form-hint { font-size: 0.85rem; color: var(--navy-soft); margin-top: 0.35em; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Footer ---- */
.site-footer-bar {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-3) 0;
}
.tagline-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  text-align: center;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.95rem;
}
.tagline-row .olive-word { color: var(--olive-bright); }
@media (min-width: 768px) {
  .tagline-row {
    flex-direction: row;
    justify-content: center;
    gap: 1.2em;
  }
}
.site-footer-lower {
  background: var(--navy-soft);
  color: var(--white);
  padding: var(--space-3) 0;
  font-size: 0.85rem;
}
.site-footer-lower .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  text-align: center;
}
.site-footer-lower a { color: var(--white); text-decoration: underline; }
.footer-wordmark {
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0.85;
}
@media (min-width: 768px) {
  .site-footer-lower .container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.9rem; }
.muted { color: var(--navy-soft); opacity: 0.85; }
