/* KeepTrack website — tokens carried over from the app's DESIGN.md (dark slate utility theme).
   Web adaptation: desktop breakpoints, header-height rhythm, web type scale; palette and radii unchanged. */
:root {
  --surface-body: #20242D;
  --surface-panel: #1C2028;
  --surface-card: #272D39;
  --surface-card-alt: #242932;
  --surface-raised: #2D3340;
  --surface-chrome: #191D25;
  --surface-max: #373E4C;
  --divider: #2E3542;
  --primary: #047CFC;
  --primary-deep: #0064FF;
  --primary-tint: #79A6F8;
  --green: #2DC53A;
  --warning-text: #FF8A3D;
  --alert-text: #FF6B86;
  --text-primary: #FFFFFF;
  --text-secondary: #828F9A;
  --text-secondary-alt: #AAB0BD;
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  background-color: var(--surface-body);
  color: var(--text-primary);
  font-family: 'Rubik', ui-sans-serif, system-ui, sans-serif;
  overflow-wrap: anywhere;
}

/* The single permitted brand gradient (45° blue-to-blue) — hero panel and primary CTA only */
.brand-gradient {
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
}

/* Inline links on the body surface */
.link-tint {
  color: var(--primary-tint);
  text-decoration-line: underline;
  text-underline-offset: 3px;
}
.link-tint:hover { color: #a5c3fb; }

/* Visible focus for keyboard users — never removed without a replacement */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary-tint);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Phone mock frame for app screenshots — declares its own ratio so the image never drives layout */
.phone-frame {
  aspect-ratio: 1080 / 2424;
  max-height: 640px;
  width: auto;
  border-radius: 20px;
  border: 1px solid var(--divider);
  background-color: var(--surface-card);
  overflow: hidden;
  display: block;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Screenshot rail: horizontal scroll region on every breakpoint — a deliberate, styled scroll area */
.shot-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot-rail > * {
  flex: 0 0 auto;
  width: clamp(200px, 26vw, 264px);
  scroll-snap-align: center;
}
.shot-rail .phone-frame { width: 100%; max-height: none; }

/* Legal pages: generous reading measure, no single fixed size */
.legal-body { max-width: 72ch; }
.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.legal-body p,
.legal-body li {
  color: var(--text-secondary-alt);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.legal-body ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.legal-body strong { color: var(--text-primary); }

/* FAQ accordion — native details/summary, touch-friendly tap areas */
.faq-item {
  background-color: var(--surface-card);
  border-radius: 10px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  font-weight: 500;
  color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-chevron { transition: transform 200ms ease-out; color: var(--primary-tint); }
.faq-item[open] summary .faq-chevron { transform: rotate(180deg); }
.faq-item .faq-answer {
  padding: 0 16px 16px;
  color: var(--text-secondary-alt);
  line-height: 1.65;
}

/* Status dots used in copy decoration */
.dot { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; }

/* Reduced motion: AOS reveals become static, smooth scroll off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-item summary .faq-chevron { transition: none; }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Safe-area padding under any fixed chrome (footer sits in normal flow, but keep iOS home indicator clear) */
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }
