/* ==========================================================================
   eventhub.rand3.com — 디자인 시스템 (design tokens + components)
   ========================================================================== */

:root {
  /* Color — primary(1) + accent(1) + neutrals(3) */
  --navy-950: #0b1220;
  --navy-900: #101828;
  --navy-800: #1b2436;
  --navy-700: #2a3650;
  --gold-500: #c79a56;
  --gold-600: #b0813f;
  --gold-100: #f4e9d8;
  --paper: #ffffff;
  --paper-soft: #f6f5f2;
  --paper-line: #e7e4dd;
  --ink: #1f2430;
  --ink-soft: #5b6272;
  --ink-faint: #8890a0;

  /* Spacing — 8pt scale */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;
  --sp-7: 64px;
  --sp-8: 80px;
  --sp-9: 96px;
  --sp-10: 120px;
  --sp-11: 140px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadow (navy-tinted, soft) */
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.16);

  /* Layout */
  --container: 1200px;
  --article: 760px;

  /* Type */
  --font-serif: 'Noto Serif KR', serif;
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;

  --transition: 200ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--gold-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.eh-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}
@media (max-width: 640px) {
  .eh-container { padding: 0 var(--sp-2); }
}

.eh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.eh-eyebrow::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--gold-600);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--navy-900); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.25; font-weight: 700; }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.35; font-weight: 700; }
h3 { font-size: 22px; line-height: 1.4; font-weight: 600; }
p { margin: 0 0 var(--sp-2); color: var(--ink); }

.eh-lede { font-size: 19px; color: var(--ink-soft); line-height: 1.75; }

/* ---------- Header / Nav ---------- */
.eh-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--paper-line);
}
.eh-header__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.eh-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--navy-900); }
.eh-brand img { width: 36px; height: 36px; border-radius: 10px; }
.eh-nav { display: flex; align-items: center; gap: var(--sp-4); }
.eh-nav a { font-size: 15px; font-weight: 500; color: var(--ink-soft); transition: color var(--transition); padding: 8px 2px; }
.eh-nav a:hover, .eh-nav a.is-active { color: var(--navy-900); }
.eh-nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.eh-nav-toggle span, .eh-nav-toggle::before, .eh-nav-toggle::after { content: ''; display: block; width: 22px; height: 2px; background: var(--navy-900); position: relative; }
.eh-nav-toggle::before { transform: translateY(-6px); }
.eh-nav-toggle::after { transform: translateY(4px); }

@media (max-width: 860px) {
  .eh-nav { position: fixed; inset: 76px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; gap: 0; padding: var(--sp-3); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition); border-top: 1px solid var(--paper-line); }
  .eh-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .eh-nav a { width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--paper-line); font-size: 17px; }
  .eh-nav-toggle { display: flex; }
}

/* ---------- Buttons ---------- */
.eh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}
.eh-btn--primary { background: var(--navy-900); color: #fff; }
.eh-btn--primary:hover { background: var(--navy-800); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.eh-btn--gold { background: var(--gold-600); color: #fff; }
.eh-btn--gold:hover { background: var(--gold-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.eh-btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--paper-line); }
.eh-btn--ghost:hover { border-color: var(--navy-900); }

/* ---------- Hero ---------- */
.eh-hero { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: flex-end; }
.eh-hero__bg { position: absolute; inset: 0; }
.eh-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.eh-hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,18,32,0.20) 0%, rgba(11,18,32,0.55) 55%, rgba(11,18,32,0.92) 100%);
}
.eh-hero__content { position: relative; z-index: 2; color: #fff; padding: var(--sp-9) 0 var(--sp-8); width: 100%; }
.eh-hero .eh-eyebrow { color: var(--gold-500); }
.eh-hero h1 { color: #fff; max-width: 820px; }
.eh-hero__desc { color: rgba(255,255,255,0.82); font-size: 18px; max-width: 620px; margin: var(--sp-2) 0 var(--sp-4); }
.eh-hero__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
@media (max-width: 640px) {
  .eh-hero { min-height: 560px; }
  .eh-hero__content { padding: var(--sp-7) 0 var(--sp-6); }
}

/* ---------- Section rhythm ---------- */
.eh-section { padding: var(--sp-9) 0; }
.eh-section--soft { background: var(--paper-soft); }
.eh-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.eh-section__head p { max-width: 560px; color: var(--ink-soft); }
@media (max-width: 640px) { .eh-section { padding: var(--sp-7) 0; } }

/* ---------- Carousel ---------- */
.eh-carousel { display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-2); scrollbar-width: thin; }
.eh-carousel::-webkit-scrollbar { height: 6px; }
.eh-carousel::-webkit-scrollbar-thumb { background: var(--paper-line); border-radius: var(--radius-pill); }
.eh-carousel__item { flex: 0 0 auto; width: min(360px, 78vw); scroll-snap-align: start; }
.eh-card {
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition);
  height: 100%; display: flex; flex-direction: column;
}
.eh-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.eh-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-soft); }
.eh-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.eh-card:hover .eh-card__media img { transform: scale(1.04); }
.eh-card__tag { position: absolute; top: 14px; left: 14px; background: rgba(16,24,40,0.72); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); }
.eh-card__body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.eh-card__title { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--navy-900); line-height: 1.4; }
.eh-card__desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.eh-card__meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--ink-faint); display: flex; justify-content: space-between; }

/* ---------- Latest posts grid ---------- */
.eh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
@media (max-width: 980px) { .eh-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .eh-grid { grid-template-columns: 1fr; } }

/* ---------- Feature split section ---------- */
.eh-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: center; }
.eh-split__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; }
.eh-split__media img { width: 100%; height: 100%; object-fit: cover; }
.eh-split ul { margin: var(--sp-3) 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.eh-split li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); font-size: 15.5px; }
.eh-split li::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--gold-600); }
@media (max-width: 860px) { .eh-split { grid-template-columns: 1fr; } .eh-split__media { order: -1; } }
.eh-split.eh-split--rev .eh-split__media { order: 2; }
@media (max-width: 860px) { .eh-split.eh-split--rev .eh-split__media { order: -1; } }

/* ---------- Footer ---------- */
.eh-footer { background: var(--navy-950); color: rgba(255,255,255,0.72); padding: var(--sp-8) 0 var(--sp-4); margin-top: var(--sp-9); }
.eh-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-5); padding-bottom: var(--sp-6); border-bottom: 1px solid rgba(255,255,255,0.10); }
.eh-footer h4 { color: #fff; font-family: var(--font-sans); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--sp-2); }
.eh-footer .eh-brand { color: #fff; margin-bottom: 10px; }
.eh-footer p { color: rgba(255,255,255,0.6); font-size: 14px; }
.eh-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.eh-footer a { font-size: 14.5px; color: rgba(255,255,255,0.72); transition: color var(--transition); }
.eh-footer a:hover { color: var(--gold-500); }
.eh-footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-3); font-size: 13px; color: rgba(255,255,255,0.5); }
@media (max-width: 780px) { .eh-footer__top { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* ---------- Article (single/page) ---------- */
.eh-article-hero { position: relative; }
.eh-article-hero__media { aspect-ratio: 21/9; overflow: hidden; }
.eh-article-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.eh-article-head { max-width: var(--article); margin: 0 auto; padding: var(--sp-5) var(--sp-3) 0; }
.eh-article-head .eh-meta { display: flex; gap: var(--sp-2); align-items: center; color: var(--ink-faint); font-size: 14px; margin-bottom: var(--sp-2); }
.eh-article-head h1 { font-size: clamp(28px, 4vw, 40px); }
.eh-article-body { max-width: var(--article); margin: 0 auto; padding: var(--sp-4) var(--sp-3) var(--sp-8); font-size: 17px; line-height: 1.8; color: var(--ink); }
.eh-article-body h2 { margin-top: var(--sp-6); margin-bottom: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--paper-line); font-size: 26px; color: var(--navy-900); }
.eh-article-body h2:first-child { border-top: none; padding-top: 0; margin-top: var(--sp-2); }
.eh-article-body h3 { margin-top: var(--sp-4); margin-bottom: 8px; color: var(--gold-600); font-family: var(--font-sans); font-weight: 700; font-size: 18px; }
.eh-article-body p { margin-bottom: var(--sp-2); }
.eh-article-body ul, .eh-article-body ol { padding-left: 1.3em; margin-bottom: var(--sp-2); }
.eh-article-body li { margin-bottom: 6px; }
.eh-article-body img { border-radius: var(--radius-md); margin: var(--sp-3) 0; box-shadow: var(--shadow-sm); }
.eh-article-body figcaption { font-size: 13.5px; color: var(--ink-faint); text-align: center; margin-top: -10px; margin-bottom: var(--sp-3); }
.eh-article-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.eh-article-body th, .eh-article-body td { border: 1px solid var(--paper-line); padding: 10px 14px; text-align: left; font-size: 15px; }
.eh-article-body pre, .eh-article-body code { overflow-x: auto; max-width: 100%; background: var(--paper-soft); border-radius: var(--radius-sm); }
.eh-article-body blockquote { border-left: 3px solid var(--gold-600); margin: var(--sp-3) 0; padding: var(--sp-1) var(--sp-3); background: var(--paper-soft); color: var(--ink-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.eh-article-body a { color: var(--gold-600); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- TOC ---------- */
.eh-toc { max-width: var(--article); margin: var(--sp-4) auto 0; background: var(--paper-soft); border: 1px solid var(--paper-line); border-radius: var(--radius-lg); padding: var(--sp-3); }
.eh-toc__title { font-weight: 700; font-size: 15px; color: var(--navy-900); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.eh-toc ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.eh-toc a { font-size: 14.5px; color: var(--ink-soft); }
.eh-toc a:hover { color: var(--gold-600); }

/* ---------- Related posts ---------- */
.eh-related { max-width: var(--container); margin: 0 auto; padding: var(--sp-7) var(--sp-3) var(--sp-9); }
.eh-related h2 { margin-bottom: var(--sp-3); }

/* ---------- Simple page (privacy/terms) ---------- */
.eh-plain { max-width: var(--article); margin: 0 auto; padding: var(--sp-9) var(--sp-3) var(--sp-10); }
.eh-plain h1 { margin-bottom: var(--sp-4); }
.eh-plain h2 { margin-top: var(--sp-5); margin-bottom: var(--sp-2); font-size: 22px; }
.eh-plain p, .eh-plain li { color: var(--ink-soft); font-size: 16px; }

/* ---------- Archive / search / 404 ---------- */
.eh-page-head { padding: var(--sp-8) 0 var(--sp-5); background: var(--paper-soft); border-bottom: 1px solid var(--paper-line); }
.eh-archive-list { padding: var(--sp-7) 0 var(--sp-9); }
.eh-404 { text-align: center; padding: var(--sp-11) var(--sp-3); }
.eh-404 .eh-eyebrow { justify-content: center; }
.eh-404 .eh-eyebrow::before { display: none; }

/* Reveal-on-scroll (subtle) */
.eh-reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.eh-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .eh-reveal { opacity: 1; transform: none; } }
