/* css/styles.css — Orbita – Wrist Browser
 * Design language adapted from the Linear DESIGN.md (awesome-design-md):
 * near-black canvas, a surface ladder with hairline borders, one chromatic
 * accent (Orbita violet), tight negative tracking on display type.
 */

/* --- Tokens --- */
:root {
  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;
  --hairline: #23252a;
  --hairline-strong: #34343a;

  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;

  --accent: #8b78ff;
  --accent-hover: #a597ff;
  --accent-pressed: #7663f0;
  --accent-ring: rgba(139, 120, 255, 0.5);

  --r-xs: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --max-width: 1200px;
  --nav-height: 56px;
  --section: 96px;
}

/* --- Reset & base --- */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: var(--r-md); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-subtle);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  vertical-align: middle;
}

h1, h2, h3 { font-weight: 600; color: var(--ink); }

.display-xl { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.display-md { font-size: clamp(1.875rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.025em; }
.card-title { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; }

.lead { font-size: 1.125rem; color: var(--ink-subtle); max-width: 560px; }
.muted { color: var(--ink-subtle); }

/* --- Buttons (8px corners, never pills) --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-pressed); }

.btn-secondary { background: var(--surface-1); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--hairline-strong); }

.btn[aria-disabled="true"] { cursor: default; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(1, 1, 2, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.logo img { width: 28px; height: 28px; }
.logo-suffix { color: var(--ink-subtle); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.875rem; color: var(--ink-subtle); }
.nav-links a:hover { color: var(--ink); }

/* --- Hero --- */
.hero { padding: 112px 0 64px; text-align: center; }
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 { max-width: 820px; margin: 0 auto 20px; }
.hero .lead { margin: 0 auto 36px; }

.hero-icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 32px rgba(139, 120, 255, 0.28));
}

.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* --- Watch screenshots --- */
.gallery { padding: 32px 0 var(--section); }

.gallery-panel {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 40px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.watch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center;
  gap: 32px;
}

.watch {
  text-align: center;
}

.watch-frame {
  padding: 10px;
  background: #000;
  border: 1px solid var(--hairline-strong);
  border-radius: 48px;
  box-shadow: 0 0 0 6px var(--surface-3);
}

.watch-frame img { border-radius: 38px; width: 100%; }

.watch figcaption { margin-top: 16px; font-size: 0.875rem; color: var(--ink-subtle); }

/* --- Sections --- */
.section { padding: var(--section) 0; border-top: 1px solid var(--hairline); }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { margin-bottom: 12px; }

/* --- Feature cards --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover { background: var(--surface-2); border-color: var(--hairline-strong); }

.feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  color: var(--accent);
}

.feature-icon svg { width: 18px; height: 18px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 0.9375rem; color: var(--ink-subtle); }

/* --- Split (text + screenshot) --- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.split .watch { max-width: 240px; justify-self: center; }

.checklist { margin-top: 28px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; color: var(--ink-muted); font-size: 0.9375rem; }
.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: var(--r-xs);
  background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b78ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 12px no-repeat;
  border: 1px solid var(--hairline);
}

/* --- CTA banner --- */
.cta-banner {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cta-banner .cta-title { margin-top: 16px; }
.cta-row { margin-top: 28px; }

.cta-banner h2 { font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.cta-banner p { color: var(--ink-subtle); max-width: 520px; }

/* --- Legal / support pages --- */
.page { padding: 80px 0 var(--section); }
.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { margin-bottom: 8px; }
.prose .updated { color: var(--ink-tertiary); font-size: 0.875rem; margin-bottom: 40px; }
.prose h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--ink-muted); }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0; display: grid; gap: 8px; }
.prose ul li { padding-left: 20px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--ink); font-weight: 600; }

.callout {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-lg);
}

.faq { margin-top: 16px; display: grid; gap: 12px; }

.faq details {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}

.faq details[open] { background: var(--surface-2); border-color: var(--hairline-strong); }

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-subtle); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; }

/* --- Footer --- */
.footer { border-top: 1px solid var(--hairline); padding: 56px 0 48px; font-size: 0.875rem; color: var(--ink-subtle); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--ink); }
.footer small { display: block; color: var(--ink-tertiary); margin-top: 6px; }

/* --- Entrance animation (CSS only) --- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-2 { animation-delay: 0.1s; }
.rise-3 { animation-delay: 0.2s; }
.rise-4 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .cta-banner { flex-direction: column; align-items: flex-start; padding: 32px; }
}

@media (max-width: 720px) {
  :root { --section: 64px; }
  .nav-links .hide-sm,
  .navbar .logo-suffix { display: none; }
  .nav-links { gap: 16px; }
  .nav-links .btn { padding: 7px 12px; font-size: 0.875rem; }
  .hero { padding: 72px 0 40px; }
  .watch-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .watch-frame { padding: 5px; border-radius: 26px; box-shadow: 0 0 0 3px var(--surface-3); }
  .watch-frame img { border-radius: 21px; }
  .gallery-panel { padding: 24px 12px; }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .watch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-row .watch:last-child { display: none; }
}
