/* MetaStacker Lab — static site styles (no external fonts or scripts) */
:root {
  --bg: #ffffff;
  --surface: #f4f7f7;
  --text: #14211f;
  --muted: #4f625f;
  --line: #d9e3e1;
  --accent: #0b6e6d;
  --accent-ink: #ffffff;
  --radius: 14px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1515;
    --surface: #152020;
    --text: #e6efed;
    --muted: #9db2ae;
    --line: #26393a;
    --accent: #3fb7b2;
    --accent-ink: #062424;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
:lang(ko) body, body:lang(ko) { word-break: keep-all; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand svg { width: 28px; height: 28px; flex: none; }
nav.main { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--muted); text-decoration: none; font-size: 15px; }
nav.main a:hover { color: var(--text); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--text) !important; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.2; margin: 0 0 16px; letter-spacing: -.5px; }
.hero p { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); max-width: 700px; margin: 0 0 28px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 11px 20px; border-radius: 999px; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); margin-left: 8px; }

/* Sections */
section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: clamp(24px, 3.2vw, 30px); margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 28px; max-width: 720px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card svg { width: 28px; height: 28px; color: var(--accent); }

/* Book */
.book { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
@media (max-width: 680px) { .book { grid-template-columns: 1fr; } .book img { max-width: 220px; } }
.book img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.book h3 { font-size: 22px; margin: 0 0 4px; }
.book .sub { color: var(--muted); margin: 0 0 14px; }
.book ul { padding-left: 20px; margin: 12px 0 16px; }
.book .meta { font-size: 14px; color: var(--muted); }
.tag { display: inline-block; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin: 0 6px 6px 0; color: var(--muted); }
.edition { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }
.contact dt { font-size: 14px; color: var(--muted); }
.contact dd { margin: 2px 0 16px; font-size: 17px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }

/* Phones: keep the header on one line (brand + language switch only) */
.brand { white-space: nowrap; }
@media (max-width: 560px) {
  nav.main a:not(.lang) { display: none; }
  .hero { padding: 48px 0 40px; }
  .btn.ghost { margin-left: 4px; }
}
