/*
  Smart Cap base system.
  Family: Minimal Prestige (product-led) -- one grotesk at two weights,
  ink on white with hairline rules; the product render supplies the only
  chroma. Signal red stays reserved for the limitation disclosure and the
  live-status lamp.
  Shared by the Liquid theme and the static preview fixture.
*/

:root {
  --ink: var(--color-foreground);
  --paper: var(--color-background);
  --surface: var(--color-surface);
  --signal: var(--color-signal);
  --band: color-mix(in srgb, var(--ink) 92%, black);
  --card: color-mix(in srgb, var(--surface) 45%, var(--paper));
  --white: #ffffff;
  --muted: color-mix(in srgb, var(--ink) 70%, var(--paper));
  --soft: color-mix(in srgb, var(--ink) 82%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 30%, transparent);
  --dark-line: rgba(255, 255, 255, 0.16);
  --dark-copy: color-mix(in srgb, var(--white) 72%, var(--band));
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Content is centred at the merchant's page width, but on ultrawide screens
     holding that cap would just grow a wall of dead margin, so past roughly
     2200px the content keeps expanding at a fixed share of the viewport
     instead. Prose blocks (hero deck, article, policy pages) carry their own
     max-widths, so only structural width scales -- line length stays readable. */
  --content-max: min(
    calc(100vw - var(--page-margin) * 2),
    max(var(--page-width), 72vw)
  );
  --gutter: max(var(--page-margin), calc((100vw - var(--content-max)) / 2));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: var(--font-body-style);
  font-weight: var(--font-body-weight);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--white);
  background: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-s);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --- Text registers ------------------------------------------------------ */
/* Sentence case carries the voice; letterspaced caps are rare small tags. */

.eyebrow,
.tech {
  margin: 0;
  font-size: 0.72rem;
  font-weight: var(--font-body-weight);
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
}

.tech {
  color: var(--muted);
  font-size: 0.68rem;
}

.figure {
  font-variant-numeric: tabular-nums;
}

/* --- Announcement + header ---------------------------------------------- */

.announcement {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem var(--gutter);
  color: color-mix(in srgb, var(--white) 88%, var(--band));
  background: var(--band);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.announcement p {
  margin: 0;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  min-height: 4.4rem;
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: clamp(1.2rem, 2.6vw, 2.4rem);
}

.site-nav a {
  font-size: 0.88rem;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.wordmark {
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: 0.1rem;
  text-align: center;
  text-decoration: none;
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--font-display-weight);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
}

.wordmark small {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.6rem;
}

.header-action {
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 0.45rem;
  min-height: 2.4rem;
  padding-inline: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: transparent;
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease;
}

.header-action:hover {
  border-color: var(--ink);
}

.header-action svg {
  width: 0.95rem;
}

.site-main {
  display: block;
}

/* --- Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-s);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  background: var(--card);
}

.button--primary {
  color: var(--white);
  background: var(--ink);
}

.button--primary:hover {
  border-color: var(--band);
  background: var(--band);
}

/* --- Sticky buy bar ------------------------------------------------------ */
/* Floating summary that appears once the hero leaves the viewport. The
   price stays labeled as a working target; the action stays a mock. */

.buy-bar {
  position: fixed;
  z-index: 90;
  bottom: 1.1rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: min(94vw, 46rem);
  padding: 0.6rem 0.6rem 0.6rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 14%, transparent);
  visibility: hidden;
  transform: translate(-50%, 130%);
  transition:
    transform 320ms var(--ease-out),
    visibility 320ms var(--ease-out);
}

.buy-bar.is-visible {
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Cookie choice comes first: the banner shares the bottom edge and would
   otherwise sit on top of the buy bar. */
.consent-open .buy-bar {
  display: none;
}

.buy-bar__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: var(--font-display-weight);
  white-space: nowrap;
}

.buy-bar__meta {
  display: grid;
  gap: 0.05rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.buy-bar__meta span {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.buy-bar__meta strong {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-bag-count] {
  font-variant-numeric: tabular-nums;
}

.buy-bar .button {
  min-height: 2.7rem;
  white-space: nowrap;
}

/* --- Reveal choreography ------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(0.9rem);
  transition:
    opacity 640ms var(--ease-out),
    transform 640ms var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

.site-footer {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr 0.85fr 1.25fr;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  padding: clamp(4rem, 8vw, 6.5rem) var(--gutter) 1.6rem;
  color: var(--dark-copy);
  background: var(--band);
}

.site-footer a {
  color: var(--white);
}

.footer-word > .eyebrow {
  color: var(--dark-copy);
}

.footer-word > p:last-child {
  max-width: 18ch;
  margin: 0.9rem 0 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: var(--font-display-weight);
  line-height: 1.15;
}

.footer-heading {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-copy {
  max-width: 31rem;
  margin: 0;
  font-size: 0.88rem;
}

.footer-base {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.6rem;
  margin-top: 2.4rem;
  border-top: 1px solid var(--dark-line);
  color: color-mix(in srgb, var(--white) 55%, var(--band));
  font-size: 0.72rem;
}

.footer-base p {
  margin: 0;
}

/* Mega wordmark across the footer base, sized to the viewport. */

.footer-mark {
  grid-column: 1 / -1;
  overflow: hidden;
  margin: 0.4rem 0 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  font-weight: var(--font-display-weight);
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1100px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 1rem;
    min-height: 0;
    padding-top: 0.85rem;
  }

  .wordmark {
    grid-row: 1;
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  /* Tighter tracking so the wordmark stays on one line at 390px. */
  .wordmark strong {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
    white-space: nowrap;
  }

  .wordmark small {
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    white-space: nowrap;
  }

  .header-actions {
    grid-row: 1;
  }

  /* The nav tabs are real pages; on small screens they become a
     horizontally scrollable tab row instead of disappearing. */
  .site-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    margin-top: 0.75rem;
    padding: 0.7rem 0.1rem 0.85rem;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav a {
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .announcement p:last-child {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-base {
    grid-column: 1;
    flex-direction: column;
  }

  .footer-mark {
    grid-column: 1;
  }

  .consent {
    right: 0.7rem;
    bottom: 0.7rem;
    left: 0.7rem;
    width: auto;
  }

  .buy-bar {
    right: var(--page-margin);
    left: var(--page-margin);
    gap: 0.8rem;
    max-width: none;
    padding-left: 1rem;
    transform: translate(0, 130%);
  }

  .buy-bar.is-visible {
    transform: translate(0, 0);
  }

  .buy-bar__name {
    display: none;
  }

  .buy-bar__meta {
    padding-left: 0;
    border-left: 0;
  }

  .buy-bar .button {
    flex: 1;
  }
}

/* Small phones: the wordmark descriptor plus two header chips overflow a
   320px viewport, so the decorative line goes and the chips tighten. */
@media (max-width: 420px) {
  .wordmark small {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .header-action {
    min-height: 2.2rem;
    padding-inline: 0.6rem;
    font-size: 0.74rem;
  }
}

@media (max-width: 360px) {
  .wordmark strong {
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .header-action {
    padding-inline: 0.5rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .buy-bar {
    gap: 0.7rem;
    padding-left: 1rem;
  }

  /* Keep the price visible; the hero picker still carries the fit detail. */
  .buy-bar__meta:first-of-type {
    display: none;
  }

  .buy-bar .button {
    min-height: 2.6rem;
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
