/* ==========================================================================
   XE'LHA — design tokens (inspired by the Millie design reference)
   ========================================================================== */
:root {
  /* colours */
  --ink: #242424;
  --ink-soft: #333333;
  --canvas: #FFFFFF;
  --surface-subtle: #F7F7F7;
  --muted: #6F6F6F;
  --divider: #ECECEC;
  --overlay: rgba(0, 0, 0, 0.3);
  --brand: #0071CE;          /* XE'LHA logo blue, used sparingly */
  --brand-tint: #EAF3FC;

  /* type */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans KR", sans-serif;
  --fs-body: 14px;    --lh-body: 1.7143;
  --fs-utility: 12px; --lh-utility: 1.5;
  --fs-h: 28px;       --lh-h: 1.3571;
  --fs-h-xl: 44px;    --lh-h-xl: 1.2273;

  /* shape */
  --r-utility: 4px;
  --r-card: 16px;
  --r-hero: 20px;
  --r-pill: 100px;

  /* layout */
  --container: 1392px;
  --gutter: 24px;
  --header-h: 64px;
}

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   type roles
   -------------------------------------------------------------------------- */
.h-xl { font-size: clamp(30px, 5vw, var(--fs-h-xl)); font-weight: 700; line-height: var(--lh-h-xl); letter-spacing: -0.02em; }
.h    { font-size: clamp(22px, 3vw, var(--fs-h)); font-weight: 700; line-height: var(--lh-h); letter-spacing: -0.01em; }
.eyebrow { font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------------------
   buttons (Millie home utility button: #333, 4px radius, 12px text)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 12px;
  font-size: var(--fs-utility); line-height: var(--lh-utility); font-weight: 400;
  border-radius: var(--r-utility);
  background: var(--ink-soft); color: #fff;
  white-space: nowrap;
  transition: background .15s ease;
}
.btn:hover { background: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--surface-subtle); }
.btn--lg { height: 44px; padding: 0 20px; font-size: var(--fs-body); }
.btn--brand { background: var(--brand); }
.btn--brand:hover { background: #005FB0; }

/* --------------------------------------------------------------------------
   header component
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.site-header__inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header__logo img { height: 22px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  font-size: var(--fs-body); color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  width: 32px; height: 32px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); transition: background .15s ease;
}
.icon-btn:hover { background: var(--surface-subtle); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: 1px; right: 1px;
  min-width: 14px; height: 14px; padding: 0 3px;
  font-size: 9px; line-height: 14px; text-align: center;
  border-radius: var(--r-pill); background: var(--ink); color: #fff;
}
.menu-toggle { display: none; }

/* mobile drawer */
.site-drawer {
  display: none;
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
  background: var(--canvas);
  padding: 8px var(--gutter) 32px;
  flex-direction: column;
  overflow-y: auto;
}
.site-drawer[data-open="true"] { display: flex; }
.site-drawer a {
  display: block; padding: 16px 0;
  font-size: 18px; font-weight: 500;
  border-bottom: 1px solid var(--divider);
}
.site-drawer a.btn { display: inline-flex; margin-top: 24px; width: 100%; border-bottom: 0; }
body[data-drawer-open="true"] { overflow: hidden; }

@media (max-width: 860px) {
  .site-nav, .site-header__actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   hero (Millie-style 20px rounded slide + translucent pill controls)
   -------------------------------------------------------------------------- */
.hero { padding-block: 16px 40px; }
.hero__frame {
  position: relative;
  border-radius: var(--r-hero); overflow: hidden;
  aspect-ratio: 1392 / 480;
  background: var(--surface-subtle);
}


.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .6s ease;
}
.hero__slide[aria-hidden="false"] { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.18) 55%, rgba(0,0,0,0) 100%);
}

.hero__copy {
  position: absolute; z-index: 2;
  left: clamp(20px, 4vw, 56px); bottom: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  max-width: 560px; color: #fff;
}
.hero__copy .eyebrow { color: rgba(255,255,255,.75); margin-bottom: 10px; }
.hero__copy h1 { color: #fff; }
.hero__copy p { margin-top: 12px; max-width: 42ch; color: rgba(255,255,255,.85); }
.hero__copy .btn { margin-top: 20px; background: #fff; color: var(--ink); }
.hero__copy .btn:hover { background: var(--surface-subtle); }

/* mobile hero: image on top, copy in a solid ink panel below (no text over the photo) */
@media (max-width: 860px) {
  .hero { padding-top: 12px; }
  .hero__frame { aspect-ratio: auto; background: var(--ink); }
  .hero__slides { position: relative; aspect-ratio: 4 / 3; }
  .hero__slide::after { background: none; }
  .hero__copy {
    position: static; max-width: none;
    padding: 20px 20px 24px; min-height: 236px;
    background: var(--ink);
  }
  .hero__copy h1 { font-size: 26px; line-height: 1.25; }
  .hero__copy p { max-width: none; }
  .hero__copy .btn { width: 100%; }
  .hero__controls { top: 12px; right: 12px; }
}

.hero__controls {
  position: absolute; z-index: 3; display: flex; gap: 8px;
  right: 16px; top: 16px;
}
.hero-ctl {
  height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--overlay); color: #fff;
  border-radius: var(--r-pill);
  font-size: 16px; line-height: 1; font-weight: 400;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-ctl--play { width: 32px; padding: 8px; }
.hero-ctl--play svg { width: 14px; height: 14px; fill: #fff; }
.hero-ctl--page { padding: 4px 10px; min-width: 76px; gap: 6px; font-variant-numeric: tabular-nums; }
.hero-ctl--page button { color: #fff; font-size: 16px; line-height: 1; padding: 0 2px; }
.hero-ctl--page button:hover { opacity: .7; }

/* --------------------------------------------------------------------------
   sections
   -------------------------------------------------------------------------- */
.section { padding-block: 40px; }
.section--tint { background: var(--surface-subtle); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .section__head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .h { font-size: 22px; }
}
/* forced line breaks in large headings are desktop-only */
@media (max-width: 860px) { .h-xl br { display: none; } }
.section__head .link { font-size: var(--fs-body); color: var(--muted); white-space: nowrap; }
.section__head .link:hover { color: var(--ink); }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-card {
  display: grid; grid-template-rows: auto 1fr;
  background: var(--surface-subtle);
  border-radius: var(--r-card); overflow: hidden;
  transition: transform .2s ease;
}
.cat-card:hover { transform: translateY(-2px); }
.cat-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover .cat-card__img img { transform: scale(1.03); }
.cat-card__body { padding: 18px 24px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-card__body h3 { font-size: 16px; font-weight: 700; line-height: 1.4; }
.cat-card__body p { margin-top: 2px; font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); }
.cat-card__arrow { width: 32px; height: 32px; border-radius: var(--r-pill); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-card__arrow svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { grid-template-columns: 112px 1fr; grid-template-rows: none; }
  .cat-card__img { aspect-ratio: 1; }
  .cat-card__body { padding: 14px 18px; }
}

/* product shelf (horizontal scroll on mobile) */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) {
  .shelf {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf > * { flex: 0 0 64%; scroll-snap-align: start; }
}
.prod {
  background: #fff; border: 1px solid var(--divider);
  border-radius: var(--r-card); overflow: hidden;
}
.prod__img { aspect-ratio: 3 / 4; background: var(--surface-subtle); }
.prod__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.prod__img--contain { background: #fff; padding: 12%; }
.prod__img--contain img { object-fit: contain; }
.prod__body { padding: 14px 16px 16px; }
.prod__body h3 { font-size: var(--fs-body); font-weight: 700; }
.prod__body p { font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); margin-top: 2px; }
.prod__tag { display: inline-block; margin-top: 10px; padding: 2px 8px; font-size: 11px; line-height: 1.5; border-radius: var(--r-utility); background: var(--brand-tint); color: var(--brand); font-weight: 500; }

/* about strip */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 20px; } }
.about__img { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 3 / 2; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__text .eyebrow { margin-bottom: 8px; }
.about__text p { margin-top: 12px; max-width: 52ch; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
@media (max-width: 600px) { .values { grid-template-columns: 1fr; } }
.value {
  padding: 14px 16px; border-radius: 10px;
  background: var(--canvas); border: 1px solid var(--divider);
}
.value strong { display: block; font-size: var(--fs-body); font-weight: 700; margin-bottom: 2px; }
.value span { font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); }

/* join band */
.join {
  border-radius: var(--r-hero); overflow: hidden;
  background: var(--ink); color: #fff;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: clamp(28px, 5vw, 48px);
}
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } }
.join h2 { color: #fff; }
.join p { margin-top: 8px; color: rgba(255,255,255,.7); max-width: 48ch; }
.join .btn { background: #fff; color: var(--ink); }
.join .btn:hover { background: var(--surface-subtle); }

/* --------------------------------------------------------------------------
   footer component
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--divider); padding-block: 40px 28px; margin-top: 24px; }
.site-footer__top { display: grid; grid-template-columns: 1.2fr .7fr 1fr; gap: 32px; }
@media (max-width: 860px) { .site-footer__top { grid-template-columns: 1fr; gap: 28px; } }
.site-footer__brand img { height: 20px; width: auto; }
.site-footer__brand p { margin-top: 12px; color: var(--muted); max-width: 40ch; font-size: var(--fs-utility); line-height: var(--lh-utility); }
.site-footer h4 { margin: 0 0 10px; font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.site-footer li + li { margin-top: 6px; }
.site-footer__links a:hover { text-decoration: underline; }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px;
  font: inherit; font-size: var(--fs-utility);
  border: 1px solid var(--divider); border-radius: var(--r-utility);
  background: var(--surface-subtle); color: var(--ink);
}
.newsletter input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.newsletter .btn { height: 36px; }
.social { display: flex; gap: 8px; margin-top: 14px; }
.social a {
  width: 32px; height: 32px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-subtle);
}
.social a:hover { background: var(--divider); }
.social svg { width: 16px; height: 16px; fill: var(--ink); }
.site-footer__bottom {
  margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--divider);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted);
}

/* --------------------------------------------------------------------------
   inner pages
   -------------------------------------------------------------------------- */
.page-head { padding-block: 40px 24px; }
.page-head .eyebrow { margin-bottom: 8px; }
.page-head p.lead { margin-top: 12px; max-width: 60ch; color: var(--muted); }

/* banner (rounded image with caption, used on About) */
.banner { border-radius: var(--r-hero); overflow: hidden; aspect-ratio: 1392 / 420; background: var(--surface-subtle); }
@media (max-width: 860px) { .banner { aspect-ratio: 4 / 3; } }
.banner img { width: 100%; height: 100%; object-fit: cover; }

/* two-column prose */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 20px; } }
.split--form { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .split--form { grid-template-columns: 1fr; } }
.prose p + p { margin-top: 12px; }
.prose p { max-width: 60ch; }

/* stat / value tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--surface-subtle); border-radius: var(--r-card); padding: 24px; }
.tile .num { display: block; font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 8px; }
.tile h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.tile p { color: var(--muted); }

/* filter pills */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
@media (max-width: 860px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .filters::-webkit-scrollbar { display: none; }
}
.pill {
  height: 32px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: var(--fs-utility); line-height: var(--lh-utility);
  background: var(--surface-subtle); color: var(--ink); white-space: nowrap;
  border: 1px solid transparent; transition: background .15s ease;
}
.pill:hover { background: var(--divider); }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* product grid (products page) */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.grid .prod[hidden] { display: none; }
.prod__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.prod__price { font-size: var(--fs-utility); color: var(--muted); }
.group { padding-block: 8px 32px; scroll-margin-top: calc(var(--header-h) + 16px); }
.group__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.group__head h2 { font-size: 18px; font-weight: 700; }
.group__head span { font-size: var(--fs-utility); color: var(--muted); }
@media (max-width: 860px) { .group__head { flex-direction: column; gap: 2px; } }

/* notice */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--brand-tint); color: var(--ink);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 24px;
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--brand); }
.notice a { text-decoration: underline; }

/* forms */
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-utility); line-height: var(--lh-utility); color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; height: 44px; padding: 0 14px;
  font: inherit; font-size: var(--fs-body); color: var(--ink);
  background: var(--surface-subtle); border: 1px solid var(--divider); border-radius: 10px;
}
.field textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--ink); outline-offset: -1px; background: #fff; }
.form__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.form__foot small { color: var(--muted); font-size: var(--fs-utility); }
.form__done { display: none; padding: 16px 18px; border-radius: 10px; background: var(--surface-subtle); }
.form[data-sent="true"] .form__done { display: block; }
.form[data-sent="true"] .form__fields { display: none; }

/* contact aside */
.card { background: var(--surface-subtle); border-radius: var(--r-card); padding: 24px; }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--muted); }
.card .btn { margin-top: 14px; }

/* empty state */
.empty { text-align: center; padding: 56px 24px; background: var(--surface-subtle); border-radius: var(--r-hero); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--muted); }
.empty p { color: var(--muted); margin-top: 6px; }
.empty .btn { margin-top: 20px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}
