/* =========================================================
   Seat-Wizard · landing
   Pure black & white. Restrained geek.
   ========================================================= */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --fg-2: #1a1a1a;
  --muted: #666666;
  --muted-2: #999999;
  --line: #e6e6e6;
  --line-strong: #111111;
  --hover: #f3f3f3;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
    Menlo, Consolas, "Liberation Mono", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --container: 920px;
  --gutter: 28px;

  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #f5f5f5;
    --fg-2: #ededed;
    --muted: #8a8a8a;
    --muted-2: #5a5a5a;
    --line: #1f1f1f;
    --line-strong: #f5f5f5;
    --hover: #141414;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s var(--easing);
}

a:hover {
  opacity: 0.55;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--hover);
  padding: 2px 6px;
  border-radius: 3px;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ----- layout helpers ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ----- ambient grid ----- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  opacity: 0.45;
  mask-image: radial-gradient(
    ellipse at 50% 30%,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0) 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 30%,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0) 80%
  );
}

/* ----- header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.01em;
  border-bottom: 0;
}

.brand-mark {
  font-size: 0.85em;
  color: var(--muted);
}

.brand-name {
  font-size: 0.95rem;
}

.brand:hover {
  opacity: 1;
}

.brand:hover .brand-mark {
  color: var(--fg);
}

.site-nav {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.site-nav a {
  border-bottom: 0;
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--fg);
  opacity: 1;
}

@media (max-width: 560px) {
  .site-nav {
    gap: 14px;
    font-size: 0.78rem;
  }
}

/* ----- hero ----- */
.hero {
  padding: 120px 0 96px;
}

@media (max-width: 640px) {
  .hero {
    padding: 72px 0 64px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-title {
  margin: 0 0 28px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-title .prompt {
  color: var(--muted-2);
  margin-right: 0.35em;
  font-weight: 500;
}

.hero-title .hyphen {
  color: var(--muted);
}

.hero-title .caret {
  display: inline-block;
  width: 0.5ch;
  height: 0.95em;
  margin-left: 0.12em;
  vertical-align: -0.12em;
  background: var(--fg);
  animation: blink 1.05s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    background: transparent;
  }
}

.hero-tagline {
  margin: 0 0 14px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 500;
  color: var(--fg);
}

.hero-desc {
  margin: 0 0 44px;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.8;
}

/* ----- CTAs (symmetrical) ----- */
.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 520px;
}

@media (max-width: 480px) {
  .cta-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.18s var(--easing),
    color 0.18s var(--easing),
    transform 0.18s var(--easing);
}

.btn .btn-prefix,
.btn .btn-suffix {
  opacity: 0.4;
  transition: opacity 0.18s var(--easing);
}

.btn:hover .btn-prefix,
.btn:hover .btn-suffix {
  opacity: 1;
}

.btn-ghost {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--fg);
  color: var(--bg);
  opacity: 1;
}

.btn-solid {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--line-strong);
}

.btn-solid:hover {
  background: var(--bg);
  color: var(--fg);
  opacity: 1;
}

.btn:active {
  transform: translateY(1px);
}

.cta-note {
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted-2);
}

/* ----- generic section ----- */
.section {
  padding: 96px 0;
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }
}

.section-head {
  margin-bottom: 48px;
}

.section-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-2);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

/* ----- feature cards ----- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--line);
  padding: 28px 26px;
  background: var(--bg);
  transition:
    border-color 0.2s var(--easing),
    transform 0.2s var(--easing);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.card-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0 0 18px;
  color: var(--muted);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.steps li {
  counter-increment: step;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  color: var(--fg-2);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--muted-2);
  font-size: 0.78rem;
}

.steps li:first-child {
  border-top: 0;
}

/* ----- stack list ----- */
.stack-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.stack-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

@media (max-width: 600px) {
  .stack-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.stack-name {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.stack-role {
  color: var(--muted);
}

/* ----- code block ----- */
.codeblock {
  margin: 0;
  padding: 22px 24px;
  background: var(--hover);
  border: 1px solid var(--line);
  border-left: 3px solid var(--fg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--fg-2);
}

.codeblock .cmt {
  color: var(--muted-2);
}

.codeblock .kw {
  color: var(--fg);
  font-weight: 700;
}

.codeblock .op {
  color: var(--muted);
}

.codeblock .str {
  color: var(--fg-2);
}

/* ----- privacy list ----- */
.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.privacy-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  line-height: 1.75;
}

.privacy-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--fg);
  font-size: 1.1em;
  line-height: 1.6;
}

.privacy-list strong {
  color: var(--fg);
  font-weight: 600;
  margin-right: 6px;
}

.privacy-list a {
  color: var(--fg);
}

/* ----- contact ----- */
.contact-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

@media (max-width: 520px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 4px;
  }
}

.contact-row dt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.contact-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.contact-row dd .sep {
  margin: 0 8px;
  color: var(--muted-2);
}

.contact-row dd a {
  color: var(--fg);
}

/* ----- download dialog ----- */
.dialog {
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  width: min(520px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  overflow: auto;
  font-family: var(--font-sans);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.dialog[open] {
  animation: dialog-in 0.18s var(--easing);
}

.dialog[open]::backdrop {
  animation: backdrop-in 0.18s var(--easing);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdrop-in {
  from {
    background: rgba(0, 0, 0, 0);
  }
  to {
    background: rgba(0, 0, 0, 0.5);
  }
}

.dialog-inner {
  margin: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

@media (max-width: 480px) {
  .dialog-inner {
    padding: 22px;
    gap: 18px;
  }
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-title {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.dialog-title .prompt {
  color: var(--muted-2);
  margin-right: 6px;
  font-weight: 500;
}

.dialog-close {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  cursor: pointer;
  transition:
    color 0.18s var(--easing),
    border-color 0.18s var(--easing);
}

.dialog-close:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.dialog-meta {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.dialog-meta-strong {
  color: var(--fg);
}

.dialog-options {
  display: grid;
  gap: 12px;
}

.dialog-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition:
    border-color 0.2s var(--easing),
    transform 0.2s var(--easing);
}

.dialog-option:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  opacity: 1;
}

.dialog-option:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.dialog-option-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-2);
  letter-spacing: 0.06em;
  align-self: start;
  padding-top: 2px;
}

.dialog-option-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dialog-option-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dialog-option-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 2px;
}

.dialog-option-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}

.dialog-option-desc code {
  font-size: 0.85em;
  padding: 1px 5px;
}

.dialog-option-arrow {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--muted);
  transition:
    color 0.2s var(--easing),
    transform 0.2s var(--easing);
}

.dialog-option:hover .dialog-option-arrow {
  color: var(--fg);
  transform: translateX(3px);
}

.dialog-footnote {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.dialog-footnote a {
  color: var(--fg-2);
  border-bottom-color: var(--line);
}

.dialog-footnote a:hover {
  border-bottom-color: var(--fg);
  opacity: 1;
}

/* ----- footer ----- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 56px;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg-2);
}

.footer-line.muted {
  color: var(--muted-2);
}

.footer-line .prompt {
  color: var(--muted-2);
  margin-right: 6px;
}

.footer-line a {
  color: var(--fg);
}

/* ----- selection ----- */
::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ----- reduce motion ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
