/* === Tokens === */
:root {
  --color-primary: #7C3AED;
  --color-secondary: #A78BFA;
  --color-accent: #22C55E;
  --color-neutral-dark: #4C1D95;
  --color-neutral-light: #FAF5FF;
  --color-text: #1F1140;
  --color-muted: #6B5A8F;
  --font-heading: 'Nanum Myeongjo', serif;
  --font-body: 'Noto Sans KR', sans-serif;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 30px -18px rgba(76, 29, 149, 0.35);
  --shadow-hero: 0 30px 60px -30px rgba(76, 29, 149, 0.4);
  --maxw: 1120px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--color-text); background: var(--color-neutral-light); line-height: 1.65; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-neutral-dark); line-height: 1.25; margin: 0 0 .75rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
button { font-family: inherit; cursor: pointer; }

/* === Header === */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 245, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(76, 29, 149, 0.08); }
.site-header__inner { max-width: var(--maxw); margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; }
.logo img { height: 72px; width: auto; }
.nav-toggle { background: none; border: 0; padding: .5rem; display: inline-flex; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-neutral-dark); display: block; }
.primary-nav { display: none; }
.primary-nav a { color: var(--color-neutral-dark); padding: .5rem .25rem; font-weight: 500; }
.primary-nav a[aria-current="page"] { border-bottom: 2px solid var(--color-primary); }
.primary-nav.is-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-neutral-light); padding: 1rem 1.25rem; box-shadow: 0 12px 24px -18px rgba(76, 29, 149, 0.4); border-bottom: 1px solid rgba(76, 29, 149, 0.08); }

@media (min-width: 768px) {
  .logo img { height: 96px; }
  .nav-toggle { display: none; }
  .primary-nav { display: flex; gap: 1.75rem; align-items: center; }
  .primary-nav.is-open { position: static; flex-direction: row; padding: 0; box-shadow: none; background: transparent; border: 0; }
}

/* === Buttons === */
.btn { display: inline-block; padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: 0 12px 24px -14px rgba(124, 58, 237, 0.6); }
.btn--primary:hover { background: var(--color-neutral-dark); }
.btn--accent { background: var(--color-accent); color: #04250f; }
.btn--accent:hover { background: #16a34a; color: #fff; }

/* === Hero card === */
.hero { padding: 3rem 1.25rem 2rem; background: linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(250, 245, 255, 0)); }
.hero-card { max-width: 880px; margin: 0 auto; background: #fff; padding: 2.5rem 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-hero); text-align: center; }
.hero-card .eyebrow { color: var(--color-primary); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin: 0 0 .75rem; }
.hero-card h1 { max-width: 22ch; margin: 0 auto .75rem; }
.hero-card .hero-sub { max-width: 52ch; margin: 0 auto 1.75rem; color: var(--color-muted); font-size: 1.05rem; }
.hero-card__figure { margin: 2rem 0 0; border-radius: var(--radius); overflow: hidden; }
.hero-card__figure img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }

@media (min-width: 768px) {
  .hero { padding: 5rem 1.5rem 3rem; }
  .hero-card { padding: 4rem 3.5rem; }
}

/* === Sections === */
.section { padding: 3.5rem 1.25rem; max-width: var(--maxw); margin: 0 auto; }
.section--narrow { max-width: 720px; }
.section--narrow h2 { text-align: center; }
.section--narrow p { text-align: left; }
.section--tint { max-width: none; background: linear-gradient(180deg, rgba(167, 139, 250, 0.1), rgba(250, 245, 255, 0)); }
.section--tint > .section__head, .section--tint > .grid, .section--tint > form, .section--tint > p, .section--tint > h2 { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--tint.section--narrow { max-width: none; }
.section--tint.section--narrow > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 2rem; }
.section__sub { color: var(--color-muted); max-width: 60ch; margin: 0 auto; }

@media (min-width: 768px) {
  .section { padding: 5rem 1.5rem; }
}

/* === Grid & cards === */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--cards { grid-template-columns: repeat(3, 1fr); } }

.card { background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-card); border: 1px solid rgba(76, 29, 149, 0.06); display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--color-text); }
.card__icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; background: rgba(124, 58, 237, 0.1); color: var(--color-primary); border-radius: 12px; margin-bottom: .25rem; }
.card-link { color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 20px 40px -22px rgba(76, 29, 149, 0.4); }
.card-link h3 { color: var(--color-neutral-dark); }

/* === Blockquote === */
.section--quote { max-width: 780px; text-align: center; }
.section--quote blockquote { margin: 0; padding: 2rem 1rem; position: relative; }
.section--quote blockquote::before { content: '“'; font-family: var(--font-heading); font-size: 4rem; color: var(--color-secondary); line-height: 1; display: block; margin-bottom: -1rem; }
.section--quote blockquote p { font-family: var(--font-heading); font-size: 1.25rem; line-height: 1.6; color: var(--color-neutral-dark); }
.section--quote blockquote cite { display: block; margin-top: 1rem; color: var(--color-muted); font-style: normal; font-size: .95rem; }

/* === CTA band === */
.cta-band { background: linear-gradient(135deg, var(--color-primary), var(--color-neutral-dark)); color: #fff; padding: 3.5rem 1.25rem; }
.cta-band__inner { max-width: 780px; margin: 0 auto; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin-bottom: 1.75rem; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* === Article detail === */
.article { max-width: 65ch; margin: 0 auto; padding: 3rem 1.25rem; }
.article__head .eyebrow { color: var(--color-primary); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 600; margin: 0 0 .5rem; }
.article__head h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin-bottom: 1rem; }
.article__sub { font-size: 1.2rem; color: var(--color-muted); margin-bottom: 1.5rem; }
.article__hero { margin: 2rem 0; border-radius: var(--radius); overflow: hidden; }
.article__hero img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.article p { font-size: 1.075rem; line-height: 1.8; margin-block: 1.25rem; }
.article__back { margin-top: 3rem; }
.back-link { display: inline-block; padding: .6rem 1rem; border: 1px solid rgba(76, 29, 149, 0.2); border-radius: 999px; color: var(--color-neutral-dark); font-weight: 500; }
.back-link:hover { background: rgba(124, 58, 237, 0.08); text-decoration: none; }

/* === Contact form === */
.contact-form { display: grid; gap: 1.1rem; max-width: 620px; margin: 0 auto; }
.form-row { display: grid; gap: .35rem; }
.form-row label { font-weight: 500; color: var(--color-neutral-dark); }
.form-row input, .form-row textarea { font: inherit; padding: .75rem .9rem; border: 1px solid rgba(76, 29, 149, 0.2); border-radius: 10px; background: #fff; color: var(--color-text); }
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: transparent; }
.form-consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--color-muted); flex-wrap: wrap; }
.form-consent input { margin-top: .25rem; }
.form-consent a { color: var(--color-primary); text-decoration: underline; }
.contact-form .btn { justify-self: start; }

/* === Footer === */
.site-footer { background: var(--color-neutral-dark); color: rgba(255,255,255,0.85); padding: 3rem 1.25rem 1.5rem; margin-top: 3rem; }
.site-footer__cols { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1fr; }
.site-footer h4 { color: #fff; font-family: var(--font-heading); font-size: 1rem; margin: 0 0 .75rem; }
.site-footer a { color: rgba(255,255,255,0.85); display: block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.logo--footer img { height: 64px; margin-bottom: .75rem; filter: brightness(0) invert(1); }
.footer-tag { font-size: .95rem; color: rgba(255,255,255,0.7); max-width: 32ch; }
.site-footer address { font-style: normal; line-height: 1.7; margin-bottom: 1rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin-top: .5rem; }
.footer-legal a { display: inline; padding: 0; font-size: .9rem; }
.copyright { max-width: var(--maxw); margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.15); font-size: .85rem; color: rgba(255,255,255,0.65); }

@media (min-width: 768px) {
  .site-footer__cols { grid-template-columns: 1.2fr 1fr 1.4fr; gap: 3rem; }
}

/* === Cookie banner === */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; display: none; z-index: 9999; background: var(--color-neutral-dark); color: var(--color-neutral-light); padding: 1.25rem 1.5rem; border-radius: var(--radius); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5); max-width: 640px; }
.cookie-banner.is-visible { display: block; }
.cookie-banner p { margin: 0 0 1rem; font-size: .95rem; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cookie-banner__actions button { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: var(--color-neutral-light); font-size: .9rem; font-weight: 500; }
.cookie-banner__actions button[data-cookie-accept] { background: var(--color-accent); border-color: var(--color-accent); color: #04250f; }
.cookie-banner__prefs { margin-top: 1rem; display: grid; gap: .5rem; }
.cookie-banner__prefs label { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.cookie-banner__prefs button { justify-self: start; padding: .5rem 1rem; border-radius: 999px; border: 0; background: var(--color-neutral-light); color: var(--color-neutral-dark); font-weight: 600; margin-top: .5rem; }

@media (min-width: 640px) {
  .cookie-banner { left: auto; right: 1.5rem; bottom: 1.5rem; }
}
