/* 한루마켓 — Sidebar layout · warm sand + forest */
:root {
  --ink: #1a2420;
  --muted: #5a6560;
  --paper: #fffef9;
  --sand: #e5dfd3;
  --sand-deep: #d4cdc0;
  --forest: #2d4a3e;
  --forest-light: #3d6354;
  --terracotta: #c45c3a;
  --terracotta-soft: #f3e8e3;
  --olive: #8b9a6b;
  --border: rgba(26, 36, 32, 0.1);
  --sidebar-w: 252px;
  --font: "Noto Sans KR", system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.7;
  background: var(--sand);
  background-image:
    linear-gradient(90deg, rgba(45, 74, 62, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(45, 74, 62, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--forest);
  color: var(--paper);
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

/* —— App shell: sidebar + main —— */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  background: var(--forest);
  color: var(--paper);
  border-right: 3px solid var(--terracotta);
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
  color: var(--paper);
}
.logo span {
  color: #f4c9a8;
}

.nav-links {
  list-style: none;
  flex: 1;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 254, 249, 0.72);
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}
.nav-links .is-active {
  background: var(--terracotta);
  color: var(--paper);
  font-weight: 600;
}

.nav-num {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.5;
  min-width: 1.4em;
}
.nav-links .is-active .nav-num {
  opacity: 0.85;
}

.sidebar-foot {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  color: rgba(255, 254, 249, 0.5);
}
.sidebar-email a {
  color: #f4c9a8;
  font-size: 0.8rem;
  word-break: break-all;
}
.sidebar-email a:hover {
  text-decoration: underline;
}
.sidebar-copy {
  margin-top: 8px;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-bar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--forest);
  color: var(--paper);
  position: sticky;
  top: 0;
  z-index: 900;
}
.mobile-logo {
  font-weight: 700;
  font-size: 1rem;
}

.nav-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(26, 36, 32, 0.5);
}
.sidebar-backdrop.is-visible {
  display: block;
}

.page-view {
  display: none;
  flex: 1;
  animation: fadeIn 0.4s var(--ease);
}
.page-view.is-visible {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.container {
  width: min(100% - 40px, 1100px);
  margin-inline: auto;
}
.container--narrow {
  max-width: 720px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--terracotta);
  color: var(--paper);
  box-shadow: 0 4px 16px rgba(196, 92, 58, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 2px solid rgba(255, 254, 249, 0.5);
}
.btn-outline:hover {
  border-color: var(--paper);
  background: rgba(255, 255, 255, 0.1);
}
.btn-block {
  width: 100%;
}

/* —— Hero cinema —— */
.hero-cinema {
  position: relative;
  min-height: clamp(420px, 58vh, 560px);
  overflow: hidden;
}
.hero-cinema img {
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 58vh, 560px);
  object-position: center 30%;
}
.hero-cinema__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(32px, 6vw, 56px);
  background: linear-gradient(
    0deg,
    rgba(26, 36, 32, 0.88) 0%,
    rgba(26, 36, 32, 0.35) 45%,
    transparent 100%
  );
}
.hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f4c9a8;
  margin-bottom: 14px;
}
.hero-cinema h1 {
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--paper);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 14px;
}
.hero-cinema p {
  color: rgba(255, 254, 249, 0.82);
  max-width: 40ch;
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.hero-stats li {
  padding: 22px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stats li:last-child {
  border-right: none;
}
.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 2px;
}
.hero-stats span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* —— Blocks —— */
.block {
  padding: 56px 0;
}
.block-products {
  background: var(--paper);
}
.block-values {
  background: var(--forest);
  color: var(--paper);
}
.block-trust {
  background: var(--sand-deep);
  padding: 48px 0;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.section-label--light {
  color: #f4c9a8;
}

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-desc {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 28ch;
}

.block-header {
  margin-bottom: 36px;
}
.block-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

/* —— Product horizontal scroll —— */
.product-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--forest-light) var(--sand);
}
.product-scroll::-webkit-scrollbar {
  height: 6px;
}
.product-scroll::-webkit-scrollbar-thumb {
  background: var(--forest-light);
  border-radius: 3px;
}

.product-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  position: relative;
  background: var(--sand);
  border: 2px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.25s var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
}
.product-card img {
  width: 100%;
  aspect-ratio: 4/5;
}
.product-card__body {
  padding: 14px 16px 18px;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}
.product-card__body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.price {
  font-weight: 700;
  color: var(--terracotta);
  font-size: 0.95rem;
}
.price-note {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.tile-badge--hot {
  background: var(--terracotta);
}

.scroll-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 14px;
}

/* —— Values steps —— */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.step-item {
  display: grid;
  grid-template-columns: auto 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.step-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.step-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(244, 201, 168, 0.35);
  line-height: 1;
}
.step-img {
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  aspect-ratio: 3/2;
}
.step-img img {
  width: 100%;
  height: 100%;
}
.step-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-body p {
  font-size: 0.9rem;
  color: rgba(255, 254, 249, 0.75);
  line-height: 1.65;
}

/* —— Trust grid —— */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 24px 18px;
  border-radius: 4px;
  text-align: center;
}
.trust-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.trust-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.trust-card p {
  font-size: 0.75rem;
  color: var(--muted);
}

/* —— About page —— */
.page-banner {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.page-banner img {
  width: 100%;
  height: 100%;
  object-position: center;
}
.page-banner__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 40px;
  background: linear-gradient(90deg, rgba(45, 74, 62, 0.92), transparent);
}
.page-banner h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--paper);
}
.page-banner .meta {
  color: rgba(255, 254, 249, 0.75);
  font-size: 0.875rem;
  margin-top: 6px;
}

.about-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 48px 0 64px;
  align-items: start;
}
.about-aside {
  position: sticky;
  top: 24px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 16px;
  border-radius: 4px;
  text-align: center;
}
.stat-box strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--forest);
}
.stat-box span {
  font-size: 0.7rem;
  color: var(--muted);
}
.about-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-nav a {
  font-size: 0.85rem;
  color: var(--forest);
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.about-nav a:hover {
  color: var(--terracotta);
}

.about-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--forest);
  margin: 28px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--terracotta);
}
.about-content h2:first-child {
  margin-top: 0;
}
.about-content p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.about-content a {
  color: var(--terracotta);
  text-decoration: underline;
}

/* —— Contact —— */
.page-intro {
  text-align: center;
  padding: 48px 0 32px;
}
.page-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.page-intro .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 64px;
}
.contact-info-card {
  background: var(--forest);
  color: var(--paper);
  padding: 28px 24px;
  border-radius: 4px;
  border: 2px solid var(--ink);
}
.contact-info-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.info-block {
  margin-bottom: 16px;
}
.info-block label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}
.info-block a {
  color: #f4c9a8;
}
.info-block a:hover {
  text-decoration: underline;
}
.contact-note {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 12px;
}

.contact-form {
  background: var(--paper);
  padding: 28px 24px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.contact-form h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--sand);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--forest);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 10px;
}
.form-note a {
  color: var(--terracotta);
}
.form-success {
  display: none;
  margin-top: 14px;
  padding: 12px;
  background: #e8f5e9;
  border: 2px solid #81c784;
  border-radius: 4px;
  color: #2e7d32;
  font-weight: 600;
  font-size: 0.875rem;
}
.form-success.is-show {
  display: block;
}

/* —— Legal —— */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 48px 0 64px;
  align-items: start;
}
.legal-aside {
  position: sticky;
  top: 24px;
  padding: 24px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.legal-aside h1 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}
.legal-aside .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.legal-content h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  margin: 28px 0 10px;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content p,
.legal-content li {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.legal-content ul,
.legal-content ol {
  margin: 0 0 14px 20px;
}
.legal-content a {
  color: var(--terracotta);
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  padding: 20px 24px;
  background: var(--ink);
  color: rgba(255, 254, 249, 0.55);
  font-size: 0.75rem;
}
.footer-inner {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.footer-inner a {
  color: #f4c9a8;
}

/* —— Cookie —— */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1100;
  max-width: 360px;
  padding: 16px 18px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.35s, transform 0.35s;
}
.cookie-banner.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.cookie-banner p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.cookie-link {
  color: var(--terracotta);
  font-weight: 600;
}
.cookie-banner .btn {
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 0.8rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .mobile-bar {
    display: flex;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stats li:nth-child(2) {
    border-right: none;
  }
  .hero-stats li {
    border-bottom: 1px solid var(--border);
  }
  .hero-stats li:nth-last-child(-n + 2) {
    border-bottom: none;
  }
  .step-item {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step-num {
    font-size: 1.75rem;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-page,
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .about-aside,
  .legal-aside {
    position: static;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
  }
  .cookie-banner {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
