/* LUNASOFT — global stylesheet
   Plain CSS. No framework, no web fonts, no external requests. */

:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #14161a;
  --muted: #5b6270;
  --border: #e2e6ee;
  --btn-border: #8a8a8a;
  --accent: #3554d1;
  --accent-strong: #2843b5;
  --on-accent: #ffffff;
  --radius: 10px;
  --container: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017;
    --surface: #141922;
    --text: #e9ecf2;
    --muted: #9aa4b4;
    --border: #242c39;
    --btn-border: #6b7280;
    --accent: #8ea6ff;
    --accent-strong: #a9bcff;
    --on-accent: #0d1017;
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* Author-origin `display` on a class would otherwise beat the UA [hidden] rule. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 0.6em; font-weight: 650; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
.prose ul { margin: 0 0 1.1em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.45em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--bg); }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand svg { display: block; }

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 9vw, 108px);
  border-bottom: 1px solid var(--border);
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero h1 { margin-bottom: 0.35em; }
.hero .tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 1em;
}
.hero .lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 2em;
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-secondary { border-color: var(--btn-border); color: var(--text); background: var(--bg); }
.btn-secondary:hover { border-color: var(--muted); color: var(--text); }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 96px) 0; border-bottom: 1px solid var(--border); }
.section-alt { background: var(--surface); }
.section > .container > p:last-child,
.section > .container > .prose > p:last-child { margin-bottom: 0; }

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.prose { max-width: 68ch; }
.prose p, .prose li { color: var(--muted); }
.prose h2, .prose h3 { color: var(--text); }
.prose h3 { margin-top: 2em; }

/* ---------- Apps ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
}
.app-card h3 { margin-bottom: 0.4em; }
.app-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

.apps-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-top: 32px;
  color: var(--muted);
  text-align: center;
  font-size: 0.98rem;
}
.apps-empty p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.contact-key {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 88px;
}
.contact-list a { font-size: 1.05rem; font-weight: 500; word-break: break-all; }

/* ---------- Page header (subpages) ---------- */

.page-header {
  padding: clamp(56px, 9vw, 88px) 0 clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.page-header h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); margin-bottom: 0.3em; }
.page-header p { color: var(--muted); margin-bottom: 0; max-width: 60ch; }
.page-body { padding: clamp(48px, 8vw, 80px) 0; }
.updated { font-size: 0.9rem; color: var(--muted); margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--border); }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0; background: var(--bg); }
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Error page ---------- */

.error-page { padding: clamp(88px, 16vw, 176px) 0; text-align: center; }
.error-page .code {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--accent);
  margin: 0 0 0.1em;
  line-height: 1;
}
.error-page p { color: var(--muted); max-width: 42ch; margin-inline: auto; }
.error-page .actions { justify-content: center; margin-top: 8px; }

@media (max-width: 600px) {
  html { scroll-padding-top: 7.5rem; }
  body { font-size: 16px; }
  .site-header .container { min-height: 56px; padding-block: 10px; }
  .site-nav ul { gap: 20px; }
}
