:root {
  --ink: #100e0b;
  --paper: #f3ead7;
  --muted: #8f846f;
  --line: rgba(243, 234, 215, 0.14);
  --amber: #f0c93a;
  --amber-dim: #c9a422;
  --smoke: #1a1712;
  --panel: rgba(26, 23, 18, 0.72);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--sans);
  background: var(--ink);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(240, 201, 58, 0.18), transparent 55%),
    radial-gradient(700px 420px at 88% 8%, rgba(120, 90, 40, 0.25), transparent 50%),
    radial-gradient(600px 500px at 50% 110%, rgba(240, 201, 58, 0.08), transparent 45%),
    linear-gradient(165deg, #15120e 0%, #0c0a08 45%, #14110d 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(16, 14, 11, 0.72);
  z-index: 10;
}
.brand {
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
nav a:hover { color: var(--paper); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--amber);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.hero {
  padding: clamp(48px, 12vh, 110px) clamp(18px, 4vw, 40px) clamp(40px, 8vh, 72px);
  max-width: 920px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0;
  animation: rise 0.7s ease forwards;
}
.brand-hero {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
  opacity: 0;
  animation: rise 0.75s ease 0.08s forwards;
}
.thesis {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.6vw, 2.15rem);
  line-height: 1.35;
  font-weight: 400;
  max-width: 18em;
  opacity: 0;
  animation: rise 0.8s ease 0.16s forwards;
}
.thesis-2 {
  display: inline-block;
  margin-top: 0.35em;
  color: rgba(243, 234, 215, 0.82);
  font-style: italic;
}
.lede {
  margin: 0 0 28px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  opacity: 0;
  animation: rise 0.8s ease 0.24s forwards;
}
.lede strong { color: var(--paper); font-weight: 650; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  animation: rise 0.8s ease 0.32s forwards;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--amber);
  color: var(--ink);
}
.btn.primary:hover { background: #ffd95a; }
.btn.ghost {
  border: 1px solid var(--line);
  color: var(--paper);
  background: transparent;
}

.contrast {
  margin: 0 clamp(18px, 4vw, 40px) clamp(36px, 6vh, 64px);
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.contrast-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contrast h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.contrast p {
  margin: 0;
  color: var(--muted);
}

.section {
  padding: 0 clamp(18px, 4vw, 40px) clamp(48px, 8vh, 88px);
  max-width: 920px;
}
.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}
.section-lede {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 40rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.steps .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(240, 201, 58, 0.15);
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}
.steps strong {
  display: block;
  margin-bottom: 8px;
}
pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a0907;
  color: #e8dcc3;
  font-size: 0.84rem;
  line-height: 1.5;
}
.api-block {
  margin-bottom: 12px;
}
.fine {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.limit-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}
.limit-list li { margin: 0.55rem 0; }
.limit-list code,
.section-lede code {
  color: #e8d9a8;
  font-size: 0.9em;
}

.not-xside {
  border-top: 1px solid var(--line);
  padding-top: clamp(36px, 6vh, 56px);
}
.not-xside p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}
.not-xside em { color: var(--paper); font-style: normal; font-weight: 650; }

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 40px) 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--amber-dim); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .contrast-grid { grid-template-columns: 1fr; }
  nav a:not(.nav-cta) { display: none; }
  .brand-hero { font-size: clamp(2.3rem, 12vw, 3.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .brand-hero, .thesis, .lede, .cta-row {
    opacity: 1;
    animation: none;
  }
  html { scroll-behavior: auto; }
}
