/* LISENIA mockup — design tokens follow docs/web-plan.md §7 */
:root {
  --ivory: #F5F2EA;
  --sand: #E8E3D8;
  --teal: #204E4A;
  --teal-deep: #183C39;
  --sage: #B8C9BE;
  --ink: #1C1C1A;
  --stone: #8A877F;
  --line: #D9D3C6;
  --brass: #A88B5C;
  --olive: #5E6E4E;
  --ink-2: #4A4843;   /* body copy */
  --warn: #9A5B2E;
  --warn-bg: #F3E6D6;
  --err: #9A3B2E;

  --f-sans: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;
  --f-display: "Inter Tight", "Pretendard Variable", sans-serif;
  --f-serif-ko: "Noto Serif KR", serif;
  --f-serif-en: "Cormorant Garamond", "Noto Serif KR", serif;

  --gutter: 64px;
  --max: 1440px;
  --section: 184px;
  --ease: cubic-bezier(.22,.61,.36,1);
}
@media (max-width: 900px) {
  :root { --gutter: 20px; --section: 104px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
section[id], article[id] { scroll-margin-top: 150px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
html { color-scheme: light; }
.section { padding: var(--section) 0; }
.bg-sand { background: var(--sand); }
.bg-teal { background: var(--teal); color: var(--ivory); }

/* ---------- type ---------- */
.label {
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--stone);
}
.bg-teal .label { color: var(--sage); }
.h-display {
  font-family: var(--f-serif-ko);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.32;
  letter-spacing: -0.03em;
}
.h-1 {
  font-family: var(--f-serif-ko);
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.4;
  letter-spacing: -0.025em;
}
.h-2 {
  font-family: var(--f-serif-ko);
  font-weight: 400;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.5;
  letter-spacing: -0.02em;
}
.en-name {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.body-l { font-size: 18px; line-height: 1.85; color: var(--ink-2); }
.body-s { font-size: 14px; line-height: 1.7; color: var(--stone); }
.bg-teal .body-l, .bg-teal .body-s { color: rgba(245,242,234,.78); }
.num {
  font-family: var(--f-serif-en);
  font-weight: 300;
  font-size: clamp(56px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 54px; padding: 0 28px;
  font-family: var(--f-display); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--teal);
  transition: background .5s var(--ease), color .5s var(--ease);
}
.btn .arr { font-family: var(--f-sans); letter-spacing: 0; font-size: 14px; }
.btn-solid { background: var(--teal); color: var(--ivory); }
.btn-solid:hover { background: var(--teal-deep); }
.btn-line { color: var(--teal); }
.btn-line:hover { background: var(--teal); color: var(--ivory); }
.bg-teal .btn-line, .on-dark .btn-line { border-color: rgba(245,242,234,.6); color: var(--ivory); }
.bg-teal .btn-line:hover, .on-dark .btn-line:hover { background: var(--ivory); color: var(--teal); }
.link {
  font-family: var(--f-display); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  padding-bottom: 6px; border-bottom: 1px solid currentColor;
  display: inline-flex; gap: 12px;
}

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .6s var(--ease), border-color .6s var(--ease), color .6s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; height: 84px; }
.hdr nav { display: flex; gap: 32px; }
.hdr nav a, .hdr .util a {
  font-family: var(--f-display); font-size: 11.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
}
.hdr nav a:hover, .hdr .util a:hover { opacity: .6; }
.hdr .util { display: flex; justify-content: flex-end; gap: 28px; align-items: center; }
.hdr .logo { display: block; height: 22px; }
.hdr .logo img { height: 100%; width: auto; }
.hdr .logo .ivory { display: none; }
.hdr.on-hero { color: var(--ivory); }
.hdr.on-hero .logo .teal { display: none; }
.hdr.on-hero .logo .ivory { display: block; }
.hdr.solid { background: rgba(245,242,234,.94); backdrop-filter: blur(10px); border-bottom-color: var(--line); color: var(--ink); }
.hdr.solid .logo .teal { display: block; }
.hdr.solid .logo .ivory { display: none; }
/* 24x14 icon inside a 44x44 tap area */
.menu-btn { display: none; width: 24px; height: 14px; padding: 15px 10px; margin: -15px -10px; box-sizing: content-box; position: relative; }
.menu-btn::before, .menu-btn::after { content: ""; position: absolute; left: 10px; right: 10px; height: 1px; background: currentColor; }
.menu-btn::before { top: 15px; } .menu-btn::after { bottom: 15px; }
@media (max-width: 1080px) {
  .hdr .wrap { height: 64px; grid-template-columns: auto minmax(0, 1fr); }
  .hdr nav, .hdr .util .hide-m { display: none; }
  .menu-btn { display: block; }
  .hdr .logo { height: 17px; }
}

.m-menu {
  position: fixed; inset: 0; z-index: 70; background: var(--ivory); color: var(--ink);
  padding: 20px var(--gutter); display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.m-menu.open { opacity: 1; pointer-events: auto; }
.m-menu .row { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.m-menu .row img { height: 17px; }
.m-menu ul { list-style: none; margin-top: 56px; }
.m-menu li { border-bottom: 1px solid var(--line); }
.m-menu li a { display: block; padding: 18px 0; font-family: var(--f-serif-ko); font-weight: 300; font-size: 24px; }
.m-menu .ctas { margin-top: auto; display: grid; gap: 10px; padding-bottom: 12px; }

/* ---------- reveal ---------- */
/* visible at rest; only elements below the first screen get .pre from site.js */
.rv { transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.rv.pre { opacity: 0; transform: translateY(14px); }
.rv.pre.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .12s; } .rv.d2 { transition-delay: .24s; } .rv.d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- media ---------- */
.ph { position: relative; overflow: hidden; background: var(--sand); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ph:hover img.zoom { transform: scale(1.03); }
.tag-temp {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--f-display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 9px; background: rgba(28,28,26,.55); color: #fff;
}
/* product shots on ivory: white studio bg melts into the page */
.on-ivory { background: var(--ivory); }
.on-ivory img { mix-blend-mode: multiply; object-fit: contain; }
.bg-sand .on-ivory { background: var(--sand); }

/* ---------- footer ---------- */
.ftr { background: var(--teal-deep); color: rgba(245,242,234,.72); padding: 104px 0 48px; font-size: 13px; }
.ftr .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 72px; border-bottom: 1px solid rgba(245,242,234,.14); }
.ftr-brand { display: grid; gap: 28px; align-content: start; justify-items: start; }
.ftr .btn-line { border-color: rgba(245,242,234,.5); color: var(--ivory); }
.ftr .btn-line:hover { background: var(--ivory); color: var(--teal); }
.ftr-line { font-family: var(--f-serif-ko); font-weight: 300; font-size: 22px; line-height: 1.5; color: var(--ivory); letter-spacing: -0.02em; }
/* oversized wordmark (Beauty of Joseon footer) */
.ftr-word { width: 100%; height: auto; margin: 72px 0 8px; opacity: .92; }
.ftr h4 { font-family: var(--f-display); font-weight: 500; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory); margin-bottom: 20px; }
.ftr li { list-style: none; margin-bottom: 10px; }
.ftr li a:hover { color: var(--ivory); }
.ftr .biz { padding-top: 32px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; line-height: 1.9; font-size: 12px; color: rgba(245,242,234,.5); }
@media (max-width: 900px) {
  .ftr .top { grid-template-columns: 1fr 1fr; }
  .ftr .top > :first-child { grid-column: 1 / -1; }
}

/* ---------- shared components for sub-pages ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 3px;
}
.hdr .util .hdr-cta { border: 1px solid currentColor; padding: 8px 14px; }
.hdr .util .hdr-cta:hover { opacity: 1; background: var(--teal); border-color: var(--teal); color: var(--ivory); }
.hdr nav a[aria-current="page"], .hdr .util a[aria-current="page"] { border-bottom: 1px solid currentColor; padding-bottom: 4px; }

/* Salon dropdown (desktop) */
.hdr nav { align-items: center; }
.dd { position: relative; }
.dd-top::after { content: "▾"; font-size: 8px; margin-left: 6px; vertical-align: 2px; }
.dd-panel {
  position: absolute; top: calc(100% + 20px); left: -24px; width: 560px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  color: var(--ink); text-transform: none; letter-spacing: 0;
}
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -21px; height: 21px; }
.dd:hover .dd-panel, .dd:focus-within .dd-panel { opacity: 1; visibility: visible; transform: none; }
.dd-panel a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hdr nav .dd-panel a { display: grid; gap: 4px; padding: 20px 22px; background: var(--ivory); font-family: var(--f-sans); text-transform: none; letter-spacing: 0; font-size: 14px; border: 0; transition: background .3s var(--ease); }
.hdr nav .dd-panel a:hover { background: var(--sand); opacity: 1; }
.dd-panel .en { font-family: var(--f-display); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.dd-panel .ko { font-family: var(--f-serif-ko); font-size: 17px; }
.dd-panel .d { font-size: 12.5px; color: var(--stone); }
/* mobile menu: salon sub-list */
.m-menu li.sub { padding: 14px 0 18px; }
.m-menu .sub-h { display: block; font-family: var(--f-serif-ko); font-weight: 300; font-size: 24px; padding: 4px 0 8px; }
.m-menu li.sub a { font-family: var(--f-sans); font-size: 15px; padding: 7px 0 7px 14px; color: var(--ink-2); }
.m-menu { overflow-y: auto; }
/* salon section tabs */
.salon-tabs { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); z-index: 30; background: rgba(245,242,234,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.salon-tabs .wrap { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.salon-tabs a { flex: none; padding: 18px 0 16px; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; }
.salon-tabs a[aria-current="page"] { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
@media (max-width: 1080px) { .salon-tabs { top: calc(64px + env(safe-area-inset-top, 0px)); } }

/* sub-page opener: big uppercase title (Typology) + Korean lead */
.page-head { padding-top: 168px; padding-bottom: 88px; }
.page-head .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 32px 96px; align-items: end; }
.page-head .t-en {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(44px, 7.4vw, 112px); line-height: .92; letter-spacing: -0.035em; color: var(--teal);
}
.page-head .t-ko { font-family: var(--f-serif-ko); font-weight: 300; font-size: clamp(22px, 2vw, 28px); margin-top: 20px; letter-spacing: -0.02em; }
.page-head .lead { color: var(--ink-2); max-width: 30em; }
@media (max-width: 900px) {
  .page-head { padding-top: 112px; padding-bottom: 56px; }
  .page-head .wrap { grid-template-columns: 1fr; }
}

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 48px; }
.filters button {
  font-family: var(--f-display); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding: 10px 18px; border: 1px solid var(--line); color: var(--ink-2); transition: all .4s var(--ease);
}
.filters button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--ivory); }

/* product card grid (Typology / Beauty of Joseon tiles) */
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 24px; }
.p-card .tile { position: relative; aspect-ratio: 4 / 5; background: var(--sand); overflow: hidden; display: grid; place-items: center; }
.p-card .tile img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 1.2s var(--ease); }
.p-card:hover .tile img { transform: scale(1.04); }
.p-card .tile .flag-top { position: absolute; left: 14px; top: 14px; font-family: var(--f-display); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.p-card .tile .soon { color: var(--stone); font-size: 13px; text-align: center; padding: 24px; }
.p-card .meta { padding-top: 20px; display: grid; gap: 6px; }
.p-card .en { font-family: var(--f-display); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.p-card .ko { font-family: var(--f-serif-ko); font-size: 19px; letter-spacing: -0.02em; }
.p-card .sub { font-size: 13px; color: var(--stone); }
.p-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 900px) { .p-grid { grid-template-columns: 1fr 1fr; gap: 36px 12px; } .p-card .ko { font-size: 16px; } }

/* side section index (Sulwhasoo brand story) */
.dots { position: fixed; z-index: 40; left: max(24px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; }
.dots a { display: flex; align-items: center; gap: 12px; color: var(--stone); }
.dots a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; transition: all .4s var(--ease); }
.dots a span { font-family: var(--f-display); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: 0; transform: translateX(-4px); transition: all .4s var(--ease); }
.dots a.on { color: var(--teal); }
.dots a.on::before { opacity: 1; transform: scale(1.4); }
.dots a.on span, .dots a:hover span { opacity: 1; transform: none; }
@media (max-width: 1280px) { .dots { display: none; } }

/* progress-bar carousel controls (Sulwhasoo) */
.carousel .slide { display: none; }
.carousel .slide.on { display: block; animation: fadeIn 1s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.c-ctrl { display: flex; align-items: center; gap: 18px; }
.c-ctrl .bar { position: relative; width: 200px; height: 1px; background: rgba(245,242,234,.35); overflow: hidden; }
.c-ctrl .bar i { position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(0); }
.c-ctrl .count { font-family: var(--f-display); font-size: 12px; letter-spacing: .12em; white-space: nowrap; }
.c-ctrl button { width: 32px; height: 32px; display: grid; place-items: center; font-size: 14px; }
.c-ctrl .pause::before { content: "❚❚"; font-size: 9px; letter-spacing: 1px; }
.c-ctrl .pause[aria-pressed="true"]::before { content: "▶"; font-size: 10px; }
.on-light .c-ctrl .bar { background: var(--line); }
/* light hero slide: dark header and controls */
.hero-light .hdr.on-hero { color: var(--ink); }
.hero-light .hdr.on-hero .logo .teal { display: block; }
.hero-light .hdr.on-hero .logo .ivory { display: none; }
.hero-light .menu-btn { color: var(--ink); }
.hero-light .hero .ctrl .c-ctrl { color: var(--ink); }
.hero-light .hero .c-ctrl .bar { background: rgba(28,28,26,.2); }

/* form */
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; color: var(--ink-2); }
.field label b { color: var(--teal); font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; border-radius: 0; min-width: 0; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; border: 1px solid var(--line); padding: 14px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; }
@media (max-width: 900px) { .field input, .field select, .field textarea { font-size: 16px; } } /* 16px stops iOS zooming on focus */


/* top banner managed in admin.html (site settings) */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 55; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 16px; background: var(--teal-deep); color: var(--ivory); font-size: 13px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.topbar:hover { text-decoration: underline; text-underline-offset: 3px; }
body.has-bar { padding-top: 36px; }
body.has-bar .hdr { top: 36px; }
body.has-bar .salon-tabs { top: calc(120px + env(safe-area-inset-top, 0px)); }
@media (max-width: 1080px) { body.has-bar .salon-tabs { top: calc(100px + env(safe-area-inset-top, 0px)); } .topbar { font-size: 12px; justify-content: flex-start; } }

/* popups managed in admin.html */
.popups { position: fixed; left: 24px; bottom: 24px; z-index: 65; display: grid; gap: 12px; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto; }
.popup { background: var(--ivory); border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(28,28,26,.18); }
.popup-in { display: grid; gap: 10px; padding: 22px 22px 20px; }
.popup-in img { width: calc(100% + 44px); max-width: none; margin: -22px -22px 6px; height: auto; max-height: 44vh; object-fit: cover; }
.popup-t { font-family: var(--f-serif-ko); font-size: 19px; line-height: 1.45; letter-spacing: -0.02em; color: var(--ink); }
.popup-b { font-size: 14px; line-height: 1.7; color: var(--ink-2); white-space: pre-line; }
.popup-c { font-size: 13px; color: var(--teal); font-weight: 500; }
a.popup-in:hover .popup-c { text-decoration: underline; text-underline-offset: 3px; }
.popup-f { display: flex; border-top: 1px solid var(--line); font-size: 12.5px; }
.popup-f button { flex: 1; padding: 12px; color: var(--stone); }
.popup-f button:last-child { flex: none; padding: 12px 22px; color: var(--ink); border-left: 1px solid var(--line); }
.popup-f button:only-child { flex: 1; border-left: 0; }
.popup-f button:hover { background: var(--sand); }
@media (max-width: 900px) { .popups { left: 16px; right: 16px; bottom: 16px; width: auto; } .popup-in img { max-height: 28vh; } }
