/* =========================================================================
   Barázda — landing page
   Layer: pages. Loaded only by index.html.
   ========================================================================= */

@layer pages {
  /* The render slots are empty until landing.js fills them. `js-loading` is
     added by the inline head script, so it is never present when scripting
     is off — the noscript message is what those visitors get instead. */
  .js-loading [data-render] {
    opacity: 0;
  }

  [data-render] {
    opacity: 1;
    transition: opacity var(--dur-slow) var(--ease-standard);
  }

  /* =====================================================================
     EMPTY SLOTS
     A section with no content yet. Deliberately looks unfinished — a dashed
     outline reads as "not filled in", where a blank gap reads as a bug.
     Delete nothing to remove one: fill in the matching entry in
     data.content.js and the real section replaces it.
     ===================================================================== */
  .slot-empty {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-lg);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-card);
    background-color: var(--surface-subtle);
  }

  .slot-empty__title {
    font-family: var(--font-display);
    font-size: var(--font-size-h4);
    font-weight: 620;
    color: var(--text-secondary);
  }

  .slot-empty__hint {
    max-width: var(--size-prose-max);
    color: var(--text-muted);
    font-size: var(--font-size-body-sm);
  }

  /* Scaffolding, not content — it has no business on paper. */
  @media print {
    .slot-empty {
      display: none;
    }
  }

  /* =====================================================================
     HERO
     ===================================================================== */
  .hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem) clamp(2.5rem, 1.4rem + 4.5vw, 5rem);
    border-block-end: 1px solid var(--border-subtle);
  }

  .hero__texture,
  .hero__contour {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }

  .hero__body {
    max-width: 46rem;
  }

  .hero__headline {
    margin-block-start: var(--space-sm);
    font-size: var(--font-size-display);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -0.022em;
  }

  .hero__subhead {
    max-width: 40rem;
    margin-block-start: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--font-size-body-lg);
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-block-start: var(--space-xl);
  }

  .hero__trust {
    margin-block-start: var(--space-md);
    max-width: 34rem;
    color: var(--text-muted);
    font-size: var(--font-size-body-sm);
  }

  .hero__tertiary {
    font-size: var(--font-size-body-sm);
  }

  /* A standalone link is a control, not prose, so SC 2.5.8's inline-target
     exception does not cover it — it gets a real target height. */
  .hero__tertiary a {
    display: inline-flex;
    align-items: center;
    min-height: var(--size-tap-min);
  }

  /* At phone width both CTAs go full width and stacked, so neither becomes
     a 90px-wide target sitting next to its twin. */
  @media (max-width: 30rem) {
    .hero__actions {
      flex-direction: column;
      align-items: stretch;
      gap: var(--space-sm);
    }
  }

  /* =====================================================================
     SECTIONS
     Alternating tint gives the long page a rhythm without adding rules or
     shadows between every block.
     ===================================================================== */
  .section--tinted {
    background-color: var(--surface-raised);
    border-block: 1px solid var(--border-subtle);
  }

  .stats-band {
    padding-block: var(--space-2xl);
    background-color: var(--surface-raised);
    border-block-end: 1px solid var(--border-subtle);
  }

  .stats__grid {
    --grid-gap: var(--space-lg);
  }

  /* =====================================================================
     MODULE GRID
     ===================================================================== */
  .module-grid__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-block-end: var(--space-md);
  }

  .module-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .module-grid__demo {
    display: inline-flex;
    align-items: center;
    min-height: var(--size-tap-min);
    gap: var(--space-2xs);
    color: var(--brand-fg);
    font-size: var(--font-size-body-sm);
    font-weight: 600;
    white-space: nowrap;
  }

  .module-grid {
    margin-block-start: var(--space-lg);
  }

  .badge-legend {
    padding: 0;
    margin: 0;
    list-style: none;
  }
  /* =====================================================================
     ROLE CARDS
     ===================================================================== */
  .role-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .role-card__modules {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin-block: var(--space-xs) auto;
    padding: 0;
    list-style: none;
  }

  .role-card__modules li {
    padding: 0.1em 0.5em;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-chip);
    background-color: var(--brand-wash);
    color: var(--brand-fg);
    font-size: var(--font-size-caption);
    font-weight: 550;
  }

  .role-card__modules .is-readonly {
    border-color: var(--border-default);
    background-color: var(--surface-subtle);
    color: var(--text-muted);
    font-weight: 450;
  }

  /* =====================================================================
     FAQ
     ===================================================================== */
  .faq-list {
    max-width: var(--size-prose-max);
    border-block-start: 1px solid var(--border-subtle);
  }

  /* =====================================================================
     FINAL CTA
     ===================================================================== */
  .final-cta__panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(1.75rem, 1rem + 3vw, 3.5rem);
    background-color: var(--surface-raised);
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
  }

  .contour-wrap {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }

  .final-cta__body {
    max-width: 38rem;
  }

  .final-cta__body p {
    margin-block: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-body-lg);
  }

  /* =====================================================================
     HEADER TWEAKS
     ===================================================================== */
  /* These two hide the header's .btn controls, so they must sit in the
     `pages` layer: .btn sets `display` in `components`, which outranks
     `layout` no matter how specific a layout selector is. Both destinations
     reappear inside the collapsed menu panel — see ui.js. */
  @media (max-width: 40rem) {
    /* On a phone the header keeps the brand, the theme control, the demo CTA
       and the menu. "Sign in" moves into the menu panel. */
    .site-header__signin {
      display: none;
    }
  }

  @media (max-width: 30rem) {
    /* At 320px even the demo CTA no longer fits beside the menu button. */
    .site-header__cta {
      display: none;
    }
  }
}
