:root {
  --bg: #0b0c10;
  --surface: #14161d;
  --text: #f2f2f4;
  --muted: #b4b8c4;
  --accent: #6ea8ff;
  --accent-ink: #06101f;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Tahoma, "Vazirmatn", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(11, 12, 16, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1f2230;
}
.brand { font-weight: 700; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { color: var(--text); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  min-height: 90vh;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 5vw, 64px);
}
.eyebrow { color: var(--accent); margin: 0; font-weight: 600; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.3;
  margin: 8px 0 16px;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 36ch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); margin-top: 8px; }
.btn[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }

.phone-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 70vh;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 40%, #1d2233 0%, var(--bg) 70%);
  touch-action: none;
  cursor: grab;
  overflow: hidden;
}
.phone-stage:active { cursor: grabbing; }
.phone-stage canvas { width: 100% !important; height: 100% !important; }
.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.fallback[hidden] { display: none; }

/* Sections */
section { padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 64px); }
section h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); margin: 0 0 12px; }
.note { color: var(--muted); font-size: 0.95rem; }

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 24px;
}
.feature {
  background: var(--surface);
  border: 1px solid #222637;
  border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { margin: 0 0 8px; color: var(--accent); }
.feature p { margin: 0; color: var(--muted); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Colors */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  border: 2px solid #2a2f40;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}
.swatch::before {
  content: "";
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #00000066;
}
.swatch[aria-checked="true"] { border-color: var(--accent); }

/* Specs */
table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  margin-top: 16px;
}
th, td {
  text-align: start;
  padding: 14px 12px;
  border-bottom: 1px solid #222637;
}
th { color: var(--muted); font-weight: 600; width: 35%; }

/* Preorder */
.preorder p { color: var(--muted); }

/* Footer */
.site-footer {
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid #1f2230;
}

/* Responsive */
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: start; }
  .phone-stage { aspect-ratio: 1 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn { transition: none; }
  .reveal { opacity: 1; transform: none; }
}
