/* ─────────────────────────────────────────────────────────
 * The Definition Diaries — Landing Page
 * Hardest Thing First / Lily Ashton
 * ───────────────────────────────────────────────────────── */

:root {
  /* Core palette */
  --htf-brown:        #794023;
  --htf-brown-deep:   #5e3119;
  --htf-cream:        #EFE6D5;
  --htf-cream-pale:   #F6F1E7;
  --htf-tan:          #B9A189;
  --htf-pink-soft:    #F6C4C3;
  --htf-black:        #000000;
  --htf-white:        #FFFFFF;

  /* E-book extras */
  --htf-cover-black:  #0A0A0A;
  --htf-pink-hot:     #EC4C8A;
  --htf-sage:         #7A7E6B;
  --htf-orange:       #E86A2C;
  --htf-wine:         #8B3A52;     /* cover wordmark / Lily's set */
  --htf-wine-deep:    #5C2334;
  --htf-wine-soft:    #B5677F;

  /* Typography */
  --font-display:   "Archivo Black", "Arial Black", sans-serif;
  --font-editorial: "Abril Fatface", Georgia, serif;
  --font-body:      "Roboto", "Open Sans", system-ui, sans-serif;

  /* Scale — compacted */
  --fs-hero-h1:    clamp(36px, 5.6vw, 72px);
  --fs-h2:         clamp(26px, 3.4vw, 44px);
  --fs-h3:         clamp(20px, 2.2vw, 26px);
  --fs-body:       17px;
  --fs-small:      14px;

  /* Spacing */
  --space-section: clamp(72px, 7vw, 112px);
  --container:     1180px;

  /* Radius */
  --r-card:  16px;
  --r-pill:  9999px;

  /* Motion */
  --ease-out: cubic-bezier(.2, .7, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--htf-black);
  background: var(--htf-cream);
}

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

h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
em { font-style: italic; font-family: var(--font-editorial); font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--htf-tan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--htf-brown);
  color: var(--htf-white);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { left: 16px; top: 16px; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* ── Shared utilities ───────────────────────────────── */
.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--htf-brown);
  margin: 0 0 10px;
}

.htf-heading-outline {
  font-family: var(--font-display);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--htf-brown);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.htf-pull-quote {
  background: var(--htf-orange);
  color: var(--htf-white);
  font-family: var(--font-display);
  text-transform: uppercase;
  padding: 22px 28px;
  border-radius: var(--r-card);
  line-height: 1.15;
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.02em;
  text-align: center;
}

.section-head { max-width: 720px; margin: 0 0 36px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.005em;
}
.section-head__h2 em {
  font-family: var(--font-editorial);
  text-transform: none;
  font-style: italic;
  color: var(--htf-brown);
  font-weight: 400;
  letter-spacing: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--r-pill);
  border: 2px solid var(--htf-brown);
  cursor: pointer;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out), transform 200ms var(--ease-out);
  text-align: center;
  line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--htf-white);
  color: var(--htf-brown);
  border-color: var(--htf-white);
}
.btn--primary:hover { background: var(--htf-brown); color: var(--htf-white); border-color: var(--htf-brown); }

.btn--ghost {
  background: transparent;
  color: var(--htf-brown);
}
.btn--ghost:hover { background: var(--htf-brown); color: var(--htf-white); }

.btn--solid {
  background: var(--htf-brown);
  color: var(--htf-white);
}
.btn--solid:hover { background: var(--htf-brown-deep); color: var(--htf-white); }

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 600px;
  height: clamp(560px, 80vh, 720px);
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  color: var(--htf-white);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--htf-cover-black) url("assets/cover.jpeg") 70% 35% / cover no-repeat;
  z-index: -2;
  filter: brightness(1.1) contrast(1.05);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(95deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.65) 30%, rgba(0,0,0,0.2) 55%, rgba(0,0,0,0) 75%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%);
}

.hero__nav {
  display: flex;
  justify-content: flex-start;
  padding: 4px 0 0;
}

.wordmark {
  display: block;
  width: 150px;
  height: 46px;
  background-color: var(--htf-wine);
  -webkit-mask: url("assets/logo.png") no-repeat center / contain;
  mask: url("assets/logo.png") no-repeat center / contain;
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 24px 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--htf-wine);
  margin: 0 0 16px;
  padding: 6px 12px;
  border: 1px solid rgba(139, 58, 82, 0.5);
  border-radius: var(--r-pill);
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero__h1 {
  font-family: var(--font-display);
  font-size: var(--fs-hero-h1);
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  max-width: 14ch;
}
.hero__h1 em {
  font-family: var(--font-editorial);
  text-transform: none;
  font-style: italic;
  color: var(--htf-cream);
  letter-spacing: 0;
  font-weight: 400;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 0 4px rgba(0,0,0,0.35);
  position: relative;
  display: inline-block;
  padding-bottom: 0.18em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'><path d='M 0 4 Q 7.5 0 15 4 T 30 4 T 45 4 T 60 4' stroke='%238B3A52' stroke-width='2.2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: 60px 8px;
}

.hero__dek {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 26px;
}
.hero__dek strong { color: var(--htf-wine); font-weight: 700; }

.hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__cta {
  font-size: 13px;
  padding: 16px 32px;
}

.hero__caption {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}

/* ── PROOF BAR (single line) ─────────────────────────── */
.proof {
  background: var(--htf-cream);
  padding: 14px 0;
  border-bottom: 1px solid rgba(121, 64, 35, 0.1);
}
.proof__inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(0,0,0,0.75);
}
.proof__stars {
  color: var(--htf-wine);
  letter-spacing: 3px;
  font-size: 13px;
}
.proof__text strong { color: var(--htf-brown); font-weight: 700; }

/* ── LEAD: ABOUT + FORM SIDE BY SIDE ─────────────────── */
.lead {
  background: var(--htf-cream);
  padding-top: var(--space-section);
  padding-bottom: calc(var(--space-section) + 32px);
}
.lead__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.lead__about { padding-top: 8px; }
.lead__h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  text-transform: uppercase;
  line-height: 0.98;
  margin: 0 0 18px;
  color: var(--htf-black);
}
.lead__h2 em {
  font-family: var(--font-editorial);
  text-transform: none;
  font-style: italic;
  color: var(--htf-brown);
  letter-spacing: 0;
  font-weight: 400;
}
.lead__about p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 50ch;
  color: rgba(0,0,0,0.82);
}
.lead__about strong { color: var(--htf-brown); font-weight: 700; }

.lead__bullets {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.lead__bullets li {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-left: 22px;
  position: relative;
  color: rgba(0,0,0,0.78);
}
.lead__bullets li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--htf-brown);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 800px) {
  .lead__inner { grid-template-columns: 1fr; }
  .lead__bullets { margin-bottom: 12px; }
}

/* ── FORM CARD ───────────────────────────────────────── */
.form-card {
  background: var(--htf-white);
  color: var(--htf-black);
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-card);
  border: 1px solid rgba(121, 64, 35, 0.12);
  box-shadow: 0 24px 60px -30px rgba(121, 64, 35, 0.35);
  position: sticky;
  top: 24px;
}
.form-card__head { text-align: left; margin: 0 0 20px; }
.form-card__head .kicker { color: var(--htf-brown); }
.form-card__h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 8px;
}
.form-card__dek {
  font-size: 14px;
  color: rgba(0,0,0,0.65);
  margin: 0;
  line-height: 1.5;
}

.form { display: grid; gap: 14px; }
.form[hidden],
.form-success[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--htf-brown);
}
.field__input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 13px 16px;
  border: 1.5px solid var(--htf-tan);
  border-radius: 10px;
  background: var(--htf-cream-pale);
  color: var(--htf-black);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 180ms var(--ease-out);
  width: 100%;
}
.field__input::placeholder { color: rgba(0,0,0,0.35); }
.field__input:focus {
  outline: none;
  border-color: var(--htf-brown);
  background: var(--htf-white);
  box-shadow: 0 0 0 3px rgba(121, 64, 35, 0.15);
}
.field--error .field__input {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.field__error {
  font-size: 12px;
  color: #C0392B;
  font-weight: 500;
  min-height: 0;
}
.field__error:empty { display: none; }

.form__submit {
  width: 100%;
  padding: 17px;
  font-size: 13px;
  margin-top: 4px;
  position: relative;
}
.form__submit .btn__spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--htf-cream);
  border-radius: 50%;
  display: none;
  animation: spin 700ms linear infinite;
}
.form__submit.is-loading .btn__label { opacity: 0.6; }
.form__submit.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form__privacy {
  text-align: center;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  margin: 4px 0 0;
  line-height: 1.5;
}

.form-success {
  text-align: left;
  padding: 4px 0;
}
.form-success .kicker { color: var(--htf-brown); }
.form-success__h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  text-transform: uppercase;
  margin: 0 0 12px;
  line-height: 1;
}
.form-success__body {
  font-size: 14px;
  color: rgba(0,0,0,0.7);
  line-height: 1.55;
  margin: 0 0 18px;
}

@media (max-width: 800px) {
  .form-card { position: static; }
}

/* ── WHAT'S INSIDE (compact) ─────────────────────────── */
.inside {
  background: var(--htf-cream-pale);
  padding: var(--space-section) 0;
}
.inside__lead {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--htf-black);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.inside__lead em {
  font-family: var(--font-editorial);
  text-transform: none;
  font-style: italic;
  color: var(--htf-brown);
  font-weight: 400;
}
.kicker--inline {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid rgba(121, 64, 35, 0.3);
  border-radius: var(--r-pill);
  background: var(--htf-white);
  font-size: 10px;
}
.chapters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}
.chapter {
  background: var(--htf-white);
  padding: 22px 22px;
  border-radius: var(--r-card);
  border: 1px solid rgba(121, 64, 35, 0.1);
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms var(--ease-out);
}
.chapter:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -16px rgba(121, 64, 35, 0.3);
  border-color: rgba(121, 64, 35, 0.3);
}
.chapter--featured {
  background: var(--htf-brown);
  border-color: var(--htf-brown);
}
.chapter--featured .chapter__num { -webkit-text-stroke-color: var(--htf-cream); }
.chapter--featured .chapter__title,
.chapter--featured .chapter__copy { color: var(--htf-cream); }

.chapter__num {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
  -webkit-text-stroke-width: 1.5px;
}
.chapter__title {
  font-family: var(--font-display);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin: 0 0 8px;
  color: var(--htf-black);
  line-height: 1.1;
}
.chapter__copy {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0,0,0,0.7);
  margin: 0;
}

.pull-quote {
  margin-top: 20px;
}

/* ── TESTIMONIALS (compact) ──────────────────────────── */
.testimonials {
  background: var(--htf-cream);
  padding: var(--space-section) 0;
}
.testimonials__lead {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--htf-black);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.t-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}
.t-card {
  background: var(--htf-cream-pale);
  border: 1px solid rgba(121, 64, 35, 0.15);
  border-radius: 12px;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.t-card__quote {
  font-family: var(--font-editorial);
  font-size: 14px;
  line-height: 1.4;
  color: var(--htf-brown-deep);
  margin: 0;
}
.t-card__quote em {
  font-family: var(--font-editorial);
  font-style: italic;
  color: var(--htf-brown);
}
.t-card__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--htf-brown);
  margin: 0;
}
.testimonials__cta {
  text-align: center;
  margin: 0;
}

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--htf-cover-black);
  color: rgba(255,255,255,0.6);
  padding: 24px 0;
  font-size: 12px;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer p { margin: 0; }
.footer a { color: var(--htf-cream); text-decoration: underline; text-decoration-color: rgba(239,230,213,0.3); text-underline-offset: 3px; }
.footer a:hover { text-decoration-color: var(--htf-cream); }

/* ── STICKY CTA (all viewports, past form) ───────────── */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, calc(100% + 48px));
  background: var(--htf-brown);
  color: var(--htf-cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  border: 2px solid var(--htf-brown);
  box-shadow: 0 14px 36px rgba(0,0,0,0.28);
  transition: transform 320ms var(--ease-out), background 200ms var(--ease-out), color 200ms var(--ease-out);
  z-index: 50;
  display: inline-block;
  pointer-events: none;
}
.sticky-cta.is-visible {
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.sticky-cta:hover {
  background: var(--htf-brown-deep);
}

/* ── REVEAL ANIMATIONS ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── REDUCED MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── MOBILE TUNING ───────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 16px 20px 32px;
    height: 100vh;
    height: 100svh;
    min-height: 640px;
  }
  .hero__nav { padding-top: 4px; }
  .hero__inner { padding: 20px 0; }
  .hero__cta { width: 100%; }
  .hero__actions { width: 100%; }
  .hero__caption { width: 100%; text-align: center; }
  .hero__bg { background-position: 60% 25%; }

  .chapter { padding: 18px 18px; }
  .chapter__num { font-size: 30px; }

  .form-card { padding: 24px 20px; }
}
