/* Nelvi — shared styles */

:root {
  color-scheme: light dark;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #4a5468;
  --border: rgba(15, 23, 42, 0.1);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --ok: #16a34a;
  --warn: #b45309;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.04), 0 10px 25px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --container: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121a2b;
    --text: #e6edf6;
    --muted: #9aa4b8;
    --border: rgba(230, 237, 246, 0.12);
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 252, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(11, 18, 32, 0.75); }
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-primary a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-primary a:hover { color: var(--text); text-decoration: none; }
.nav-primary .btn {
  margin-left: 6px;
  color: #ffffff;
  font-weight: 600;
}
.nav-primary .btn:hover { color: #ffffff; }

@media (max-width: 640px) {
  .nav-primary { gap: 14px; }
  .nav-primary a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--text); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* ---------- Sections / cards ---------- */
main { padding: 32px 0 56px; }

.section { padding: 56px 0; }
.section-narrow { max-width: 820px; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 650; }

p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
}

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 6px 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 24px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: center;
}
.hero-visual img {
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.hero-visual img:first-child { transform: translateY(18px); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { grid-template-columns: repeat(2, 1fr); max-width: 480px; }
}

/* ---------- Features grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.feature .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Screenshots ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.screens img {
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .screens {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .screens img { scroll-snap-align: start; }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 0.97rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.plan .plan-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.plan .price {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}
.plan .price-sub { color: var(--muted); margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; }
.plan ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.plan ul li:last-child { border-bottom: 0; }
.plan ul li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--muted);
  transition: transform 160ms ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p, .faq details > div {
  padding: 0 18px 16px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Legal pages layout ---------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
}
.legal header.legal-header {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 24px;
}
.legal h1 { font-size: 2rem; margin-bottom: 6px; }
.legal .sub { margin: 0; color: var(--muted); }
.legal nav.toc {
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: 18px 0;
  background: var(--surface);
}
.legal nav.toc a { margin-right: 14px; white-space: nowrap; font-size: 0.94rem; }
.legal section { margin: 28px 0; }
.legal h2 { font-size: 1.3rem; margin-bottom: 10px; }
.legal h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.legal th, .legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th { font-weight: 700; background: var(--accent-soft); }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.legal .small { font-size: 0.92rem; color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal ul li { margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 56px;
  padding: 36px 0 28px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.site-footer h4 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 3px 0; }
.site-footer ul a { color: var(--text); font-size: 0.95rem; }
.site-footer ul a:hover { color: var(--accent); text-decoration: none; }
.site-footer .brand-block p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 10px;
  max-width: 360px;
}
.site-footer .fine {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .brand-block { grid-column: 1 / -1; }
}

/* ---------- /glp1-tracker landing ---------- */
.landing-header .container { justify-content: flex-start; }

.apple-logo {
  width: 0.95em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.18em;
  margin-left: 4px;
}

.sticky-cta-mobile { display: none; }
@media (max-width: 860px) {
  .landing-header { display: none; }
  .sticky-cta-mobile {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 60;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  }
  .sticky-cta-mobile .btn {
    width: 100%;
    padding: 24px 28px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    animation: ctaPulse 1.2s ease-in-out infinite;
  }
  .sticky-cta-mobile .btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.7) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: ctaShimmer 1.8s linear infinite;
    pointer-events: none;
  }
  body.landing { padding-top: 116px; }
}
@keyframes ctaPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45), 0 0 0 0 rgba(37, 99, 235, 0.55);
  }
  50% {
    transform: scale(1.055);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.75), 0 0 0 10px rgba(37, 99, 235, 0);
  }
}
@keyframes ctaShimmer {
  0%   { left: -75%; }
  55%  { left: 125%; }
  100% { left: 125%; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta-mobile .btn,
  .sticky-cta-mobile .btn::after {
    animation: none !important;
  }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) {
  .sticky-cta-mobile { background: rgba(11, 18, 32, 0.92); }
}

.landing-hero-inner { grid-template-columns: 1.2fr 0.8fr; }
.hero-visual-single {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-visual-single img {
  width: 100%;
  max-width: 320px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.trust-line {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 860px) {
  .landing-hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual-single img { max-width: 240px; }
}
@media (max-width: 700px) {
  body.landing .container { padding-left: 28px; padding-right: 28px; }
  body.landing .sticky-cta-mobile { padding-left: 24px; padding-right: 24px; }
  body.landing .hero { padding-top: 28px; padding-bottom: 8px; }
  body.landing .section { padding-top: 36px; padding-bottom: 36px; }
  body.landing main { padding-top: 16px; padding-bottom: 24px; }
  body.landing h1 { font-size: clamp(1.85rem, 7vw, 2.4rem); }
  body.landing h2 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); }
  body.landing .hero .lead { font-size: 1.05rem; margin-bottom: 20px; }
  body.landing .hero-ctas .btn,
  body.landing .section .btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: 14px;
  }
  body.landing .trust-line { margin-top: 14px; }
  body.landing .landing-secondary-cta { padding: 24px; }
  body.landing .landing-secondary-cta .cta-text { text-align: center; }
}

.landing-features { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .landing-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .landing-features { grid-template-columns: 1fr; } }

.landing-screens { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .landing-screens {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 70%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .landing-screens img { scroll-snap-align: start; }
}

.landing-secondary-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.landing-secondary-cta .cta-text h2 { margin-bottom: 8px; }
.landing-secondary-cta .cta-text p { color: var(--muted); margin-bottom: 18px; }
.landing-secondary-cta .cta-qr {
  text-align: center;
  flex-shrink: 0;
}
.landing-secondary-cta .cta-qr #qr {
  width: 132px;
  height: 132px;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
}
.landing-secondary-cta .cta-qr #qr svg {
  width: 100%;
  height: 100%;
  display: block;
}
.landing-secondary-cta .cta-qr p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
@media (max-width: 700px) {
  .landing-secondary-cta { grid-template-columns: 1fr; padding: 28px; }
  .landing-secondary-cta .cta-qr { display: none; }
}

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
