/* The Carbon Cure — homepage.
   Dark apothecary landing, one world with /shop. Standalone (no base.njk):
   loads only this file, so class names may echo shop.css without collision. */

:root {
  --night: #0e1512;
  --night-deep: #0a100d;
  --panel: #141d18;
  --line: #2a3a31;
  --bone: #e8dfc8;
  --bone-dim: #b9b098;
  --sage: #8fa68e;
  --amber: #d9a441;
  --amber-glow: #e8b95a;
  --violet: #7b6290;
  --serif-display: "IM Fell English", Georgia, serif;
  --serif-sc: "IM Fell English SC", Georgia, serif;
  --serif-body: "Crimson Pro", Georgia, serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--night); color: var(--bone);
  font-family: var(--serif-body); font-size: 1.125rem; font-weight: 340; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--amber); color: var(--night-deep); padding: 0.5rem 1rem; z-index: 50; font-family: var(--mono); }
.skip-link:focus { left: 0; }

/* ---- header ---- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1rem, 4vw, 2.4rem);
}
.brand { font-family: var(--serif-sc); font-size: 1.1rem; letter-spacing: 0.06em; color: var(--sage); text-decoration: none; }
.brand:hover, .brand:focus-visible { color: var(--bone); }
.site-nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sage); text-decoration: none; border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--bone); border-color: var(--sage); }
.site-nav a.nav-cta { color: var(--amber); border: 1px solid rgba(217, 164, 65, 0.45); padding: 0.5rem 0.9rem; border-radius: 2px; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta:focus-visible { background: rgba(217, 164, 65, 0.12); color: var(--amber-glow); }

/* ---- hero ---- */
.hero {
  position: relative; min-height: 96vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; background: var(--night-deep);
  padding: 6rem 1.5rem 5rem;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%; z-index: 0;
  transform: scale(1.06); animation: heroDrift 36s ease-in-out infinite alternate;
}
@keyframes heroDrift { from { transform: scale(1.06); } to { transform: scale(1.13) translate3d(-1.4%, -1.8%, 0); } }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(78% 52% at 50% 86%, rgba(217, 164, 65, 0.14), transparent 60%),
    radial-gradient(92% 64% at 50% 46%, rgba(8, 12, 10, 0.74), transparent 72%),
    linear-gradient(180deg, rgba(8, 12, 10, 0.8) 0%, rgba(8, 12, 10, 0.3) 32%, rgba(8, 12, 10, 0.4) 64%, rgba(8, 12, 10, 0.94) 100%);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 220px 60px rgba(6, 9, 7, 0.9); }
.hero-inner { position: relative; z-index: 2; max-width: 48rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--sage); text-shadow: 0 1px 14px rgba(6, 9, 7, 0.9);
  margin: 0; opacity: 0; animation: rise 1.1s ease 0.15s forwards;
}
.hero h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.08; text-wrap: balance;
  margin: 0.4em 0 0.5em; color: var(--bone);
  text-shadow: 0 2px 30px rgba(6, 9, 7, 0.85), 0 0 60px rgba(217, 164, 65, 0.22);
  opacity: 0; animation: rise 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s forwards;
}
.hero .lede {
  font-size: 1.3rem; font-style: italic; color: var(--bone-dim); max-width: 36rem; margin: 0 auto;
  text-shadow: 0 1px 14px rgba(6, 9, 7, 0.9); opacity: 0; animation: rise 1.2s ease 0.75s forwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-cta-row {
  margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: rise 1.2s ease 1.05s forwards;
}
.btn {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; padding: 0.9rem 1.6rem; border-radius: 2px; transition: background 0.28s, box-shadow 0.28s, color 0.28s;
}
.btn-primary { color: var(--night-deep); background: var(--amber); border: 1px solid var(--amber); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--amber-glow); box-shadow: 0 0 26px rgba(217, 164, 65, 0.4); }
.btn-ghost { color: var(--bone); border: 1px solid rgba(232, 223, 200, 0.4); background: rgba(232, 223, 200, 0.03); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--bone); box-shadow: 0 0 22px rgba(232, 223, 200, 0.12); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- shared section chrome ---- */
main { display: block; }
.section { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem 1rem; }
.sec-eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--sage); text-align: center; margin: 0; }
.sec-head { text-align: center; margin-bottom: 2.6rem; }
.sec-head h2 { font-family: var(--serif-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0.3em 0 0; color: var(--bone); text-wrap: balance; }

/* ---- start cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.4rem; }
.card {
  position: relative; background: linear-gradient(180deg, var(--panel) 0%, #101813 100%);
  border: 1px solid var(--line); border-radius: 3px; padding: 1.6rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(217, 164, 65, 0.4); box-shadow: 0 18px 42px -18px rgba(0, 0, 0, 0.7), 0 0 30px -14px rgba(217, 164, 65, 0.3); }
.card .kicker { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber); }
.card h3 { font-family: var(--serif-display); font-weight: 400; font-size: 1.5rem; margin: 0; color: var(--bone); line-height: 1.15; }
.card p { font-size: 1rem; color: var(--bone-dim); margin: 0; flex: 1; }
.card .card-link { position: relative; z-index: 1; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); text-decoration: none; }
.card:hover .card-link { color: var(--bone); }

/* ---- brand ethos seal ---- */
.ethos { background: radial-gradient(120% 100% at 50% 0%, #12100c 0%, var(--night-deep) 60%); border-block: 1px solid var(--line); margin-top: 4rem; }
.ethos-inner { max-width: 46rem; margin: 0 auto; padding: 4.5rem 1.5rem; text-align: center; }
.seal { width: 168px; height: 168px; margin: 0 auto 1.6rem; border-radius: 50%; filter: drop-shadow(0 0 26px rgba(217, 164, 65, 0.28)); }
.ethos .latin { font-family: var(--serif-display); font-style: italic; font-size: 1.5rem; color: var(--amber-glow); margin: 0 0 0.6rem; letter-spacing: 0.02em; }
.ethos p { color: var(--bone-dim); margin: 0 auto; max-width: 34rem; }

/* ---- signup ---- */
.signup-band { max-width: 40rem; margin: 4rem auto 0; text-align: center; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(180deg, var(--panel), #101813); padding: 2.6rem 1.8rem 2.2rem; }
.signup-band h2 { font-family: var(--serif-display); font-weight: 400; font-size: 1.8rem; margin: 0 0 0.4em; color: var(--bone); }
.signup-band > p { color: var(--bone-dim); margin: 0 auto 1.5rem; max-width: 30rem; }
.signup-form { display: flex; flex-direction: column; gap: 0.8rem; }
.signup-form input { background: #0c120f; border: 1px solid var(--line); border-radius: 2px; color: var(--bone); font-family: var(--serif-body); font-size: 1rem; padding: 0.78rem 0.95rem; }
.signup-form input::placeholder { color: #5c6b5e; }
.signup-form input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.cf-turnstile { min-height: 65px; }
.signup-form button[type="submit"] {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--night-deep); background: var(--amber); border: none; border-radius: 2px; padding: 0.9rem 1.15rem; cursor: pointer;
  transition: background 0.25s, box-shadow 0.25s;
}
.signup-form button[type="submit"]:hover, .signup-form button[type="submit"]:focus-visible { background: var(--amber-glow); box-shadow: 0 0 22px rgba(217, 164, 65, 0.4); }
.form-error { color: #d98f8f; font-size: 0.95rem; }
.fine-print { font-size: 0.85rem; font-style: italic; color: #7e7a69; }

/* ---- follow ---- */
.follow { text-align: center; padding-top: 2rem; }
.follow p { color: var(--bone-dim); font-style: italic; }
.social-links { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; }
.social-links a { color: var(--sage); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.social-links a:hover, .social-links a:focus-visible { color: var(--bone); border-color: var(--sage); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.6rem 1.5rem 3.2rem; text-align: center; }
.foot-mark { font-family: var(--serif-sc); font-size: 1.15rem; color: var(--sage); letter-spacing: 0.08em; }
.site-footer p { max-width: 40rem; margin: 0.8rem auto 0; font-size: 0.9rem; color: #7e7a69; }
.site-footer .legal { font-size: 0.82rem; }
.foot-links { margin-top: 1.4rem; display: flex; gap: 1.8rem; justify-content: center; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.foot-links a { color: var(--sage); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.foot-links a:hover, .foot-links a:focus-visible { color: var(--bone); border-color: var(--sage); }

/* Tablet/mobile: the overlay header can wrap and collide with the hero.
   Drop it into normal flow as a solid bar so it always sits ABOVE the hero. */
@media (max-width: 860px) {
  .site-header {
    position: static; background: var(--night-deep);
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap; gap: 0.5rem 1.1rem;
  }
  .hero { min-height: 80vh; padding-top: 3.5rem; }
}
@media (max-width: 460px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 0.6rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eyebrow, .hero h1, .hero .lede, .hero-cta-row { opacity: 1; }
  .hero-bg { transform: scale(1.06); }
}
