/* ============================================================
   Prompt & Practice, Landing Page
   Brand tokens sourced from Brand_Kit_Spec.md (source of truth).
   See CREDITS.md for the differences vs the brief's Section 3 defaults.
   ============================================================ */

:root {
  /* Brand Kit Spec palette (overrides Section 3 defaults) */
  --cream:         #F7F3EC; /* Warm Off-White, page background */
  --ink:           #23201D; /* Charcoal, primary body text on light */
  --muted:         #6B6459; /* Warm Gray, secondary text */
  --teal:          #12333A; /* Ink Teal, brand primary / headings */
  --teal-deep:     #12333A; /* dark sections */
  --terracotta:    #A8492C; /* Burnt Terracotta, primary CTA / accent */
  --terracotta-dk: #8A3A22; /* CTA hover (darker terracotta) */
  --ochre:         #E8A93B; /* Golden Ochre, fills / accents only */

  --radius:        16px;
  --radius-lg:     24px;
  --shadow-soft:   0 8px 24px rgba(18, 51, 58, 0.10);
  --shadow-card:   0 12px 40px rgba(18, 51, 58, 0.12);

  --maxw:          1120px;
  --pad:           clamp(1.25rem, 4vw, 2.5rem);

  --font-display:  "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:     "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--terracotta); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--teal);
  line-height: 1.1;
  margin: 0;
}

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

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 50%; top: 0;
  transform: translate(-50%, -120%);
  background: var(--teal);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Visible focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible,
.ml-embedded button:focus-visible,
.ml-embedded input:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-header {
  padding-block: clamp(1rem, 3vw, 1.75rem);
}
.header-inner { display: flex; align-items: center; }
.wordmark-link {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
}
.wordmark { width: clamp(150px, 30vw, 230px); height: auto; }
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--teal);
  font-size: clamp(1.5rem, 5vw, 2rem);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 7vw, 5rem);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.hero-headline {
  font-weight: 900;
  font-size: clamp(2.4rem, 1.6rem + 4.2vw, 4.5rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero-subhead {
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  max-width: 46ch;
  margin-top: 1.1rem;
}

/* Signup card */
.signup-card {
  margin-top: clamp(1.5rem, 4vw, 2rem);
  background: #ffffff;
  border: 1px solid rgba(18, 51, 58, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 30rem;
}
.signup-label {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--teal);
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}
.trust-microcopy {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---------- Hero organic visual (no gridlines) ---------- */
.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: clip;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.blob-teal {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  background: var(--teal);
  top: -14vw; left: -10vw;
  opacity: 0.18;
}
.blob-terracotta {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  background: var(--terracotta);
  top: 30%; right: -12vw;
  opacity: 0.22;
}
.blob-ochre {
  width: 30vw; height: 30vw; max-width: 400px; max-height: 400px;
  background: var(--ochre);
  bottom: -12vw; left: 28%;
  opacity: 0.20;
}
/* Subtle grain, generated (no asset) */
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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.045'/%3E%3C/svg%3E");
}

/* ---------- PDF cover mockup (CSS only) ---------- */
.hero-visual { display: flex; justify-content: center; }
.pdf-mockup {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 3 / 4;
  background: var(--teal);
  color: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}
.pdf-mockup::before {
  /* spine highlight, keeps it reading as a booklet without gridlines */
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius) 0 0 var(--radius);
}
.hero-visual:hover .pdf-mockup { transform: rotate(-1deg) translateY(-4px); }
.pdf-kicker {
  display: inline-block;
  align-self: flex-start;
  background: var(--ochre);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.pdf-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2rem);
  line-height: 1.08;
  margin-top: auto;
}
.pdf-rule {
  width: 56px; height: 5px;
  background: var(--ochre);
  border-radius: 999px;
}
.pdf-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--cream);
}
.pdf-brand em { color: var(--ochre); font-style: italic; font-weight: 600; }

/* ---------- What's inside ---------- */
.inside {
  padding-block: clamp(3rem, 7vw, 5rem);
}
.section-heading {
  font-weight: 900;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.inside-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .inside-list { grid-template-columns: repeat(2, 1fr); }
}
.inside-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid rgba(18, 51, 58, 0.08);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-soft);
}
.inside-item p { margin: 0; }
.inside-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(168, 73, 44, 0.12);
  color: var(--terracotta);
}
.inside-icon svg { width: 24px; height: 24px; }

/* ---------- Founder note ---------- */
.founder {
  background: var(--teal);
  color: var(--cream);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.founder-inner {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2rem);
  align-items: center;
  flex-wrap: wrap;
}
.founder-avatar {
  flex: none;
  width: clamp(76px, 16vw, 104px);
  height: auto;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}
.founder-note {
  margin: 0;
  flex: 1 1 320px;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.5;
  font-family: var(--font-display);
  font-weight: 600;
}
.founder-sign { display: block; margin-top: 0.6rem; color: var(--ochre); font-style: italic; }
.founder-sign em { font-style: italic; }

/* ---------- Secondary CTA ---------- */
.secondary-cta {
  text-align: center;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  padding: 1rem 2rem;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--terracotta);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--terracotta-dk); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  border-top: 1px solid rgba(18, 51, 58, 0.10);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.footer-wordmark { width: clamp(140px, 28vw, 200px); }
.footer-disclaimer,
.footer-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 60ch;
}
.footer-line a { color: var(--terracotta); font-weight: 600; }

/* ============================================================
   MailerLite embed styling.
   Show ONLY the email field + submit button: hide the embed's
   own baked-in heading and description so they do not duplicate
   the page headline/subhead (per brief Section 8).
   ============================================================ */
.ml-embedded .ml-form-embedContent,
.ml-embedded .ml-form-embedHeader,
.ml-embedded .ml-form-embedWrapper .ml-form-embedContent h4,
.ml-embedded .ml-form-embedWrapper .ml-form-embedContent p {
  display: none !important;
}

/* Let the form fill the card width */
.ml-embedded,
.ml-embedded .ml-form-embedWrapper,
.ml-embedded .ml-form-embedBody,
.ml-embedded form {
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Fallback styling while the MailerLite script loads or if it is
   blocked, so the container never looks broken. Real styles from
   MailerLite override these once the embed renders. */
.ml-embedded input[type="email"],
.ml-embedded input[type="text"] {
  width: 100% !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
}
