/* 대한살림연구소 — layout: burgundy first screen with Korean headline, then a light
   single column; company facts (사업자 정보) shown as a plain table in 문의. */
:root {
  /* color */
  --paper: #f5f3f2;        /* page ground, faint red-biased neutral */
  --paper-2: #ebe7e6;      /* quiet band */
  --ink: #151113;
  --ink-2: #5a5154;        /* secondary text */
  --line: #d9d3d2;
  --wine: #7a1426;         /* CELLMEDI burgundy accent */
  --wine-deep: #2a0910;    /* hero / footer ground */
  --on-dark: #f6efef;
  --on-dark-2: rgba(246, 239, 239, .72);

  /* type */
  --f-display: "Archivo", "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --f-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;

  /* scale */
  --t-sm: .875rem;   /* 14px: smallest Korean text */
  --t-md: 1.0625rem; /* 17px body */
  --t-lg: clamp(1.1875rem, 1.05rem + .6vw, 1.5rem);
  --t-xl: clamp(1.625rem, 1.2rem + 1.9vw, 2.75rem);
  --t-2xl: clamp(2rem, 1.2rem + 3.2vw, 4rem);
  --t-hero: clamp(2.25rem, 1.1rem + 4.6vw, 5.5rem);

  --gutter: clamp(20px, 4vw, 56px);
  --sec-pad: clamp(88px, 11vw, 160px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.75;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--on-dark);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-solid {
  background: rgba(245, 243, 242, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: 1.125rem; letter-spacing: -.01em; }
.logo-dot { color: #d8344d; }
.is-solid .logo-dot { color: var(--wine); }
.logo-ko { font-size: var(--t-sm); font-weight: 600; opacity: .85; padding-left: 12px; border-left: 1px solid currentColor; line-height: 1; }
.nav ul { display: flex; gap: clamp(24px, 3vw, 44px); }
.nav a { font-size: .9375rem; font-weight: 600; text-decoration: none; position: relative; padding-block: 6px; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); }

.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: inherit; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--wine-deep); color: var(--on-dark);
  padding-top: calc(88px + env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-y: auto;
}
.mobile-menu li { border-bottom: 1px solid rgba(246, 239, 239, .14); }
.mobile-menu li a { display: block; padding-block: 18px; text-decoration: none; font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; }
.mm-contact { margin-top: 32px; font-size: 1rem; line-height: 2; color: var(--on-dark-2); }
.mm-contact a { text-decoration: none; }
body.menu-open .site-header { background: transparent; color: var(--on-dark); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.menu-open .logo-dot { color: #d8344d; }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 860px);
  display: flex; align-items: flex-end;
  color: var(--on-dark);
  background:
    radial-gradient(120% 90% at 85% 15%, #5a1320 0%, rgba(90, 19, 32, 0) 60%),
    radial-gradient(90% 80% at 10% 100%, #1a0609 0%, rgba(26, 6, 9, 0) 70%),
    var(--wine-deep);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-grain {
  position: absolute; inset: -50%; z-index: -1; opacity: .14; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.hero-inner {
  display: grid; justify-items: start; gap: 24px;
  padding-top: calc(140px + env(safe-area-inset-top, 0px));
  padding-bottom: clamp(56px, 8vw, 112px);
}
.hero-kicker { font-size: 1rem; font-weight: 600; color: #e7c3c8; }
.hero-title {
  font-size: var(--t-hero); font-weight: 700; line-height: 1.2; letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-sub { max-width: 38em; font-size: 1.125rem; color: var(--on-dark-2); line-height: 1.7; }
.btn-hero {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px 16px 28px;
  background: #fff; color: var(--ink); text-decoration: none;
  font-size: 1rem; font-weight: 700;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.btn-hero svg { width: 20px; height: 20px; transition: transform .35s var(--ease); }
.btn-hero:hover { background: #f1dfe2; }
.btn-hero:hover svg { transform: translateY(3px); }

/* ---------- sections ---------- */
.section { padding-block: var(--sec-pad); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { font-size: .9375rem; font-weight: 700; color: var(--wine); margin-bottom: clamp(20px, 2.4vw, 32px); }
.sec-title { font-size: var(--t-xl); font-weight: 700; line-height: 1.32; letter-spacing: -.035em; text-wrap: balance; max-width: 20em; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px clamp(48px, 7vw, 120px); align-items: end; }
.about-statement { font-size: var(--t-2xl); font-weight: 700; line-height: 1.22; letter-spacing: -.045em; }
.about-body { margin-top: clamp(32px, 4vw, 48px); max-width: 34rem; color: var(--ink-2); display: grid; gap: 14px; }
.history { border-top: 2px solid var(--ink); }
.history-title { font-size: 1rem; font-weight: 700; padding-block: 18px 6px; }
.history-list li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.h-date { font-family: var(--f-display); font-weight: 600; font-size: 1rem; color: var(--wine); font-variant-numeric: tabular-nums; }
.h-text { font-weight: 600; display: grid; }
.h-text small { font-size: var(--t-sm); font-weight: 400; color: var(--ink-2); }

/* business */
.business { background: var(--paper-2); }
.biz-list { margin-top: clamp(48px, 6vw, 80px); border-top: 2px solid var(--ink); }
.biz {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px 40px; align-items: start;
  padding-block: clamp(28px, 3.4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.biz-no { font-family: var(--f-display); font-weight: 600; font-size: 1.125rem; color: var(--wine); padding-top: .3em; font-variant-numeric: tabular-nums; }
.biz-name h3 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.15; }
.biz-who { margin-top: 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.biz-desc { color: var(--ink-2); max-width: 34em; display: grid; gap: 14px; justify-items: start; }
.biz-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.biz-tags li { font-size: var(--t-sm); font-weight: 600; color: var(--ink); border: 1px solid var(--ink); padding: 4px 12px; }

/* brand */
.brand-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.brand-visual { background: #8e1d27; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden; }
.brand-visual img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: var(--t-2xl); font-weight: 700; letter-spacing: -.045em; line-height: 1.1; }
.brand-name span { display: block; margin-top: 10px; font-family: var(--f-display); font-stretch: 112%; font-weight: 600; font-size: 1rem; letter-spacing: .08em; color: var(--wine); }
.brand-lead { color: var(--ink-2); margin-top: 18px; font-size: 1.125rem; }
.product { margin-top: clamp(32px, 4vw, 48px); padding-top: 24px; border-top: 2px solid var(--ink); }
.product-name { font-size: var(--t-lg); font-weight: 700; letter-spacing: -.02em; }
.product-name span { font-family: var(--f-display); font-stretch: 110%; font-weight: 500; color: var(--ink-2); margin-left: 6px; font-size: .8em; }
.product-desc { color: var(--ink-2); margin-top: 6px; }
.facts { margin-top: 20px; }
.facts div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); font-size: var(--t-sm); padding-top: 2px; }
.facts dd { font-weight: 600; }
.btn-dark {
  margin-top: 32px; display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 22px 16px 26px; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1rem;
  transition: background-color .3s var(--ease);
}
.btn-dark svg { width: 20px; height: 20px; }
.btn-dark:hover { background: var(--wine); }

/* contact */
.contact-grid { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px clamp(40px, 6vw, 96px); align-items: start; }
.contact-ways { display: grid; gap: 40px; min-width: 0; }
.direct { display: grid; gap: 4px; }
.direct-item { display: grid; gap: 2px; text-decoration: none; padding-block: 6px; }
.d-label { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.d-value { font-family: var(--f-display); font-stretch: 105%; font-weight: 600; font-size: clamp(1.375rem, 1rem + 1.4vw, 2rem); letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
.direct-item:hover .d-value { color: var(--wine); }
.contact-list { border-top: 2px solid var(--ink); }
.contact-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 24px;
  padding-block: 20px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: color .3s var(--ease);
}
.c-title { font-size: 1.125rem; font-weight: 700; }
.c-desc { grid-column: 1; color: var(--ink-2); font-size: var(--t-sm); }
.c-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 1.375rem; transition: transform .35s var(--ease); }
.contact-list a:hover { color: var(--wine); }
.contact-list a:hover .c-arrow { transform: translateX(5px); }

.company { background: #fff; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); min-width: 0; }
.company-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 12px; }
.company-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.company-table th, .company-table td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); }
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: 0; }
.company-table th { width: 8.5em; padding-right: 16px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.company-table td { font-weight: 600; }
.company-table td a { text-decoration: none; }
.company-table td a:hover { color: var(--wine); }
.t-link { display: inline-block; margin-left: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--wine); border-bottom: 1px solid currentColor; line-height: 1.3; }

/* ---------- footer ---------- */
.site-footer { background: var(--wine-deep); color: var(--on-dark); padding-top: clamp(56px, 7vw, 96px); padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 40px 64px; }
.f-logo { font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); letter-spacing: -.02em; line-height: 1; }
.f-logo span { color: #d8344d; }
.f-ko { margin-top: 10px; color: var(--on-dark-2); font-size: .9375rem; }
.f-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px; font-size: .9375rem; }
.f-info div { display: grid; gap: 2px; min-width: 0; }
.f-info .f-wide { grid-column: span 2; }
.f-info dt { font-size: var(--t-sm); color: var(--on-dark-2); }
.f-info dd { color: var(--on-dark); }
.f-info a { text-decoration: none; border-bottom: 1px solid rgba(246, 239, 239, .4); }
.f-info dd a[target] { margin-left: 6px; font-size: var(--t-sm); color: var(--on-dark-2); }
.f-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid rgba(246, 239, 239, .16); font-size: var(--t-sm); color: var(--on-dark-2); }
.f-links { display: flex; gap: 20px; flex-wrap: wrap; }
.f-links a { text-decoration: none; }
.f-links strong { color: var(--on-dark); font-weight: 700; }
.f-links a:hover { color: var(--on-dark); }

/* ---------- reveal (only for items below the fold at load) ---------- */
.reveal.is-pending { opacity: 0; transform: translateY(24px); }
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-pending { opacity: 1; transform: none; transition: none; }
}

/* ---------- privacy page ---------- */
.doc-header { background: var(--wine-deep); color: var(--on-dark); }
.doc-header .header-inner { height: 72px; }
.doc-back { font-size: .9375rem; font-weight: 600; text-decoration: none; }
.doc { padding-block: clamp(56px, 8vw, 104px); }
.doc-inner { max-width: 760px; }
.doc h1 { font-size: var(--t-xl); font-weight: 700; letter-spacing: -.035em; }
.doc .doc-date { margin-top: 10px; color: var(--ink-2); font-size: .9375rem; }
.doc h2 { font-size: 1.1875rem; font-weight: 700; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc p, .doc li { color: var(--ink-2); margin-top: 10px; }
.doc ul { list-style: disc; padding-left: 1.25em; }
.doc table { margin-top: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .biz { grid-template-columns: 56px minmax(0, 1fr); }
  .biz-desc { grid-column: 2; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .header-inner { height: 64px; }
  .about-grid { grid-template-columns: 1fr; }
  .brand-card { grid-template-columns: 1fr; }
  .brand-visual { max-width: 560px; }
  .f-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .logo-ko { display: none; }
  .hero { min-height: 0; }
  .hero-inner { padding-top: calc(112px + env(safe-area-inset-top, 0px)); padding-bottom: 56px; gap: 18px; }
  .hero-title { font-size: clamp(2rem, 9vw, 2.5rem); }
  .hero-sub { font-size: 1rem; }
  .btn-hero { margin-top: 8px; }
  .about-statement { font-size: clamp(2rem, 9vw, 2.5rem); }
  .biz { grid-template-columns: 1fr; gap: 10px; }
  .biz-desc { grid-column: 1; }
  .company { padding: 20px 18px; }
  .company-table th, .company-table td { display: block; width: auto; padding: 0; border: 0; }
  .company-table th { padding-top: 14px; font-size: var(--t-sm); }
  .company-table td { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .company-table tr:last-child td { border-bottom: 0; }
  .f-info { grid-template-columns: 1fr; }
  .f-info .f-wide { grid-column: auto; }
  .btn-dark { width: 100%; justify-content: space-between; }
}
