/* ==========================================================================
   APLE — Professional Aesthetics for Dermatology Clinics
   ========================================================================== */

:root {
  --red: #b8231a;
  --red-600: #a11d15;
  --red-700: #861810;
  --red-400: #d4443a;
  --red-100: #fae3df;
  --red-50: #fdf3f1;

  --ink: #1d1a19;
  --ink-2: #3d3836;
  --muted: #7a7270;
  --line: #ece7e5;
  --bg: #ffffff;
  --bg-soft: #f8f6f5;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 6px rgba(29, 26, 25, .04), 0 12px 32px rgba(29, 26, 25, .07);
  --shadow-lg: 0 4px 12px rgba(29, 26, 25, .06), 0 28px 60px rgba(29, 26, 25, .12);

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- Logo ---------- */
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 36px;
  line-height: 1;
  letter-spacing: .16em;
  color: var(--red);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding-left: .16em; /* optical balance for letter-spacing */
}
.logo .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  display: inline-block;
  margin-left: -6px;
  transform: translateY(-1px);
}
.logo--lg { font-size: 44px; }
.logo--light { color: #fff; }
.logo--light .dot { background: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }

.header__pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px;
  border: 1px solid var(--red-400);
  border-radius: 999px;
  color: var(--red);
  font-size: 13px; font-weight: 600;
  background: var(--red-50);
  transition: background .2s;
}
.header__pill:hover { background: var(--red-100); }
.header__pill svg { width: 12px; height: 12px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 13.5px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-2);
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--red); transform: scaleX(0);
  transition: transform .25s; transform-origin: left;
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }
.nav__sep { width: 1px; height: 14px; background: var(--line); }
.nav__muted { color: var(--muted) !important; }

.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .25s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .15s, background .2s, box-shadow .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(184, 35, 26, .25); }
.btn--primary:hover { background: var(--red-600); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { background: var(--red-50); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  min-height: 620px; padding-top: 60px; padding-bottom: 60px;
}
.hero__eyebrow { font-size: 15px; font-weight: 500; color: var(--ink-2); margin: 0 0 14px; }
.hero__eyebrow em { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--red); }
.hero h1 {
  font-size: clamp(34px, 4.4vw, 52px); line-height: 1.18; letter-spacing: -.035em;
  font-weight: 800; margin: 0 0 22px;
}
.hero h1 .accent { color: var(--red); }
.hero__lead { color: var(--muted); font-size: 16.5px; margin: 0 0 34px; max-width: 470px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__badges { display: flex; gap: 22px; margin-top: 40px; flex-wrap: wrap; }
.hero__badge { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hero__badge i {
  width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--red); font-style: normal;
}
.hero__badge i svg { width: 14px; height: 14px; }

.hero__visual { position: relative; height: 500px; }
.hero__glow {
  position: absolute; inset: -10% -20% -10% -5%;
  background:
    radial-gradient(closest-side at 55% 50%, rgba(184, 35, 26, .30), rgba(184, 35, 26, .10) 55%, transparent 100%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__card {
  position: absolute; border-radius: 26px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-lg); border: 6px solid #fff;
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; }
.hero__card--a { width: 56%; height: 82%; left: 6%; top: 9%; transform: rotate(-4deg); }
.hero__card--b { width: 46%; height: 64%; right: 2%; top: 3%; transform: rotate(5deg); }
.hero__card--c { width: 38%; height: 40%; right: 10%; bottom: 0; transform: rotate(-2deg); }
.hero__chip {
  position: absolute; left: 0; bottom: 8%;
  background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; font-size: 13px; z-index: 3;
}
.hero__chip strong { display: block; font-size: 14px; }
.hero__chip span { color: var(--muted); }
.hero__chip .ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--red-50); color: var(--red);
  display: grid; place-items: center;
}
.hero__chip .ico svg { width: 18px; height: 18px; }

@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hero__card--a { animation: floaty 7s ease-in-out infinite; }
.hero__card--b { animation: floaty 8s ease-in-out infinite .6s; }
.hero__card--c { animation: floaty 6.5s ease-in-out infinite 1.2s; }

/* ---------- Brand marquee ---------- */
.brands { padding: 34px 0; border-bottom: 1px solid var(--line); overflow: hidden; background: #fff; }
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.brands:hover .marquee { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 72px; padding-right: 72px; }
.brand-word { color: #9b9391; white-space: nowrap; font-size: 22px; line-height: 1; transition: color .2s; }
.brand-word:hover { color: var(--ink); }
.brand-word.f1 { font-family: var(--serif); letter-spacing: .14em; font-weight: 600; }
.brand-word.f2 { font-weight: 800; letter-spacing: .02em; }
.brand-word.f3 { font-weight: 300; letter-spacing: .3em; font-size: 19px; }
.brand-word.f4 { font-family: var(--serif); font-style: italic; font-size: 26px; }
.brand-word.f5 { font-weight: 600; letter-spacing: -.02em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section--soft { background: var(--red-50); }
.section--gray { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.section__kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.section__title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.22; letter-spacing: -.035em; font-weight: 800; margin: 0 0 14px; }
.section__desc { color: var(--muted); font-size: 16px; margin: 0; }
.section__head--left { text-align: left; margin-left: 0; }

/* ---------- Category cards ---------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat__img { aspect-ratio: 4 / 4.4; overflow: hidden; background: var(--bg-soft); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat:hover .cat__img img { transform: scale(1.05); }
.cat__body { padding: 18px 18px 20px; }
.cat__num { font-family: var(--serif); color: var(--red); font-size: 17px; font-weight: 600; }
.cat__title { font-size: 17px; font-weight: 700; margin: 2px 0 6px; letter-spacing: -.02em; }
.cat__desc { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.cat__go {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--red);
  transition: background .2s, color .2s;
}
.cat__go svg { width: 16px; height: 16px; }
.cat:hover .cat__go { background: var(--red); color: #fff; }

/* ---------- Featured slider ---------- */
.featured { position: relative; }
.featured__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 24px 24px;
  scrollbar-width: none;
  max-width: var(--wrap); margin: 0 auto;
}
.featured__track::-webkit-scrollbar { display: none; }
.featured__nav { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink); transition: background .2s, color .2s;
}
.round-btn:hover { background: var(--red); color: #fff; }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- Product card ---------- */
.pcard {
  background: #fff; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start;
  box-shadow: var(--shadow); display: flex; flex-direction: column; text-align: left;
  transition: transform .25s, box-shadow .25s; width: 100%;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard__img { aspect-ratio: 1 / 1; background: var(--bg-soft); overflow: hidden; position: relative; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.pcard:hover .pcard__img img { transform: scale(1.04); }
.pcard__tag {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); font-size: 11.5px; font-weight: 700; color: var(--red);
  letter-spacing: .02em;
}
.pcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pcard__brand { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.pcard__name { font-size: 17px; font-weight: 700; margin: 4px 0 6px; letter-spacing: -.02em; line-height: 1.3; }
.pcard__desc { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard__meta { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.pcard__more { font-size: 13px; font-weight: 700; color: var(--red); display: inline-flex; align-items: center; gap: 4px; }
.pcard__more svg { width: 14px; height: 14px; transition: transform .2s; }
.pcard:hover .pcard__more svg { transform: translateX(3px); }

.ph {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 20px;
  background: linear-gradient(145deg, var(--red-50), var(--red-100));
  font-family: var(--serif); font-size: 26px; color: var(--red-700); line-height: 1.15;
}

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why__item {
  padding: 36px 30px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
  transition: border-color .25s, box-shadow .25s;
}
.why__item:hover { border-color: transparent; box-shadow: var(--shadow-lg); }
.why__num { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--red); font-weight: 500; }
.why__item h3 { font-size: 20px; margin: 22px 0 10px; letter-spacing: -.025em; }
.why__item p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Spotlight ---------- */
.spot {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(115deg, #2a0805 0%, #5a0f0a 45%, var(--red-600) 100%);
}
.spot .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding-top: 100px; padding-bottom: 100px; }
.spot__img { border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); aspect-ratio: 4 / 5; }
.spot__img img { width: 100%; height: 100%; object-fit: cover; }
.spot .section__kicker { color: #ffb4ab; }
.spot h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 4.6vw, 58px); line-height: 1.05; letter-spacing: .01em; margin: 0 0 18px; }
.spot p { color: rgba(255, 255, 255, .78); margin: 0 0 30px; max-width: 480px; }
.spot__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 36px; padding: 0; list-style: none; }
.spot__list li {
  padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12); font-size: 14px;
  transition: background .2s;
}
.spot__list li:hover { background: rgba(255, 255, 255, .14); }
.spot__list strong { display: block; font-size: 15px; }
.spot__list span { color: rgba(255, 255, 255, .65); font-size: 12.5px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.stat { background: #fff; border-radius: var(--radius-sm); padding: 22px 18px; box-shadow: var(--shadow); }
.stat__v { font-size: 30px; font-weight: 800; letter-spacing: -.04em; color: var(--red); line-height: 1.1; }
.stat__v small { font-size: 16px; font-weight: 700; }
.stat__k { font-size: 13px; color: var(--ink-2); margin-top: 6px; font-weight: 500; line-height: 1.35; }
.stats__note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 18px; }

/* ---------- Programs ---------- */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.program {
  padding: 26px 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.program__tag { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.program h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.program p { margin: 0; color: var(--muted); font-size: 14px; }
.program__steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.program__steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 24px 4px; font-size: 17px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; color: var(--red); flex: none; transition: transform .25s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 4px 24px; color: var(--muted); font-size: 15px; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  background: var(--bg-soft);
}
.cta::before {
  content: ""; position: absolute; width: 700px; height: 700px; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(184, 35, 26, .22), transparent);
}
.cta .wrap { position: relative; padding-top: 110px; padding-bottom: 110px; }
.cta h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.25; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 800; }
.cta p { color: var(--muted); margin: 0 0 32px; }
.cta .hero__ctas { justify-content: center; }

/* ---------- Footer ---------- */
.footer { background: #181514; color: rgba(255, 255, 255, .62); font-size: 13.5px; }
.footer .wrap { padding-top: 64px; padding-bottom: 40px; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); flex-wrap: wrap; }
.footer__brand p { margin: 16px 0 0; max-width: 300px; line-height: 1.6; }
.footer .logo { color: #e4473c; }
.footer .logo .dot { background: #e4473c; }
.footer__nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__nav h4 { color: #fff; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__nav a:hover { color: #fff; }
.footer__info { padding-top: 30px; display: grid; gap: 6px; line-height: 1.7; }
.footer__info .row { display: flex; flex-wrap: wrap; gap: 4px 0; }
.footer__info .row span + span::before { content: "|"; margin: 0 12px; color: rgba(255, 255, 255, .25); }
.footer__info strong { color: rgba(255, 255, 255, .85); font-weight: 600; }
.footer__info a:hover { color: #fff; }
.footer__copy { margin-top: 22px; color: rgba(255, 255, 255, .4); font-size: 12.5px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Products page ---------- */
.page-hero { background: var(--bg-soft); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 560px; height: 560px;
  background: radial-gradient(closest-side, rgba(184, 35, 26, .22), transparent);
}
.page-hero .wrap { position: relative; z-index: 1; padding-top: 80px; padding-bottom: 70px; }
.page-hero h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; line-height: 1.15; margin: 0 0 14px; font-weight: 800; }
.page-hero p { color: var(--muted); max-width: 560px; margin: 0; font-size: 16px; }

.toolbar {
  position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.toolbar .wrap { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: .2s;
}
.tab:hover { border-color: var(--ink-2); }
.tab.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.tab .count { opacity: .6; font-weight: 500; margin-left: 4px; }
.search { position: relative; flex: 0 0 240px; }
.search input {
  width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line); padding: 0 16px 0 38px;
  font: inherit; font-size: 14px; background: var(--bg-soft); outline: none; transition: .2s;
}
.search input:focus { border-color: var(--red-400); background: #fff; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-empty { text-align: center; padding: 80px 0; color: var(--muted); grid-column: 1 / -1; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 12px;
  background: var(--red-50); color: var(--red-700); font-size: 13.5px; margin-bottom: 30px;
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__bg { position: absolute; inset: 0; background: rgba(20, 14, 13, .55); animation: fade .2s; }
.modal__box {
  position: relative; max-width: 960px; margin: 5vh auto; background: #fff; border-radius: 24px;
  overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr; max-height: 90vh;
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.2);
}
.modal__img { background: var(--bg-soft); position: relative; min-height: 420px; }
.modal__img img, .modal__img .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 40px 36px; overflow-y: auto; min-width: 0; }
.specs td { overflow-wrap: anywhere; }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; z-index: 2;
}
.modal__close svg { width: 18px; height: 18px; }
.modal h3 { font-size: 28px; letter-spacing: -.03em; margin: 6px 0 8px; line-height: 1.2; }
.modal__tagline { color: var(--red); font-weight: 600; margin: 0 0 16px; }
.modal__desc { color: var(--ink-2); font-size: 15px; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.chip { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; background: var(--red-50); color: var(--red-700); font-weight: 600; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 28px; }
.specs th, .specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 36%; color: var(--muted); font-weight: 500; padding-right: 14px; }
.modal__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
body.no-scroll { overflow: hidden; }

/* ---------- Ingredient guide (Q&A) ---------- */
.guide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.qa { padding: 28px 28px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.qa__q { margin: 0 0 10px; font-size: 18px; letter-spacing: -.02em; line-height: 1.35; }
.qa__q::before { content: "Q."; font-family: var(--serif); color: var(--red); font-size: 22px; margin-right: 8px; }
.qa__a { margin: 0; color: var(--ink-2); font-size: 15px; }
.qa__a a, .pd__body a:not(.btn) { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Product detail page ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a:hover { color: var(--red); }
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; padding: 28px 0 90px; }
.pd__media { position: sticky; top: calc(var(--header-h) + 24px); border-radius: 24px; overflow: hidden; background: var(--bg-soft); aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.pd__media img, .pd__media .ph { width: 100%; height: 100%; object-fit: cover; }
.pd__brand { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pd h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.035em; line-height: 1.15; margin: 8px 0 10px; font-weight: 800; }
.pd__tagline { color: var(--red); font-weight: 600; font-size: 17px; margin: 0 0 18px; }
.pd__desc { color: var(--ink-2); font-size: 16px; margin: 0 0 22px; }
.pd h2 { font-size: 20px; letter-spacing: -.02em; margin: 36px 0 12px; }
.pd .specs { margin-bottom: 0; }
.pd .modal__ctas { margin-top: 28px; }
.pd__qa { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pd__qa div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pd__qa h3 { margin: 0 0 6px; font-size: 15.5px; }
.pd__qa p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.pd__note { font-size: 12.5px; color: var(--muted); margin-top: 24px; }
.related { padding: 0 0 100px; }
.related h2 { font-size: 24px; letter-spacing: -.03em; margin: 0 0 22px; }
.related .grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; gap: 28px; padding-bottom: 60px; }
  .pd__media { position: static; }
  .related .grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- About / entity facts ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.about .section__title { margin-bottom: 18px; }
.about__def { font-size: 18px; line-height: 1.7; color: var(--ink-2); margin: 0 0 26px; }
.about__def strong { color: var(--ink); font-weight: 700; }
.facts { margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 24px; }
.facts div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-size: 14.5px; }
.facts a, .prose a:not(.btn) { color: var(--red); font-weight: 600; }
.prose { max-width: 780px; }
.prose h2 { font-size: 24px; letter-spacing: -.03em; margin: 48px 0 12px; }
.prose h3 { font-size: 17px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; }
.prose ul { padding-left: 20px; }
.prose .facts { margin: 22px 0; }
.updated { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--header-h); height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); background: #fff; overflow-y: auto;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s; margin: 0;
  }
  .nav a { width: 100%; padding: 18px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav__sep { display: none; }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .header__pill { display: none; }

  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .hero__visual { height: 420px; }
  .spot .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 70px; padding-bottom: 70px; }
  .spot__img { max-width: 440px; }
  .why { grid-template-columns: 1fr; }
  .programs { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
  .modal__box { display: block; width: 100%; max-width: none; margin: 0; max-height: none; height: 100%; border-radius: 0; overflow-y: auto; }
  .modal__img { min-height: 0; height: 46vh; flex: none; }
  .modal__body { overflow: visible; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cats .cat:last-child { grid-column: 1 / -1; }
  .cats .cat:last-child .cat__img { aspect-ratio: 16 / 9; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .programs { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard__desc { display: none; }
  .pcard__body { padding: 12px 14px 14px; }
  .pcard__name { font-size: 15px; }
  .pcard__meta { display: none; }
  .spot__list { grid-template-columns: 1fr; }
  .hero__visual { height: 360px; }
  .hero__chip { bottom: 2%; }
  .toolbar .wrap { flex-direction: column; align-items: stretch; gap: 10px; }
  .search { flex: none; }
  .featured__track { grid-auto-columns: 240px; padding-left: 16px; padding-right: 16px; }
  .modal__body { padding: 28px 20px; }
  .footer__info .row { flex-direction: column; }
  .footer__info .row span + span::before { display: none; }
  .btn { height: 48px; padding: 0 20px; }
  .section__title br, .cta h2 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
