/**
 * Layout: the editorial grid, shells, section rhythm, header and footer.
 */

.shell   { width: 100%; max-width: var(--shell);   margin-inline: auto; padding-inline: var(--gutter); }
.shell-2 { width: 100%; max-width: var(--shell-2); margin-inline: auto; padding-inline: var(--gutter); }
.shell-read { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }

/* 12 / 8 / 4 column editorial grid */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); } }

.section { padding-block: var(--section-y); }
.section--sunk { background: var(--paper-2); }
/* Used directly under the hero, where the page should feel continuous. */
.section--tight { padding-block: var(--s-7) var(--section-y); }
.section--ink { background: var(--ink); color: rgba(255,255,255,0.82); }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .kicker { color: var(--brass); }

.section__head {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: end; gap: var(--s-5);
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) { .section__head { grid-template-columns: 1fr; } }
.section__head h2 { margin: 0; }
.section__head p { margin: var(--s-3) 0 0; max-width: 52ch; color: var(--muted); font-size: var(--t-small); }

/* Small labelled link that closes a section header */
.more {
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); display: inline-flex; align-items: center; gap: var(--s-2);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px; white-space: nowrap;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.more:hover { color: var(--clay); border-color: var(--clay); }
.more .arrow { transition: transform var(--dur) var(--ease); }
.more:hover .arrow { transform: translateX(4px); }

/* ---- Header ---------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.site-header__inner {
  /* Logo left, navigation centred, actions right. */
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: var(--s-5);
  height: 68px;
  transition: height var(--dur) var(--ease);
}
.site-header.is-compact .site-header__inner { height: 56px; }

/* Over a dark hero the header floats transparent until the user scrolls.
   `top` respects the WordPress admin bar — a fixed header at top:0 slides
   underneath it and loses its first 32px for every logged-in user. */
.site-header.is-over-hero {
  position: fixed; top: 0; left: 0; right: 0; bottom: auto;
  background: transparent; border-color: transparent;
  color: #fff;
}
.admin-bar .site-header.is-over-hero { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header.is-over-hero { top: 46px; }
}
/* The admin bar stops being fixed below 600px, so the offset goes too. */
@media screen and (max-width: 600px) {
  .admin-bar .site-header.is-over-hero { top: 0; }
}
.site-header.is-over-hero .nav-link,
.site-header.is-over-hero .site-title,
.site-header.is-over-hero .icon-btn { color: #fff; }
.site-header.is-over-hero.is-compact {
  background: var(--paper); border-color: var(--line);
  box-shadow: 0 1px 24px rgba(20,17,13,0.07);
}
.site-header.is-over-hero.is-compact .nav-link,
.site-header.is-over-hero.is-compact .site-title,
.site-header.is-over-hero.is-compact .icon-btn { color: var(--ink); }

.site-title {
  font-family: var(--display); font-size: 1.4rem; letter-spacing: 0.16em;
  font-weight: 500; color: var(--ink); text-transform: uppercase; line-height: 1;
  justify-self: start; white-space: nowrap;
}
.site-title small {
  display: block; font-family: var(--sans); font-size: 0.5rem; letter-spacing: 0.34em;
  color: var(--muted); margin-top: 5px; font-weight: 500;
}
.site-header.is-over-hero:not(.is-compact) .site-title small { color: rgba(255,255,255,0.7); }

.primary-nav { display: flex; align-items: center; justify-content: center; gap: var(--s-6); justify-self: center; }
.nav-link {
  font-size: var(--t-meta); font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink); position: relative; padding-block: 6px;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width var(--dur) var(--ease);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: var(--s-4); justify-self: end; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink);
  transition: color var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--clay); }
.cart-count {
  position: absolute; transform: translate(11px, -11px);
  background: var(--clay); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: var(--radius-pill);
  display: grid; place-items: center; padding: 0 4px;
}

/* The nav and the centred wordmark stop competing before they can collide. */
@media (max-width: 1300px) {
  .primary-nav { gap: var(--s-5); }
  .nav-link { font-size: var(--t-label); letter-spacing: 0.12em; }
}

.menu-toggle { display: none; }
@media (max-width: 1024px) {
  /* The tagline is the widest thing in the middle column; below desktop it
     pushes the action icons past the right edge, so it goes. */
  .site-title small { display: none; }
  .primary-nav { display: none; }
  .menu-toggle { display: grid; }
  .site-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .site-title { justify-self: center; order: 2; }
  .menu-toggle { order: 1; }
  .header-actions { order: 3; }
}

@media (max-width: 560px) {
  .site-title { font-size: 1.2rem; letter-spacing: 0.12em; }
  .header-actions { gap: var(--s-2); }
  /* Account lives in the drawer on a phone; search and cart earn their space. */
  .header-actions > .icon-btn:nth-child(2) { display: none; }
}

/* Full-screen editorial drawer */
.nav-drawer {
  position: fixed; inset: 0; z-index: 120;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-rows: auto 1fr auto;
  transform: translateY(-100%);
  transition: transform 560ms var(--ease);
  overflow-y: auto;
}
.nav-drawer[data-open="true"] { transform: none; }
@media (prefers-reduced-motion: reduce) { .nav-drawer { transition: none; } }
.nav-drawer__top { display: flex; justify-content: space-between; align-items: center; height: 68px; }
.nav-drawer__list { display: flex; flex-direction: column; justify-content: center; gap: var(--s-2); }
.nav-drawer__list a {
  font-family: var(--display); font-size: clamp(2rem, 8vw, 3.6rem); color: #fff;
  line-height: 1.1; display: flex; align-items: baseline; gap: var(--s-4);
}
.nav-drawer__list a span {
  font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.2em;
  color: var(--brass); font-weight: 600;
}
.nav-drawer__foot { padding-block: var(--s-6); border-top: 1px solid rgba(255,255,255,0.14); }

/* ---- Footer ---------------------------------------------------------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding-block: var(--s-9) var(--s-6); }
.site-footer a { color: rgba(255,255,255,0.72); transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--s-7) var(--s-5); }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 {
  font-family: var(--sans); font-size: var(--t-label); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brass); margin-bottom: var(--s-4); font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.footer-col li { margin: 0; font-size: var(--t-small); }
.footer-brand .site-title { color: #fff; justify-self: start; font-size: 1.9rem; }
.footer-brand p { font-size: var(--t-small); max-width: 34ch; margin-top: var(--s-4); }
.footer-bottom {
  margin-top: var(--s-8); padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap;
  font-size: var(--t-meta); letter-spacing: 0.06em;
}
.footer-statement {
  font-family: var(--display); font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  color: #fff; letter-spacing: 0.01em; margin: 0;
}
