/* DivTracker website — shared styles */

:root {
  --bg: #0a223d;
  --bg-elevated: #0f2c4d;
  --bg-card: #122f54;
  --border: #1d3f6c;
  --accent: #20c997;
  --accent-strong: #1ab184;
  --text: #ffffff;
  --text-muted: #b0c7db;
  --text-soft: #8aa6c2;
  --max-width: 1120px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; color: var(--text-muted); }

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

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 34, 61, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand-mark { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .cta {
  background: var(--accent);
  color: #0a223d;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-links .cta:hover { background: var(--accent-strong); color: #0a223d; }

.nav-links a.active:not(.cta),
.nav-links a[aria-current="page"]:not(.cta) {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .nav-links a:not(.cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(32, 201, 151, 0.18), transparent 70%),
    radial-gradient(700px 300px at 50% 110%, rgba(32, 201, 151, 0.08), transparent 70%);
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  top: -180px; left: 20%;
  width: 520px; height: 520px;
  background: radial-gradient(closest-side, rgba(32, 201, 151, 0.35), transparent 70%);
  animation: float-a 16s ease-in-out infinite;
}
.hero::after {
  bottom: -200px; right: 15%;
  width: 480px; height: 480px;
  background: radial-gradient(closest-side, rgba(76, 134, 255, 0.22), transparent 70%);
  animation: float-b 20s ease-in-out infinite;
}
.hero > .container { position: relative; z-index: 1; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50%      { transform: translate(40px, 30px) scale(1.08); opacity: 1; }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50%      { transform: translate(-50px, -20px) scale(1.12); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}
.hero .logo {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow);
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(32, 201, 151, 0.12);
  border: 1px solid rgba(32, 201, 151, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(3.25rem, 7.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
}
.hero h1 strong,
.hero h1 .brand-mark { color: var(--accent); }
.hero .hero-tagline {
  margin: 28px auto 0;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero .hero-tagline .word {
  /* Browsers render letter-spacing after the last char of each word too,
     producing a trailing 0.32em ghost gap. Pull each word's right edge back
     in by the same amount so the dot sits visually centered between words. */
  margin-right: -0.32em;
}
.hero .hero-tagline .word:last-child {
  margin-right: 0;
}
.hero .hero-tagline .sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  margin: 0 0.85em;
  vertical-align: 0.32em; /* lift to cap-height middle of uppercase text */
}
.hero .hero-tagline strong {
  color: var(--accent);
  font-weight: 700;
}
.hero .lead {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 16px auto 28px;
  color: var(--text-muted);
}

.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.store-buttons a { display: inline-block; }
.store-buttons img { height: 56px; object-fit: contain; }

/* ---------- Section ---------- */
section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}
section:first-of-type { border-top: 0; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 strong { color: var(--accent); }
.section-head p { max-width: 640px; margin: 0 auto; }

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(32, 201, 151, 0.18),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 201, 151, 0.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.card > * { position: relative; }
.card .icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(32, 201, 151, 0.14);
  color: var(--accent);
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 22px;
}
.card h3 { color: var(--text); }
.card p { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -18px; left: 24px;
  width: 36px; height: 36px;
  background: var(--accent);
  color: #0a223d;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { color: var(--text); margin-top: 8px; }

/* ---------- Screenshots ---------- */
.shots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .shots { grid-template-columns: 1fr; }
}
.shot {
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: 1px dashed var(--border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
  overflow: hidden;
}
.shot:has(img) {
  background: transparent;
  border: 0;
  padding: 0;
}
.shot img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 28px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
}
.faq details[open] { border-color: rgba(32, 201, 151, 0.4); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.4rem;
  margin-left: 16px;
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; }

/* ---------- About / contact strip ---------- */
.cta-strip {
  background: linear-gradient(135deg, rgba(32, 201, 151, 0.16), rgba(32, 201, 151, 0.04));
  border: 1px solid rgba(32, 201, 151, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}
.cta-strip h2 { color: var(--text); }

/* ---------- Doc page ---------- */
.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 0;
}
.doc h1 { margin-bottom: 8px; }
.doc .updated { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 32px; }
.doc h2 { margin-top: 36px; color: var(--text); }
.doc h3 { margin-top: 24px; color: var(--text); }
.doc ul { color: var(--text-muted); padding-left: 22px; }
.doc li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
  color: var(--text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-about { color: var(--text-muted); font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* ---------- Stats strip ---------- */
.stats {
  padding: 48px 0;
  background:
    linear-gradient(180deg, rgba(32, 201, 151, 0.05), transparent 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr; gap: 20px; }
}
.stat {
  padding: 12px;
  border-radius: 12px;
  transition: background 0.25s ease;
}
.stat:hover { background: rgba(32, 201, 151, 0.06); }
.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #20c997, #4cd6c0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Reviews ---------- */
#reviews {
  background:
    radial-gradient(700px 280px at 85% 15%, rgba(32, 201, 151, 0.07), transparent 70%),
    radial-gradient(700px 280px at 15% 85%, rgba(76, 134, 255, 0.06), transparent 70%);
}
/* Carousel container */
.carousel {
  position: relative;
  margin-bottom: 8px;
  padding: 4px 0 8px;
}
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 4px 12px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > .review {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  width: 100%;
  max-width: 760px;
  justify-self: center;
  margin: 0 auto;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15, 44, 77, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  padding: 0;
}
.carousel-arrow:hover {
  background: var(--accent);
  color: #0a223d;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.06);
}
.carousel-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.carousel-prev { left: 0; }
.carousel-next { right: 0; }
@media (min-width: 1100px) {
  .carousel-prev { left: -8px; }
  .carousel-next { right: -8px; }
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  min-height: 12px;
}
.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}
.carousel-dot:hover { background: var(--text-soft); }
.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 999px;
}

/* Single-slide carousel: hide controls */
.carousel[data-single="true"] .carousel-arrow,
.carousel[data-single="true"] .carousel-dots {
  display: none;
}
.review {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.review::after {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6rem;
  line-height: 1;
  color: rgba(32, 201, 151, 0.14);
  pointer-events: none;
}
.review:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 201, 151, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.stars {
  color: #ffc857;
  letter-spacing: 4px;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.review-title {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.review blockquote {
  margin: 0 0 18px 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.reviewer {
  color: var(--text);
  font-weight: 600;
}
.source {
  color: var(--text-soft);
  font-size: 0.85rem;
}
.reviews-cta {
  text-align: center;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Step cards: stagger-friendly subtle hover */
.step {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.step:hover {
  transform: translateY(-3px);
  border-color: rgba(32, 201, 151, 0.4);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

/* Screenshots: gentle lift on hover */
.shot { transition: transform 0.3s ease; }
.shot:hover { transform: translateY(-4px) scale(1.01); }
