/* We Custom Beauty — a quiet, milky, modern shop inspired by the spirit of
   Rhode (original design; no copied assets or copy). */

:root {
  --milk: #faf7f4;
  --milk-deep: #f3eee8;
  --beige: #e8dfd6;
  --nude: #edd8d0;
  --blush: #f0e4de;
  --ink: #2f2a27;
  --ink-soft: #5c564f;
  --muted: #8a827a;
  --line: rgba(47, 42, 39, 0.12);
  --line-strong: rgba(47, 42, 39, 0.22);
  --sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Syne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nav-h: 4.25rem;
  --pad: clamp(1.25rem, 5.5vw, 5.5rem);
  --max: 72rem;
  --radius: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--milk);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}
h1 { font-size: clamp(3rem, 8vw, 6.25rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); text-wrap: balance; }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: inherit; }
address { font-style: normal; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--milk);
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.7rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--milk);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease);
}
.btn:hover, .btn:focus-visible {
  background: transparent;
  color: var(--ink);
  outline: none;
}
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--nav-h);
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(250, 247, 244, 0.9);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  height: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  text-decoration: none;
  color: var(--ink);
  line-height: 0;
  display: flex;
  align-items: center;
}
.logo-mark {
  display: block;
  height: 44px;
  width: auto;
  object-fit: contain;
}
.logo-mark-footer {
  height: 64px;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.site-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.3rem 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.site-nav a:hover, .site-nav a:focus-visible { opacity: 1; }

.cart-toggle, .nav-toggle {
  background: none;
  border: 0;
  color: inherit;
  font-family: var(--sans);
  cursor: pointer;
  padding: 0;
}
.cart-toggle {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  justify-self: end;
  opacity: 0.85;
}
.cart-count {
  display: inline-flex;
  min-width: 1.1rem;
  margin-left: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.nav-toggle {
  display: none;
  width: 1.7rem;
  height: 1.05rem;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease), top 0.25s;
}
.nav-toggle span:first-child { top: 0.25rem; }
.nav-toggle span:last-child { top: 0.7rem; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 0.48rem; transform: rotate(40deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 0.48rem; transform: rotate(-40deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--blush) url("assets/hero-poster.jpg") 16% 24% / cover no-repeat;
  color: var(--ink);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 16% 24%;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Bottom-left scrim: typography sits low so the face (upper left) stays clear. */
  background: linear-gradient(
    to top,
    rgba(16, 13, 11, 0.62) 0%,
    rgba(16, 13, 11, 0.36) 28%,
    rgba(16, 13, 11, 0.10) 52%,
    rgba(16, 13, 11, 0.00) 72%
  ),
  linear-gradient(
    to right,
    rgba(16, 13, 11, 0.38) 0%,
    rgba(16, 13, 11, 0.18) 28%,
    rgba(16, 13, 11, 0.00) 52%
  );
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  text-align: left;
  width: 42%;
  max-width: 51rem;
  padding: calc(var(--nav-h) + 1rem) var(--pad) clamp(3.5rem, 9vh, 6.5rem);
  margin-top: 0;
  box-sizing: border-box;
}
.hero-brand {
  /* Typography stays visible; the new hero has no timed baked-in title overlay. */
}
.hero-copy .eyebrow {
  color: rgba(250, 247, 244, 0.90);
  margin-bottom: 1.35rem;
  letter-spacing: 0.22em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 1px 16px rgba(0, 0, 0, 0.48);
}
.hero-copy .wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: #faf7f4;
  line-height: 1;
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.30),
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 8px 36px rgba(0, 0, 0, 0.50);
}
.wordmark-lock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}
.wordmark-accent {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem); /* JS fits tracking/size to BEAUTY's ink width */
  letter-spacing: 0.08em; /* CSS fallback; JS fits to BEAUTY's ink width */
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0 -0.08em 0.18em 0;
  color: #faf7f4;
  white-space: nowrap;
}
.wordmark-primary {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.6vw, 6.2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 0.9;
  margin-right: -0.14em;
  color: #faf7f4;
  white-space: nowrap;
}
.tagline {
  margin: 0 0 2rem;
  max-width: 22rem;
  font-size: 1.08rem;
  color: rgba(250, 247, 244, 0.96);
  font-weight: 400;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.32),
    0 1px 18px rgba(0, 0, 0, 0.48);
}
.hero .btn {
  background: #faf7f4;
  color: var(--ink);
  border-color: #faf7f4;
  margin-top: 0.9rem;
}
.hero .btn:hover, .hero .btn:focus-visible {
  background: transparent;
  color: #faf7f4;
  border-color: #faf7f4;
}


/* ---------- Feature film (previous hero, full-width, uncropped) ---------- */
.feature-film {
  position: relative;
  width: 100%;
  aspect-ratio: 1890 / 1080;
  overflow: clip;
  background: var(--ink);
  line-height: 0;
}
.feature-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* ---------- Collection ---------- */
.collection, .routine {
  padding: clamp(5rem, 11vw, 8.5rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.section-header {
  max-width: 32rem;
  margin: 0 auto 3.75rem;
  text-align: center;
}
.section-header h2 { margin: 0 0 0.9rem; }
.section-header p:last-child { margin: 0; color: var(--muted); font-weight: 300; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4.5rem 2.25rem;
}
.product-card { display: flex; flex-direction: column; }
.product-media {
  overflow: hidden;
  background: var(--milk-deep);
  aspect-ratio: 4 / 5;
  margin-bottom: 1.35rem;
  border-radius: 0.35rem;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.04); }

.product-body { display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.product-body h3 { margin: 0; font-size: 1.2rem; }
.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  flex: 1;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.price { font-variant-numeric: tabular-nums; color: var(--ink); }


/* Product ingredients (expandable). Native details/summary stays keyboard-accessible. */
.product-ingredients {
  margin: 0.15rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.product-ingredients[hidden] { display: none; }
.product-ingredients summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  user-select: none;
}
.product-ingredients summary::-webkit-details-marker,
.product-ingredients summary::marker { display: none; content: ""; }
.product-ingredients summary:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
.product-ingredients summary::after {
  content: "+";
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--ink-soft);
}
.product-ingredients[open] summary::after { content: "–"; }
.product-body p.ingredients-list {
  flex: none;
  margin: 0 0 0.85rem;
  padding-right: calc(3.5rem + env(safe-area-inset-right, 0px));
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* ---------- Philosophy ---------- */
.philosophy {
  background: var(--blush);
  padding: clamp(5rem, 11vw, 8.5rem) 0;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.philosophy-photo { overflow: hidden; border-radius: 0.35rem; }
.philosophy-photo img {
  width: 100%;
  height: 100%;
  max-height: 38rem;
  object-fit: cover;
}
.philosophy-copy { max-width: 32rem; }
.philosophy-copy h2 { margin: 0 0 1.2rem; }
.philosophy-copy p { color: var(--ink-soft); font-weight: 300; }
.made-in {
  margin-top: 1.6rem;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.ingredients {
  list-style: none;
  margin: clamp(3.5rem, 7vw, 5.5rem) auto 0;
  padding: 0 var(--pad);
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.25rem 1.75rem;
}
.ingredients h3 { margin: 0 0 0.45rem; font-size: 1.15rem; }
.ingredients p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; font-weight: 300; }

/* ---------- Routine ---------- */
.routine { width: 100%; }
.routine-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.75rem;
}
.skin-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.7rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.skin-btn:hover { border-color: var(--ink); }
.skin-btn.is-active {
  background: var(--ink);
  color: var(--milk);
  border-color: var(--ink);
}
.routine-lead {
  max-width: 34rem;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 300;
}
.routine-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.routine-step {
  background: var(--milk-deep);
  padding: 1.6rem 1.4rem 1.7rem;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease), background 0.25s;
}
.routine-step:hover { transform: translateY(-3px); background: var(--blush); }
html.js-motion .routine-step:hover { transform: none; }

/* Scroll-linked 3D flip for brow-guide steps */
.flip-card {
  -webkit-perspective: 1000px;
  perspective: 1000px;
}
.flip-card-inner {
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  will-change: transform;
}
.flip-card-front,
.flip-card-back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 0.75rem;
}
.flip-card-front {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--milk-deep);
  color: var(--ink);
  pointer-events: none;
  -webkit-transform: rotateY(0deg) translateZ(1px);
  transform: rotateY(0deg) translateZ(1px);
}
.flip-card-front .flip-step-label {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.flip-card-front .flip-step-index {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 0.3rem;
}
.flip-card-back {
  -webkit-transform: rotateY(180deg) translateZ(1px);
  transform: rotateY(180deg) translateZ(1px);
  display: block;
  height: 100%;
}
html:not(.js-motion) .flip-card-front { display: none; }
html:not(.js-motion) .flip-card-back {
  -webkit-transform: none;
  transform: none;
}

.routine-step .step-num {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.routine-step h3 { margin: 0; font-size: 1.12rem; }
.routine-step p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; font-weight: 300; }

/* ---------- Testimonials ---------- */
.testimonials {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 8.5rem) var(--pad);
  /* clip, not hidden: avoids a scroll container and does not break sticky.
     Do not put overflow-x: hidden on body/html (Safari / sticky). */
  overflow: clip;
}
.testimonials .section-header,
.testimonials .quote-grid {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.75rem;
}
.quote-cell {
  min-width: 0;
  overflow: clip;
}
.quote-grid blockquote {
  margin: 0;
  padding: 1.75rem 1.5rem;
  background: var(--milk-deep);
  border-radius: 0.75rem;
}
.quote-grid p {
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.45;
  margin: 0 0 1.2rem;
}
.quote-grid footer {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--nude);
  color: var(--ink);
  padding: clamp(5rem, 10vw, 7.5rem) var(--pad);
}
.newsletter-inner { max-width: 38rem; margin: 0 auto; text-align: center; }
.newsletter h2 { margin: 0 0 0.85rem; }
.newsletter-inner > p { color: var(--ink-soft); font-weight: 300; }
.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55rem 0 0.6rem;
  border-radius: 0;
  outline: none;
  width: 100%;
}
.field input:focus { border-bottom-color: var(--ink); }
.form-note { margin: 1.25rem 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.newsletter-form .btn { align-self: end; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--milk);
  padding: clamp(3.5rem, 8vw, 5.5rem) var(--pad) calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr 1fr;
  gap: 2.5rem 2rem;
}
.footer-logo {
  display: inline-block;
  line-height: 0;
  margin: 0 0 0.9rem;
  text-decoration: none;
  border-bottom: 0;
}
.site-footer a.footer-logo:hover { border-bottom-color: transparent; }
.footer-brand .made-in { margin: 0 0 0.9rem; color: var(--nude); }
.footer-brand p { color: rgba(250, 247, 244, 0.72); font-weight: 300; }
.footer-heading {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nude);
  margin: 0.35rem 0 1rem;
}
.site-footer a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.site-footer a:hover { border-bottom-color: var(--nude); }
.footer-address { line-height: 1.6; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.45rem; }
.hours-note, .footer-base p, .credit { color: rgba(250, 247, 244, 0.48); font-size: 0.82rem; font-weight: 300; }
.footer-base {
  max-width: var(--max);
  margin: 3.5rem auto 0;
  padding-top: 1.25rem;
  padding-right: calc(4rem + env(safe-area-inset-right, 0px));
  border-top: 1px solid rgba(250, 247, 244, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-sizing: border-box;
  width: 100%;
}
.credit a { color: inherit; }

/* ---------- Cart ---------- */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
.cart-drawer.is-open { pointer-events: auto; }
.cart-drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(47, 42, 39, 0.3);
  opacity: 0;
  transition: opacity 0.35s;
}
.cart-drawer.is-open::before { opacity: 1; }
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(26rem, 100%);
  height: 100%;
  background: var(--milk);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.cart-drawer.is-open .cart-panel { transform: none; }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 { margin: 0; font-size: 1.5rem; }
.cart-close {
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  padding: 0 0.2rem;
}
.cart-items { padding: 1.25rem 1.5rem; flex: 1; overflow: auto; }
.cart-empty { color: var(--muted); }
.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-row h3 { margin: 0; font-size: 1.05rem; }
.cart-row .qty { font-size: 0.8rem; color: var(--muted); }
.cart-foot { padding: 1.25rem 1.5rem 1.75rem; border-top: 1px solid var(--line); }
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.cart-disclaimer { margin: 0; font-size: 0.8rem; color: var(--muted); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--ink);
  color: var(--milk);
  padding: 0.85rem 1.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  z-index: 70;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.product-card.is-highlighted { box-shadow: 0 0 0 1px var(--ink); }


/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: calc(1.15rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(250, 247, 244, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(47, 42, 39, 0.12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.4rem);
  transition: opacity 0.35s var(--ease), visibility 0.35s, transform 0.35s var(--ease), background 0.25s, border-color 0.25s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.back-to-top svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.back-to-top:hover {
  background: var(--milk);
  border-color: var(--ink);
}
.back-to-top:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Motion ---------- */
/* Visible by default so content remains if JS never runs. html.js is added by script.js. */
.reveal { opacity: 1; transform: none; }
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: calc(var(--stagger, 0) * 70ms);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* Heading words slide up from a clip mask. Unsplit text stays visible without js-motion. */
.heading-word-clip { display: inline; }
.heading-word { display: inline; }
html.js-motion .heading-word-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.06em;
}
html.js-motion .heading-word {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  transition: transform 0.95s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
  will-change: transform;
}
html.js-motion [data-reveal-heading].is-in .heading-word {
  transform: none;
}

/* Marquee bands — position is driven by scroll, not a CSS animation. */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--milk);
  padding: 1.15rem 0;
  user-select: none;
  pointer-events: none;
}
.marquee--soft {
  background: var(--blush);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee-copy {
  flex: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.4vw, 2.35rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  padding-right: 0.15em;
}

/* Philosophy: oversized place-name drifts against the copy. */
.philosophy { position: relative; overflow: hidden; }
.philosophy-stage { position: relative; overflow: hidden; }
.philosophy-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.philosophy-backdrop span {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(7rem, 24vw, 18rem);
  letter-spacing: -0.05em;
  line-height: 0.75;
  text-transform: uppercase;
  color: rgba(47, 42, 39, 0.055);
  white-space: nowrap;
  will-change: transform;
}
.philosophy-copy-wide { position: relative; z-index: 1; }

/* Footer typographic mark — scale + fade is scroll-linked.
   Final (scale 1) size is fitted to the padded content width so all three
   words stay fully visible. The oversized starting scale may clip. */
.footer-mark {
  overflow: clip;
  margin: 3.25rem calc(var(--pad) * -1) 0;
  padding: 0 var(--pad);
  text-align: center;
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}
.footer-mark-text {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 6.6vw, 7.5rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--milk);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  padding: 0.08em 0 0.14em;
  opacity: 1;
}
.footer-mark-lock {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.22em;
  margin: 0 auto;
  width: max-content;
  max-width: 100%;
}
.footer-mark-accent,
.footer-mark-primary {
  display: block;
  white-space: nowrap;
  font-weight: 700;
  line-height: 0.82;
}
/* Narrow screens: two-line lock (WE CUSTOM / BEAUTY), equal widths via JS. */
@media (max-width: 899px) {
  .footer-mark-lock {
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 0.8;
  }
  .footer-mark-accent { font-size: clamp(1.7rem, 10.5vw, 4.2rem); }
  .footer-mark-primary { font-size: clamp(2.3rem, 16.5vw, 7rem); }
}
.footer-mark.is-stacked .footer-mark-lock {
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 0.8;
}

/* Product image shift layer (parallax translateY); hover scale stays on the photo. */
.product-art-shift {
  width: 100%;
  height: 112%;
  will-change: transform;
}
.product-art-shift .product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-art-shift .product-photo { transform: scale(1.04); }
}

.hero-video, .hero-copy { will-change: transform; }

/* Scroll-linked testimonial slide-in. Visible unless js-motion is on. */
.quote-card { will-change: auto; }
html.js-motion .quote-card {
  opacity: 0;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .product-media img, .product-art-shift .product-photo, .cart-panel, .toast, .btn, .skin-btn, .routine-step, .back-to-top, .heading-word {
    transition: none !important;
  }
  html.js .reveal, .reveal { opacity: 1; transform: none; }
  .heading-word, .heading-word-clip { transform: none !important; }
  .product-card:hover .product-media img,
  .product-card:hover .product-art-shift .product-photo { transform: none; }
  .hero-brand, .hero-scrim { opacity: 1 !important; visibility: visible !important; }
  .hero-video, .hero-copy, .marquee-track, .philosophy-backdrop span, .footer-mark-text, .product-art-shift, .quote-card, .flip-card-inner, .flip-card-back, .feature-video {
    transform: none !important;
    will-change: auto;
  }
  .hero-copy { opacity: 1 !important; }
  .footer-mark-text { opacity: 1 !important; }
  html.js-motion .quote-card, .quote-card { opacity: 1 !important; }
  html.js-motion .flip-card-front, .flip-card-front { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .ingredients, .routine-steps, .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .philosophy-photo img { max-height: 28rem; width: 100%; }
}

@media (max-width: 820px) {
  .hero {
    align-items: flex-end;
    justify-content: flex-start;
    background-position: 22% 18%;
  }
  .hero-video { object-position: 22% 18%; }
  .hero-scrim {
    background: linear-gradient(
      to top,
      rgba(16, 13, 11, 0.78) 0%,
      rgba(16, 13, 11, 0.55) 26%,
      rgba(16, 13, 11, 0.18) 48%,
      rgba(16, 13, 11, 0.00) 68%
    );
  }
  .hero-copy {
    width: 100%;
    max-width: none;
    text-align: center;
    padding: 1rem var(--pad) calc(1.7rem + env(safe-area-inset-bottom, 0px));
    margin-top: 0;
  }
  .hero-copy .wordmark { align-items: center; }
  .hero-copy .tagline { margin-left: auto; margin-right: auto; }
  .hero .btn { margin-top: 0; }
  .hero-brand, .hero-scrim { opacity: 1 !important; visibility: visible !important; }
  .nav-toggle { display: block; }
  .nav-inner { grid-template-columns: auto 1fr auto; }
  .logo { justify-self: center; }
  .logo-mark { height: 38px; }
  .logo-mark-footer { height: 52px; }
  .site-header { background: rgba(250, 247, 244, 0.86); backdrop-filter: blur(12px); }
  .site-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--milk);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--pad) 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 0.85rem 0; width: 100%; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav-backdrop {
    position: fixed;
    inset: var(--nav-h) 0 0;
    background: rgba(47, 42, 39, 0.25);
    z-index: 30;
  }
  .nav-backdrop[hidden] { display: none; }
  .newsletter-form { grid-template-columns: 1fr; }
  .newsletter-form .btn { width: 100%; margin-top: 0.5rem; }
  .product-grid { gap: 3rem 1.25rem; }
}

@media (max-width: 820px) {
  .philosophy-backdrop span {
    font-size: clamp(5rem, 36vw, 9rem);
    color: rgba(47, 42, 39, 0.05);
  }
}

@media (max-width: 620px) {
  .product-grid, .ingredients, .routine-steps, .quote-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .wordmark-accent {
    font-size: clamp(2.35rem, 9.4vw, 2.8rem);
    letter-spacing: 0.06em;
    margin: 0 -0.06em 0.12em 0;
  }
  .wordmark-primary {
    font-size: clamp(2.75rem, 14.5vw, 3.35rem);
    letter-spacing: 0.12em;
    margin-right: -0.12em;
  }
}

/* ---------- Shop filters & groups ---------- */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: -1.5rem auto 3rem;
  max-width: var(--max);
}
.filter-tab {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.65rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.filter-tab:hover { border-color: var(--ink); }
.filter-tab.is-active {
  background: var(--ink);
  color: var(--milk);
  border-color: var(--ink);
}
.shop-group { margin-bottom: 3.75rem; }
.shop-group:last-child { margin-bottom: 0; }
.shop-group-title {
  margin: 0 0 1.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Product art & swatches ---------- */
.product-art {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, #fffefb 0%, var(--milk-deep) 70%);
  aspect-ratio: 4 / 5;
  margin-bottom: 1.35rem;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-svg {
  width: 78%;
  height: 86%;
  display: block;
}
.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-art:has(.product-photo) {
  background: #f3f1ee;
}
.option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.85rem;
  min-height: 1.6rem;
}
.swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.swatch {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 1px solid rgba(47, 42, 39, 0.2);
  border-radius: 50%;
  cursor: pointer;
  background: #ccc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  transition: transform 0.2s var(--ease);
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-active {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
.swatch-name {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.option-pill {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.4rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
}
.option-pill.is-active {
  background: var(--ink);
  color: var(--milk);
  border-color: var(--ink);
}
.price-placeholder {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 500;
}
.price-note {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-meta {
  align-items: center;
}

/* Philosophy, typographic */
.philosophy-copy-wide {
  max-width: 38rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  text-align: center;
}
.philosophy-copy-wide h2 { margin: 0 0 1.2rem; }
.philosophy-copy-wide p { color: var(--ink-soft); font-weight: 300; }
.philosophy-copy-wide .made-in { color: var(--ink); }
