/* ---------------------------------------------------------------------------
   The Beginner's Guide to Worm Farming — placeholder site
   Earthy / rustic. Soil browns, kraft paper, compost green, cream.
--------------------------------------------------------------------------- */

:root {
  --soil-900: #2a1c12;
  --soil-800: #3d2b1f;
  --soil-700: #5c4433;
  --soil-500: #8a6d4f;
  --kraft-300: #d8c3a5;
  --kraft-200: #e7d7bd;
  --cream: #f5efe2;
  --cream-2: #efe6d3;
  --green-700: #566338;
  --green-500: #6f7d47;
  --green-300: #9aa66b;
  --rust: #b0562e;
  --ink: #2a1c12;

  --shadow: 0 18px 40px -22px rgba(42, 28, 18, 0.55);
  --radius: 14px;
  --wrap: 1080px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(154, 166, 107, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(176, 86, 46, 0.10), transparent 55%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; position: relative; z-index: 2; }

a { color: var(--rust); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }

/* ---------------- header ---------------- */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.28rem;
  color: var(--soil-800);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark__dot { color: var(--green-700); }
.wordmark__worm { color: var(--green-500); margin-right: 4px; }
.head-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--soil-700);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.head-link:hover { border-color: var(--rust); }

/* ---------------- hero ---------------- */
.hero { padding: 30px 0 66px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--rust);
  margin: 0 0 10px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--soil-900);
}
.hero h1 em { font-style: italic; color: var(--green-700); }
.byline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--soil-700);
  margin: 0 0 20px;
}
.byline strong { font-weight: 600; color: var(--soil-800); }
.byline__pub { color: var(--soil-500); }
.lede { font-size: 1.12rem; max-width: 52ch; margin: 0 0 22px; color: var(--soil-800); }
.lede--bridge { font-weight: 700; color: var(--soil-700); margin-bottom: 26px; }
.hero__points { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 9px; }
.hero__points li { position: relative; padding-left: 30px; color: var(--soil-800); font-weight: 500; }
.hero__points li::before {
  content: "〰";
  position: absolute; left: 0; top: -1px;
  color: var(--green-500); font-weight: 900;
}

/* signup */
.signup {
  background: var(--cream-2);
  border: 1.5px solid var(--kraft-300);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow: var(--shadow);
  max-width: 540px;
}
.signup__label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--soil-800); }
.signup__row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  padding: 13px 15px;
  border: 1.5px solid var(--kraft-300);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.signup input[type="email"]:focus-visible { outline: 3px solid var(--green-300); border-color: var(--green-500); }
.signup__note { font-size: 0.85rem; color: var(--soil-500); margin: 10px 2px 0; }
.signup__status { font-size: 0.95rem; font-weight: 700; margin: 10px 2px 0; min-height: 1.2em; }
.signup__status.is-ok { color: var(--green-700); }
.signup__status.is-err { color: var(--rust); }
.buy-line { margin: 16px 2px 0; font-size: 0.98rem; color: var(--soil-700); }
.buy-line a { font-weight: 700; }

.btn {
  font: inherit; font-weight: 700;
  border: none; border-radius: 10px;
  padding: 13px 20px; cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green-700); color: #fdfbf4; }
.btn--primary:hover { background: var(--green-500); }
.btn--ghost {
  background: transparent; color: var(--soil-700);
  border: 1.5px solid var(--kraft-300);
}
.btn--ghost:hover { border-color: var(--green-500); color: var(--green-700); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* book mockup */
.hero__book { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.book {
  position: relative;
  width: 210px; height: 300px;
  transform: rotate(-3deg);
  filter: drop-shadow(0 22px 30px rgba(42, 28, 18, 0.4));
}
.book__cover {
  position: absolute; inset: 0;
  border-radius: 6px 12px 12px 6px;
  background: linear-gradient(140deg, var(--soil-700), var(--soil-900));
  border-left: 8px solid rgba(0,0,0,0.25);
  display: flex; flex-direction: column;
  padding: 26px 22px; color: var(--kraft-200);
  overflow: hidden;
}
.book__spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: rgba(0,0,0,0.35); border-radius: 6px 0 0 6px;
}
.book__eyebrow { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-300); }
.book__title { font-family: var(--font-display); font-weight: 900; font-size: 2.1rem; line-height: 0.95; margin-top: 12px; color: #fff; }
.book__worm { color: var(--green-300); margin-top: auto; font-size: 1.4rem; letter-spacing: 4px; }
.book__author {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 12px;
  color: #fff;
}
.book__foot { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 10px; color: var(--kraft-300); }
.book__caption { font-size: 0.8rem; color: var(--soil-500); font-style: italic; }

/* ---------------- resources ---------------- */
.resources {
  padding: 60px 0 72px;
  background:
    linear-gradient(var(--kraft-200), var(--kraft-200));
  border-top: 2px solid var(--kraft-300);
  border-bottom: 2px solid var(--kraft-300);
}
.section-head { max-width: 60ch; margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 900; font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--soil-900); margin: 0 0 12px; letter-spacing: -0.01em;
}
.section-head p { font-size: 1.05rem; color: var(--soil-800); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--cream);
  border: 1.5px solid var(--kraft-300);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 26px -20px rgba(42,28,18,0.5);
}
.card__icon { font-size: 1.7rem; line-height: 1; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; margin: 0; color: var(--soil-900); }
.card__desc { font-size: 0.96rem; color: var(--soil-700); margin: 0; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tag--soon { background: rgba(176,86,46,0.14); color: var(--rust); }
.tag--ready { background: rgba(86,99,56,0.16); color: var(--green-700); }
.card .btn { padding: 9px 15px; font-size: 0.9rem; }

.resources__foot { margin-top: 30px; color: var(--soil-700); }

/* ---------------- footer ---------------- */
.site-foot { padding: 34px 0; color: var(--kraft-200); background: var(--soil-900); }
.site-foot__grid { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-foot__brand { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; margin: 0; color: #fff; }
.site-foot__meta { font-size: 0.9rem; margin: 0; color: var(--kraft-300); }
.site-foot__meta em { color: var(--green-300); font-style: italic; }

/* ---------------- responsive ---------------- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__book { order: -1; }
  .book { width: 170px; height: 244px; }
}
@media (max-width: 480px) {
  .signup__row { flex-direction: column; }
  .btn--primary { width: 100%; }
}

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