/* =========================================================================
   templates/atomic/showcase/showcase.css

   STRUCTURE ONLY, with one recorded exception: the TASK-279/283/274 Home
   blocks near the end of section 2 (.home-facts, .home-makers and the Home
   picture ceiling) author a band background, a ruled border, wordmark type and
   object-fit, so this sheet does not pass `atomic-lint --kind=structure-paint`.
   Everything else authors no colour, border, background, radius, shadow or
   type metric: every pixel of paint comes from components.css (core + floor)
   resolved against the token sheet of whichever style is being previewed.
   The same markup has to read as Terminal, Luxury and Neo-brutalist, so the
   layout may only decide WHERE things sit, never what they look like.

   Breakpoint: 900px, the spec's collapse point. Tablet (820) deliberately
   sits under it and gets the drawer, not the desktop nav.

   Sections:
     1. site frame — header bar, primary nav, actions, drawer, main, footer
     2. home       — hero split, proof quote, alternating feature rows, coda
     3. auth + 404 — the two chrome-less pages
   ========================================================================= */

/* ---- 1. site frame ------------------------------------------------------ */

/* .topbar (core) is the sticky full-bleed band; .site-bar caps the content
   to the same measure as <main> so the brand lines up with the page edge. */
.site-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  /* <main> puts its gutter INSIDE --content-max; .topbar puts it outside. Take
     the gutter back off here or the brand sits 1 gutter left of the content. */
  max-inline-size: calc(var(--content-max) - 2 * var(--gutter));
  margin-inline: auto;
  min-width: 0;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}
.site-nav .nav-link { white-space: nowrap; }

.site-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}
.site-signin { display: none; }
.site-basket { white-space: nowrap; }

/* THE BRAND NEVER SHRINKS. Measured at 390px: as a shrinkable flex item it
   was squeezed to 63px around 98px of text (glassmorphism), and the Basket
   button painted over it; under editorial's 48px gutter the Basket was
   pushed off-screen. Below the collapse the two controls go compact instead
   (icon-only Menu, bag icon + count) so the three items fit every style. */
.site-bar > .brand { flex: none; }

/* INTERIM, layout only: core's .brand lockup reserves a second grid row for
   .brand-sub, so a brand without a sub-line drops its mark 3-5px below the
   name's centre (measured in every style). Pin the mark to row 1. The proper
   fix belongs in core/core.css's .brand rule; delete this when it lands. */
.brand:not(:has(.brand-sub)) > .brand-mark { grid-row: 1; }
@media (max-width: 899px) {
  .site-bar { gap: var(--space-3); }
  .site-basket { padding-inline: var(--space-3); }
  .site-basket-label { display: none; }
}
/* WCAG 1.4.10 reflow is judged at 320px; editorial's 48px gutter leaves a
   224px bar there, so the last few pixels come out of gaps and padding. */
@media (max-width: 419px) {
  .site-bar { gap: var(--space-2); }
  .site-actions { gap: var(--space-1); }
  .site-basket { padding-inline: var(--space-2); min-width: 44px; }
}

/* the menu button leads on mobile and comes FIRST IN SOURCE too, so tab
   order matches what the eye sees (it opens a drawer docked at the
   inline-start edge, so trigger and panel share a side) */

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .site-signin { display: flex; }
  .site-menu-btn { display: none; }
}
/* the measured priority collapse (scripts/site.js fitNav): this style's links
   do not fit at this width, so the header keeps the drawer */
html[data-nav="compact"] .site-nav,
html[data-nav="compact"] .site-signin { display: none; }
html[data-nav="compact"] .site-menu-btn { display: inline-flex; }

/* ---- the drawer: a native modal <dialog> -------------------------------
   Native gives focus containment, ESC, an inert page behind and the top
   layer. It carries .dialog-panel (for the floor's ::backdrop scrim and the
   closed-dialog display fix) AND .drawer-panel (for the docked-edge paint);
   the rules below re-dock it from centred to the inline-start edge. */
dialog.site-drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  inset-inline-end: auto;
  margin: 0;
  padding: 0;
  width: min(20rem, 86vw);
  max-width: none;
  max-inline-size: none;
  height: 100dvh;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
dialog.site-drawer:not([open]) { display: none; }

.site-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5) var(--space-6);
}
.site-drawer-group {
  display: grid;
  gap: var(--space-1);
}
.site-drawer .nav-link { min-height: 44px; }

/* ---- page body + footer ---- */
.site-main {
  display: grid;
  gap: var(--space-8);
  width: 100%;
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--space-6) var(--space-8);
  min-width: 0;
}

.site-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-5);
  width: 100%;
  max-inline-size: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--space-5) var(--space-6);
}
@media (min-width: 900px) {
  .site-foot { grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); }
}
.site-foot-about {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  grid-column: 1 / -1;
  max-inline-size: 26rem;
}
@media (min-width: 900px) {
  .site-foot-about { grid-column: auto; }
}
.site-foot-about .brand { justify-self: start; }
.site-foot-group {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
}
.site-foot-links {
  display: grid;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-foot-legal { grid-column: 1 / -1; }

/* delivery / returns / packing as one inline definition band across the top
   of the footer, not a three-up row of cards on the page */
.site-foot-facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: 0;
  padding-block-end: var(--space-4);
}
.site-foot-facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.site-foot-facts dd { margin: 0; }

/* ---- 2. home ------------------------------------------------------------ */

/* hero: the headline and the lead sit on one 7:5 row (headline wider,
   lead + CTAs bottom-aligned beside it), then the photograph runs the full
   measure underneath. Display type at scale AND hero imagery, each given
   room, rather than both squeezed into half a row. */
.home-hero {
  display: grid;
  gap: var(--space-6);
}
.home-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  min-width: 0;
}
@media (min-width: 900px) {
  .home-hero-copy {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-7);
    align-items: end;
  }
}
.home-hero-lead {
  display: grid;
  gap: var(--space-4);
  max-inline-size: 34rem;
  min-width: 0;
}
.home-ctas {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* image slots: the floor paints the frame (.media-slot), the slot takes the
   photograph's own ratio so the <img> fills it with no cropping maths.
   display:block is scoped to :not([hidden]) so it never overrides `hidden`. */
.media-slot > img:not([hidden]) { display: block; }
.media-slot > img {
  width: 100%;
  height: auto;
}
.home .media-slot,
.notfound .media-slot {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.home-hero-media { aspect-ratio: 16 / 9; }
/* the autumn edit: ONE big image beside an editorial list. Not alternating
   rows and not a card grid; the list is plain type on the page ground. */
.home-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 900px) {
  .home-edit { grid-template-columns: 7fr 5fr; gap: var(--space-7); }
}
.home-edit-media { aspect-ratio: 1 / 1; }
.home-edit-body {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}
.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.home-edit-list {
  display: grid;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
  padding-block-start: var(--space-2);
}
.home-edit-list > li {
  display: grid;
  gap: var(--space-1);
}

/* featured: the ONE raised surface on the page. Every style's card depth,
   edge and radius pole shows here; nothing else on Home is a card. */
.home-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 900px) {
  .home-featured { grid-template-columns: 3fr 2fr; gap: var(--space-7); }
}
.home-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  min-width: 0;
}
/* side-by-side only where the CARD is wide: 640-899 (band stacked, card
   full width) and 1100+. Between 900 and 1099 the card is ~60% of the row,
   and generous-padding styles (claymorphic) left a ~240px text column. */
@media (min-width: 640px) and (max-width: 899px), (min-width: 1100px) {
  .home-product { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
}
.home-product-media { aspect-ratio: 1 / 1; }
.home-product-body {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  min-width: 0;
}
/* core gives .card-title a bottom margin for flow layout; in this grid the
   gap already spaces it, and the two stacked into a 44px hole */
.home-product-body .card-title { margin: 0; }
.home-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
}
.home-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.home-quote {
  display: grid;
  gap: var(--space-3);
  max-inline-size: 30rem;
  margin: 0;
}

/* TASK-279 r1: the facts band (a div, not a section, so it takes no nth-of-type slot and band parity matches main) under the hero (a KPI strip, the annual-report figure row). Hidden unless a style asks for
   BOTH a ruled stat strip and tinted section bands (corporate), so every other style keeps today's Home. */
.home-facts { display: none; }
.home-facts .stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) {
  .home-facts .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* TASK-283 R1: the logo-row band under the KPI strip (the makers as a ruled row of wordmarks), shown with the facts band. */
.home-makers { display: none; }
@container style(--stat-layout: strip) and style(--section-band-fill) {
  .home-facts { display: block; background-color: var(--section-band-fill); padding: var(--space-5); }
  .home-makers {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3) var(--space-5);
    margin: var(--space-4) 0 0; padding: var(--space-4) 0 0; list-style: none;
    border-block-start: 1px solid var(--color-border-strong);
    font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg, 1.125rem); color: var(--color-text-muted);
  }
}

/* TASK-274 / E1: a style that caps the hero photograph with --hero-media-height (data-dense: a console sheet, not a
   photo-led shop) gets the same ceiling on the other two Home pictures, and the autumn edit narrows its photo column so
   the list leads. Inert while the hook is unset. */
@container style(--hero-media-height) and (not style(--hero-layout: overlay)) {
  .home-edit-media, .home-product-media { aspect-ratio: auto; }
  .home-edit-media > img, .home-product-media > img { max-block-size: var(--hero-media-height); object-fit: cover; }
  @media (min-width: 900px) {
    .home-edit { grid-template-columns: 4fr 8fr; }
  }
}

/* sign-up: an asymmetric split, intro left and form right, top-aligned.
   (The old version was the page's second centred block; now nothing on
   Home is centred.) */
.home-signup-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  padding-block: var(--space-4);
}
@media (min-width: 900px) {
  .home-signup-band { grid-template-columns: 5fr 7fr; gap: var(--space-7); align-items: start; }
}
.home-signup-intro {
  display: grid;
  gap: var(--space-3);
  max-inline-size: 28rem;
}
/* label above, input + button on one row, hint and error under both, so an
   error never knocks the button out of line with the input */
.home-signup {
  display: grid;
  gap: var(--space-2);
  width: 100%;
  max-inline-size: 32rem;
}
.home-signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.home-signup-row .input {
  flex: 1 1 12rem;
  min-width: 0;
}
.home-signup-row .btn { flex: 0 0 auto; }

/* ---- 3. auth + 404 (chrome-less) ---------------------------------------- */

.auth-card .brand { justify-self: start; }
.auth-card form {
  display: grid;
  gap: var(--space-4);
}
.auth-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.notfound {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: var(--gutter);
}
.notfound .empty {
  max-inline-size: 36rem;
  gap: var(--space-4);
}
.notfound .notfound-media {
  aspect-ratio: 1 / 1;
  width: 9rem;
}
.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-block-start: var(--space-2);
}
