/* DollarWarden marketing site.
   Palette + elevation mirror the app's design system (Dusk Periwinkle, anchored
   cards). Dark-only — same token values as DollarWarden.Web/src/index.css. */

:root {
  color-scheme: dark;
  /* Dusk Periwinkle (mirrors the app's `--dw-*` tokens). */
  --bg: #222849;
  --card: #32385c;
  --panel: #3a4168;
  --ink: #f0f2ff;
  --muted: #b0b6d4;
  --line: #4a5280;
  --accent: #9aa5ff;
  --accent-strong: #7c88f5;
  --soft: #3a4270;
  --pos: #5eead4;
  --neg: #fb7185;
  --warn: #fbbf24;

  --grad-1: #3a4270;
  --grad-2: #2a3158;
  --grad-3: #222849;
  --header-bg: rgba(34, 40, 73, 0.62);
  --header-bg-solid: var(--bg);
  --overlay-bg: rgba(20, 24, 49, 0.82);

  --maxw: 1120px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 38px -18px rgba(0, 0, 0, 0.55);
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(1100px 620px at 50% -12%, var(--grad-1) 0%, var(--grad-2) 42%, var(--grad-3) 100%)
      fixed,
    var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.num {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-strong);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(92, 102, 232, 0.75);
}
.btn-primary:hover {
  background: #4a54d0;
}
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
}
.btn-lg {
  padding: 13px 24px;
  font-size: 1rem;
}

/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-strong);
  color: #fff;
}
.brand-mark svg {
  width: 20px;
  height: 20px;
}
.brand-name {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--header-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
}
.header-cta {
  flex-shrink: 0;
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  font-weight: 800;
}
.lede {
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 38ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-points li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pos) 22%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-11'/%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
}

/* browser frame around the hero screenshot */
.browser {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.browser-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.browser-url {
  margin-left: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}
.browser img {
  width: 100%;
  height: auto;
}
.hero-shot-zoom {
  display: block;
  width: 100%;
}

/* ---------- sections ---------- */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}
.section-alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.04), transparent 60%);
  padding-block: clamp(40px, 6vw, 72px);
}
.section-head {
  max-width: 640px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  margin-top: 12px;
}
.section-sub {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  padding: 28px;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  margin-bottom: 18px;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}
.feature h3 {
  font-size: 1.18rem;
  font-weight: 700;
}
.feature p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ---------- screenshots ---------- */
.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.shot {
  margin: 0;
  padding: 14px 14px 0;
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.shot figcaption {
  padding: 16px 6px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.shot figcaption strong {
  color: var(--ink);
}
.shot-wide {
  grid-column: span 2;
}

/* each screenshot is a button that opens a full-size lightbox */
.shot-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 10px;
}
.shot-zoom:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover {
  border-color: var(--accent);
}

/* ---------- cta ---------- */
.cta {
  text-align: center;
  padding: clamp(40px, 6vw, 64px) 24px;
  background: radial-gradient(900px 360px at 50% -40%, rgba(99, 102, 241, 0.22), transparent 70%),
    var(--card);
}
.cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
}
.cta p {
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
}
.footer-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 600;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--ink);
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  width: 100%;
}

/* ---------- responsive ----------
   Three tiers: desktop (default), tablet (<= 980px), phone (<= 600px). Tweaks
   below keep the header from crowding, stop the hero/feature/screenshot grids
   from getting cramped, and avoid any horizontal overflow on small screens. */

/* tablet & down */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 44px);
  }
  /* keep the copy first; the screenshot follows it on narrow layouts */
  .hero-copy {
    max-width: 620px;
  }
  .lede {
    max-width: none;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* hide the in-page nav before the header gets tight; brand + toggle + CTA stay */
@media (max-width: 820px) {
  .site-nav {
    display: none;
  }
}

/* phone */
@media (max-width: 600px) {
  .container {
    padding-inline: 16px;
  }
  .header-inner {
    gap: 12px;
    height: 60px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature {
    padding: 22px;
  }
  .hero {
    padding: 44px 0 32px;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-nav {
    margin-left: 0;
    flex-wrap: wrap;
  }
}

/* very small phones: reclaim header space */
@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
  .header-cta {
    padding: 9px 14px;
  }
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  body,
  .card {
    transition: none;
  }
}
