/* Feonix SkinLab — reset, elements, layout primitives, header and footer.
 * Clean-room. Written from the Feonix brand spec; nothing derives from the
 * previous theme. Mobile first, 390px up.
 */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--sl-cream);
  color: var(--sl-dark);
  font-family: var(--sl-font-body);
  font-size: var(--sl-step-body);
  font-weight: 400;
  line-height: var(--sl-leading-body);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }

/* ── type ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--sl-font-display);
  font-weight: 400;
  line-height: var(--sl-leading-display);
  letter-spacing: -0.005em;
  margin: 0 0 var(--sl-space-md);
  text-wrap: balance;
}
h1 { font-size: var(--sl-step-h1); }
h2 { font-size: var(--sl-step-h2); }
h3 { font-size: var(--sl-step-h3); }

p { margin: 0 0 var(--sl-space-md); }
p:last-child { margin-bottom: 0; }

a { color: var(--sl-rg-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--sl-rg-mid); }

:focus-visible {
  outline: 2px solid var(--sl-rg-mid);
  outline-offset: 3px;
  border-radius: var(--sl-radius);
}

/* Small caps label. Used for eyebrows, nav, buttons, meta. */
.sl-label {
  font-size: var(--sl-step-xs);
  font-weight: 500;
  letter-spacing: var(--sl-tracking-wide);
  text-transform: uppercase;
  color: var(--sl-muted);
}

/* R-005 — our own visually-hidden utility, replacing the theme's. */
.sl-visually-hidden:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sl-skip-link {
  position: absolute; left: var(--sl-gutter); top: var(--sl-space-xs);
  z-index: 100; padding: var(--sl-space-xs) var(--sl-space-md);
  background: var(--sl-dark); color: var(--sl-cream); text-decoration: none;
  transform: translateY(-200%);
}
.sl-skip-link:focus { transform: translateY(0); color: var(--sl-cream); }

/* ── layout ───────────────────────────────────────────────────────────── */
.sl-wrap {
  width: 100%;
  max-width: var(--sl-page-max);
  margin-inline: auto;
  padding-inline: var(--sl-gutter);
}
.sl-wrap--narrow { max-width: calc(var(--sl-measure) + var(--sl-gutter) * 2); }

.sl-section { padding-block: var(--sl-space-2xl); }
.sl-section + .sl-section { padding-top: 0; }

main { flex: 1 0 auto; }

/* ── buttons ──────────────────────────────────────────────────────────── */
.sl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sl-space-xs);
  min-height: 3rem;
  padding: var(--sl-space-sm) var(--sl-space-xl);
  border: 1px solid transparent;
  border-radius: var(--sl-radius);
  font-family: var(--sl-font-body);
  font-size: var(--sl-step-xs);
  font-weight: 600;
  letter-spacing: var(--sl-tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--sl-dur) var(--sl-ease), color var(--sl-dur) var(--sl-ease),
              border-color var(--sl-dur) var(--sl-ease);
}
.sl-btn--primary { background: var(--sl-rg-mid); color: #fff; }
.sl-btn--primary:hover { background: var(--sl-rg-dark); color: #fff; }
.sl-btn--ghost { background: transparent; color: var(--sl-dark); border-color: var(--sl-border); }
.sl-btn--ghost:hover { border-color: var(--sl-rg-mid); color: var(--sl-rg-dark); }
.sl-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.sl-btn--full { width: 100%; }

/* ── forms ────────────────────────────────────────────────────────────── */
input[type="email"], input[type="text"], input[type="number"], select, textarea {
  font: inherit;
  color: inherit;
  padding: var(--sl-space-sm) var(--sl-space-md);
  background: var(--sl-paper);
  border: var(--sl-rule);
  border-radius: var(--sl-radius);
  min-height: 3rem;
}
input:focus-visible { border-color: var(--sl-rg-mid); }

/* ── header ───────────────────────────────────────────────────────────── */
.sl-site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--sl-cream) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--sl-rule);
}
.sl-site-header__inner {
  display: flex; align-items: center; gap: var(--sl-space-lg);
  min-height: 4.5rem;
}
.sl-site-header__logo {
  display: block;
  margin-right: auto;
  line-height: 0;                       /* no descender gap under the image */
  flex: none;
}
/* Sized off the HEADER, not off the artwork. The lockup is 681x300, so a
   150px width renders 66px tall inside a 72px header - almost touching top and
   bottom. These widths keep it at 42-48px with real breathing room. */
.sl-site-header__logo img {
  width: 96px;
  height: auto;
}
@media (min-width: 900px) {
  .sl-site-header__logo img { width: 112px; }
}

.sl-nav__list { display: flex; align-items: center; gap: var(--sl-space-lg);
             list-style: none; margin: 0; padding: 0; }
.sl-nav__link {
  display: inline-block; padding-block: var(--sl-space-xs);
  font-size: var(--sl-step-xs); font-weight: 500;
  letter-spacing: var(--sl-tracking-wide); text-transform: uppercase;
  color: var(--sl-dark); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sl-nav__link:hover, .sl-nav__link[aria-current="page"] {
  color: var(--sl-rg-dark); border-bottom-color: var(--sl-rg-mid);
}

/* Submenu: hover on pointer devices, and keyboard-reachable via focus-within. */
.sl-nav__item { position: relative; }
.sl-nav__sub {
  position: absolute; top: 100%; left: 0; min-width: 15rem;
  display: grid; gap: var(--sl-space-2xs);
  margin: 0; padding: var(--sl-space-md);
  list-style: none;
  background: var(--sl-paper);
  border: var(--sl-rule);
  box-shadow: var(--sl-shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--sl-dur) var(--sl-ease), transform var(--sl-dur) var(--sl-ease),
              visibility var(--sl-dur);
}
.sl-nav__item:hover .sl-nav__sub, .sl-nav__item:focus-within .sl-nav__sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sl-nav__sub a {
  display: block; padding: var(--sl-space-2xs) 0;
  font-size: var(--sl-step-sm); color: var(--sl-dark); text-decoration: none;
}
.sl-nav__sub a:hover { color: var(--sl-rg-dark); }

.sl-site-header__actions { display: flex; align-items: center; gap: var(--sl-space-md); }
.sl-cart-link {
  font-size: var(--sl-step-xs); font-weight: 600;
  letter-spacing: var(--sl-tracking-wide); text-transform: uppercase;
  color: var(--sl-dark); text-decoration: none; white-space: nowrap;
}
.sl-cart-link:hover { color: var(--sl-rg-dark); }
.sl-cart-link__count {
  display: inline-grid; place-items: center;
  min-width: 1.5rem; height: 1.5rem; margin-left: var(--sl-space-2xs);
  padding-inline: 0.35em;
  background: var(--sl-rg-mid); color: #fff;
  border-radius: 999px;
  font-size: var(--sl-step-xs); font-weight: 600; letter-spacing: 0;
}

/* Mobile: the menu button toggles the nav open. */
.sl-nav__toggle { display: none; }
@media (max-width: 899px) {
  .sl-nav__toggle {
    display: inline-flex; align-items: center; gap: var(--sl-space-xs);
    background: none; border: 0; padding: var(--sl-space-xs); cursor: pointer;
    font-size: var(--sl-step-xs); font-weight: 600;
    letter-spacing: var(--sl-tracking-wide); text-transform: uppercase;
    color: var(--sl-dark); font-family: var(--sl-font-body);
  }
  .sl-nav { position: fixed; inset: 4.5rem 0 auto; display: none;
         background: var(--sl-cream); border-bottom: var(--sl-rule);
         padding: var(--sl-space-md) var(--sl-gutter) var(--sl-space-xl);
         max-height: calc(100svh - 4.5rem); overflow-y: auto; }
  .sl-nav[data-open="true"] { display: block; }
  .sl-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .sl-nav__item { border-bottom: var(--sl-rule); }
  .sl-nav__link { padding-block: var(--sl-space-md); font-size: var(--sl-step-sm); }
  .sl-nav__sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent;
    padding: 0 0 var(--sl-space-md) var(--sl-space-md);
  }
}

/* ── footer ───────────────────────────────────────────────────────────── */
.sl-site-footer {
  margin-top: var(--sl-space-2xl);
  background: var(--sl-dark);
  color: var(--sl-cream);
  padding-block: var(--sl-space-xl);
}
.sl-site-footer a { color: var(--sl-cream); text-decoration: none; }
.sl-site-footer a:hover { color: var(--sl-rg-light); text-decoration: underline; }
.sl-site-footer h2 {
  font-size: var(--sl-step-h3); color: var(--sl-cream);
  margin-bottom: var(--sl-space-sm);
}
.sl-footer__grid {
  display: grid; gap: var(--sl-space-xl);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .sl-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sl-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1.4fr; } }

.sl-footer__heading {
  font-family: var(--sl-font-body);
  font-size: var(--sl-step-xs); font-weight: 600;
  letter-spacing: var(--sl-tracking-wide); text-transform: uppercase;
  color: var(--sl-rg-light);
  margin: 0 0 var(--sl-space-md);
}
.sl-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sl-space-xs); }
.sl-footer__list a { font-size: var(--sl-step-sm); }
.sl-footer__contact { font-style: normal; font-size: var(--sl-step-sm); line-height: 1.9; }
.sl-footer__legal {
  margin-top: var(--sl-space-xl); padding-top: var(--sl-space-md);
  border-top: 1px solid rgb(247 243 239 / 0.16);
  font-size: var(--sl-step-xs); color: rgb(247 243 239 / 0.7);
}
.sl-footer__logo {
  display: block; width: 170px; height: auto;
  margin: 0 0 var(--sl-space-md);
}

/* newsletter */
.sl-newsletter__field { display: grid; gap: var(--sl-space-xs); margin-bottom: var(--sl-space-md); }
.sl-newsletter__field input { width: 100%; color: var(--sl-dark); }
.sl-newsletter__consent {
  display: flex; gap: var(--sl-space-sm); align-items: flex-start;
  font-size: var(--sl-step-xs); line-height: 1.55; margin-bottom: var(--sl-space-md);
}
.sl-newsletter__consent input { margin-top: 0.2em; flex: none; width: 1rem; height: 1rem;
                             min-height: 0; accent-color: var(--sl-rg-mid); }
.sl-newsletter__note { font-size: var(--sl-step-xs); color: rgb(247 243 239 / 0.7); }
.sl-newsletter__note a { text-decoration: underline; }

/* ── coming soon ──────────────────────────────────────────────────────────── */
.sl-soon { padding-block: var(--sl-space-2xl); }
.sl-soon__lede { font-size: 1.125rem; color: var(--sl-muted); }

/* ── hero ─────────────────────────────────────────────────────────────────── */
.sl-hero { padding-block: var(--sl-space-xl) 0; }
.sl-hero__inner { display: grid; gap: var(--sl-space-lg); align-items: center; }
@media (min-width: 900px) {
  .sl-hero { padding-block: var(--sl-space-2xl) 0; }
  .sl-hero__inner { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
                    gap: clamp(2rem, 5vw, 5rem); }
}
.sl-hero__title { font-size: var(--sl-step-hero); margin-block: var(--sl-space-xs) var(--sl-space-md); }
.sl-hero__lede { font-size: 1.125rem; color: var(--sl-muted); max-width: 34ch;
                 margin-bottom: var(--sl-space-lg); }
/* Type-led hero: no photograph until one exists showing only the real eleven
   SKUs (DEFECTS IMG-001..006). Centred, generous, and the collection tiles
   directly beneath carry the actual product photography. */
.sl-hero--type { padding-block: var(--sl-space-2xl); text-align: center;
                 border-bottom: var(--sl-rule); }
.sl-hero--type .sl-hero__inner { grid-template-columns: 1fr; }
/* Constrain the TITLE, not the column: capping the whole copy block squeezed
   the lede into a ribbon and stacked the two buttons on top of each other. */
.sl-hero--type .sl-hero__copy { max-width: none; }
.sl-hero--type .sl-hero__title { max-width: 16ch; margin-inline: auto; }
.sl-hero--type .sl-hero__lede { max-width: 48ch; margin-inline: auto; }
.sl-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sl-space-md);
                    justify-content: center; }

/* ── authority ────────────────────────────────────────────────────────────── */
.sl-authority {
  /* No margin-top: the preceding .sl-section already pads by --sl-space-2xl,
     and stacking both left a dead band the width of two sections. */
  padding-block: var(--sl-space-2xl);
  background: color-mix(in srgb, var(--sl-rg-light) 18%, var(--sl-cream));
  border-block: var(--sl-rule);
}
.sl-authority__inner { max-width: 62ch; margin-inline: auto; text-align: center; }
.sl-authority__inner h2 { margin-bottom: var(--sl-space-lg); }
.sl-authority__inner p { color: var(--sl-dark); }
.sl-authority__inner .sl-btn { margin-top: var(--sl-space-md); }

.sl-section__lede { color: var(--sl-muted); max-width: 52ch; margin-bottom: var(--sl-space-lg); }

/* ── prose / policy pages ─────────────────────────────────────────────────── */
/* One readable column shared by every content and policy page. Measure is
   capped in ch so the line length stays right whatever the viewport does. */
.sl-prose { padding-block: var(--sl-space-xl) var(--sl-space-2xl); }
.sl-prose h1 { margin-bottom: var(--sl-space-lg); }
.sl-prose__updated {
  font-size: var(--sl-step-xs); letter-spacing: var(--sl-tracking-wide);
  text-transform: uppercase; color: var(--sl-muted);
  padding-bottom: var(--sl-space-md); border-bottom: var(--sl-rule);
  margin-bottom: var(--sl-space-xl);
}
.sl-prose__body { max-width: var(--sl-measure); }
.sl-prose__body h2 {
  font-size: var(--sl-step-h3);
  margin-top: var(--sl-space-xl); margin-bottom: var(--sl-space-sm);
  padding-top: var(--sl-space-md); border-top: var(--sl-rule);
}
.sl-prose__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sl-prose__body h3 { font-size: 1.15rem; margin-top: var(--sl-space-lg); }
.sl-prose__body p, .sl-prose__body li { color: var(--sl-dark); }
.sl-prose__body ul, .sl-prose__body ol { padding-left: 1.2rem; margin: 0 0 var(--sl-space-md); }
.sl-prose__body li { margin-bottom: var(--sl-space-xs); }
.sl-prose__body strong { font-weight: 600; }
.sl-prose__body a { color: var(--sl-rg-dark); }

/* The policy bodies carry numbered section headings as <p> from the original
   copy. Style them as headings without rewriting the source. */
.sl-prose__body > p:has(+ p) { margin-bottom: var(--sl-space-md); }

.sl-prose__body table {
  width: 100%; border-collapse: collapse; margin-bottom: var(--sl-space-lg);
  font-size: var(--sl-step-sm);
}
.sl-prose__body th, .sl-prose__body td {
  text-align: left; vertical-align: top;
  padding: var(--sl-space-sm); border-bottom: var(--sl-rule);
}
.sl-prose__body th {
  font-family: var(--sl-font-body); font-size: var(--sl-step-xs); font-weight: 600;
  letter-spacing: var(--sl-tracking-wide); text-transform: uppercase;
  color: var(--sl-muted);
}
.sl-prose__table-scroll { overflow-x: auto; }

/* A pull-out for the legally load-bearing paragraphs (the 14-day right, the
   sealed-goods exception) so they cannot be skimmed past. */
.sl-callout {
  background: color-mix(in srgb, var(--sl-rg-light) 22%, var(--sl-cream));
  border-left: 3px solid var(--sl-rg-mid);
  border-radius: var(--sl-radius);
  padding: var(--sl-space-md) var(--sl-space-lg);
  margin-bottom: var(--sl-space-lg);
}

/* ── cookie consent ───────────────────────────────────────────────────────── */
/* Reject and Accept are deliberately identical in size and prominence. Only the
   fill differs, and the ghost/primary pair is the same contrast relationship
   used everywhere else on the site - neither is visually louder. */
.sl-consent {
  position: fixed; inset: auto 0 0 0; z-index: 200;
  background: var(--sl-paper);
  border-top: 1px solid var(--sl-border);
  box-shadow: 0 -8px 32px rgb(23 18 31 / 0.10);
  padding: var(--sl-space-lg) 0;
}
.sl-consent__inner {
  width: 100%; max-width: var(--sl-page-max); margin-inline: auto;
  padding-inline: var(--sl-gutter);
  display: grid; gap: var(--sl-space-lg); align-items: center;
}
@media (min-width: 800px) {
  .sl-consent__inner { grid-template-columns: 1fr auto; gap: var(--sl-space-2xl); }
}
.sl-consent__title { font-size: var(--sl-step-h3); margin-bottom: var(--sl-space-xs); }
.sl-consent__body {
  font-size: var(--sl-step-sm); color: var(--sl-muted);
  max-width: 68ch; margin: 0;
}
.sl-consent__body a { color: var(--sl-rg-dark); }
.sl-consent__body strong { color: var(--sl-dark); font-weight: 600; }
.sl-consent__actions {
  display: flex; flex-wrap: wrap; gap: var(--sl-space-md);
}
.sl-consent__actions form { margin: 0; flex: 1 1 auto; }
/* Equal weight, enforced in CSS rather than left to chance.
   Both buttons carry the SAME class and the SAME styling. Neither is filled
   while the other is outlined: that distinction is precisely how a "reject"
   button gets quietly demoted, and it is what the ICO objects to. If one of
   these ever needs to look different, that is a decision to argue for, not a
   styling tweak. */
.sl-consent__btn {
  width: 100%; min-width: 13rem;
  background: transparent;
  color: var(--sl-dark);
  border-color: var(--sl-dark);
}
.sl-consent__btn:hover { background: var(--sl-dark); color: var(--sl-cream); }
@media (min-width: 800px) {
  .sl-consent__actions form { flex: 0 0 auto; }
}

/* ── modal ────────────────────────────────────────────────────────────────── */
/* Native <dialog>: focus trap, Esc and inertness come from the platform. */
.sl-modal {
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius);
  background: var(--sl-cream);
  color: var(--sl-dark);
  padding: 0;
  max-width: min(34rem, calc(100vw - 2rem));
  box-shadow: 0 24px 64px rgb(23 18 31 / 0.22);
}
.sl-modal::backdrop { background: rgb(23 18 31 / 0.45); }
.sl-modal__inner { padding: var(--sl-space-xl); text-align: center; }
.sl-modal__heading {
  font-size: var(--sl-step-h2);
  margin-block: var(--sl-space-xs) var(--sl-space-sm);
}
.sl-modal__message {
  color: var(--sl-muted);
  margin-bottom: var(--sl-space-lg);
}
.sl-modal__close { min-width: 10rem; }

/* ── newsletter / unsubscribe result page (no-JS fallback) ────────────────── */
.sl-result { padding-block: var(--sl-space-2xl); text-align: center; }
.sl-result__heading { font-size: var(--sl-step-h1); margin-block: var(--sl-space-xs) var(--sl-space-md); }
.sl-result__message { font-size: 1.125rem; color: var(--sl-muted); }
.sl-result .sl-product__rule { margin-inline: auto; }
