/* ===== Consult a Buddy — design tokens ===== */
:root {
  --paper: #EFF2EF;
  --paper-white: #FFFFFF;
  --ink: #182022;
  --ink-soft: #4B5A5C;
  --ink-faint: #7C8A8C;
  --teal: #1F8A82;
  --teal-deep: #145E58;
  --teal-tint: #DCEEEC;
  --coral: #E8654A;
  --coral-tint: #FBE3DC;
  --line: #D3DBD6;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 3.8rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em 0; max-width: 62ch; }
p.wide { max-width: 74ch; }

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

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

/* ===== Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(239, 242, 239, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--teal); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal-deep); }
.nav-cta {
  background: var(--ink);
  color: var(--paper-white) !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper-white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-toggle { display: block; }
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 40px;
}
.hero-eyebrow {
  color: var(--teal-deep);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.hero h1 { max-width: 15ch; }
.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 18px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper-white); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-illustration { display: none; }
}
.stat-strip {
  display: flex;
  gap: 48px;
  margin-top: 52px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.stat { position: relative; }
.stat .num {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 600;
  color: var(--ink);
  position: relative;
  display: inline-block;
}
.stat .num svg { position: absolute; left: -4px; right: -4px; bottom: 2px; width: calc(100% + 8px); z-index: -1; }
.stat .label { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }

/* ===== Cards / grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.96rem; color: var(--ink-soft); }
.card a.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card-link { text-decoration: none; color: inherit; display: block; }
a.card-link:hover .card { border-color: var(--teal); }

/* ===== Sections ===== */
section { padding: 56px 0; }
section.tinted { background: var(--paper-white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); }

/* ===== Sequence steps (for genuinely ordered content) ===== */
.sequence {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}
.seq-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  position: relative;
  padding-bottom: 36px;
}
.seq-step:last-child { padding-bottom: 0; }
.seq-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}
.seq-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 44px;
  bottom: -8px;
  width: 2px;
  background: var(--line);
}
.seq-body h3 { margin-bottom: 6px; }
.seq-body p { margin-bottom: 0; color: var(--ink-soft); }

/* ===== Two-column compare ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }
.compare-col {
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.compare-col.teal { border-top: 4px solid var(--teal); }
.compare-col.coral { border-top: 4px solid var(--coral); }
.compare-col ul { padding-left: 20px; margin: 12px 0 0 0; color: var(--ink-soft); }
.compare-col li { margin-bottom: 6px; }

/* ===== Worked example flow ===== */
.flow {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flow-box {
  width: 100%;
  max-width: 460px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.flow-box .fk { color: var(--ink-soft); font-size: 0.95rem; }
.flow-box .fv { font-family: 'Fraunces', serif; font-weight: 600; color: var(--teal-deep); font-size: 1.15rem; }
.flow-arrow { margin: 6px 0; color: var(--ink-faint); }
.flow-result {
  width: 100%;
  max-width: 460px;
  background: var(--ink);
  color: var(--paper-white);
  border-radius: 12px;
  padding: 20px 22px;
  text-align: center;
  margin-top: 6px;
}
.flow-result .fk { color: #B9C4C2; font-size: 0.9rem; }
.flow-result .fv { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.5rem; }

/* ===== Pill list (non-sequential facts) ===== */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pill {
  background: var(--teal-tint);
  color: var(--teal-deep);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== Callout ===== */
.callout {
  background: var(--coral-tint);
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
}
.callout p { margin: 0; color: var(--ink); }

/* ===== Footer ===== */
.footer-cta {
  background: var(--ink);
  color: var(--paper-white);
  padding: 64px 0;
}
.footer-cta h2 { color: white; max-width: 16ch; }
.footer-cta p { color: #B9C4C2; }
.footer-cta .btn-primary { background: var(--teal); }

.site-footer {
  padding: 28px 0;
  color: var(--ink-faint);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer a { color: var(--ink-faint); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ===== Dropdown nav ===== */
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: " \25BE"; font-size: 0.7em; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  background: var(--paper-white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20,30,30,0.10);
  min-width: 200px;
  padding: 14px 8px 8px 8px;
  margin: 0;
  list-style: none;
  z-index: 50;
}
.has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li { padding: 0 !important; border-bottom: none !important; }
.dropdown a {
  display: block;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.dropdown a:hover, .dropdown a:focus { background: var(--paper); color: var(--teal-deep); }

@media (max-width: 760px) {
  .has-dropdown > a::after { display: none; }
  .dropdown {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 14px;
    margin: 6px 0 0 0;
    background: transparent;
  }
  .dropdown a { padding: 6px 0; color: var(--ink-soft); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
