:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-2: #f4eee5;
  --text: #1d1b19;
  --muted: #6b645c;
  --line: #e7dfd3;
  --accent: #e8590c;
  --accent-2: #f59f00;
  --accent-text: #b8470a;
  --rise: #2f9e44;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 12px 40px rgb(60 40 20 / 10%);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Scrolling the page plays a sunrise: dawn at the top, sunrise in the middle, morning at the end. */
  --sky-dawn:
    radial-gradient(80% 55% at 80% 100%, #ffc39a 0%, #f4cfe2 42%, transparent 76%),
    linear-gradient(#e7e2f4, #f1e4ef 55%, #fbe2d4);
  --sky-sunrise:
    radial-gradient(95% 70% at 76% 92%, #ffae66 0%, #ffd3ad 38%, transparent 76%),
    linear-gradient(#f5e8f0, #fff0e2 55%, #ffe0c0);
  --sky-day:
    radial-gradient(70% 45% at 72% 0%, rgb(255 214 140 / 40%), transparent 70%),
    linear-gradient(#edf4fa, #fbf7f1 42%);
  --sun-core: #fff4c8;
  --sun-edge: #ffb347;
  --sun-low: 0.7;
  --sun-high: 0.95;
  --glass: color-mix(in srgb, var(--surface) 86%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1d1a16;
    --surface-2: #262219;
    --text: #f3eee7;
    --muted: #a59c90;
    --line: #332d25;
    --accent: #ff8a3d;
    --accent-2: #ffc35c;
    --accent-text: #ffa766;
    --rise: #69db7c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 48px rgb(0 0 0 / 40%);
    --sky-dawn:
      radial-gradient(80% 55% at 80% 100%, #8f2d3c 0%, #3a1f3d 38%, transparent 72%),
      linear-gradient(#0e0c18, #1a1327 60%, #2a1a37);
    --sky-sunrise:
      radial-gradient(95% 70% at 76% 92%, #d9530f 0%, #8f2d3c 34%, transparent 72%),
      linear-gradient(#1a1327, #2a1a2b 52%, #4a2421);
    --sky-day:
      radial-gradient(80% 55% at 78% 8%, rgb(255 160 70 / 22%), transparent 70%),
      linear-gradient(#251b14, #17130f 55%);
    --sun-core: #ffcf8a;
    --sun-edge: #ff7a2e;
    --sun-low: 0.75;
    --sun-high: 0.35;
    --glass: color-mix(in srgb, var(--surface) 80%, transparent);
  }
}

* { box-sizing: border-box; }

/* --p is the scroll progress from 0 (top) to 1 (bottom), set by site.js; 0 without JavaScript. */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; --p: 0; }
.sky-layer { position: absolute; inset: 0; }
.dawn { background: var(--sky-dawn); }
.sunrise { background: var(--sky-sunrise); opacity: clamp(0, calc(var(--p) * 2.6 - 0.15), 1); }
.day { background: var(--sky-day); opacity: clamp(0, calc((var(--p) - 0.5) * 2.4), 1); }
.sun {
  position: absolute; right: 4vw; top: 0; width: min(46vmin, 420px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--sun-core) 0%, var(--sun-edge) 38%, transparent 70%);
  filter: blur(14px);
  /* Strong and warm on the horizon; in dark mode it fades into a glow as it climbs. */
  opacity: calc(var(--sun-low) + (var(--sun-high) - var(--sun-low)) * var(--p));
  /* Low on the horizon at the top of the page, high in the sky at the bottom. */
  translate: 0 calc(100vh - min(46vmin, 420px) * 0.45 - var(--p) * 70vh);
  will-change: translate, opacity;
}
html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--bg); }
body {
  margin: 0; background: transparent; color: var(--text);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
/* Korean breaks only between words; paragraphs avoid a lone word on the last line, headings balance their lines. */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
p, li, summary, .feature h3 { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.9em; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(20px, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; gap: 22px; margin-right: auto; }
.nav nav a, .gh { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav nav a:hover, .gh:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 16px; }
.lang {
  font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}

/* Sections */
main > section { padding: 96px max(20px, calc((100vw - 1120px) / 2)); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); margin: 12px 0 0; }
.eyebrow {
  margin: 0 0 10px !important; font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-text) !important;
}

/* Hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center;
  padding-top: 72px !important;
}
.badge {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 14px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
}
.badge span:first-child {
  padding: 2px 10px; border-radius: 999px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 22px 0 20px; letter-spacing: -0.035em; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.secondary {
  padding: 12px 18px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); background: var(--surface);
}
.secondary:hover { border-color: var(--muted); }
.fine { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.hero-shot { margin: 0; }
.hero-shot video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  border-radius: 14px; box-shadow: var(--shadow); background: #120f1f;
}

/* Copy buttons */
.copy {
  display: inline-flex; align-items: center; gap: 14px; max-width: 100%;
  font: inherit; text-align: left; cursor: pointer; color: var(--text);
  padding: 12px 12px 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.copy code { overflow-x: auto; white-space: nowrap; font-size: 14px; }
.copy.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.copy-label {
  flex: none; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.copy.done .copy-label { color: var(--rise); }
.copy.primary.done .copy-label { color: inherit; }
.prompt { color: var(--muted); user-select: none; }

/* Today */
.today, .install { background: transparent; }
.trending { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trending li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline;
  padding: 18px 20px; border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line);
}
.trending li.placeholder { display: block; color: var(--muted); }
.rank { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.repo { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.repo .owner { font-weight: 400; color: var(--muted); }
.repo:hover { text-decoration: underline; }
.gain { color: var(--rise); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trending .desc {
  grid-column: 2 / 4; margin: 0; color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.trending .lang-tag { grid-column: 2 / 4; font-size: 13px; color: var(--muted); }
.updated { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature {
  padding: 28px; border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line);
}
.feature h3 { font-size: 20px; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--muted); }
.feature.wide {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: center;
  overflow: hidden; padding-bottom: 0;
}
.feature.wide > div { padding-bottom: 28px; }
.feature.wide h3 { font-size: 26px; }
.feature.wide img { border-radius: 12px 12px 0 0; box-shadow: var(--shadow); align-self: end; }

/* Privacy */
.pills { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li {
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 15px;
  background: var(--glass); border: 1px solid var(--line);
}
.pills li::before { content: "✓ "; color: var(--rise); }
.privacy-body { color: var(--muted); max-width: 46em; margin: 0; }

/* Install */
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.install-card { padding: 28px; border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); min-width: 0; }
.install-card h3 { font-size: 20px; margin-bottom: 16px; }
.install-card .copy { width: 100%; justify-content: space-between; }
.install-card .copy code { white-space: normal; overflow-wrap: anywhere; }
.install-card p, .install-card li { color: var(--muted); }
.install-card p { margin: 16px 0 0; }
.install-card ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.install-card b { color: var(--text); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); max-width: 820px; }
.faq summary {
  cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 18px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 44em; }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding: 32px max(20px, calc((100vw - 1120px) / 2)); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Motion: only with JavaScript and when the visitor has not asked for less motion (see site.js). */
.motion .sun { animation: glow 7s ease-in-out infinite alternate; }
@keyframes glow { to { scale: 1.06; } }
.calm .sun { translate: 0 30vh; }
.motion .intro > * { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.motion .intro > :nth-child(2) { animation-delay: 0.08s; }
.motion .intro > :nth-child(3) { animation-delay: 0.16s; }
.motion .intro > :nth-child(4) { animation-delay: 0.24s; }
.motion .intro > :nth-child(5) { animation-delay: 0.32s; }
.motion .hero-shot { animation: rise 1.1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; translate: 0 28px; } }
.motion .reveal {
  opacity: 0; translate: 0 32px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), translate 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}
.motion .reveal.is-visible { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px !important; }
  .feature.wide { grid-template-columns: minmax(0, 1fr); }
  .feature.wide img { max-width: 280px; margin: 0 auto; }
  .install-grid, .feature-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .nav nav { display: none; }
  .nav-end { margin-left: auto; }
  main > section { padding-top: 64px; padding-bottom: 64px; }
  .lead { font-size: 17px; }
  .cta { flex-direction: column; align-items: stretch; }
  .copy { width: 100%; }
  .copy code { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
  .secondary { text-align: center; }
  .trending li { grid-template-columns: 24px minmax(0, 1fr); padding: 16px; }
  .trending .gain { grid-column: 2; }
  .trending .desc, .trending .lang-tag { grid-column: 2; }
  .feature, .install-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
