:root {
  --bg: #F6F3EC;
  --surface: #FCFBF7;
  --subtle-bg: #EFECE3;
  --ink: #141413;
  --muted: #5C5B55;
  --faint: #8C8A82;
  --line: rgba(20, 20, 19, 0.14);
  --line-strong: rgba(20, 20, 19, 0.28);
  --accent: #15803D;
  --btn-bg: #141413;
  --btn-fg: #FAF8F4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --surface: #191917;
    --subtle-bg: #1F1F1C;
    --ink: #F3F0E8;
    --muted: #A6A297;
    --faint: #6F6C64;
    --line: rgba(243, 240, 232, 0.13);
    --line-strong: rgba(243, 240, 232, 0.28);
    --accent: #34D399;
    --btn-bg: #F3F0E8;
    --btn-fg: #111110;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Pretendard", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #F6F3EC;
  border: 1px solid rgba(20, 20, 19, 0.22);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Editorial Split Hero */
.hero {
  padding: 88px 0 72px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 18px;
}
.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero p {
  margin: 0 0 32px;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 460px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--btn-bg);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }

.meta-note {
  font-size: 12px;
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Interactive MacBook Notch Demo Card (Right Hero) */
.demo-stage {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mac-topbar {
  height: 54px;
  background: var(--subtle-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}
.notch-pill {
  background: #0B0B0C;
  color: #F4F4F6;
  border-radius: 0 0 16px 16px;
  padding: 7px 18px;
  min-width: 148px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: min-width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.notch-pill.active { min-width: 248px; }
.wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}
.wave span {
  width: 2.5px;
  height: 5px;
  border-radius: 2px;
  background: #F4F4F6;
  transition: height 0.15s ease;
}
.notch-pill.active .wave span { animation: pulseBar 0.7s ease-in-out infinite alternate; }
.notch-pill.active .wave span:nth-child(2) { animation-delay: 0.12s; }
.notch-pill.active .wave span:nth-child(3) { animation-delay: 0.24s; }
.notch-pill.active .wave span:nth-child(4) { animation-delay: 0.36s; }
@keyframes pulseBar {
  from { height: 4px; }
  to { height: 14px; }
}

.demo-body {
  padding: 26px 24px 24px;
}
.demo-dog-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.dog-tile {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #F6F3EC;
  border: 1.5px solid #141413;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dog-tile img {
  width: 46px;
  height: 46px;
  animation: gentleTilt 4.2s ease-in-out infinite;
}
@keyframes gentleTilt {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}
.demo-caption {
  font-size: 13px;
  color: var(--muted);
}
.demo-caption strong { display: block; color: var(--ink); font-size: 14px; }

.demo-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.demo-tab {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.demo-tab.active {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: var(--btn-bg);
}

.diff-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.diff-raw {
  font-size: 13px;
  color: var(--faint);
  text-decoration: line-through;
  margin-bottom: 8px;
}
.diff-clean {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.diff-tag {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* Editorial Numbered Rows */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}
.section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.rows {
  display: flex;
  flex-direction: column;
}
.row {
  display: grid;
  grid-template-columns: 72px 240px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
}
.row-title {
  font-size: 16px;
  font-weight: 700;
}
.row-desc {
  font-size: 14.5px;
  color: var(--muted);
}

/* Spec Strip */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.spec-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.spec-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.spec-label {
  font-size: 13px;
  color: var(--muted);
}

/* Install Section */
.install-card {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.install-card pre {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
}
.copy-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Docs Layout */
.docs-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 28px 72px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: 78px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.docs-sidebar h4 {
  margin: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.docs-sidebar a {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
.docs-sidebar a:hover { background: var(--subtle-bg); color: var(--ink); }
.docs-content h2 {
  margin: 40px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.docs-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.docs-content h3 { margin: 22px 0 8px; font-size: 15.5px; }
.docs-content pre {
  background: var(--subtle-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
}
.docs-content p, .docs-content li { color: var(--muted); font-size: 14.5px; }
.docs-content strong { color: var(--ink); }
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 22px;
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.docs-content th, .docs-content td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.docs-content th {
  background: var(--subtle-bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 12.5px;
}
.docs-content tr:last-child td { border-bottom: none; }
.docs-content img.doc-diagram {
  width: 100%;
  height: auto;
  display: block;
  margin: 16px 0 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.docs-callout {
  margin: 16px 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--subtle-bg);
  border-left: 3px solid var(--accent);
  font-size: 13.5px;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--line);
  padding: 32px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 52px 0; gap: 36px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .section-head { flex-direction: column; gap: 6px; }
}
