/*
---
name: layout.css
description: Reset + base + header/footer scaffolding. Matches Lorayne mockup (cream / teal / brass).
version: 0.3
date: 2026-07-19
---
*/

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); }
h2 {
  font-size: var(--fs-h2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
  margin: var(--space-8) 0 var(--space-3);
}
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h3);
  color: var(--ink);
  margin: var(--space-6) 0 var(--space-2);
}
p  { margin: 0 0 var(--space-4); }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
}
.display { font-family: var(--font-display); }

/* === Site header — matches the mockup: script logo left, nav right, sitting on
   the same brown the hero uses so header and hero read as one continuous field.
   Colour comes from the shared --band-* tokens in tokens.css; never hard-code a
   brown here or the header will drift away from the hero. === */
/* Jerry's call 2026-08-10: the logo is LARGER, and the nav stays on the same
   line as it at every width, in no more than two rows. The header therefore
   never stacks — the previous rule flipped it to a column below 860px, which
   pushed the nav onto its own line and read as a third row.

   NO border-bottom. It used to carry `1px solid var(--band-line)`, a translucent
   CREAM hairline, which was invisible while the header met a cream page. Once
   the header and the landing hero became the same brown it was the only thing
   between them and read as a stray line across the top of the page. Elsewhere
   the brown meets the beige page, and that colour change separates them without
   help. Do not put it back. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-4);
  padding: 14px 5vw;
  background: var(--band-bg);
}
.brand-block { line-height: 1.1; display: block; flex: 0 0 auto; }
.brand-block:hover { text-decoration: none; }
/* The script logo replaces the type-set wordmark. Light cut only (white
   "Lorayne" + gold "Designs") — the black cut is illegible on this band. */
.brand-logo { display: block; height: 68px; width: auto; }

/* TWO ROWS, always. 8 items (7 links + the bag) in a fixed 4-column grid gives
   4+4 by construction. flex-wrap was filling greedily and produced a lopsided
   5+3, and it could not guarantee a row count at all.
   NOTE: adding or removing a nav item breaks the 4+4 split — recheck it.
   Labels stay long ("Special Offerings", "Our Story") by Lorayne's choice, so
   crowding is solved with layout and type size, never by shortening her copy. */
.nav {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: end; justify-items: center; align-items: center;
  gap: 9px 20px;
}
.nav a {
  color: var(--band-ink);
  opacity: 0.88;
  font-family: var(--font-body);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: #fff; opacity: 1; text-decoration: none; }
.nav a.is-active { color: #fff; opacity: 1; }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--band-gold);
}
.nav__cart {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(247,242,233,0.45);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  background: transparent;
  color: var(--band-ink);
  opacity: 1;
}
.nav__cart svg { display: block; }
.nav__cart::after { content: none; }
.nav__cart:hover { background: var(--band-ink); color: var(--band-bg-deep); text-decoration: none; }
/* Narrower viewports keep the SAME shape — logo left, nav right, two rows.
   Only the logo, the type and the gaps shrink; the layout never restructures,
   so the header looks like itself on a laptop, an iPad and a phone. Stop it
   sticking on short screens so it does not eat a portrait viewport. */
@media (max-width: 1080px) {
  .nav { gap: 8px 16px; }
  .nav a { font-size: 0.62rem; }
  .brand-logo { height: 60px; }
}
@media (max-width: 860px) {
  .site-header { position: static; padding: 12px 4vw; gap: var(--space-2); }
  .brand-logo { height: 50px; }
  .nav { gap: 8px 13px; }
  .nav a { font-size: 0.56rem; padding-bottom: 2px; }
}
@media (max-width: 620px) {
  .site-header { padding: 10px 3vw; gap: 10px; }
  .brand-logo { height: 42px; }
  .nav { gap: 7px 9px; }
  .nav a { font-size: 0.5rem; letter-spacing: 0.02em; }
  .nav__cart { padding: 0.2rem 0.5rem; gap: 4px; }
}
@media (max-width: 420px) {
  .brand-logo { height: 36px; }
  .nav { gap: 6px 7px; }
  .nav a { font-size: 0.45rem; }
}

/* === Main === */
main, .main { max-width: var(--container); margin: 0 auto; padding: var(--space-8) 5vw; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 5vw; }
.container--narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }

.section { padding: var(--space-8) 0; }
.section--tight { padding: var(--space-4) 0; }

/* === Grids === */
.grid { display: grid; gap: var(--space-4); }
.grid--catalog {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.grid--cats {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

/* Footer markup lives in js/site.js renderFooter(); its styles are the
   .ld-footer block in components.css. The former cream 3-column footer CSS
   was removed 2026-07-28 when option A was chosen — nothing emitted it. */

.subtle { color: var(--ink-soft); font-size: 0.9rem; }
.note {
  background: #fff8ec;
  border-left: 3px solid var(--brass);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}
.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--teal);
  padding: 0.6rem 0.9rem;
  margin: 0.5rem 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
