/* SpendSmart support site — matches app brand #5E5CDE */

:root {
  --brand: #5e5cde;
  --brand-dark: #4d4aeb;
  --brand-soft: #eeedfd;
  --text: #1c1c1e;
  --text-muted: #636366;
  --surface: #ffffff;
  --bg: #f5f5f7;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 22px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --max: 1080px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(94, 92, 222, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover,
.nav a.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

/* Hero — full bleed */
.hero {
  background: linear-gradient(145deg, var(--brand) 0%, #7b79e8 55%, #9d9bf0 100%);
  color: #fff;
  padding: 72px 24px 88px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 85% 15%, rgba(255, 255, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(0, 0, 0, 0.08), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-copy .tagline {
  margin: 0 0 28px;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  opacity: 0.92;
  max-width: 32ch;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  text-decoration: none;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.16);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  text-decoration: none;
}

.hero-visual img {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

/* Sections */
main {
  padding-bottom: 64px;
}

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

.section-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0 0 32px;
  color: var(--text-muted);
  max-width: 52ch;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--brand);
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Contact band */
.contact-band {
  margin-top: 56px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-band h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.contact-band p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.contact-email {
  font-size: 1.125rem;
  font-weight: 600;
  word-break: break-all;
}

/* Legal / prose pages */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
}

.page-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-hero .meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose strong {
  color: var(--text);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 24px;
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .hero-visual img {
    width: 112px;
    height: 112px;
    border-radius: 26px;
  }

  .nav {
    gap: 4px;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
