/* ==========================================================================
   pages.css — page-level sections (hero, tiles, custom band, inner pages…)
   ========================================================================== */

/* ---------- home hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: min(860px, calc(100svh - var(--header-h) - 40px));
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(48% 55% at 85% 12%, rgba(255, 254, 251, 0.85), transparent 70%),
    radial-gradient(45% 55% at 8% 95%, color-mix(in srgb, var(--sand) 65%, transparent), transparent 70%),
    radial-gradient(30% 35% at 60% 90%, color-mix(in srgb, var(--sand) 30%, transparent), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(2%, -3%, 0) scale(1.06); } }
.hero__bubbles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(3.1rem, 7.6vw, 7rem); line-height: 0.98; }
.hero h1 em { color: var(--emph); font-variation-settings: "opsz" 144, "SOFT" 100; }
.hero__lead { max-width: 36ch; margin: 1.7rem 0 2.3rem; font-size: 1.2rem; color: var(--ink-soft); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.stage { position: relative; aspect-ratio: 1 / 1.05; width: min(100%, 560px); margin-inline: auto; }
.stage::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), color-mix(in srgb, var(--sand) 55%, transparent) 55%, transparent 72%);
  filter: blur(6px);
}
.stage__item {
  position: absolute;
  transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) + var(--sy, 0px)), 0);
}
.stage__item .soap, .stage__item .frame { animation: float 7s ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot)); }
  50% { transform: translateY(-16px) rotate(calc(var(--rot) + 2.5deg)); }
}
.stage__a { top: 2%; left: 0; width: 60%; }
.stage__b { top: 30%; right: -3%; width: 56%; z-index: 2; }
.stage__c { bottom: 0; left: 14%; width: 44%; z-index: 3; }

.spin-badge {
  position: absolute;
  top: -2%; right: 6%;
  width: clamp(96px, 20%, 130px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--shadow-1);
}
.spin-badge svg { width: 100%; height: 100%; animation: spin 22s linear infinite; }
.spin-badge text { font-family: var(--font-body); font-size: 10.4px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; fill: var(--cream); }
.spin-badge::after { content: "✺"; position: absolute; font-size: 1.4rem; color: var(--sand); }

.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; border: 1.5px solid var(--ink-soft); border-radius: 999px; transform: translateX(-50%); opacity: 0.6; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--ink-soft); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .stage { width: min(100%, 440px); }
  .scroll-cue { display: none; }
}

/* ---------- ticker strip ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--cream-2); white-space: nowrap; }
.ticker__track { display: inline-flex; padding-block: 1.3rem; animation: marquee 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 2.5rem; padding-right: 2.5rem; font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.02em; }
.ticker__item em { color: var(--emph); }
.ticker__item::after { content: "✺"; font-size: 0.55em; color: var(--sand); }

/* ---------- collection tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.tile {
  --tone: var(--sand);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(360px, 40vw, 500px);
  padding: 1.7rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  background: color-mix(in srgb, var(--tone) 45%, var(--cream));
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
}
.tile::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 120%;
  aspect-ratio: 1;
  left: -10%;
  top: -35%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.75), transparent 65%);
  transition: transform 1.2s var(--ease);
}
.tile:hover { box-shadow: var(--shadow-2); transform: translateY(-6px); }
.tile:hover::before { transform: scale(1.15) translate(6%, 6%); }
.tile .soap { position: absolute; top: 14%; left: 14%; --w: 72%; transition: transform 1s var(--ease); }
.tile:hover .soap { transform: rotate(calc(var(--rot) - 5deg)) scale(1.08) translateY(-8px); }
/* photo tiles: full-bleed picture with a soft dark fade for the label */
.tile--photo { background: var(--cream-2); color: var(--cream); }
.tile--photo::before { display: none; }
.tile--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(24, 22, 18, 0.72), rgba(24, 22, 18, 0.05) 58%);
}
.tile__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.tile--photo:hover .tile__img { transform: scale(1.07); }
.tile--photo .tile__label p { color: rgba(246, 242, 234, 0.8); }
.tile--photo .tile__arrow { color: var(--ink); }

.tile__label { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.tile__label h3 { font-size: 2rem; line-height: 1; }
.tile__label p { margin-top: 0.4rem; font-size: 0.93rem; color: var(--ink-soft); }
.tile__arrow { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); transition: transform 0.7s var(--ease), background 0.4s, color 0.4s; }
.tile__arrow svg { width: 20px; height: 20px; }
.tile:hover .tile__arrow { transform: rotate(-45deg); background: var(--ink); color: var(--cream); }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr; } .tile { min-height: 340px; } }

/* ---------- product grid ---------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 2.4rem 1.4rem; }
.grid-products.is-switching { opacity: 0; transform: translateY(10px); }
.grid-products { transition: opacity 0.3s, transform 0.3s; }

/* ---------- custom order feature band ---------- */
.custom {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-inline: clamp(0.5rem, 2vw, 1.5rem);
  border-radius: clamp(28px, 4vw, 56px);
  background: var(--accent);
  color: var(--cream);
}
.custom::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(40% 60% at 90% 10%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(217, 205, 185, 0.1), transparent 70%);
}
.custom__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.custom h2 em { color: var(--sand); }
.custom__text p { margin: 1.4rem 0 1.8rem; max-width: 44ch; color: rgba(251, 247, 240, 0.78); font-size: 1.12rem; }
.custom__chips { margin-bottom: 2.2rem; }
.custom__stack { position: relative; min-height: 440px; }
.custom__stack .soap { position: absolute; --w: 62%; }
.custom__stack .s1 { top: 2%; left: 0; }
.custom__stack .s2 { top: 34%; right: 0; z-index: 2; }
.custom__stack .s3 { bottom: 0; left: 10%; }
@media (max-width: 900px) { .custom__grid { grid-template-columns: 1fr; } .custom__stack { min-height: 380px; } }

/* ---------- values ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.value { display: grid; gap: 0.9rem; align-content: start; }
.value__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--cream-2); color: var(--accent); transition: transform 0.8s var(--ease), background 0.4s; }
.value:hover .value__icon { transform: rotate(-12deg) scale(1.1); background: var(--sand); }
.value__icon svg { width: 28px; height: 28px; }
.value p { color: var(--ink-soft); max-width: 32ch; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }

/* ---------- closing CTA ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 16ch; margin-inline: auto; }
.cta p { max-width: 42ch; margin: 1.4rem auto 2.2rem; color: var(--ink-soft); }
.cta__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }

/* ---------- inner page header ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 7rem) clamp(2rem, 4vw, 3.5rem); }
.page-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  z-index: -1;
  width: min(640px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--sand) 75%, transparent), transparent 68%);
  animation: aurora 14s ease-in-out infinite alternate;
}
.page-hero h1 { font-size: clamp(2.8rem, 6.6vw, 5.6rem); max-width: 14ch; }
.page-hero h1 em { color: var(--emph); }
.page-hero p { max-width: 46ch; margin-top: 1.5rem; font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- two-column form layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split__aside { position: sticky; top: calc(var(--header-h) + 2rem); display: grid; gap: 2.5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; counter-reset: step; }
.steps li { position: relative; padding-left: 4rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -0.2rem;
  width: 2.8rem; height: 2.8rem;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.steps p { color: var(--ink-soft); font-size: 0.97rem; }
.mini-stack { position: relative; height: 230px; }
.mini-stack .soap { position: absolute; --w: 52%; }
.mini-stack .m1 { left: 0; top: 4%; }
.mini-stack .m2 { right: 4%; top: 22%; z-index: 2; }
.mini-stack .m3 { left: 18%; bottom: 0; }
.aside-note { padding: 1.4rem 1.6rem; border-radius: var(--r); background: var(--cream-2); font-size: 0.95rem; color: var(--ink-soft); }
.aside-note a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } .split__aside { position: static; } .mini-stack { display: none; } }

/* ---------- shop toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2.4rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.toolbar__count { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about__art { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); background: color-mix(in srgb, var(--sand) 45%, var(--cream)); overflow: hidden; }
.about__art .frame { position: absolute; }
.about__art .a1 { top: 8%; left: 8%; width: 62%; }
.about__art .a2 { bottom: 8%; right: 8%; width: 50%; }
.about__text { display: grid; gap: 1.2rem; }
.about__text p { color: var(--ink-soft); font-size: 1.1rem; max-width: 52ch; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

/* ---------- per-soap theme ----------
   product.html sets data-theme="soap" and --tone (the soap's color) on <html> before first paint.
   These overrides re-color everything that uses the neutral tokens: header, buttons, footer, banner. */
html[data-theme="soap"] {
  --accent: var(--theme-deep, color-mix(in srgb, var(--tone) 50%, #1b1a17));
  --accent-soft: color-mix(in srgb, var(--tone) 75%, white);
  --emph: var(--accent);
  --sand: color-mix(in srgb, var(--tone) 65%, white);
  --cream: color-mix(in srgb, var(--tone) 18%, #f8f5ee);
  --cream-2: color-mix(in srgb, var(--tone) 30%, #f3eee4);
  --line: color-mix(in srgb, var(--accent) 16%, transparent);
}
html[data-theme="soap"] body { transition: background-color 0.8s var(--ease); }

/* ---------- a soap's own page ---------- */
.pdp { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3.5rem, 7vw, 6rem); }
.pdp__glow {
  position: absolute;
  z-index: -1;
  left: -12%;
  top: -18%;
  width: min(1000px, 130vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, color-mix(in srgb, var(--tone, var(--sand)) 55%, transparent), transparent 66%);
  animation: glow-in 1.8s var(--ease) both;
}
@keyframes glow-in { from { opacity: 0; transform: scale(0.55); } }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); font-size: 0.88rem; color: var(--ink-soft); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); }

.pdp__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.pdp__gallery { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.pdp__main {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 4.6;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--tone, var(--sand)) 30%, var(--cream));
  box-shadow: var(--shadow-2);
  transform: perspective(1100px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
  transition: transform 0.5s var(--ease);
}
.pdp__img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; transition: opacity 0.25s ease; }
.pdp__thumbs { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.1rem; }
.pdp__thumb {
  width: 84px;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 2px solid transparent;
  border-radius: 16px;
  opacity: 0.65;
  transition: opacity 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp__thumb:hover { opacity: 1; transform: translateY(-3px); }
.pdp__thumb[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }

.pdp__info { display: grid; gap: 0; align-content: start; padding-top: clamp(0rem, 2vw, 1.5rem); }
.pdp__info h1 { font-size: clamp(2.8rem, 5.6vw, 4.8rem); line-height: 1; }
.pdp__price { margin-top: 1.2rem; font-family: var(--font-display); font-size: 1.9rem; color: var(--accent); }
.pdp__desc { margin-top: 1.2rem; max-width: 44ch; color: var(--ink-soft); font-size: 1.12rem; }
.pdp__details { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 44ch; border-top: 1px solid var(--line); }
.pdp__details li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.pdp__details span { color: var(--ink-soft); }
.pdp__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }
.pdp__note { margin-top: 1.8rem; max-width: 44ch; padding: 1.2rem 1.4rem; border-radius: var(--r); background: var(--cream-2); font-size: 0.95rem; color: var(--ink-soft); }
.pdp__note a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.pdp__missing { display: grid; justify-items: start; gap: 1.2rem; padding-block: clamp(3rem, 8vw, 6rem); }
.pdp__missing p:not(.eyebrow) { color: var(--ink-soft); max-width: 40ch; }

@media (max-width: 900px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .pdp__gallery { position: static; }
}

/* ---------- ingredients (on each product page) ---------- */
.pdp__ing { margin-top: 2.2rem; max-width: 46ch; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.pdp__ing-title { margin-bottom: 0.7rem; font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.pdp__ing-list { font-size: 1rem; line-height: 1.75; color: var(--ink); }
.pdp__ing-list--soon { color: var(--ink-soft); }
.pdp__ing-list a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }
.pdp__ing-note { margin-top: 0.8rem; font-size: 0.9rem; color: var(--ink-soft); }
.pdp__natural { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.1rem; padding: 0.55rem 1rem 0.55rem 0.8rem; border-radius: 999px; background: var(--cream-2); font-size: 0.9rem; font-weight: 500; }
.pdp__natural svg { width: 20px; height: 20px; flex: none; color: var(--accent); }

/* ---------- bulk pricing (shop note + product page card) ---------- */
.bulk-note { display: inline-flex; margin: -0.8rem 0 2rem; padding: 0.5rem 1rem; border-radius: 999px; background: var(--cream-2); font-size: 0.9rem; font-weight: 500; }
.pdp__bulk { margin-top: 1.8rem; max-width: 44ch; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--paper) 70%, transparent); }
.pdp__bulk-title { margin-bottom: 0.7rem; font-family: var(--font-display); font-size: 1.25rem; }
.pdp__bulk-title span { margin-left: 0.4rem; font-family: var(--font-body); font-size: 0.82rem; color: var(--ink-soft); }
.pdp__bulk ul { list-style: none; margin: 0; padding: 0; }
.pdp__bulk li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.96rem; }
.pdp__bulk li span { color: var(--ink-soft); }
.pdp__bulk-more { margin-top: 0.7rem; font-size: 0.85rem; color: var(--ink-soft); }
.pdp__bulk-more a { color: var(--ink); font-weight: 500; text-underline-offset: 3px; }

/* ---------- order estimator (custom order page) ---------- */
.split__main { display: grid; gap: clamp(1.25rem, 3vw, 2rem); min-width: 0; }
.estimator__lead { margin: -0.6rem 0 1.6rem; color: var(--ink-soft); max-width: 52ch; }
.est-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.est-quick .chip { padding: 0.4rem 0.95rem; font-size: 0.86rem; }
.est-local { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.est-local label { font-size: 0.9rem; font-weight: 500; }
.estimator__result { margin: 1.8rem 0 1.4rem; padding: 1.5rem 1.6rem; border-radius: var(--r); background: var(--cream-2); }
.est-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.9rem; }
.est-each { font-family: var(--font-display); font-size: clamp(3rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.est-each-label { display: grid; font-size: 1.05rem; }
.est-each-label small { font-size: 0.82rem; color: var(--ink-soft); }
.est-tiers { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.1rem 0 0.4rem; }
.est-tiers span { padding: 0.3rem 0.75rem; border: 1.5px solid var(--line); border-radius: 999px; font-size: 0.8rem; color: var(--ink-soft); transition: background 0.4s, color 0.4s, border-color 0.4s; }
.est-tiers span.is-on { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.est-rows { margin-top: 1rem; }
.est-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.est-row small { color: var(--ink-soft); }
.est-row--save { color: var(--accent); font-weight: 500; }
.est-row--total { border-top: 2px solid var(--ink); font-size: 1.1rem; }
.est-row--total strong { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.est-foot { margin-top: 0.9rem; font-size: 0.84rem; color: var(--ink-soft); }
.pdp__bulk-sub { margin: 1.1rem 0 0.3rem; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
