:root {
  --bg: #F3EFE6;
  --fg: #302E2A;
  --muted: #6E685F;
  --surface: #FCF9F2;
  --accent: #7A6852;
  --accent-fg: #FFFCF6;
  --border: #D9D1C4;
  --radius: 2px;

  --font-serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;

  --page-max: 1200px;
  --pad-desktop: clamp(4rem, 5vw, 5rem);
  --pad-mobile: 1.5rem;
  --section-gap: clamp(4rem, 10vw, 10rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--fg);
  background: var(--bg);
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

#app {
  min-height: 100vh;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-desktop) 5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.25rem 0;
}

.brand {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-en {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.brand-ko {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-nav button {
  font-size: 0.9375rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav button:hover,
.site-nav button:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--border);
  outline: none;
}

/* Hero */
.hero {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.hero-nav-hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.35;
  margin: 0 0 1.5rem;
  max-width: 18ch;
}

.hero-lead {
  margin: 0 0 3rem;
  max-width: 42rem;
  color: var(--muted);
}

.hero-figure {
  margin: 0 0 2.5rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cta-wrap {
  margin: 0;
}

.text-link {
  font-size: 0.9375rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.2rem;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--fg);
  outline: none;
}

/* Sections */
.section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.section-num {
  font-size: 1.05rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.45;
  margin: 0 0 2rem;
  max-width: 22ch;
}

.philosophy-body {
  max-width: 36rem;
}

.philosophy-body p {
  margin: 0;
}

/* Products */
.product-grid {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.product-trigger {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-trigger:hover .product-name,
.product-trigger:focus-visible .product-name {
  color: var(--accent);
}

.product-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.product-image-wrap {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  transition: color 0.15s;
}

.product-caption {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
}

.products-hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

/* Materials */
.materials-intro {
  max-width: 40rem;
  margin: 0 0 4rem;
}

.material-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.material-row--reverse .material-figure {
  order: 2;
}

.material-row--reverse .material-copy {
  order: 1;
}

.material-figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
}

.material-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.material-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 22rem;
}

/* Store */
.store-name {
  margin-bottom: 1.5rem;
}

.store-body {
  max-width: 36rem;
}

.store-body p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.store-body strong {
  color: var(--fg);
  font-weight: 500;
}

.site-footer {
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 40rem;
}

.site-footer p {
  margin: 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(48, 46, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin: auto;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  font-size: 0.9375rem;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  z-index: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  clear: both;
}

.modal-figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg);
}

.modal-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  font-size: 1rem;
}

.modal-eyebrow {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

.modal-tagline {
  font-family: var(--font-serif);
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.modal-description {
  margin: 0 0 1.5rem;
}

.modal-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.modal-disclaimer {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Admin (demo stub) */
.admin-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem var(--pad-mobile);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.admin-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
}

.admin-back {
  font-size: 0.9375rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.admin-note {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}

.admin-list {
  padding-left: 1.25rem;
  margin: 1rem 0 2rem;
}

@media (max-width: 768px) {
  .page {
    padding-left: var(--pad-mobile);
    padding-right: var(--pad-mobile);
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .material-row,
  .material-row--reverse {
    grid-template-columns: 1fr;
  }

  .material-row--reverse .material-figure,
  .material-row--reverse .material-copy {
    order: unset;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    padding: 1.25rem;
  }
}
