/* app/assets/stylesheets/home.css
   ─────────────────────────────────────────────────────────────────────────────
   Public landing page. Dark throughout — chrome sits on --bg-chrome, the body
   sections on the page surface stack.

   Alignment: every band is full-bleed (no padding of its own) and puts its
   content inside .home-shell. That shell is the only thing that sets the
   horizontal gutter, so the nav wordmark, hero headline, feature grid, CTA and
   footer all share one left edge at any viewport width.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Shared content shell ────────────────────────────────────────────────── */

.home-shell {
  width:          100%;
  max-width:      var(--max-width-content);
  margin-inline:  auto;
  padding-inline: var(--gutter);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */

.home-nav {
  position:      sticky;
  top:           0;
  z-index:       var(--z-masthead);
  background:    var(--bg-chrome);
  border-bottom: 3px solid var(--color-blue-600);
  height:        var(--masthead-height);
  display:       flex;
  align-items:   center;
}

.home-nav__inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--space-4);
}

.home-nav__brand {
  display:     flex;
  align-items: baseline;
  gap:         var(--space-2);
  min-width:   0;
}

.home-nav__wordmark {
  font-family:    var(--font-serif);
  font-size:      var(--text-lg);
  font-weight:    700;
  color:          var(--color-white);
  letter-spacing: var(--tracking-tight);
  white-space:    nowrap;
}

.home-nav__tag {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--color-blue-500);
  padding:        2px 6px;
  border:         1px solid var(--color-blue-600);
  border-radius:  var(--radius-sm);
  line-height:    1;
  flex-shrink:    0;
}

.home-nav__actions {
  display:     flex;
  align-items: center;
  gap:         var(--space-3);
  flex-shrink: 0;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.home-hero {
  background:    var(--wash);
  padding-block: var(--space-16);
  border-bottom: 1px solid var(--border-color);
}

.home-hero__eyebrow {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--color-blue-500);
  margin-bottom:  var(--space-4);
}

.home-hero__h1 {
  font-family:    var(--font-serif);
  font-size:      clamp(var(--text-2xl), 5vw, var(--text-4xl));
  font-weight:    700;
  color:          var(--text-primary);
  line-height:    var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  max-width:      var(--max-width-prose);
  margin-bottom:  var(--space-6);
}

.home-hero__em {
  font-style: normal;
  color:      var(--color-blue-500);
}

.home-hero__sub {
  font-family:   var(--font-sans);
  font-size:     var(--text-lg);
  color:         var(--text-secondary);
  line-height:   var(--leading-normal);
  max-width:     520px;
  margin-bottom: var(--space-8);
}

.home-hero__actions {
  display:     flex;
  align-items: center;
  gap:         var(--space-6);
  flex-wrap:   wrap;
}

.home-hero__link {
  font-family:     var(--font-sans);
  font-size:       var(--text-sm);
  color:           var(--text-muted);
  text-decoration: none;
  transition:      color var(--transition-fast);
}

.home-hero__link:hover {
  color: var(--text-primary);
}

/* ── Body ────────────────────────────────────────────────────────────────── */

.home-body {
  padding-block: var(--space-12);
}

.home-section-label {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--text-secondary);
  margin-bottom:  var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom:  2px solid var(--border-strong);
}

/* ── Features grid ───────────────────────────────────────────────────────── */
/* 1px gap over a border-coloured background draws the hairline rules between
   cells — no per-cell borders to double up at the seams. */

.home-features {
  display:               grid;
  /* Three columns, so each group of three or six fills whole rows. Narrower
     screens drop to two columns (see Responsive) rather than one long stack. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   1px;
  background:            var(--border-color);
  border:                1px solid var(--border-color);
  margin-bottom:         var(--space-12);
}

/* Consecutive feature groups sit closer together than the sections after them. */
.home-features--group {
  margin-bottom: var(--space-10);
}

.home-group-intro {
  font-family:   var(--font-sans);
  font-size:     var(--text-sm);
  color:         var(--text-secondary);
  margin:        calc(-1 * var(--space-2)) 0 var(--space-4);
}

.home-feat {
  background: var(--bg-surface);
  padding:    var(--space-6);
}

.home-feat__icon {
  font-size:     20px;
  margin-bottom: var(--space-3);
  line-height:   1;
}

.home-feat__title {
  font-family:    var(--font-serif);
  font-size:      var(--text-md);
  font-weight:    700;
  color:          var(--text-primary);
  letter-spacing: var(--tracking-tight);
  margin-bottom:  var(--space-2);
}

.home-feat__body {
  font-family: var(--font-sans);
  font-size:   var(--text-sm);
  color:       var(--text-secondary);
  line-height: var(--leading-normal);
}

/* ── Levels grid ─────────────────────────────────────────────────────────── */

.home-levels {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:                   1px;
  background:            var(--border-color);
  border:                1px solid var(--border-color);
  margin-bottom:         var(--space-12);
}

.home-level {
  background:     var(--bg-surface);
  padding:        var(--space-5) var(--space-4);
  text-align:     center;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            var(--space-2);
}

.home-level__name {
  font-family: var(--font-sans);
  font-size:   var(--text-sm);
  font-weight: 600;
  color:       var(--text-primary);
}

.home-level__area {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  color:       var(--text-secondary);
}

/* ── Pull quote ──────────────────────────────────────────────────────────── */

.home-quote {
  border-left:   3px solid var(--color-blue-600);
  padding:       var(--space-5) var(--space-6);
  background:    var(--bg-surface);
  border-top:    1px solid var(--border-color);
  border-right:  1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.home-quote__text {
  font-family:   var(--font-serif);
  font-size:     var(--text-lg);
  color:         var(--text-primary);
  line-height:   var(--leading-normal);
  font-style:    italic;
  margin-bottom: var(--space-3);
}

.home-quote__attr {
  font-family:    var(--font-sans);
  font-size:      var(--text-xs);
  font-weight:    600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color:          var(--text-secondary);
  font-style:     normal;
}

/* ── CTA strip ───────────────────────────────────────────────────────────── */

.home-cta-strip {
  background:    var(--wash);
  border-top:    3px solid var(--color-blue-600);
  padding-block: var(--space-16);
}

.home-cta-strip__inner {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  gap:            var(--space-4);
}

.home-cta-strip__heading {
  font-family:    var(--font-serif);
  font-size:      var(--text-3xl);
  font-weight:    700;
  color:          var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.home-cta-strip__sub {
  font-family: var(--font-sans);
  font-size:   var(--text-base);
  color:       var(--text-secondary);
}

.home-cta-strip__sub strong {
  color: var(--text-primary);
}

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

/* ── Footer ──────────────────────────────────────────────────────────────── */

.home-footer {
  background:    var(--bg-chrome);
  border-top:    1px solid var(--color-ink-600);
  padding-block: var(--space-5);
}

.home-footer__inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--space-4);
}

.home-footer__copy {
  font-family: var(--font-sans);
  font-size:   var(--text-xs);
  color:       var(--text-muted);
}

.home-footer__links {
  display: flex;
  gap:     var(--space-4);
}

.home-footer__link {
  font-family:     var(--font-sans);
  font-size:       var(--text-xs);
  color:           var(--text-muted);
  text-decoration: none;
  transition:      color var(--transition-fast);
}

.home-footer__link:hover {
  color: var(--color-white);
}

/* ── Application layout override for home page ───────────────────────────── */
/* The home page owns the full viewport — remove default body padding, and stay
   transparent so the map watermark on <html> shows through behind .home-body. */

.home-page-body {
  background: transparent;
  padding:    0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* The shell gutter narrows via --gutter, so only block spacing needs tuning. */

/* Two columns from tablet down. A group with an odd count lets its last card
   take the full row so the grid never ends on a gap. */
@media (max-width: 900px) {
  .home-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-feat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding-block: var(--space-10);
  }

  .home-body {
    padding-block: var(--space-8);
  }

  /* Compact cards: icon beside the title, tighter padding and text, so a
     phone screen shows several cards at once. */
  .home-feat {
    display:               grid;
    grid-template-columns: auto 1fr;
    column-gap:            var(--space-2);
    align-items:           baseline;
    padding:               var(--space-3);
  }

  .home-feat__icon {
    font-size:     14px;
    margin-bottom: 0;
  }

  .home-feat__title {
    font-size:     var(--text-sm);
    margin-bottom: var(--space-1);
  }

  .home-feat__body {
    grid-column: 1 / -1;
    font-size:   var(--text-xs);
    line-height: var(--leading-snug, 1.4);
  }

  .home-features--group {
    margin-bottom: var(--space-8);
  }

  .home-hero__actions {
    flex-direction: column;
    align-items:    flex-start;
  }

  .home-cta-strip {
    padding-block: var(--space-10);
  }

  .home-footer__inner {
    flex-direction: column;
    gap:            var(--space-2);
    text-align:     center;
  }
}
