/* =========================================================================
   BulletForge landing page
   Editorial / field-manual aesthetic.
   Fraunces (display) · Lora (body) · IBM Plex Mono (labels & citations)
   ========================================================================= */

:root {
  /* Brand palette — matches in-app theme; rust is landing-page-only accent */
  --olive:            #4A5942;
  --olive-hover:      #6E8C56;
  --parchment:        #F2EEE3;
  --ink:              #1C1F1A;
  --rust:             #B85A3E;
  --rust-hover:       #9F4A30;

  --text-on-olive:     #F2EEE3;
  --text-on-parchment: #1C1F1A;
  --text-on-ink:       #F2EEE3;
  --text-muted:        #6E7567;
  --text-muted-on-ink: #8C9382;

  --border-subtle:     rgba(28, 31, 26, 0.12);
  --border-on-ink:     rgba(242, 238, 227, 0.16);

  /* Typography stack */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-body:    'Lora', Georgia, 'Times New Roman', serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Section rhythm */
  --section-y:        140px;
  --section-y-mobile: 88px;

  /* Editorial measure */
  --measure:          68ch;
  --container:        1180px;
  --container-narrow: 760px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-on-parchment);
  background: var(--parchment);
  /* Subtle paper grain on parchment — radial noise approximation */
  background-image:
    radial-gradient(circle at 25% 35%, rgba(74, 89, 66, 0.025) 0, transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(74, 89, 66, 0.02)  0, transparent 50%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
blockquote { margin: 0; }
em { font-style: italic; }

/* ----- Layout primitives ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container--narrow { max-width: var(--container-narrow); }

main > section { padding-block: var(--section-y); }

/* ----- Typography ----- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}
.display--hero    { font-size: clamp(2.6rem, 6vw + 0.5rem, 5rem); }
.display--section { font-size: clamp(2rem,   4vw + 0.5rem, 3.4rem); margin-bottom: 28px; max-width: 22ch; }
.display--final   { font-size: clamp(2.4rem, 5vw + 0.5rem, 4rem);  margin-bottom: 20px; }

.subhead {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 1vw + 0.85rem, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 36ch;
  margin: 24px auto 36px;
}
.subhead--on-olive { color: rgba(242, 238, 227, 0.78); }

.lede {
  font-family: var(--font-body);
  font-size: 1.2rem;
  line-height: 1.65;
  max-width: var(--measure);
  margin: 0 0 64px;
}

.kicker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0 0 28px;
}
.kicker--on-ink { color: var(--olive-hover); }

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 1.15em 1.8em;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
  will-change: transform;
}
.btn:hover, .btn:focus-visible { transform: translateY(1px); outline: none; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(74, 89, 66, 0.35); }

.btn--primary   { background: var(--olive); color: var(--text-on-olive); }
.btn--primary:hover { background: var(--rust); }

.btn--rust      { background: var(--rust); color: var(--parchment); }
.btn--rust:hover { background: var(--rust-hover); }

.btn--outline   { background: transparent; color: var(--olive); border-color: var(--olive); }
.btn--outline:hover { background: var(--olive); color: var(--text-on-olive); }

.btn--inverted  { background: var(--parchment); color: var(--olive); }
.btn--inverted:hover { background: var(--rust); color: var(--parchment); }

/* ===========================================================
   SECTION 1 — HERO
   =========================================================== */
.hero {
  text-align: center;
  padding-block: calc(var(--section-y) + 20px) var(--section-y);
}
.hero__logo {
  display: inline-block;
  margin: 0 auto 48px;
  transition: transform 0.4s ease;
}
.hero__logo:hover { transform: rotate(-4deg) scale(1.04); }
.logomark--hero { width: 120px; height: 120px; }

.mono--note {
  margin: 24px auto 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ===========================================================
   SECTION 2 — DIFFERENTIATOR (olive)
   =========================================================== */
.differentiator {
  background: var(--olive);
  color: var(--text-on-olive);
}
.differentiator .container { max-width: 1320px; }
.differentiator .kicker { color: rgba(242, 238, 227, 0.7); }
.differentiator .lede { color: rgba(242, 238, 227, 0.86); }
.differentiator .display em {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--parchment);
  /* slight tonal lift via underline */
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: rgba(242, 238, 227, 0.35);
  text-underline-offset: 0.12em;
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-on-ink);
  border-bottom: 1px solid var(--border-on-ink);
  margin-top: 16px;
}
.compare__col {
  padding: 48px 28px;
  border-right: 1px solid var(--border-on-ink);
}
.compare__col:last-child { border-right: none; }

.compare__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242, 238, 227, 0.55);
  margin: 0 0 24px;
}
.compare__col--good .compare__label { color: var(--parchment); }

.compare__quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 24px;
  color: var(--parchment);
}
.compare__col--bad .compare__quote { opacity: 0.6; }

.compare__tag {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 238, 227, 0.55);
  margin: 0;
}
.compare__cite {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--olive-hover);
  margin: 0;
}
.compare__cite--small {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: rgba(110, 140, 86, 0.7);
  margin-top: 8px;
  font-style: italic;
}

/* ===========================================================
   SECTION 3 — FEATURES (parchment)
   =========================================================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 48px;
  margin-top: 24px;
}
.feature { position: relative; }
.logomark--ornament { width: 36px; height: 36px; opacity: 0.55; margin-bottom: 20px; }
.feature__num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--olive);
  margin: 0 0 12px;
}
.feature__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.feature__body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-on-parchment);
  margin: 0;
}

/* ===========================================================
   SECTION 4 — FOUNDER (ink)
   =========================================================== */
.founder {
  background: var(--ink);
  color: var(--text-on-ink);
  text-align: left;
}
.founder__body {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(242, 238, 227, 0.92);
  margin-top: 8px;
}
.founder__body p { margin: 0 0 1.4em; }
.founder__body p:last-child { margin-bottom: 0; }
.founder__signature {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--olive-hover);
  margin-top: 56px;
  letter-spacing: 0.02em;
}
.founder__signature--tagline {
  margin-top: 4px;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 400;
  color: rgba(110, 140, 86, 0.8);
}

/* ===========================================================
   SECTION 5 — PRICING (parchment)
   =========================================================== */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 24px;
  align-items: stretch;
}
.tier {
  position: relative;
  background: var(--parchment);
  border: 1px solid var(--border-subtle);
  padding: 44px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tier__head { display: flex; flex-direction: column; gap: 8px; }
.tier__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.tier__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  margin: 0;
  color: var(--olive);
}
.tier__price-note {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-left: 4px;
}
.tier__pitch {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}
.tier__features {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-on-parchment);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tier__features li {
  padding-left: 18px;
  position: relative;
}
.tier__features li::before {
  content: '+';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--olive);
  font-weight: 700;
}

/* Pro tier highlight */
.tier--pro {
  border: 2px solid var(--rust);
  background: var(--parchment);
  transform: translateY(-12px);
  box-shadow: 0 12px 32px -16px rgba(184, 90, 62, 0.35);
}
.tier--pro .tier__price { color: var(--rust); }
.tier__recommended {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rust);
  color: var(--parchment);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 6px 14px;
  white-space: nowrap;
  text-transform: uppercase;
}
.tier--pro .tier__features li::before { color: var(--rust); }

/* ===========================================================
   SECTION 6 — FINAL CTA (olive)
   =========================================================== */
.final-cta {
  background: var(--olive);
  color: var(--text-on-olive);
  text-align: center;
}

/* ===========================================================
   FOOTER (ink)
   =========================================================== */
.footer {
  background: var(--ink);
  color: var(--text-muted-on-ink);
  padding: 56px 0 48px;
  border-top: 1px solid var(--border-on-ink);
}
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.logomark--footer { width: 32px; height: 32px; opacity: 0.85; }
.footer__nav { display: flex; gap: 28px; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.footer__nav a { color: var(--text-muted-on-ink); transition: color 0.15s ease; }
.footer__nav a:hover { color: var(--parchment); }
.footer__disclaimer {
  max-width: var(--container);
  margin: 32px auto 0;
  padding: 0 32px;
  font-size: 0.7rem;
  color: rgba(242, 238, 227, 0.4);
  letter-spacing: 0.08em;
  line-height: 1.6;
}

/* ===========================================================
   SCROLL-FADE ANIMATION
   =========================================================== */
[data-fade] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-fade].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-fade] { opacity: 1; transform: none; transition: none; }
  .hero__logo, .btn { transition: none; }
}

/* ===========================================================
   RESPONSIVE — mobile-first overrides for narrow screens
   =========================================================== */
@media (max-width: 880px) {
  :root { --section-y: var(--section-y-mobile); }
  .container { padding: 0 24px; }

  .display--section { margin-bottom: 20px; }
  .lede { font-size: 1.08rem; margin-bottom: 40px; }

  .compare { grid-template-columns: 1fr; }
  .compare__col { border-right: none; border-bottom: 1px solid var(--border-on-ink); padding: 36px 28px; }
  .compare__col:last-child { border-bottom: none; }

  .features__grid { grid-template-columns: 1fr; gap: 44px; }

  .pricing__grid { grid-template-columns: 1fr; gap: 24px; }
  .tier--pro { transform: none; margin-top: 16px; }

  .footer__row { flex-direction: column; align-items: flex-start; }
  .footer__nav { gap: 20px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .logomark--hero { width: 96px; height: 96px; }
  .hero__logo { margin-bottom: 36px; }
  .compare__col { padding: 28px 20px; }
  .tier { padding: 36px 24px 28px; }
  .btn { padding: 1.05em 1.5em; font-size: 0.8rem; }
}
