/* ==========================================================================
   nyapi — Vercel / Linear Monochrome Dark Design System
   Pitch black ground, sharp hairlines, subtle specular depth, zero neon
   ========================================================================== */

:root {
  --bg: #000000;
  --surface-1: #0a0a0a;
  --surface-2: #111111;
  --surface-hover: #161616;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(255, 255, 255, 0.42);

  --text: #ededed;
  --text-secondary: #888888;
  --text-muted: #5c5c5c;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Subtle pure-white radial sheen at very top — zero color */
.top-sheen {
  position: fixed;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 440px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-white {
  background: #ffffff;
  color: #000000;
}

.btn-white:hover {
  background: #e5e5e5;
}

.btn-dark {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-dark:hover {
  background: #1c1c1c;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0 8px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-lg {
  height: 44px;
  font-size: 0.9rem;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8125rem;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: #a1a1aa;
}

.brand-wordmark {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 15%, #d4d4d8 58%, #7a7a82 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-wordmark {
  font-size: 0.9rem;
}

.brand-glyph {
  display: block;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.brand:hover .brand-glyph {
  transform: scale(1.04);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4d4d8;
}

/* ==========================================================================
   Hero & Pricing Grid
   ========================================================================== */
.pricing-section {
  padding: 84px 0 64px;
}

.hero-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 52px;
}

.hero-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.06;
  background: linear-gradient(180deg, #ffffff 45%, #8f8f8f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Segmented Billing Control */
.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg-btn.active {
  background: #1f1f1f;
  color: #ffffff;
}

/* Plan Cards */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.plan-card:hover {
  border-color: var(--border-strong);
}

.plan-featured {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.015) 100%);
  border-color: rgba(255, 255, 255, 0.22);
}

.plan-card.selected {
  border-color: rgba(255, 255, 255, 0.45);
}

.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-top h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.plan-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.pill-mono {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price .amount {
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-price .period {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.plan-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.plan-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #b4b4b4;
}

.check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid #ededed;
  border-width: 0 1.4px 1.4px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   Fast Inline Checkout
   ========================================================================== */
.checkout-section {
  padding: 12px 0 64px;
}

.checkout-shell {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.checkout-summary {
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.checkout-summary h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.co-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.co-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: auto;
}

.co-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.co-row .mono {
  color: var(--text);
}

.co-total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.co-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.checkout-form-wrap {
  padding: 36px 32px;
  background: #060606;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  height: 40px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus {
  border-color: var(--border-focus);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.method-btn {
  height: 36px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.method-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.method-btn.active {
  background: #191919;
  border-color: rgba(255, 255, 255, 0.36);
  color: #ffffff;
}

.alt-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
}

/* Issued Key State */
.key-issued {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 14px;
}

.issued-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #ededed;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 10px;
  border-radius: 999px;
}

.key-issued h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.issued-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.key-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 4px 0;
}

.key-box code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Quickstart Strip
   ========================================================================== */
.quickstart-section {
  padding-bottom: 72px;
}

.qs-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.qs-head .label-mono {
  margin-bottom: 0;
}

.qs-code {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #b4b4b4;
  overflow-x: auto;
}

/* ==========================================================================
   Homepage Animations & Alternating Spotlight Rows
   ========================================================================== */
.top-sheen {
  animation: sheenPulse 8s ease-in-out infinite;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 30%, transparent 100%);
  animation: gridDrift 26s linear infinite;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-header h1 {
  animation: heroReveal 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-header .subtitle {
  animation: heroReveal 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
  animation: heroReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

.hero-actions .btn {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.15s, border-color 0.15s, box-shadow 0.2s;
}

.hero-actions .btn:hover {
  transform: translateY(-2px);
}

.hero-actions .btn-white:hover {
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.14);
}

.spotlight-section {
  position: relative;
  z-index: 1;
  padding: 56px 0 110px;
}

.spotlight-stack {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 108px;
}

.spotlight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 72px;
}

.spotlight-row .spotlight-art,
.spotlight-row .spotlight-copy {
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spotlight-row .spotlight-art {
  transform: translateY(28px) scale(0.95);
}

.spotlight-row .spotlight-copy {
  transform: translateY(24px);
  transition-delay: 0.12s;
}

.spotlight-row.in-view .spotlight-art,
.spotlight-row.in-view .spotlight-copy {
  opacity: 1;
  transform: none;
}

.spotlight-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.75));
  animation: floatSlow 6s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spotlight-row:nth-child(2) .art-svg {
  animation-delay: -2s;
}

.spotlight-row:nth-child(3) .art-svg {
  animation-delay: -4s;
}

.art-bob {
  animation: subBob 4.6s ease-in-out infinite;
}

.art-bob-delay {
  animation-delay: -1.8s;
}

.art-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 3.2s ease-in-out infinite;
}

.art-sparkle-delay {
  animation-delay: -1.6s;
}

.art-key {
  transform-box: fill-box;
  transform-origin: 176px 144px;
  animation: keySwing 4.8s ease-in-out infinite;
}

@keyframes sheenPulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes subBob {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.12) rotate(12deg); }
}

@keyframes keySwing {
  0%, 100% { transform: rotate(0deg) translateY(0px); }
  50% { transform: rotate(-6deg) translateY(-4px); }
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 64px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .top-sheen, .bg-grid, .hero-header h1, .hero-header .subtitle, .hero-actions,
  .art-svg, .art-bob, .art-sparkle, .art-key {
    animation: none !important;
  }
  .spotlight-row .spotlight-art, .spotlight-row .spotlight-copy {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .bg-canvas { display: none; }
}

.spotlight-copy h2 {
  font-family: var(--font-sans);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: #ffffff;
  margin-bottom: 14px;
}

.spotlight-copy p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.68;
}

.spotlight-copy code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text);
}

.spotlight-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}

.spotlight-link:hover {
  opacity: 1;
  transform: translateX(3px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .plan-grid,
  .checkout-shell,
  .spotlight-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .spotlight-stack {
    gap: 72px;
  }
  .spotlight-reverse .spotlight-art {
    order: -1;
  }
  .spotlight-copy {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
  }
  .checkout-summary {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 580px) {
  .nav,
  .status {
    display: none;
  }
}
