/* Carmen Wilson, author: cream + meadow-green palette from the book cover. */

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/eb-garamond-italic-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/bitter-latin-var.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --bg: #fdffef;
  --surface: #f4f6df;
  --card: #ffffff;
  --border: #dfe4c8;
  --ink: #1e2b23;
  --muted: #4d5c52;
  --green: #53866a;
  --green-deep: #1a5d3e;
  --green-soft: #e3eedc;
  --on-green: #ffffff;

  --font-head: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Bitter", Georgia, serif;

  --max: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px;
  --section: clamp(3.5rem, 9vw, 6rem);
  --shadow: 0 1px 2px rgb(26 93 62 / 0.08), 0 12px 32px -12px rgb(26 93 62 / 0.28);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 300 1.0625rem/1.75 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.1;
  color: var(--green-deep);
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 7vw, 4.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h3 { font-size: 1.45rem; }
p  { margin: 0 0 1rem; color: var(--muted); text-wrap: pretty; }

a { color: var(--green-deep); text-underline-offset: 3px; }
a:hover { color: var(--green); }

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

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--green-deep);
  color: var(--on-green);
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(253 255 239 / 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--green-deep);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--green);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.4rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--green); }
.site-nav .btn { padding: 0.5rem 1.1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.site-nav .btn-primary,
.btn-primary { background: var(--green-deep); color: var(--on-green); }
.site-nav .btn-primary:hover,
.btn-primary:hover { background: var(--green); color: var(--on-green); }

.btn-ghost { border-color: var(--green); color: var(--green-deep); background: transparent; }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-deep); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3rem, 8vw, 5.5rem);
  background:
    radial-gradient(50rem 26rem at 90% -10%, rgb(83 134 106 / 0.22), transparent 65%),
    radial-gradient(40rem 22rem at -10% 110%, rgb(83 134 106 / 0.18), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero .container {
  display: grid;
  gap: clamp(2.5rem, 7vw, 5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.byline {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  color: var(--green);
}
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink); }

.cover {
  position: relative;
  justify-self: center;
  width: min(100%, 22rem);
  margin: 0;
}
.cover img {
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    0 2px 4px rgb(26 93 62 / 0.15),
    0 30px 60px -20px rgb(26 93 62 / 0.55);
  transform: rotate(2deg);
  transition: transform 0.4s ease;
}
.cover:hover img { transform: rotate(0deg) scale(1.01); }
.cover::before {
  content: "";
  position: absolute;
  inset: 6% -8% -4% 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(83 134 106 / 0.3), transparent);
  filter: blur(10px);
}

.social { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; align-items: center; color: var(--muted); font-size: 0.9rem; }
.icon-link {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--green-deep);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.icon-link:hover { background: var(--green-deep); color: var(--on-green); }
.icon-link svg { width: 1.15rem; height: 1.15rem; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }

.split {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.back-cover {
  justify-self: center;
  width: min(100%, 24rem);
  margin: 0;
}
.back-cover a { display: block; border-radius: 10px; }
.back-cover img { border-radius: 10px; box-shadow: var(--shadow); }
.back-cover figcaption { margin-top: 0.75rem; font-size: 0.85rem; text-align: center; color: var(--muted); }

.flourish { display: block; width: 4.5rem; height: auto; margin-bottom: 1rem; color: var(--green); }

/* ---------- Podcasts ---------- */

.podcasts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.podcast {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.podcast:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green); color: inherit; }

.podcast .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.podcast .badge svg { width: 0.9rem; height: 0.9rem; }
.podcast h3 { margin: 0; }
.podcast .show { margin: 0; font-style: italic; font-family: var(--font-head); font-size: 1.15rem; color: var(--muted); }
.podcast .watch {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--green-deep);
}
.podcast .watch svg { width: 1rem; height: 1rem; transition: transform 0.2s ease; }
.podcast:hover .watch svg { transform: translateX(3px); }

/* ---------- Contact band ---------- */

.contact {
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4rem) var(--gutter);
  border-radius: calc(var(--radius) + 6px);
  color: var(--on-green);
  background:
    radial-gradient(36rem 16rem at 20% 0%, rgb(255 255 255 / 0.14), transparent 70%),
    linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
}
.contact h2 { color: var(--on-green); }
.contact p { color: rgb(255 255 255 / 0.88); max-width: 34rem; margin-inline: auto; }
.contact .actions { justify-content: center; }
.contact .btn-primary { background: var(--bg); color: var(--green-deep); }
.contact .btn-primary:hover { background: var(--on-green); color: var(--green-deep); }
.contact .btn-ghost { border-color: rgb(255 255 255 / 0.6); color: var(--on-green); }
.contact .btn-ghost:hover { background: rgb(255 255 255 / 0.12); color: var(--on-green); }
.contact .email { color: var(--on-green); font-family: var(--font-head); font-size: clamp(1.2rem, 3vw, 1.5rem); word-break: break-all; }
.contact .email:hover { color: var(--green-soft); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--section);
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
}
.site-footer .social { margin: 0; }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .cover img { transform: none; }
}

@media (max-width: 48rem) {
  .hero .container,
  .split { grid-template-columns: 1fr; }
  .hero .cover { order: -1; width: min(70%, 16rem); }
  .brand small { display: none; }
  .site-nav { gap: 0.25rem 1rem; }
}
