/* ===================================================
   Food Pharmacy Seoul — Design System v4
   Bright · Editorial · Brand-grade
   =================================================== */

:root {
  /* ─── Palette (bright white) ─── */
  --white:       #FFFFFF;
  --paper:       #FBFAF7;
  --sand-50:     #F6F3EE;
  --sand-100:    #EFEBE3;
  --sand-200:    #E4DED2;
  --sand-300:    #CEC5B4;

  --ink-900:     #13110E;
  --ink-800:     #1F1B16;
  --ink-700:     #2E2922;
  --ink-500:     #463F36;
  --ink-400:     #6A6258;
  --ink-300:     #8F8778;
  --ink-200:     #B7AE9E;

  --accent:       #5B7560;
  --accent-600:   #435A47;
  --accent-soft:  #8AA38E;
  --accent-tint:  rgba(91, 117, 96, 0.09);
  --accent-wash:  #EAEFE8;

  --rule:        rgba(19, 17, 14, 0.09);
  --rule-2:      rgba(19, 17, 14, 0.16);
  --rule-inv:    rgba(255, 255, 255, 0.14);

  /* ─── Semantics ─── */
  --bg:          var(--white);
  --bg-soft:     var(--paper);
  --bg-sand:     var(--sand-50);
  --bg-dark:     var(--ink-900);
  --text:        var(--ink-900);
  --text-mid:    var(--ink-700);
  --text-muted:  var(--ink-500);
  --text-faint:  var(--ink-300);

  /* ─── Type ─── */
  --font-sans:    "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-kr-serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --font-en-serif: "Cormorant Garamond", "Noto Serif KR", Georgia, serif;

  /* ─── Fluid type scale ─── */
  --fs-xs:  clamp(0.72rem, 0.69rem + 0.12vw, 0.78rem);
  --fs-sm:  clamp(0.82rem, 0.79rem + 0.16vw, 0.9rem);
  --fs-base: clamp(0.95rem, 0.92rem + 0.16vw, 1.02rem);
  --fs-md:  clamp(1.05rem, 1rem + 0.2vw, 1.15rem);
  --fs-lg:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --fs-xl:  clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --fs-2xl: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  --fs-3xl: clamp(2.6rem, 1.85rem + 3.6vw, 4.5rem);
  --fs-4xl: clamp(3.2rem, 2rem + 5.5vw, 6rem);
  --fs-hero: clamp(2.8rem, 1.8rem + 5vw, 5.2rem);

  /* ─── Rhythm ─── */
  --r-xs: 6px;
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 36px;

  --shadow-1: 0 2px 6px rgba(19, 17, 14, 0.04);
  --shadow-2: 0 10px 30px -10px rgba(19, 17, 14, 0.12);
  --shadow-3: 0 30px 60px -25px rgba(19, 17, 14, 0.25);
  --shadow-card: 0 1px 2px rgba(19, 17, 14, 0.03), 0 14px 40px -18px rgba(19, 17, 14, 0.18);

  --container: min(1280px, 92vw);
  --container-narrow: min(880px, 90vw);

  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 72px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  word-break: keep-all;
  overflow-wrap: break-word;
}
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
hr { border: 0; }

::selection { background: var(--accent); color: var(--white); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ─── Layout ─── */
.container { width: var(--container); margin-inline: auto; }
.container-narrow { width: var(--container-narrow); margin-inline: auto; }

/* ─── Type utilities ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.display-en {
  font-family: var(--font-en-serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.display-kr {
  font-family: var(--font-kr-serif);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ─── Buttons ─── */
.btn {
  --_bg: var(--ink-900);
  --_fg: var(--white);
  --_bd: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.95rem 1.75rem;
  min-height: 48px;
  background: var(--_bg);
  color: var(--_fg);
  border: 1px solid var(--_bd);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary {
  --_bg: var(--accent);
  --_fg: var(--white);
  --_bd: var(--accent);
}
.btn--primary:hover { --_bg: var(--accent-600); --_bd: var(--accent-600); }

.btn--ghost {
  --_bg: transparent;
  --_fg: var(--ink-900);
  --_bd: var(--rule-2);
}
.btn--ghost:hover { --_bg: var(--ink-900); --_fg: var(--white); --_bd: var(--ink-900); }

.btn--light {
  --_bg: var(--white);
  --_fg: var(--ink-900);
  --_bd: var(--white);
}
.btn--light:hover { --_bg: var(--accent); --_fg: var(--white); --_bd: var(--accent); }

/* ─── Arrow icon helper ─── */
.arrow { display: inline-block; width: 16px; height: 1px; background: currentColor; position: relative; }
.arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* ─── Section label ─── */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.label--light { color: var(--sand-200); }

/* ─── Fade in ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-left { transform: translateX(-24px); }
.reveal-right { transform: translateX(24px); }
.reveal-left.is-visible, .reveal-right.is-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
}
.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--white);
  transition: color 0.35s var(--ease);
}
.site-header.is-scrolled .header-logo,
.site-header.is-solid .header-logo { color: var(--ink-900); }
.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
}
.header-logo-text {
  font-family: var(--font-en-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.header-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.35s var(--ease);
}
.site-header.is-scrolled .header-nav,
.site-header.is-solid .header-nav { color: var(--ink-900); }
.header-nav a {
  position: relative;
  padding-block: 0.35rem;
}
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease);
}
.header-nav a:hover::after { right: 0; }

.header-sns {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--white);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled .header-sns,
.site-header.is-solid .header-sns { color: var(--ink-900); }
.header-sns:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.header-sns svg { width: 17px; height: 17px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  color: var(--white);
}
.site-header.is-scrolled .hamburger,
.site-header.is-solid .hamburger { color: var(--ink-900); }
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  margin-left: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), width 0.35s var(--ease), opacity 0.2s var(--ease);
}
.hamburger span:nth-child(2) { width: 16px; }
.hamburger span:nth-child(3) { width: 22px; }
.hamburger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--white);
  color: var(--ink-900);
  padding: calc(var(--nav-h) + 1.5rem) 1.75rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--font-en-serif);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu a::after {
  content: "→";
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 400;
}
.mobile-menu-social {
  margin-top: auto;
  padding-top: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.mobile-menu-social a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0;
  border: 0;
  color: var(--ink-900);
  letter-spacing: 0.02em;
  margin-top: 0.4rem;
  text-transform: none;
}
.mobile-menu-social a::after { display: none; }

/* ═══════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════ */
.site-footer {
  background: var(--ink-900);
  color: var(--sand-100);
  padding: clamp(4rem, 9vw, 6.5rem) 0 2rem;
  position: relative;
  overflow: hidden;
}
.site-footer::after {
  content: "FOOD PHARMACY";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15em;
  font-family: var(--font-en-serif);
  font-size: clamp(4rem, 16vw, 16rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  text-align: center;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  white-space: nowrap;
}
.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--rule-inv);
}
.footer-brand { display: flex; flex-direction: column; gap: 1rem; max-width: 360px; }
.footer-logo { width: 44px; height: 44px; border-radius: 50%; background: var(--white); padding: 2px; }
.footer-tagline {
  font-family: var(--font-en-serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--white);
}
.footer-column { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-column h4 {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-300);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.footer-column a, .footer-column span {
  color: var(--sand-100);
  font-size: 0.95rem;
  transition: color 0.3s var(--ease);
}
.footer-column a:hover { color: var(--accent-soft); }
.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--ink-300);
}
.footer-social { display: flex; gap: 0.7rem; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--rule-inv);
  color: var(--sand-100);
  transition: all 0.3s var(--ease);
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.footer-social svg { width: 15px; height: 15px; }

/* ═══════════════════════════════════════════════════
   Form elements (shared)
   ═══════════════════════════════════════════════════ */
.form-notice {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  color: inherit;
  opacity: 0.75;
}

.email-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--rule-2);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.email-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.email-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: 0;
  color: var(--ink-900);
  font-size: 0.95rem;
  min-width: 0;
}
.email-input::placeholder { color: var(--text-faint); }
.email-input:focus { outline: none; }
.email-submit {
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.04em;
  transition: background 0.3s var(--ease);
  white-space: nowrap;
}
.email-submit:hover { background: var(--accent-600); }
.email-submit:disabled { opacity: 0.7; cursor: default; }

.email-form--disabled {
  background: rgba(255, 255, 255, 0.03);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.22);
  cursor: not-allowed;
}
.email-form--disabled:focus-within { box-shadow: none; border-color: rgba(255, 255, 255, 0.22); }
.email-form--disabled .email-input {
  cursor: not-allowed;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-en-serif);
  font-style: italic;
}
.email-form--disabled .email-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}
.email-form--disabled .email-submit {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
  letter-spacing: 0.08em;
}

.email-form--dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--rule-inv);
}
.email-form--dark .email-input { color: var(--white); }
.email-form--dark .email-input::placeholder { color: var(--ink-300); }

/* ═══════════════════════════════════════════════════
   Responsive — Header/Footer
   ═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .header-nav { display: none; }
  .header-sns { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 480px) {
  .email-form { flex-direction: column; border-radius: var(--r); padding: 0.6rem; }
  .email-submit { width: 100%; }
}
