/* ==========================================================================
   Slow Morning Co. — stylesheet
   Palette and mood follow the Page's visual signature: warm natural light,
   cream / oatmeal / pale oak, with green as the single focal accent.
   No third-party fonts or CDNs on purpose — see /privacy.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */
:root {
  color-scheme: light dark;

  --cream:      #fbf8f3;
  --oat:        #f3ede3;
  --oak-line:   #d9cbb5;
  --ink:        #2b2621;
  --ink-soft:   #5f5648;
  --green:      #3d5c47;
  --green-deep: #2c4434;
  --green-tint: #eef2ed;

  --bg:          var(--cream);
  --bg-alt:      var(--oat);
  --surface:     #fffdfa;
  --text:        var(--ink);
  --text-soft:   var(--ink-soft);
  --line:        var(--oak-line);
  --accent:      var(--green);
  --accent-ink:  #fffdfa;
  --accent-soft: var(--green-tint);

  --font-serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --shell:   72rem;
  --gutter:  clamp(1rem, 5vw, 2.5rem);
  --radius:  14px;
  --shadow:  0 1px 2px rgb(43 38 33 / 6%), 0 12px 32px -18px rgb(43 38 33 / 28%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #171512;
    --bg-alt:      #1f1c18;
    --surface:     #232019;
    --text:        #f0e9dd;
    --text-soft:   #b8ab98;
    --line:        #3a352c;
    --accent:      #9cc0a6;
    --accent-ink:  #15201a;
    --accent-soft: #23302a;
    --shadow:      0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -18px rgb(0 0 0 / 60%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); }

p, li { text-wrap: pretty; }
p { margin: 0 0 1.1em; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

/* -------------------------------------------------------------- helpers -- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.shell--narrow { --shell: 46rem; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.45vw, 1.25rem);
  color: var(--text-soft);
  max-width: var(--measure);
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 120ms ease-in;
}
.skip-link:focus { top: 0; color: var(--accent-ink); }

/* --------------------------------------------------------------- button -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--green-deep); color: var(--accent-ink); transform: translateY(-1px); }

.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

@media (prefers-color-scheme: dark) {
  .btn--primary:hover { background: #b3d2bc; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 0.85rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark span {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.nav a {
  color: var(--text-soft);
  text-decoration: none;
  padding-block: 0.25rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* ----------------------------------------------------------------- hero -- */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem); }

.hero h1 { max-width: 16ch; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--accent); }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.hero__meta li { display: flex; align-items: center; gap: 0.5rem; }
.hero__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero__figure {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero__figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------------------------------------------------------------- grids -- */
.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2.75rem;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--text-soft); margin: 0; }
.card__tag {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-top: 2.75rem;
  padding: 0;
  list-style: none;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { color: var(--text-soft); margin: 0; }

/* ---------------------------------------------------------------- about -- */
.about {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 52rem) {
  .about { grid-template-columns: 17rem minmax(0, 1fr); }
}

.about__portrait {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about__portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.about__portrait figcaption {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 0.7rem 0.9rem;
  background: var(--surface);
}

.about__body > :last-child { margin-bottom: 0; }

blockquote.pull {
  margin: 2rem 0 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  font-style: italic;
  color: var(--text);
}
blockquote.pull p { margin: 0 0 0.4em; }
blockquote.pull p:last-child { margin: 0; }

/* -------------------------------------------------------------- contact -- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}

.detail-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin: 2rem 0 0;
}
.detail-list dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}
.detail-list dd { margin: 0; }

/* --------------------------------------------------------------- footer -- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.92rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { color: var(--text-soft); margin: 0.6rem 0 0; max-width: 34ch; }
.site-footer strong { color: var(--text); font-weight: 600; }

/* ----------------------------------------------------------- legal page -- */
.page-head {
  padding-block: clamp(3rem, 7vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.page-head p.updated {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0;
}

.prose { max-width: var(--measure); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.prose h2 {
  font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
  margin-top: 2.75rem;
  scroll-margin-top: 6rem;
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.9rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--accent); }

.toc {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc h2.toc__title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 0.75rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.93rem;
}
@media (max-width: 34rem) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 0.3em; break-inside: avoid; }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
}
.callout > :last-child { margin-bottom: 0; }

/* ----------------------------------------------------- user preferences -- */
@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;
  }
}

@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { max-width: none; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
}
