/* Tokens: same names as homepage/design/homepage.pen variables. */
:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #14130f;
  --ink-2: #3a4150;
  --muted: #5f6573;
  --line: #d5dae3;
  --blue: #2563eb;
  --blue-tint: #e8effe;
  --mint: #14b8a6;
  --amber: #ffb224;
  --amber-text: #b45309;

  --font-display: "Space Grotesk", "Noto Sans KR", sans-serif;
  --font-body: "Noto Sans KR", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4.5vw, 64px);
  --max: 1440px;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --footer: #14130f;
  --bezel: #ffffff;
  --hl: #ffe39b;
  --route: #ffffff;
  --blue-fill: #2563eb;
  color-scheme: light;
}
/* Dark: follows the OS setting (no JS on this site). Blue brightens for text; buttons keep the brand fill. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0f1115;
    --surface: #171a21;
    --ink: #eef0f4;
    --ink-2: #c3c8d3;
    --muted: #8b92a1;
    --line: #2a2f3a;
    --blue: #7aa2ff;
    --blue-tint: #172036;
    --mint: #2dd4bf;
    --amber-text: #fbbf24;
    --footer: #0a0b0e;
    --bezel: #262b35;
    --hl: #6b5417;
    --route: rgba(255, 255, 255, 0.14);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted); }
.kicker { font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: 0.1em; color: var(--blue); }
.lead { font-size: clamp(16px, 1.2vw + 10px, 19px); line-height: 1.75; color: var(--ink-2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* Brand mark: two stops on a line. */
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.mark { position: relative; width: 22px; height: 22px; flex: none; }
.mark::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 8px 0 0 -3px var(--blue); }
.mark::after { content: ""; position: absolute; right: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); border: 2px solid var(--blue); }
.footer .mark::after { background: var(--footer); border-color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--radius); font-weight: 600; font-size: 16px; transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { box-shadow: 0 10px 24px rgba(20, 19, 15, 0.18); }
.btn-blue { background: var(--blue-fill); color: #fff; }
.btn-blue:hover { box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28); }
.btn-line { border: 1.5px solid var(--ink); }
.btn-line:hover { background: var(--surface); }
/* Official Apple badge, self-hosted; keep it at least 40px tall. */
.appstore-badge { display: inline-flex; justify-content: center; border-radius: 10px; transition: transform 0.2s var(--ease), opacity 0.2s; }
.appstore-badge img { display: block; height: 52px; width: auto; }
.appstore-badge:hover { transform: translateY(-1px); opacity: 0.88; }
.appstore-badge:active { transform: none; opacity: 1; }
.appstore-badge:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--blue); font-weight: 600; }
.text-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* Studio bar on app pages */
.studio-bar { background: var(--footer); color: #fff; }
.studio-bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.studio-bar a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; }
.studio-bar a svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.studio-bar a:hover svg { transform: translateX(-3px); }
.studio-bar .mono { color: rgba(255, 255, 255, 0.7); font-size: 12px; font-weight: 400; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); background: var(--paper); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 500; color: var(--ink-2); border-radius: 10px; transition: background-color 0.2s; }
.nav-links .en { font-family: var(--font-display); }
.nav-links a:not(.btn):hover { background: var(--blue-tint); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-links .btn { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 999px; margin-left: 12px; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 20px; height: 20px; }
.menu ul { position: absolute; right: 0; top: 52px; z-index: 5; min-width: 200px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 19, 15, 0.12); }
.menu li a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; }
.menu li a:hover { background: var(--blue-tint); }

/* Footer */
.footer { background: var(--footer); color: rgba(255, 255, 255, 0.9); }
.footer .wrap { padding-top: 36px; padding-bottom: 28px; }
.footer .brand { color: #fff; font-size: 18px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px 40px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-links .en { font-family: var(--font-display); }
.footer-links svg { width: 15px; height: 15px; color: var(--blue); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .copy { font-family: var(--font-mono); }
.nw { white-space: nowrap; }

/* Phone screenshot */
.phone { border-radius: 34px; border: 6px solid var(--bezel); background: var(--bezel); box-shadow: 0 32px 64px rgba(30, 58, 138, 0.22); overflow: hidden; }
.phone img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .nav .wrap { min-height: 60px; }
  .nav-links.collapsible { display: none; }
  .menu { display: block; }
  .footer .wrap { padding-top: 28px; padding-bottom: 24px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 0 16px; }
  .footer-links a { min-height: 48px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .footer-bottom { flex-direction: column; gap: 6px; margin-top: 16px; }
  .phone { border-radius: 24px; border-width: 4px; }
}
