/* v2 — magazine development, after the POPOPO Magazine site.
   Layout: the site opens like an issue — italic "Section" folios, large serif openers,
   lavender paper with plum as the one accent. Body stays in Pretendard for reading. */
:root {
  --canvas: #f7f4fb;        /* lavender-tinted paper */
  --paper: #ffffff;         /* sheet */
  --ink: #1f1828;           /* purple-biased near-black */
  --muted: #665c73;
  --line: #e7e1ef;
  --line-strong: #d4cbe2;
  --lilac: #cec1e6;         /* POPOPO light purple */
  --lilac-soft: #e3daf1;
  --lilac-wash: #efeaf7;
  --lilac-ink: #654c84;     /* plum, for text and accents */
  --plum: #654c84;
  --plum-deep: #4e3a68;
  --night: #1d1626;         /* dark band */
  --night-ink: #efe9f6;
  --night-sub: #b9aecb;

  --font-display: "Gloock", "Noto Serif KR", Georgia, serif;
  --font-serif: "Noto Serif KR", "Gloock", Georgia, serif;
  --font-italic: "Cormorant Garamond", Georgia, serif;
  --page: 1240px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}
body { letter-spacing: -.01em; line-height: 1.75; }

/* Type */
h1, h2 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; text-wrap: balance; }
h3 { text-wrap: balance; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.015em; line-height: 1.05; }
.sec { font-family: var(--font-italic); font-style: italic; font-weight: 500; font-size: 20px; color: var(--lilac-ink); margin: 0; letter-spacing: 0; }
.eyebrow { letter-spacing: .18em; color: var(--lilac-ink); }
.lede { color: var(--muted); }
.quote { font-family: var(--font-serif); font-style: normal; font-weight: 400; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.6; border-left-color: var(--plum); }

/* Header */
.site-header { background: rgba(247, 244, 251, .88); }
.brand-mark { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--plum); }
.nav a { font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 12px; }
.nav a:hover { color: var(--ink); background: var(--lilac-wash); }
.nav a[aria-current="page"] { background: transparent; color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--plum); border-radius: 0; }
.nav a.ext { background: var(--plum); color: #fff; margin-left: 6px; padding-inline: 16px; }
.nav a.ext:hover { background: var(--ink); }
.nav .ext::after { color: #fff; }
.nav a.ip { color: var(--plum); font-weight: 700; }
.lang button[aria-pressed="true"] { background: var(--plum); color: #fff; }

/* Buttons */
.btn { background: var(--plum); border-color: var(--plum); color: #fff; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.btn:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.btn.ghost { background: var(--paper); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn.lilac { background: var(--lilac); border-color: var(--lilac); color: var(--ink); }
.btn.lilac:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.link { color: var(--plum); }

/* Section opener (magazine convention) */
.opener { display: grid; gap: 14px 48px; align-items: end; margin-bottom: clamp(28px, 4vw, 52px); }
@media (min-width: 900px) { .opener { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.opener h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 5.2vw, 64px); line-height: 1.05; letter-spacing: -.015em; margin-top: 6px; }
.opener .side { display: grid; gap: 10px; justify-items: start; color: var(--muted); max-width: 34em; }
@media (min-width: 900px) { .opener .side { justify-self: end; } }
.opener .side p { margin: 0; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { padding-top: 0; }
.section.band, .section.lilac-band { padding-top: clamp(64px, 9vw, 120px); }
.section.lilac-band { background: var(--lilac-wash); }
.section.night { background: var(--night); color: var(--night-ink); padding-top: clamp(64px, 9vw, 120px);
  --line: rgba(255, 255, 255, .14); --muted: var(--night-sub); --lilac-ink: #cec1e6; --paper: #272031; --ink: var(--night-ink); }
.section.night + .section { padding-top: clamp(64px, 9vw, 120px); }

/* Page heads */
.page-head { border-bottom: 1px solid var(--line); }
.page-head .display { font-size: clamp(48px, 9vw, 104px); }
.page-head .sec { margin-bottom: 4px; }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 88px); }
.hero .display-en { font-family: var(--font-italic); font-size: clamp(22px, 2.4vw, 30px); color: var(--plum); }
.hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 5.2vw, 60px); line-height: 1.22; letter-spacing: -.04em; }
.hero h1 em { background: linear-gradient(transparent 64%, var(--lilac) 64%); }
.feature { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(40, 22, 70, .45); }
.feature .title { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.feature .tag { color: var(--plum); }

/* Cards & covers */
.cover-img { border-radius: 3px; box-shadow: 0 18px 34px -22px rgba(40, 22, 70, .6); }
a:hover > .cover-img { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 28px 44px -22px rgba(40, 22, 70, .7); }
.shelf .caption b { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 18px; letter-spacing: -.03em; }
.card .kind, .row .k { color: var(--plum); letter-spacing: .14em; }
.row .t { font-weight: 600; }
.rows { border-top-color: var(--ink); }
.editor-card { border-radius: 20px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease); }
.editor-card:hover { border-color: var(--plum); box-shadow: 0 22px 40px -28px rgba(40, 22, 70, .55); }
.editor-card .name { font-family: var(--font-serif); font-weight: 600; font-size: 19px; }
.editor-card .role { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--plum); }
.editor-card .bio { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.avatar { background: var(--lilac-soft); color: var(--plum); font-family: var(--font-serif); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stat b { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.4vw, 52px); }
.stats { border-radius: 20px; }
.subscribe { background: var(--plum); border-radius: 28px; position: relative; overflow: hidden; }
.subscribe .display { font-family: var(--font-display); }
.subscribe p { color: #e4dbf3; }
.subscribe .btn { background: #fff; border-color: #fff; color: var(--plum-deep); }
.subscribe .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.subscribe .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.site-footer .brand-mark { color: var(--plum); }
.session .date { font-family: var(--font-display); font-weight: 400; }
.session .what { font-family: var(--font-italic); font-weight: 500; font-size: 21px; }
.badge.live::before { background: var(--plum); }

/* Article (editor post) */
.article .body { font-family: var(--font-serif); font-size: 18px; line-height: 2; letter-spacing: -.02em; }
.article .body p { margin: 0 0 1.4em; }
.article h1 { font-family: var(--font-serif); font-weight: 600; }
.article .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 0; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--lilac-wash); color: var(--plum); }
.author-box { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; margin: 40px 0 0; padding: 20px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.author-box .avatar { width: 72px; height: 72px; }
.author-box p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* Editor room */
.room-head .avatar.lg { width: 120px; height: 120px; font-size: 40px; }
.room-bio { font-family: var(--font-serif); font-size: 16px; line-height: 1.8; margin: 18px 0 0; white-space: pre-line; }

/* Innate Potential hub */
.ip-hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); background: radial-gradient(120% 90% at 85% 0%, var(--lilac-soft) 0%, transparent 60%), var(--canvas); border-bottom: 1px solid var(--line); }
.ip-hero .display { font-size: clamp(52px, 11vw, 136px); color: var(--plum); line-height: .95; }
.ip-hero .slogan { font-family: var(--font-serif); font-size: clamp(24px, 3.4vw, 40px); font-weight: 500; margin: 18px 0 8px; letter-spacing: -.04em; }
.ip-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .ip-grid { grid-template-columns: 1.3fr .7fr; } }
.ip-fridge { max-width: 300px; justify-self: center; }
.path { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 900px) { .path { grid-template-columns: repeat(5, 1fr); } }
.path > div { background: var(--paper); padding: 22px; display: grid; gap: 6px; align-content: start; }
.path .step-n { font-family: var(--font-italic); font-style: italic; font-size: 18px; color: var(--plum); }
.path h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0; }
.path p { margin: 0; font-size: 14px; color: var(--muted); }
.path .now { background: var(--lilac-wash); }
.backs { display: grid; gap: 16px; }
@media (min-width: 900px) { .backs { grid-template-columns: repeat(3, 1fr); } }
.backs > div { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.backs h3 { font-family: var(--font-serif); font-weight: 600; }
.levels-row { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 900px) { .levels-row { grid-template-columns: repeat(3, 1fr); } }
.levels-row > div { border-top: 2px solid var(--ink); padding-top: 10px; font-size: 14px; }
.levels-row b { font-family: var(--font-display); font-weight: 400; font-size: 26px; display: block; }
.lab-cta { display: grid; gap: 20px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--night); color: var(--night-ink); }
@media (min-width: 900px) { .lab-cta { grid-template-columns: 1.4fr .6fr; } }
.lab-cta .display { font-size: clamp(36px, 5vw, 60px); color: #fff; }
.lab-cta p { color: var(--night-sub); margin: 12px 0 0; }
.lab-cta .btn { background: var(--lilac); border-color: var(--lilac); color: var(--ink); justify-self: start; }
.lab-cta .btn:hover { background: #fff; border-color: #fff; }

/* Timeline on the dark band */
.night .timeline { border-left-color: rgba(255, 255, 255, .25); }
.night .timeline li::before { background: var(--night); border-color: #cec1e6; }
.night .timeline .y { color: #fff; }
.night .timeline li { color: var(--night-sub); }

/* Lab tokens follow the new paper */
:root { --fridge-shell: #ffffff; --prompt-bg: #1f1828; }
.lab-hero .display { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.04em; }
.recipe .display { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.04em; }
.role { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--plum); }
.split .opener { grid-template-columns: 1fr; }
.split .opener h2 { font-size: clamp(28px, 3.6vw, 42px); }
.author-box { transition: border-color .3s; }
.author-box:hover { border-color: var(--plum); }
.ip-fridge svg { width: 100%; height: auto; }
.output .n { font-family: var(--font-italic); font-style: italic; font-size: 18px; color: var(--plum); }
.output h3 { font-family: var(--font-serif); font-weight: 600; }
.backs > div { padding: 18px 20px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 54px); }
.feature .badge { white-space: nowrap; }
.feature .cta { gap: 10px 16px; }
.feature .cta .btn-row { flex: 1 1 auto; justify-content: flex-end; }
.feature .badge { flex-shrink: 0; padding: 5px 12px; }

/* Google sign-in */
.auth { display: flex; align-items: center; }
.auth-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper);
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.auth-btn:hover { background: var(--lilac-wash); }
.g-logo { width: 16px; height: 16px; flex: none; }
.auth-menu { position: relative; }
.auth-menu summary { list-style: none; cursor: pointer; border-radius: 999px; display: grid; place-items: center; width: 36px; height: 36px; }
.auth-menu summary::-webkit-details-marker { display: none; }
.auth-menu summary:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.auth-menu img, .auth-menu .initial { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; border: 1px solid var(--line-strong); }
.auth-menu .initial { display: grid; place-items: center; background: var(--lilac-soft); color: var(--plum-deep); font-weight: 700; font-size: 14px; }
.auth-menu .pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(260px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  box-shadow: 0 12px 32px rgba(31, 24, 40, .12);
}
.auth-menu .pop p { margin: 0; overflow-wrap: anywhere; }
.auth-menu .pop .nm { font-weight: 700; }
.auth-menu .pop .em { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.auth-menu .pop .btn { width: 100%; justify-content: center; }
.apply-auth { display: grid; gap: 8px; justify-items: start; margin-bottom: 8px; }
.apply-auth:empty { display: none; }
.g-btn { display: inline-flex; align-items: center; gap: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--night); color: var(--night-ink); font-size: 14px;
}
@media (max-width: 600px) { .auth-menu .pop { position: fixed; top: 68px; left: 16px; right: 16px; width: auto; } }
@media (max-width: 480px) { .auth-btn span { display: none; } .auth-btn { padding: 6px 9px; } }
