/* ═══════════════════════════════════════════════════════════════════════════
   Home page — sections below the hero
   ═══════════════════════════════════════════════════════════════════════════

   Hero CSS lives in static/css/components/hero.css.

   Sections:
     .stats-bar               trust/social-proof strip between hero and grid
     .home-section            shared wrapper (light)
     .home-section--alt       slightly off-white background
     .home-section--cinematic dark atmospheric section (editorial)

     .home-section__header    flex row: title + CTA link
     .home-section__title     Playfair Display serif heading
     .home-section__eyebrow   small-caps label above title
     .home-section__link      "View all →" style action link

     .mills-grid              supplier logo wall — bordered, gapped cards
     .mill-item               individual card (logo only, no text)
     .mill-item__plate        fixed warm-white backing behind each logo
     .mill-item__logo         logo image, fills the plate via object-fit
     .mill-item__logo-fallback initial-letter shown when no logo is set

     .editorial               pull-quote block inside cinematic section
     .editorial__label        small-caps accent label
     .editorial__pull         large italic blockquote
     .editorial__body         supporting paragraph

     .newsletter              centred subscription form
*/

/* ─── Stats bar — trust signals directly below hero ─────────────────────── */

.stats-bar {
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    padding: var(--space-5) 0;
}

.stats-bar__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    text-align: center;
}

.stats-bar__value {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stats-bar__label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.stats-bar__sep {
    display: block;
    width: 1px;
    height: var(--space-8);
    background-color: var(--border-light);
}

@media (max-width: 639px) {
    .stats-bar__sep { display: none; }
}

/* ─── Shared section wrapper ─────────────────────────────────────────────── */

.home-section {
    padding: var(--space-16) 0;
    border-bottom: 1px solid var(--border-light);
}

.home-section--alt {
    background-color: var(--bg-tertiary);
}

/* Cinematic dark treatment — editorial / about section.
   Intentionally not a theme variable: this section must stay dark
   regardless of light/dark mode — it is a design accent, not a surface. */
.home-section--cinematic {
    background-color: var(--accent-dark);
    border-bottom: none;
}

[data-theme="dark"] .home-section--cinematic {
    background-color: #141210;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .home-section--cinematic {
        background-color: #141210;
    }
}

/* ─── Section header ─────────────────────────────────────────────────────── */

.home-section__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.home-section__eyebrow {
    color: var(--accent-gold);
    letter-spacing: 0.18em;
}

.home-section__title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.home-section__title {
    font-family: var(--font-heading);
    font-size: clamp(var(--text-2xl), 3.5vw, var(--text-3xl));
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--text-primary);
}

.home-section--cinematic .home-section__title {
    color: rgba(255, 255, 255, 0.94);
}

.home-section__subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-top: var(--space-2);
    /*max-width: 480px;*/
}

.home-section__link {
    font-size: var(--text-xs);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color var(--duration-fast) var(--ease);
    align-self: flex-start;
}

.home-section__link:hover {
    color: var(--accent-gold);
}

/* ─── Featured fabrics (uses fabric-grid component) ─────────────────────── */

.home section:first-of-type + .home-section {
    padding-top: calc(var(--space-16) + var(--space-4));
}

/* ─── Mills grid — logo wall ─────────────────────────────────────────────── */
/* The logo is the hero: cards are large and quiet, with a fixed warm-white
   "plate" behind every uploaded logo (--surface-logo-plate, base/variables.css)
   so contrast holds regardless of site theme or how dark the source artwork
   is. No fixed logo dimensions anywhere — .mill-item__plate stretches to
   fill the card (flex default align-items: stretch) and the <img> fills the
   plate at width/height: 100% with object-fit: contain, so sizing always
   derives from the card, never a hardcoded px value.

   .mill-item uses aspect-ratio rather than min-height so every card is
   IDENTICAL in both width and height: width already matches via the grid's
   equal 1fr columns, and aspect-ratio derives height from that same width —
   independent of any individual logo's own proportions. (A min-height alone
   let a near-square logo's intrinsic size push that one card taller than
   its wide-wordmark siblings, breaking row alignment.) */

.mills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    list-style: none;
    padding: 0;
    margin: 0;
}

.mill-item {
    display: flex;
    /* Explicit (matches the flex default) because .mill-item__plate's fill
       depends on it — see note above .mills-grid. */
    align-items: stretch;
    justify-content: center;
    aspect-ratio: 3 / 2;
    /* Mobile-first: smaller "mat" so the two nested padding layers (card +
       plate, see .mill-item__plate) don't eat most of a narrow 2-column
       card's width. Scales back up to the original spacing at the existing
       column-count breakpoints below. */
    padding: var(--space-3);
    background-color: var(--surface-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition:
        border-color var(--duration-base) var(--ease),
        box-shadow   var(--duration-base) var(--ease),
        transform    var(--duration-base) var(--ease);
}

.mill-item:hover,
.mill-item:focus-visible {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.mill-item__plate {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3);
    background-color: var(--surface-logo-plate);
    border: 1px solid var(--surface-logo-plate-border);
    border-radius: var(--radius-md);
}

.mill-item__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mill-item__logo-fallback {
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--text-muted);
    transition: color var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease);
}

.mill-item:hover .mill-item__logo-fallback,
.mill-item:focus-visible .mill-item__logo-fallback {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

@media (min-width: 640px) {
    .mills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mill-item,
    .mill-item__plate {
        padding: var(--space-4);
    }
}

@media (min-width: 1024px) {
    .mills-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .mill-item,
    .mill-item__plate {
        padding: var(--space-6);
    }
}

/* ─── Editorial — cinematic pull-quote section ───────────────────────────── */

.editorial {
    /*max-width: var(--width-content);*/
}

.editorial__label {
    display: block;
    margin-bottom: var(--space-8);
    color: var(--accent-gold);
}

.editorial__pull {
    font-family: var(--font-heading);
    font-size: clamp(var(--text-xl), 3.2vw, var(--text-3xl));
    font-weight: 400;
    font-style: italic;
    line-height: 1.42;
    letter-spacing: -0.01em;
    /* White text on intentional dark background — not a theme value */
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: var(--space-8);
    border: none;
    padding: 0;
}

.editorial__body {
    font-size: var(--text-base);
    /* Muted white on dark cinematic bg */
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.82;
    /*max-width: 540px;*/
    margin-bottom: var(--space-10);
}

/* Ghost button in cinematic dark section */
.home-section--cinematic .btn--ghost {
    color: rgba(255, 255, 255, 0.80);
    border-color: rgba(255, 255, 255, 0.22);
}

.home-section--cinematic .btn--ghost:hover {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.50);
    color: rgba(255, 255, 255, 0.97);
}

/* ─── Newsletter ─────────────────────────────────────────────────────────── */

.newsletter {
    max-width: var(--width-narrow);
    margin-inline: auto;
    text-align: center;
}

.newsletter__eyebrow {
    color: var(--accent-gold);
    letter-spacing: 0.18em;
    margin-bottom: var(--space-4);
    display: block;
}

.newsletter__title {
    font-family: var(--font-heading);
    font-size: clamp(var(--text-xl), 2.8vw, var(--text-2xl));
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--space-4);
}

.newsletter__body {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: var(--space-8);
}

.newsletter__form {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.newsletter__input {
    flex: 1;
    min-width: 200px;
}

/* Honeypot — off-canvas, never visible or reachable by real visitors */
.newsletter__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.newsletter__status {
    font-size: var(--text-sm);
    color: var(--success);
    margin-bottom: var(--space-4);
}

.newsletter__status--error {
    color: var(--danger);
}

.newsletter__note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.04em;
}
