/* Public site styles. Shared by landing, track, stocks, and order pages. */

:root {
  color-scheme: dark;
  --ink: #0b1220;
  --ink-soft: #0f172a;
  --brand: #f59e0b;
  --brand-2: #14b8a6;
  --glow: rgba(245, 158, 11, 0.22);
  --line: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Anchor links land below the sticky header instead of under it. */
[id] {
  scroll-margin-top: 5.5rem;
}

.bg-ink {
  background-color: var(--ink);
}

.bg-grid {
  background-image:
    linear-gradient(transparent 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.glow {
  background:
    radial-gradient(600px circle at 20% 20%, var(--glow), transparent 60%),
    radial-gradient(500px circle at 80% 30%, rgba(20, 184, 166, 0.18), transparent 60%);
}

.fade-up { animation: fadeUp 0.7s ease both; }
.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Surfaces ---------- */

.panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
}

.panel-lg {
  border-radius: 1.5rem;
}

.panel-hover {
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.panel-hover:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.875rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--brand);
  color: #111827;
}

.btn-primary:hover {
  background: #fbbf24;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-mint {
  background: #10b981;
  color: #052e16;
}

.btn-mint:hover {
  background: #34d399;
}

/* ---------- Forms ---------- */

.field {
  width: 100%;
  border-radius: 0.875rem;
  border: 1px solid var(--line);
  background: #020617;
  padding: 0.75rem 1rem;
  color: #f3f4f6;
}

.field::placeholder {
  color: #4b5563;
}

.field:focus {
  outline: 2px solid rgba(245, 158, 11, 0.75);
  outline-offset: 1px;
  border-color: transparent;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 0.375rem;
}

/* ---------- Mobile navigation drawer ---------- */

.site-nav-drawer {
  transition: opacity 180ms ease, visibility 180ms ease;
}

.site-nav-drawer[hidden] {
  display: none !important;
}

.site-nav-panel {
  transition: transform 220ms ease;
}

/* Stop background scroll while the drawer is open. */
body.nav-open {
  overflow: hidden;
}

/* ---------- FAQ accordion ---------- */

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .faq-chevron {
  transition: transform 180ms ease;
  flex-shrink: 0;
}

.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}

/* ---------- Repair status timeline ---------- */

.timeline-step::before {
  content: '';
  position: absolute;
  left: 0.6875rem;
  top: 1.75rem;
  bottom: -0.5rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-step.is-done::before {
  background: rgba(52, 211, 153, 0.45);
}

/* ---------- Accessibility ---------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.85);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #111827;
  font-weight: 600;
}

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

  .fade-up,
  .panel-hover,
  .panel-hover:hover,
  .site-nav-panel,
  .faq-item summary .faq-chevron {
    animation: none;
    transition: none;
    transform: none;
  }
}
