/* Coway redesign — shared styles for every page.
   Mobile first. Breakpoints: 600 / 900 / 1200px. */

@view-transition { navigation: auto; }

:root {
  /* Color: warm home neutrals taken from Coway's own banner panels,
     with Coway blue reserved for actions. */
  --white: #ffffff;
  --stone: #f3efea;
  --sand: #e8e2db;
  --taupe: #b7a595;
  --umber: #5e5249;
  --ink: #2a2420;
  --muted: #6b6159;
  --line: #e4ddd5;
  --blue: #1e6db5;
  --blue-deep: #17588f;
  --sky: #4ba3de;
  --danger: #b42318;
  --ok: #2f7d4f;

  /* Type */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1.1vw, 1.95rem);
  --t-2xl: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --t-3xl: clamp(2.3rem, 1.5rem + 3.4vw, 4.25rem);

  /* Space (4px rhythm) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 77.5rem;

  /* Shape: radius follows hierarchy — tiles soft, fields tighter, actions round */
  --r-tile: 1.25rem;
  --r-field: 0.75rem;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --d-fast: 160ms;
  --d-base: 260ms;
  --d-slow: 520ms;
  --d-hero: 1100ms;

  --header-h: 4rem;
  color-scheme: light;
}

@media (min-width: 900px) { :root { --header-h: 4.5rem; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  font-feature-settings: "ss06" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(ko) body, body:lang(ko) { word-break: keep-all; line-height: 1.7; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.022em; font-weight: 700; text-wrap: balance; }
:lang(ko) :is(h1, h2, h3) { letter-spacing: -0.01em; line-height: 1.3; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: var(--s-3) var(--s-4); border-radius: var(--r-field);
  transition: top var(--d-fast) var(--ease-out);
}
.skip-link:focus { top: var(--s-3); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Icons ---------- */
.icon { width: 1.25rem; height: 1.25rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 3rem; padding: 0 var(--s-5);
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--t-md); line-height: 1.2; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out),
    border-color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } .btn-primary:hover { box-shadow: 0 10px 20px -12px rgb(23 88 143 / 0.7); } .btn:active { transform: scale(0.97); } }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.btn .spinner { display: none; width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.text-link { color: var(--blue); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, var(--blue) 35%, transparent); transition: text-decoration-color var(--d-fast); }
.text-link:hover { text-decoration-color: var(--blue); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  transition: box-shadow var(--d-base) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgb(42 36 32 / 0.25); }
.header-bar { height: var(--header-h); display: flex; align-items: center; gap: var(--s-4); }
.brand { display: flex; align-items: center; min-height: 2.75rem; }
.brand img { width: auto; height: 1.75rem; }
@media (min-width: 900px) { .brand img { height: 2rem; } }

.main-nav { display: none; }
.main-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s-3);
  font-size: var(--t-sm); font-weight: 600; color: var(--muted);
  transition: color var(--d-fast);
}
.main-nav a::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 0.55rem; height: 2px;
  background: var(--ink); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform var(--d-base) var(--ease-out);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--ink); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.lang-link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s-3);
  font-size: var(--t-sm); font-weight: 600; color: var(--muted); border-radius: var(--r-pill);
}
.lang-link:hover { color: var(--ink); background: var(--stone); }
.call-btn { min-height: 2.75rem; padding: 0 var(--s-4); font-size: var(--t-sm); }
.call-btn .num { display: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.icon-btn:hover { background: var(--stone); }
.lang-link.desktop { display: none; }

@media (min-width: 600px) { .call-btn .num { display: inline; } }
@media (min-width: 1040px) {
  .main-nav { display: flex; margin-left: var(--s-5); }
  .menu-toggle { display: none; }
  .lang-link.desktop { display: inline-flex; }
}

/* Mobile menu sheet */
.menu-sheet {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
  background: var(--white); padding: var(--s-5) var(--gutter) var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-6); overflow-y: auto;
  visibility: hidden; opacity: 0; transform: translateY(-0.75rem);
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out), visibility 0s linear var(--d-base);
}
.menu-open .menu-sheet { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.menu-open { overflow: hidden; }
.menu-sheet nav a {
  display: flex; align-items: center; min-height: 3.5rem; border-bottom: 1px solid var(--line);
  font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.02em;
  opacity: 0; transform: translateY(0.5rem);
  transition: opacity var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}
.menu-open .menu-sheet nav a { opacity: 1; transform: none; }
.menu-open .menu-sheet nav li:nth-child(2) a { transition-delay: 40ms; }
.menu-open .menu-sheet nav li:nth-child(3) a { transition-delay: 80ms; }
.menu-open .menu-sheet nav li:nth-child(4) a { transition-delay: 120ms; }
.menu-open .menu-sheet nav li:nth-child(5) a { transition-delay: 160ms; }
.menu-sheet nav a[aria-current="page"] { color: var(--blue); }
.menu-sheet .sheet-foot { display: grid; gap: var(--s-3); }
.menu-toggle .icon-close { display: none; }
.menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }
@media (min-width: 1040px) { .menu-sheet { display: none; } }

/* ---------- Home hero ---------- */
.hero { position: relative; isolation: isolate; background: var(--hero-panel, var(--taupe)); transition: background-color var(--d-hero) var(--ease-out); overflow: hidden; }
.hero-grid { display: grid; }
.hero-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease-out); }
.hero-media picture { position: absolute; inset: 0; opacity: 0; transition: opacity var(--d-hero) var(--ease-out); }
.hero-media picture.is-active { opacity: 1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 10s cubic-bezier(0.25, 0.1, 0.25, 1); }
.hero-media picture.is-active img { transform: scale(1); }
.hero-media picture:nth-child(1) img { object-position: 30% 60%; }
.hero-media picture:nth-child(2) img { object-position: 30% 70%; } /* AP-2023K photo: purifier in the left third */
@media (min-width: 600px) and (max-width: 899px) { .hero-media { aspect-ratio: 16 / 9; } }

.hero-panel { position: relative; display: grid; padding: var(--s-6) var(--gutter) var(--s-5); min-height: 19rem; }
.hero-slide { grid-area: 1 / 1; align-self: center; display: flex; flex-direction: column; gap: var(--s-3); visibility: hidden; }
.hero-slide.is-active { visibility: visible; }
.hero-slide > * { opacity: 0; transform: translateY(1.75rem); transition: opacity 760ms var(--ease-out), transform 900ms var(--ease-out); }
.hero-slide.is-active > * { opacity: 1; transform: none; }
.hero-slide.is-active > :nth-child(1) { transition-delay: 150ms; }
.hero-slide.is-active > :nth-child(2) { transition-delay: 270ms; }
.hero-slide.is-active > :nth-child(3) { transition-delay: 390ms; }
.hero-slide.is-active > :nth-child(4) { transition-delay: 510ms; }
.hero-pre, .hero-post { font-size: var(--t-lg); line-height: 1.45; max-width: 26ch; }
.hero-title { font-size: var(--t-3xl); font-weight: 750; letter-spacing: -0.035em; line-height: 1.02; max-width: 12ch; }
:lang(ko) .hero-title { letter-spacing: -0.02em; line-height: 1.18; }
.hero-model { font-size: var(--t-sm); color: var(--ink); opacity: 0.8; }
.hero-model a { text-decoration: underline; text-underline-offset: 0.2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }
.hero-actions .btn-ghost { color: var(--ink); }

.hero-controls { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--gutter) var(--s-5); }
.hero-dots { display: flex; gap: var(--s-2); }
.hero-dot { position: relative; width: 3rem; height: 2.75rem; border: 0; background: none; padding: 0; cursor: pointer; }
.hero-dot::before, .hero-dot::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; border-radius: 3px; translate: 0 -50%; }
.hero-dot::before { background: rgb(42 36 32 / 0.22); }
.hero-dot::after { background: var(--ink); transform: scaleX(0); transform-origin: left; }
.hero-dot[aria-current="true"]::after { transform: scaleX(1); transition: transform var(--hero-interval, 7s) linear; }
.hero.is-paused .hero-dot[aria-current="true"]::after, .hero.no-auto .hero-dot[aria-current="true"]::after { transition: none; transform: scaleX(1); }
.hero-pause { color: var(--ink); }
.hero-pause .icon-play { display: none; }
.hero.is-paused .hero-pause .icon-play { display: block; }
.hero.is-paused .hero-pause .icon-pause { display: none; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: min(42rem, calc(100svh - var(--header-h))); }
  .hero-media { aspect-ratio: auto; order: 2; }
  .hero-panel { padding: var(--s-8) var(--s-7) var(--s-9) max(var(--gutter), (100vw - var(--max)) / 2); }
  .hero-controls { position: absolute; left: max(var(--gutter), (100vw - var(--max)) / 2); bottom: var(--s-6); padding: 0; }
}

/* Load-in: one orchestrated moment for the whole hero */
.js .hero:not(.is-ready) .hero-media picture.is-active { opacity: 0; }
.js .hero:not(.is-ready) .hero-media { clip-path: inset(0 0 0 100%); }
.js .hero:not(.is-ready) .hero-slide.is-active > * { opacity: 0; transform: translateY(1.75rem); }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-7); }
.section-stone { background: var(--stone); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-6); }
.section-title { font-size: var(--t-2xl); }
.section-lead { color: var(--muted); max-width: 48ch; }
@media (min-width: 900px) { .section { padding-block: var(--s-9); } }

/* ---------- Category tiles (home) ---------- */
.cats .section-head { justify-content: center; text-align: center; }
.cat-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; width: 100%; max-width: 64rem; margin-inline: auto; }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); } }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; }
/* Whole product always visible: the photo is fitted, not cropped, and the
   tile takes the photo's own flat background color so the fit is seamless. */
.cat-tile .media { width: 100%; border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 4 / 5; background: var(--tile-bg, #d6e2ee); }
.cat-tile picture { width: 100%; height: 100%; }
.cat-tile img { width: 100%; height: 100%; object-fit: contain; transform: scale(var(--fit, 1)); transition: transform var(--d-slow) var(--ease-out); }
.cat-tile:hover img { transform: scale(calc(var(--fit, 1) * 1.04)); }
.cat-tile h3 { font-size: var(--t-xl); }
.cat-meta { color: var(--muted); font-size: var(--t-sm); margin-top: var(--s-1); }
@media (max-width: 599px) {
  .cat-tile { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: var(--s-4); text-align: left; }
  .cat-tile .media { aspect-ratio: 1; }
}

/* ---------- Story rows (home) ---------- */
.story { display: grid; gap: var(--s-5); align-items: center; }
.story + .story { margin-top: var(--s-8); }
.story .media { border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 3 / 2; background: var(--sand); }
.story .media img { width: 100%; height: 100%; object-fit: cover; }
.story-air .media img { object-position: 80% 50%; }
.story h3 { font-size: var(--t-2xl); }
.story p { color: var(--muted); max-width: 52ch; }
.story .copy { display: grid; gap: var(--s-4); justify-items: start; }
@media (min-width: 900px) {
  .story { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); }
  .story:nth-child(even) .media { order: 2; }
  .story:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .story + .story { margin-top: var(--s-9); }
}

/* Promise pair (home): healthy home + Heart Service */
.promise-grid { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .promise-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }
.promise { display: grid; gap: var(--s-4); align-content: start; }
.promise .media { border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 16 / 10; background: var(--sand); }
.promise .media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.promise h3 { font-size: var(--t-xl); }
.promise .lead { color: var(--blue); font-weight: 600; }
.promise p:not(.lead) { color: var(--muted); }

/* Image reveal on scroll */
.js .reveal-media .media { clip-path: inset(12% 12% 12% 12% round var(--r-tile)); transition: clip-path 1100ms var(--ease-out); }
.js .reveal-media .media img { transform: scale(1.16); transition: transform 1500ms var(--ease-out); }
.js .reveal-media .copy > *, .js .promise.reveal-media > :not(.media) { opacity: 0; transform: translateY(1.25rem); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); }
.js .reveal-media.is-in .copy > *, .js .promise.reveal-media.is-in > :not(.media) { opacity: 1; transform: none; }
.js .reveal-media.is-in .copy > :nth-child(1), .js .promise.reveal-media.is-in > :nth-child(2) { transition-delay: 250ms; }
.js .reveal-media.is-in .copy > :nth-child(2), .js .promise.reveal-media.is-in > :nth-child(3) { transition-delay: 350ms; }
.js .reveal-media.is-in .copy > :nth-child(3), .js .promise.reveal-media.is-in > :nth-child(4) { transition-delay: 450ms; }
.js .reveal-media.is-in .media { clip-path: inset(0 0 0 0 round var(--r-tile)); }
.js .reveal-media.is-in .media img { transform: none; }

/* Staggered entrance for grids */
.js .stagger > * { opacity: 0; transform: translateY(2rem) scale(0.97); transition: opacity 700ms var(--ease-out), transform 850ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .stagger.is-in > * { opacity: 1; transform: none; }

/* ---------- Page head / breadcrumb ---------- */
.page-head { padding-block: var(--s-6) var(--s-5); }
.js .page-head > * { animation: rise 800ms var(--ease-out) both; }
.js .page-head > :nth-child(2) { animation-delay: 100ms; }
.js .page-head > :nth-child(3) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } }
.js .section-head { opacity: 0; transform: translateY(1.25rem); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); }
.js .section-head.is-in { opacity: 1; transform: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--taupe); }
.page-title { font-size: var(--t-3xl); letter-spacing: -0.035em; }
:lang(ko) .page-title { letter-spacing: -0.02em; }
.page-sub { color: var(--muted); margin-top: var(--s-3); font-size: var(--t-lg); }

/* ---------- Product grid (category) ---------- */
.product-grid { display: grid; gap: var(--s-6) var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.p-card { display: flex; flex-direction: column; gap: var(--s-3); }
.p-card .media { border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 1; background: #dfe9f2; }
.p-card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-slow) var(--ease-out); }
.p-card:hover img { transform: scale(1.045); }
.p-card .media, .cat-tile .media { transition: transform var(--d-base) var(--ease-out), box-shadow var(--d-base) var(--ease-out); }
.p-card:hover .media, .cat-tile:hover .media { transform: translateY(-6px); box-shadow: 0 22px 36px -22px rgb(42 36 32 / 0.45); }
.p-card .name { font-size: var(--t-md); font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.p-card .code { font-size: var(--t-sm); color: var(--muted); }
.p-card .price { font-size: var(--t-md); font-weight: 650; font-variant-numeric: tabular-nums; margin-top: auto; padding-top: var(--s-1); }
.p-card .price small { font-weight: 500; color: var(--muted); font-size: var(--t-sm); }
@media (min-width: 900px) { .p-card .name { font-size: var(--t-lg); } }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: var(--s-6); padding-bottom: var(--s-8); }
.pdp-media { position: relative; }
.pdp-media .frame { border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 1; background: #dfe9f2; }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
  .pdp-media { position: sticky; top: calc(var(--header-h) + var(--s-5)); }
}
.pdp-info { display: grid; gap: var(--s-5); }
.pdp-code { color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.pdp-title { font-size: var(--t-2xl); margin-top: var(--s-2); }
.features { display: grid; gap: var(--s-3); }
.features li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--s-3); align-items: start; color: var(--ink); }
.features .icon { color: var(--blue); margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; stroke-width: 2.4; }

.config { display: grid; gap: var(--s-5); padding: var(--s-5); border-radius: var(--r-tile); background: var(--stone); }
@media (min-width: 600px) { .config { padding: var(--s-6); } }
.config h2 { font-size: var(--t-lg); }
.opt-group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--s-3); }
.opt-group legend { padding: 0; font-size: var(--t-sm); font-weight: 600; color: var(--muted); margin-bottom: var(--s-3); }
.opt-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 2.75rem; padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--white);
  font-size: var(--t-sm); font-weight: 600; cursor: pointer; user-select: none;
  transition: border-color var(--d-fast) var(--ease-out), background-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.opt input:hover + span { border-color: var(--taupe); }
.opt input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--white); }
.opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.opt input:active + span { transform: scale(0.97); }
.swatch { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid rgb(0 0 0 / 0.18); }

.collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--d-base) var(--ease-out), opacity var(--d-base) var(--ease-out); }
.collapse > * { overflow: hidden; }
.collapse[data-hidden="true"] { grid-template-rows: 0fr; opacity: 0; }
.collapse[data-hidden="true"] > * { visibility: hidden; }

.price-box { display: grid; gap: var(--s-2); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.price-line { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.price-amount { position: relative; display: inline-grid; font-size: var(--t-2xl); font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow: hidden; }
.price-amount > span { grid-area: 1 / 1; }
.price-amount .out { animation: price-out var(--d-base) var(--ease-in) forwards; }
.price-amount .in { animation: price-in var(--d-slow) var(--ease-out); }
@keyframes price-out { to { opacity: 0; transform: translateY(-60%); } }
@keyframes price-in { from { opacity: 0; transform: translateY(60%); } }
.price-unit { color: var(--muted); font-weight: 600; }
.price-notes { display: grid; gap: var(--s-1); color: var(--muted); font-size: var(--t-sm); }
.cta-stack { display: grid; gap: var(--s-3); }
.cta-stack .btn { min-height: 3.25rem; font-size: var(--t-lg); }
.call-note { font-size: var(--t-sm); color: var(--muted); text-align: center; }
.call-note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }

.details { display: grid; gap: var(--s-4); justify-items: center; padding-bottom: var(--s-8); }
.details-title { font-size: var(--t-xl); justify-self: start; width: min(100%, 56rem); margin-inline: auto; }
.details img { width: min(100%, 56rem); border-radius: var(--r-tile); background: var(--stone); }
.js .details img { opacity: 0; transition: opacity var(--d-slow) var(--ease-out); }
.js .details img.is-loaded { opacity: 1; }

/* Sticky price bar on phones */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s-4); justify-content: space-between;
  padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%); transition: transform var(--d-base) var(--ease-out);
}
.buy-bar.is-shown { transform: none; }
.buy-bar .bb-price { font-weight: 750; font-variant-numeric: tabular-nums; font-size: var(--t-lg); line-height: 1.2; }
.buy-bar .bb-sub { font-size: var(--t-xs); color: var(--muted); }
.buy-bar .btn { min-height: 2.75rem; white-space: nowrap; flex: none; }
.buy-bar > div { min-width: 0; }
@media (min-width: 900px) { .buy-bar { display: none; } }

/* ---------- Call band + footer ---------- */
.call-band { position: relative; isolation: isolate; overflow: hidden; background: var(--umber); color: var(--white); }
/* Glass-fold WebGL background (assets/glass-fold.js); fades in once running.
   The plain umber background stays as the fallback. */
.call-band-fx { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.call-band-fx.is-live { opacity: 1; }
/* Scrim: keeps white text readable where a lit glass edge passes behind it */
.call-band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(100deg, rgb(30 25 22 / 0.5) 0%, rgb(30 25 22 / 0.2) 45%, rgb(30 25 22 / 0.42) 100%); }
.call-band .wrap { position: relative; display: grid; gap: var(--s-4); padding-block: var(--s-7); }
.js .call-band .wrap > * { opacity: 0; transform: translateY(1.25rem); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); }
.js .call-band.is-in .wrap > * { opacity: 1; transform: none; }
.js .call-band.is-in .wrap > :nth-child(2) { transition-delay: 140ms; }
.call-band p { font-size: var(--t-lg); max-width: 34ch; color: rgb(255 255 255 / 0.92); }
.call-band p, .call-band .big-phone { text-shadow: 0 1px 2px rgb(20 16 14 / 0.6), 0 0 18px rgb(20 16 14 / 0.75); }
.call-band .big-phone { font-size: clamp(2.2rem, 1.4rem + 4vw, 4rem); font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; width: fit-content; background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; padding-bottom: 0.15em; transition: background-size var(--d-slow) var(--ease-out); }
.call-band .big-phone:hover { background-size: 100% 2px; }
@media (min-width: 900px) { .call-band .wrap { grid-template-columns: 1fr auto; align-items: end; padding-block: var(--s-8); } }

.site-footer { background: var(--stone); color: var(--muted); font-size: var(--t-sm); }
.site-footer .wrap { display: grid; gap: var(--s-5); padding-block: var(--s-7) var(--s-6); }
.footer-top { display: grid; gap: var(--s-5); }
.footer-top img { height: 1.6rem; width: auto; mix-blend-mode: multiply; } /* logo file has a white background */
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.footer-nav a { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--ink); font-weight: 600; }
.footer-nav a:hover { color: var(--blue); }
.areas { max-width: 80ch; line-height: 1.7; }
.copyright { padding-top: var(--s-4); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .footer-top { grid-template-columns: auto 1fr; align-items: center; } .footer-nav { justify-content: end; } }
.has-buy-bar .site-footer { padding-bottom: 5rem; }
@media (min-width: 900px) { .has-buy-bar .site-footer { padding-bottom: 0; } }

/* ---------- Checkout ---------- */
.checkout { display: grid; gap: var(--s-6); padding-bottom: var(--s-8); }
@media (min-width: 900px) { .checkout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); align-items: start; } }
.summary { border-radius: var(--r-tile); background: var(--stone); padding: var(--s-5); display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .summary { position: sticky; top: calc(var(--header-h) + var(--s-5)); order: 2; padding: var(--s-6); } }
.summary h2 { font-size: var(--t-lg); }
.summary-item { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--s-4); align-items: start; }
.summary-item img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: var(--r-field); background: #dfe9f2; }
.summary-item .name { font-weight: 650; line-height: 1.3; }
.summary-item .meta { color: var(--muted); font-size: var(--t-sm); }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.summary-price { font-size: var(--t-xl); font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--white); }
.qty button { width: 2.75rem; height: 2.75rem; border: 0; background: none; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--stone); }
.qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty input { width: 2.5rem; border: 0; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.empty-state { display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-6); border-radius: var(--r-tile); background: var(--stone); }
.empty-state h2 { font-size: var(--t-xl); }

.form { display: grid; gap: var(--s-6); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-4); min-width: 0; }
.form legend { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.02em; padding: 0; margin-bottom: var(--s-4); }
.field-grid { display: grid; gap: var(--s-4); }
@media (min-width: 600px) { .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-grid .full { grid-column: 1 / -1; } }
@media (min-width: 600px) { .field-grid.thirds { grid-template-columns: 2fr 1.4fr 1fr; } }
.field { display: grid; gap: var(--s-2); align-content: start; }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field .req { color: var(--danger); }
.field .opt-label { color: var(--muted); font-weight: 500; }
.input {
  width: 100%; min-height: 3rem; padding: 0 var(--s-4);
  border: 1.5px solid var(--line); border-radius: var(--r-field); background: var(--white);
  font-size: 1rem; transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6159' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 1.1rem; padding-right: 2.5rem; }
.input:hover { border-color: var(--taupe); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.field.has-error .input { border-color: var(--danger); }
.field-error { display: none; align-items: center; gap: var(--s-2); color: var(--danger); font-size: var(--t-sm); }
.field-error .icon { width: 1rem; height: 1rem; }
.field.has-error .field-error { display: flex; }
.error-summary { display: none; padding: var(--s-4) var(--s-5); border-radius: var(--r-field); border: 1.5px solid var(--danger); background: #fdf3f2; color: var(--ink); }
.error-summary.is-shown { display: grid; gap: var(--s-2); }
.error-summary h2 { font-size: var(--t-md); color: var(--danger); }
.error-summary a { color: var(--danger); text-decoration: underline; }
.form-foot { display: grid; gap: var(--s-3); }
.form-foot p { font-size: var(--t-sm); color: var(--muted); }

/* ---------- Thank you ---------- */
.thanks { display: grid; justify-items: center; text-align: center; gap: var(--s-4); padding-block: var(--s-8) var(--s-9); max-width: 40rem; margin-inline: auto; }
.check-mark { width: 5rem; height: 5rem; color: var(--ok); }
.check-mark circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 700ms var(--ease-out) 150ms forwards; }
.check-mark path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 420ms var(--ease-out) 700ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks h1 { font-size: var(--t-2xl); }
.thanks p { color: var(--muted); font-size: var(--t-lg); }
.thanks .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-3); }

/* ---------- Promotions ---------- */
/* One poster sits centered; two or more sit side by side, stacking on phones.
   A slot whose image file is missing removes itself, so empty slots never show. */
.promo-list { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 34rem)); justify-content: center; align-items: start; padding-bottom: var(--s-8); }
.promo-list:not(:has(.promo-slot)) { display: none; }
.promo-slot { border-radius: var(--r-tile); overflow: hidden; background: var(--stone); opacity: 0; transform: translateY(0.75rem); transition: opacity var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-out); }
.promo-slot.is-loaded { opacity: 1; transform: none; background: transparent; }
.promo-slot:nth-child(2) { transition-delay: 80ms; }
.promo-slot:nth-child(3) { transition-delay: 160ms; }
.promo-slot:nth-child(4) { transition-delay: 240ms; }
.promo-slot a { display: block; }
.promo-slot img { width: 100%; height: auto; }
.promo-empty { display: none; padding-bottom: var(--s-8); }
.promo-list:not(:has(.promo-slot)) + .promo-empty { display: block; }
.promo-empty p { padding: var(--s-6); border-radius: var(--r-tile); background: var(--stone); font-size: var(--t-lg); color: var(--muted); max-width: 40rem; }
.promo-empty strong { display: block; color: var(--ink); margin-bottom: var(--s-2); }
.promo-noscript { display: grid; gap: var(--s-5); justify-items: center; padding-bottom: var(--s-8); }
.promo-noscript img { width: min(100%, 34rem); border-radius: var(--r-tile); }

/* ---------- View transitions ---------- */
::view-transition-old(root) { animation: vt-out 180ms var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in 320ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
::view-transition-group(*) { animation-duration: 420ms; animation-timing-function: var(--ease-out); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .hero-media img { transform: none !important; }
  .js .stagger > *, .js .reveal-media .media, .js .reveal-media .media img, .js .reveal-media .copy > *, .js .promise.reveal-media > *, .js .section-head, .js .call-band .wrap > *, .js .page-head > *, .js .hero .hero-media { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}

/* ---------- Glass overlay in light sections (assets/glass-fold.js) ----------
   A neutral grey shader blended with soft-light: it lights and shades the color
   behind it, so the same canvas works on any panel color. */
.glass-soft { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; mix-blend-mode: soft-light; opacity: 0; transition: opacity 1.6s var(--ease-out); pointer-events: none; }
.glass-soft.is-live { opacity: 1; }

/* Page header band: breadcrumb and title on taupe, like the home hero panel */
.page-band { position: relative; isolation: isolate; overflow: hidden; background: var(--taupe); margin-bottom: var(--s-6); }
.page-band .page-head { padding-block: var(--s-6) var(--s-6); }
@media (min-width: 900px) { .page-band .page-head { padding-block: var(--s-8) var(--s-7); } }
.page-band .crumbs, .page-band .crumbs a, .page-band .page-sub { color: var(--ink); }
.page-band .crumbs a { text-decoration-color: rgb(42 36 32 / 0.35); }
.page-band .crumbs li + li::before { color: rgb(42 36 32 / 0.5); }
.page-band .page-head .crumbs { margin-bottom: var(--s-4); }
.page-band .page-head[style] { padding-block: var(--s-5) var(--s-5) !important; }

/* Thank-you page on the band */
.thanks-band { margin-bottom: 0; }
.thanks-band .thanks p { color: var(--ink); }
.thanks-band .check-mark { color: #1f5e3a; }
.thanks-band .btn-ghost { color: var(--ink); }

/* Home story rows on warm sand with the glass overlay. Text colors are darkened
   to keep 4.5:1 contrast on the sand (the glass only lightens it further). */
.stories-glass { position: relative; isolation: isolate; overflow: hidden; background: #d8ccbe; }
.stories-glass .story p { color: #4e463f; }
.stories-glass .text-link { color: var(--blue-deep); text-decoration-color: rgb(23 88 143 / 0.4); }
.stories-glass .text-link:hover { text-decoration-color: var(--blue-deep); }

/* ---------- New product tags ----------
   Blue tag with a sparkle; a soft band of light glints across it every few seconds,
   and new product photos get a gentle blue ring. The word itself carries the meaning. */
.p-card .media, .cat-tile .media, .pdp-media .frame { position: relative; }
.new-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.38rem 0.75rem 0.38rem 0.6rem; border-radius: var(--r-pill);
  background: var(--blue); color: var(--white);
  font-size: var(--t-sm); font-weight: 700; letter-spacing: 0.02em; line-height: 1;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 8px 18px -10px rgb(23 88 143 / 0.85), inset 0 0 0 1px rgb(255 255 255 / 0.18);
}
.new-badge .spark { width: 0.95rem; height: 0.95rem; fill: currentColor; flex: none; transform-origin: 40% 50%; animation: twinkle 3.6s ease-in-out 1.2s infinite; }
.new-badge::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 25%, rgb(255 255 255 / 0.55) 50%, transparent 75%);
  transform: translateX(-130%); animation: glint 3.6s var(--ease-out) 1.2s infinite;
}
@keyframes glint { 0% { transform: translateX(-130%); } 40%, 100% { transform: translateX(130%); } }
@keyframes twinkle { 0%, 60%, 100% { transform: scale(1) rotate(0deg); } 20% { transform: scale(1.25) rotate(18deg); } }
.new-badge.inline { position: static; padding-block: 0.3rem; vertical-align: middle; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.p-card.is-new .media, .pdp-media.is-new .frame { outline: 2px solid rgb(30 109 181 / 0.32); outline-offset: 3px; }
@media (min-width: 900px) { .pdp-media .new-badge:not(.inline) { top: 1.1rem; left: 1.1rem; font-size: var(--t-sm); } }
@media (max-width: 599px) { .cat-tile .new-badge { top: 0.4rem; left: 0.4rem; padding: 0.3rem 0.55rem 0.3rem 0.45rem; font-size: var(--t-xs); } .p-card .new-badge { top: 0.5rem; left: 0.5rem; } }
@media (prefers-reduced-motion: reduce) { .new-badge::after, .new-badge .spark { animation: none !important; } .new-badge::after { display: none; } }
