/* ==========================================================================
   Weightlytic — design system (Bootstrap 5 + custom brand layer)
   Ported from the original Tailwind theme. Edit brand tokens in :root.
   ========================================================================== */

:root {
  /* Brand palette */
  --brand: #0A84FF;
  --brand-deep: #0066CC;
  --accent-orange: #FF7A00;
  --success: #22C55E;
  --ink: #0F172A;
  --surface: #F8FAFC;

  /* Semantic */
  --foreground: var(--ink);
  --muted-foreground: #64748B;
  --border: #E6EBF1;
  --card: #FFFFFF;

  --radius: 1rem;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #0A84FF, #0066CC);
  --gradient-hero:
    radial-gradient(60% 80% at 70% 20%, rgba(10,132,255,0.22), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(255,122,0,0.14), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--surface));
  --gradient-soft: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);

  /* Shadows */
  --shadow-elegant: 0 30px 60px -30px rgba(10,132,255,0.35);
  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px -16px rgba(15,23,42,.12);
  --shadow-phone: 0 50px 80px -30px rgba(10,132,255,.35), 0 30px 60px -30px rgba(15,23,42,.25);

  /* Bootstrap overrides */
  --bs-primary: #0A84FF;
  --bs-body-color: #0F172A;
  --bs-body-font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { border-color: var(--border); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--bs-body-font-family);
  color: var(--foreground);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { letter-spacing: -0.025em; font-weight: 700; }

a { text-decoration: none; }

.text-muted-fg { color: var(--muted-foreground) !important; }

/* ---- Layout helpers ---- */
.container-px { max-width: 1280px; }
.section { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) { .section { padding-top: 7rem; padding-bottom: 7rem; } }
.bg-surface { background: var(--surface); }
.bg-hero { background: var(--gradient-hero); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink .text-muted-fg { color: rgba(255,255,255,0.7) !important; }

/* ---- Brand text & gradients ---- */
.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-brand { background: var(--gradient-brand); }

/* ---- Shadows ---- */
.shadow-elegant { box-shadow: var(--shadow-elegant); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-phone { box-shadow: var(--shadow-phone); }

/* ---- Rounded ---- */
.rounded-2xl { border-radius: 1.25rem; }
.rounded-3xl { border-radius: 1.75rem; }
.rounded-4xl { border-radius: 2.25rem; }

/* ---- Cards ---- */
.card-soft {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 1.75rem;
  box-shadow: var(--shadow-card);
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-foreground);
}
.eyebrow::before {
  content: "";
  width: .375rem; height: .375rem;
  border-radius: 999px;
  background: var(--brand);
}

/* ---- Buttons ---- */
.btn-brand {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .75rem 1.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-elegant);
  transition: transform .15s ease;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-brand:hover { color: #fff; transform: scale(1.03); }
.btn-ghost {
  background: #fff;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .75rem 1.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background .15s ease;
}
.btn-ghost:hover { background: var(--surface); color: var(--foreground); }
.btn-sm-pill { padding: .55rem 1.25rem; font-size: .875rem; }

/* ---- Navbar ---- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  transition: all .3s ease;
  background: transparent;
}
.site-header.scrolled {
  background: rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230,235,241,.6);
}
.nav-link-brand {
  color: var(--muted-foreground);
  font-weight: 500;
  font-size: .9rem;
  padding: .4rem .25rem;
  transition: color .15s ease;
}
.nav-link-brand:hover, .nav-link-brand.active { color: var(--foreground); }

/* ---- Logo ---- */
.site-logo { height: 2.5rem; width: auto; display: block; }
@media (min-width: 992px) { .site-logo { height: 2.75rem; } }

/* ---- Section heading ---- */
.section-title { font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; }
.section-sub { font-size: 1.125rem; color: var(--muted-foreground); }

/* ---- Feature / stat cards ---- */
.icon-badge {
  display: grid; place-items: center;
  height: 2.5rem; width: 2.5rem;
  border-radius: 1rem;
  background: var(--gradient-brand);
  color: #fff;
}
.check-badge {
  display: grid; place-items: center;
  height: 1.5rem; width: 1.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
}
.stat-tile {
  border-radius: 1.75rem;
  padding: 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-elegant);
  background: var(--gradient-brand);
}
.stat-tile.orange { background: linear-gradient(135deg,#FFB36B,#FF7A00); }
.stat-tile.green  { background: linear-gradient(135deg,#86EFAC,#22C55E); }

/* ---- Forms ---- */
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .875rem;
  background: #fff;
  padding: .875rem 1rem;
  font-size: .95rem;
  outline: none;
}
.input:focus {
  box-shadow: 0 0 0 3px rgba(10,132,255,.25);
  border-color: var(--brand);
}
.input-pill { border-radius: 999px; padding: 1rem 1.5rem; }

/* ---- FAQ / accordion ---- */
details.faq { padding: 1.5rem; }
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  font-size: 1.125rem; font-weight: 600;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .toggle {
  display: grid; place-items: center;
  height: 2rem; width: 2rem; flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface);
  transition: transform .2s ease;
}
details.faq[open] summary .toggle { transform: rotate(45deg); }

/* ---- Pricing toggle ---- */
.toggle-pill {
  display: inline-flex; align-items: center; gap: .25rem;
  border: 1px solid var(--border); background: #fff;
  border-radius: 999px; padding: .25rem; box-shadow: var(--shadow-card);
}
.toggle-pill button {
  border: none; background: transparent;
  border-radius: 999px; padding: .5rem 1.25rem;
  font-size: .875rem; font-weight: 600; color: var(--muted-foreground);
}
.toggle-pill button.active { background: var(--gradient-brand); color: #fff; }

.plan-featured { border: 2px solid var(--brand) !important; box-shadow: var(--shadow-elegant); }

/* ---- Phone mockup ---- */
.phone {
  position: relative;
  width: 300px;
  margin-inline: auto;
}
@media (min-width: 576px) { .phone { width: 340px; } }
.phone::before {
  content: ""; position: absolute; inset: -2rem; z-index: -1;
  border-radius: 60px; opacity: .6; filter: blur(48px);
  background: var(--gradient-brand);
}
.phone-frame {
  position: relative;
  border-radius: 3rem;
  border: 10px solid #0F172A;
  background: #0F172A;
  box-shadow: var(--shadow-phone);
}
.phone-notch {
  position: absolute; left: 50%; top: .5rem; z-index: 20;
  height: 1.5rem; width: 7rem; transform: translateX(-50%);
  border-radius: 999px; background: #000;
}
.phone-screen {
  position: relative; overflow: hidden;
  border-radius: 2.2rem; background: #fff;
  aspect-ratio: 9 / 19;
}
.phone-screen > .screen-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* phone screen internals */
.ps-pad { padding: 1.25rem; }
.ps-up { text-transform: uppercase; letter-spacing: .08em; font-size: .625rem; color: var(--muted-foreground); }
.ps-card { background: #fff; border-radius: 1.25rem; padding: 1rem; box-shadow: var(--shadow-card); }
.ps-soft { background: var(--surface); border-radius: 1.25rem; padding: 1rem; }
.ps-tabbar {
  margin-top: auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: .25rem;
  background: #fff; border-radius: 999px; padding: .375rem; box-shadow: var(--shadow-card);
}
.ps-tab { border-radius: 999px; padding: .375rem 0; text-align: center; font-size: .625rem; font-weight: 500; color: var(--muted-foreground); }
.ps-tab.active { background: var(--gradient-brand); color: #fff; }
.progress-thin { height: .375rem; border-radius: 999px; background: var(--surface); overflow: hidden; }
.progress-thin > span { display: block; height: 100%; border-radius: 999px; }

/* ---- Timeline (how it works) ---- */
.timeline { position: relative; max-width: 48rem; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; left: 1.5rem; top: .5rem; bottom: .5rem; width: 1px;
  background: linear-gradient(to bottom, var(--brand), var(--accent-orange), var(--success));
}
@media (min-width: 768px) { .timeline::before { left: 2rem; } }
.timeline-num {
  position: relative; z-index: 10;
  display: grid; place-items: center;
  height: 3rem; width: 3rem; flex: 0 0 auto;
  border-radius: 999px; color: #fff; font-weight: 700; font-size: .875rem;
  background: var(--gradient-brand); box-shadow: var(--shadow-elegant);
}
@media (min-width: 768px) { .timeline-num { height: 4rem; width: 4rem; font-size: 1rem; } }

/* ---- Animations ---- */
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.animate-float { animation: float-y 6s ease-in-out infinite; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-up { animation: fade-up .6s ease-out both; }

/* ---- Misc ---- */
.divider { border-top: 1px solid var(--border); }
.star { color: #fbbf24; }
.prose p { margin-bottom: 0; }
.blog-thumb { aspect-ratio: 16/9; border-radius: 1.25rem; background: var(--gradient-brand); }
.tag-pill { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: .35rem 1.25rem; font-size: .875rem; font-weight: 600; }
.cat-pill { display: inline-block; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: .35rem 1rem; font-size: .72rem; font-weight: 600; color: var(--muted-foreground); transition: border-color .15s ease, color .15s ease, transform .15s ease; }
a.cat-pill:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.cat-pill.active, a.cat-pill.active:hover { border-color: transparent; color: #fff; background: var(--gradient-brand); transform: none; }

/* ---- Blog hero: shorter than a standard section ---- */
.blog-hero { padding-top: 1.75rem; padding-bottom: 1.75rem; }
@media (min-width: 768px) { .blog-hero { padding-top: 2.25rem; padding-bottom: 2.25rem; } }

/* Bolder blue gradient band, fading softly into the page below */
.blog-hero-bg {
  background:
    radial-gradient(70% 140% at 82% 0%, rgba(10,132,255,0.30), transparent 62%),
    linear-gradient(180deg, rgba(10,132,255,0.16) 0%, rgba(10,132,255,0.05) 55%, var(--surface) 100%);
}

/* ---- Featured (latest) blog post card in the hero ---- */
.blog-featured { color: var(--foreground); transition: transform .15s ease, box-shadow .15s ease; }
.blog-featured:hover { transform: translateY(-3px); box-shadow: var(--shadow-elegant); }
.blog-featured-thumb { position: relative; aspect-ratio: 21/9; background: var(--gradient-brand); background-size: cover; background-position: center; }
.blog-featured-badge { position: absolute; top: 1rem; left: 1rem; background: rgba(255,255,255,.92); color: var(--ink); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .7rem; border-radius: 999px; box-shadow: var(--shadow-card); }
.blog-featured-excerpt { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- Blog pagination ---- */
.blog-pagination .page-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted-foreground); font-weight: 600; font-size: .875rem; text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.blog-pagination a.page-pill:hover { border-color: var(--brand); color: var(--brand); }
.blog-pagination .page-pill.active { border-color: transparent; color: #fff; background: var(--gradient-brand); }
.blog-pagination .page-ellipsis { color: var(--muted-foreground); padding: 0 .25rem; }

/* ---- Rich-text article body (rendered from sanitized HTML) ---- */
.blog-body > :first-child { margin-top: 0; }
.blog-body > :last-child { margin-bottom: 0; }
.blog-body p { margin: 0 0 1.25rem; }
.blog-body h2 { font-size: 1.6rem; font-weight: 800; margin: 2.25rem 0 .75rem; line-height: 1.25; }
.blog-body h3 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .5rem; }
.blog-body h4 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 .5rem; }
.blog-body ul, .blog-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.blog-body li { margin-bottom: .4rem; }
.blog-body a { color: var(--brand); text-decoration: underline; }
.blog-body blockquote {
  margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem;
  border-left: 4px solid var(--brand); color: rgba(15,23,42,.72); font-style: italic;
}

/* ---- Store badges (coming soon) ---- */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1rem;
  border-radius: .875rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.1;
  transition: transform .15s ease, opacity .15s ease;
}
.store-badge:hover { color: #fff; transform: scale(1.03); opacity: .92; }
.store-badge-icon { display: inline-flex; }
.store-badge-text { display: flex; flex-direction: column; }
.store-badge-text small { font-size: .62rem; opacity: .8; letter-spacing: .01em; }
.store-badge-text strong { font-size: .98rem; font-weight: 600; }
