/* ==========================================================================
   COMPONENTS — navigation, buttons, cart, hero, standards, footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. NAVIGATION — sticky, three-column: brand / links / cart
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: var(--rule);
  transition: background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

/* Solidifies once the page scrolls away from the top. */
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom-color: var(--rule-color-strong);
}

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-4);
  height: var(--nav-h);
}

/* Brand ------------------------------------------------------------------- */
.nav__brand {
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.125rem);
  letter-spacing: var(--tr-tight);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__brand-mark { color: var(--text); }

.nav__brand-sub {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tr-label);
  color: var(--text-faint);
}

@media (max-width: 560px) { .nav__brand-sub { display: none; } }

/* Center links ------------------------------------------------------------ */
.nav__links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(var(--sp-5), 3vw, var(--sp-8));
}

.nav__link {
  position: relative;
  padding-block: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--rule-width);
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}

.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 720px) {
  .nav__links { gap: var(--sp-4); }
  .nav__link { font-size: var(--fs-micro); letter-spacing: 0.06em; }
}

/* Cart -------------------------------------------------------------------- */
.nav__cart {
  justify-self: end;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  margin-right: calc(var(--sp-3) * -1);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}

.nav__cart:hover { color: var(--text); }

.nav__cart-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.25;
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.nav__cart-count {
  min-width: 20px;
  height: 20px;
  padding-inline: 6px;
  display: inline-grid;
  place-items: center;
  border: var(--rule-width) solid var(--rule-color-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

/* Filled the moment the bag stops being empty. */
.nav__cart[data-count]:not([data-count="0"]) .nav__cart-count {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--c-porcelain);
}

/* --------------------------------------------------------------------------
   2. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  --btn-pad-y: 1.05rem;
  --btn-pad-x: 2.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--dur-base) var(--ease);
}

.btn__arrow { transition: transform var(--dur-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

/* Primary: porcelain slab that inverts on hover via a wiping fill. */
.btn--primary {
  background: var(--c-porcelain);
  color: var(--c-black);
  border: var(--rule-width) solid var(--c-porcelain);
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-black);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease);
}

.btn--primary:hover { color: var(--c-porcelain); }
.btn--primary:hover::before { transform: scaleX(1); transform-origin: left; }
.btn--primary:active { transform: translateY(1px); }

/* Ghost: hairline outline only. */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: var(--rule);
}

.btn--ghost:hover {
  border-color: var(--rule-color-strong);
  background: var(--bg-raised);
}

/* --------------------------------------------------------------------------
   3. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  border-bottom: var(--rule);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(520px, 78svh, 860px);
  padding-block: var(--section-y);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: clamp(var(--sp-6), 4vw, var(--sp-8));
}

.hero__eyebrow::after {
  content: "";
  flex: 1;
  height: var(--rule-width);
  background: var(--rule-color);
}

.hero__headline {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-display);
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 17ch;
}

/* The payoff line is cut in outline — the 1px rule of the system,
   applied to type. Screenprint stencil, not a colour pop. */
.hero__headline em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: var(--rule-width) var(--c-porcelain);
  text-stroke: var(--rule-width) var(--c-porcelain);
  paint-order: stroke fill;
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(var(--sp-6), 4vw, var(--sp-8));
  margin-top: clamp(var(--sp-7), 5vw, var(--sp-9));
  padding-top: clamp(var(--sp-6), 4vw, var(--sp-7));
  border-top: var(--rule);
}

@media (min-width: 900px) {
  .hero__body {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--sp-9);
  }
}

.hero__lede {
  max-width: var(--measure);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero__lede strong {
  color: var(--text);
  font-weight: var(--fw-medium);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5);
}

@media (min-width: 900px) {
  .hero__actions { justify-content: flex-end; padding-top: var(--sp-1); }
}

.hero__note {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   4. STANDARDS — the hairline-divided spec row under the hero
   -------------------------------------------------------------------------- */
.standards { border-bottom: var(--rule); }

.standards__grid {
  display: grid;
  grid-template-columns: 1fr;
}

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

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

.standards__item {
  padding-block: clamp(var(--sp-6), 4vw, var(--sp-8));
  padding-inline: 0;
  border-top: var(--rule);
}

.standards__item:first-child { border-top: 0; }

@media (min-width: 640px) {
  .standards__item { padding-inline: var(--sp-6); border-left: var(--rule); }
  .standards__item:nth-child(-n + 2) { border-top: 0; }
  .standards__item:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}

@media (min-width: 1024px) {
  .standards__item { border-top: 0; }
  .standards__item:nth-child(2n + 1) { border-left: var(--rule); padding-left: var(--sp-6); }
  .standards__item:first-child { border-left: 0; padding-left: 0; }
}

.standards__index {
  display: block;
  margin-bottom: var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  color: var(--text-faint);
}

.standards__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tr-tight);
  margin-bottom: var(--sp-3);
}

.standards__copy {
  font-size: var(--fs-body);
  color: var(--text-muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   5. FOOTER
   -------------------------------------------------------------------------- */
.footer { padding-block: clamp(var(--sp-7), 5vw, var(--sp-9)); }

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
}

.footer__links { display: flex; flex-wrap: wrap; gap: var(--sp-6); }

.footer__link {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color var(--dur-fast) var(--ease);
}

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

/* --------------------------------------------------------------------------
   6. PLACEHOLDER PAGE — store / account stubs
   -------------------------------------------------------------------------- */
.stub__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(460px, calc(100svh - var(--nav-h) - 160px), 760px);
  padding-block: var(--section-y);
}

.stub__title {
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: var(--tr-display);
  margin-block: var(--sp-5) var(--sp-5);
}

.stub__copy { max-width: var(--measure); color: var(--text-muted); }
