/**
 * Gist Homepage Marketing Tail Styles (`/`)
 *
 * SCOPE:
 * Below-the-fold marketing sections only:
 *   1. `.home-sample-*` — curated sample-gist cards (hourly rotation), vertical
 *      stack matching `#try-results`
 *   2. `.home-recycled-*` — full-bleed opaque pitch band + CTAs (always-dark slab)
 *   3. `.home-features-*` — three differentiator cards (always-dark slab; contrast-safe)
 *   4. `.home-principles-*` — compact explanation of Gist's reading model
 *   5. `.home-privacy-note-*` — small privacy note inside the explanation
 * The above-the-fold creation tool is styled by try.css.
 *
 * LOAD ORDER:
 * Linked AFTER try.css so it inherits its design tokens (--ink, --paper,
 * --wash, --gradient, --gradient-start/mid/end, --border, --radius-*).
 * Do NOT redeclare tokens here.
 *
 * NAMING:
 * Every selector is prefixed `.home-*`. This guarantees no collision with
 * the `.try-*` classes that style the creation tool above the fold.
 *
 * NON-GOALS:
 * - Do not extend or override `.try-*` selectors.
 * - Do not introduce new color tokens; reuse what try.css defines (recycled slab
 *   uses fixed ink-adjacent text shades so it stays readable on the deliberate
 *   dark background regardless of prefers-color-scheme).
 */

/* ============================================
   Recycled pitch band — full-bleed beneath `.try-main` horizontal padding

   WHY BREAKOUT WIDTH + NEGATIVE MARGINS:
   `.try-main` is a centered flex column (`align-items: center`). Sections
   default to a narrow column (~680px beside the textarea). We widen the slab
   (`width: calc(100% + …)`) and pull it with symmetric negative margins so the
   band spans the viewport without changing `.try-main`. Inner wrappers stay
   `width: 100%` so copy + grids use the slab—not a capped column.

   WHY `background-color` + `main.try-main`-scoped reinforcement:
   Same failure mode as `waitlist.css` on `[data-landing-section='features']`:
   the slab must always paint `#1c1c24` even when shorthand `background` or
   external utilities drift; otherwise light headline copy sits on `--wash`.
   ============================================ */
main.try-main > section.home-recycled-hero {
  background-color: #1c1c24;
}

.home-recycled-hero {
  align-self: stretch;
  box-sizing: border-box;
  width: calc(100% + 2 * var(--space-6));
  max-width: none;
  margin-top: 80px;
  margin-left: calc(-1 * var(--space-6));
  margin-right: calc(-1 * var(--space-6));
  padding: 72px var(--space-6) 80px;
  background-color: #1c1c24;
  color: #f5f5f5;
  text-align: center;
}

.home-recycled-hero-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.home-recycled-hero-headline {
  margin: 0 0 24px;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5f5f5;
}

main.try-main > section.home-recycled-hero .home-recycled-hero-headline {
  color: #f5f5f5;
}

.home-gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .home-recycled-hero-headline .home-gradient-text {
    background: none;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--gradient-mid);
  }
}

.home-recycled-hero-sub {
  max-width: min(42rem, 100%);
  margin: 0 auto 20px;
  font-size: 17px;
  line-height: 1.6;
  color: #c8c8d0;
}

.home-recycled-hero-tagline {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-recycled-hero-trailer {
  margin: 0 0 36px;
  font-size: 15px;
  color: #8f8f98;
}

.home-recycled-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.home-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  color: #1c1c24;
  background: var(--gradient);
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(255, 107, 107, 0.35);
}

.home-cta-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.home-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f5f5f5;
  background: transparent;
  border: 1px solid rgba(245, 245, 245, 0.35);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 245, 245, 0.55);
}

.home-cta-secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.35);
}

/* ============================================
   Features slab — deliberate dark field + readable type

   Parity with `waitlist.css` rules for `[data-landing-section='features']`:
   SSR cannot rely on Tailwind arbitrary utilities bundled from the Worker
   scan — without explicit CSS, headings can inherit `text-white`-style intents
   while the section loses its `#1c1c24` backing (white-on-white).
   ============================================ */
.home-features-section {
  align-self: stretch;
  box-sizing: border-box;
  width: calc(100% + 2 * var(--space-6));
  max-width: none;
  margin-left: calc(-1 * var(--space-6));
  margin-right: calc(-1 * var(--space-6));
  padding: 64px var(--space-6) 72px;
  background-color: #1c1c24;
  color: #f5f5f5;
}

.home-features-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.home-features-title {
  margin: 0 0 40px;
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f5f5f5;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background-color: #24242c;
  border: 1px solid rgba(245, 245, 245, 0.08);
}

.home-feature-index {
  margin: 0 0 var(--space-4);
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
  opacity: 0.35;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-feature-heading {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #f5f5f5;
}

.home-feature-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #c4c4cc;
}

@media (prefers-reduced-motion: no-preference) {
  .home-feature-card {
    transition: transform 0.15s ease, border-color 0.15s ease;
  }

  .home-feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 245, 245, 0.18);
  }
}

/* ============================================
   Sample Cards Section
   ============================================ */
.home-sample-section {
  margin: 96px auto 0;
  padding: 0 24px;
  max-width: 1200px;
}

.home-sample-heading {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Same vertical stack + width as `#try-results` inside `.try-input-wrap` (try.css). */
.home-sample-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
}

/* Curated links: brand sunrise accent on the rail (try.css `--gradient`), not success green. */
.home-sample-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-sizing: border-box;
  min-height: 72px;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.home-sample-card::before {
  content: '';
  align-self: stretch;
  width: 3px;
  min-height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  flex-shrink: 0;
}

.home-sample-card:hover {
  border-color: var(--ink-faint);
}

.home-sample-card:hover .home-sample-card-open {
  background: var(--wash);
  color: var(--gradient-start);
}

.home-sample-card:hover .home-sample-card-open-label {
  color: var(--gradient-start);
}

.home-sample-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.home-sample-card-content {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: var(--space-1);
}

.home-sample-eyebrow {
  min-width: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--ink-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-sample-card-title {
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.home-sample-card-status {
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-sample-card-detail {
  color: var(--ink-secondary);
}

.home-sample-card-open-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: var(--space-1);
}

.home-sample-card-open-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: lowercase;
  color: var(--ink-tertiary);
  transition: color 0.15s ease;
}

.home-sample-card-open {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: var(--radius-md);
  transition: background 0.15s ease, color 0.15s ease;
}

.home-sample-card-open svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Principles Section
   ============================================ */
.home-principles-section {
  max-width: 1200px;
  margin: 96px auto 0;
  padding: 0 24px 112px;
  color: var(--ink);
}

.home-principles-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.home-principles-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.home-principles-title {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.home-principles-lede {
  margin: 20px auto 0;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.home-principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-principle-card {
  padding: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.home-principle-number {
  margin: 0 0 28px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-tertiary);
}

.home-principle-heading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

.home-principle-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.home-privacy-note {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  margin: 24px 0 0;
  padding: 24px 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
}

.home-privacy-note-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.home-privacy-note-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

/* ============================================
   Mobile Adjustments
   ============================================ */
@media (max-width: 768px) {
  .home-recycled-hero {
    width: calc(100% + 2 * var(--space-4));
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    margin-top: 56px;
    padding-top: 52px;
    padding-bottom: 56px;
  }

  .home-features-section {
    width: calc(100% + 2 * var(--space-4));
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    padding-top: 48px;
    padding-bottom: 56px;
  }

  .home-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-feature-card {
    padding: 24px;
  }

  .home-sample-section {
    margin-top: 64px;
    padding: 0 16px;
  }

  .home-sample-card {
    padding: 20px;
  }

  .home-principles-section {
    margin-top: 64px;
    padding: 0 16px 80px;
  }

  .home-principles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-principle-card {
    padding: 24px;
  }

  .home-privacy-note {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .home-principles-section {
    padding: 0 18px 64px;
  }
}
