/* ============================================================
   Brim — marketing site
   Single stylesheet, vanilla CSS, mobile-first.
   ============================================================ */

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ---------- Theme tokens ---------- */
:root {
  /* Brand */
  --primary: #4FC3F7;
  --primary-dark: #0288D1;
  --primary-light: #B3E5FC;
  --accent: #01579B;

  /* Dark surfaces (used for hero + footer) */
  --bg-dark: #0B1220;
  --surface-dark: #111A2E;
  --card-dark: #1A2440;
  --divider-dark: #22304A;
  --text-on-dark: #E6EEF8;
  --text-on-dark-muted: #A9B6C8;

  /* Light surfaces (content sections) */
  --background: #F7FAFD;
  --surface: #FFFFFF;
  --surface-alt: #F1F6FB;
  --text-primary: #0E1B2C;
  --text-secondary: #546E7A;
  --text-tertiary: #8A9AAB;
  --divider: #E3EAF2;

  /* Feedback */
  --success: #66BB6A;
  --warning: #FFB74D;
  --error: #E57373;

  /* Layout */
  --container: 1100px;
  --gap-sm: 12px;
  --gap: 24px;
  --gap-lg: 48px;
  --radius: 14px;
  --radius-lg: 20px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(14, 27, 44, 0.06);
  --shadow: 0 6px 24px rgba(14, 27, 44, 0.08);
  --shadow-lg: 0 20px 50px rgba(14, 27, 44, 0.18);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--text-secondary); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.55; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
}

/* On-dark variants */
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--text-on-dark); }
.on-dark p, .on-dark li { color: var(--text-on-dark-muted); }
.on-dark .eyebrow { color: var(--primary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: clamp(56px, 9vw, 110px) 0; }
.section-tight { padding: clamp(36px, 6vw, 64px) 0; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-on-dark);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-image: url('../assets/logo_transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 180ms ease;
}
.nav-links a:hover { color: var(--text-on-dark); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #0B1220;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 195, 247, 0.35);
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-on-dark);
  border-radius: 10px;
}
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
.mobile-menu {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-dark);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--text-on-dark-muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.mobile-menu a:last-of-type { border-bottom: 0; }
@media (min-width: 760px) { .mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(
    ellipse at 50% -10%,
    rgba(79, 195, 247, 0.18),
    transparent 55%
  ), var(--bg-dark);
  color: var(--text-on-dark);
  padding: clamp(56px, 8vw, 100px) 0 clamp(64px, 9vw, 120px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-logo {
  width: clamp(96px, 14vw, 132px);
  height: clamp(96px, 14vw, 132px);
  margin: 0 auto 28px;
  border-radius: 28px;
  background-image: url('../assets/logo_transparent.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 12px 40px rgba(79, 195, 247, 0.35));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero h1 { color: var(--text-on-dark); margin-bottom: 16px; }
.hero .lead {
  color: var(--text-on-dark-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}
.tagline {
  display: inline-block;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn-primary {
  background: var(--primary);
  color: #0B1220;
  box-shadow: 0 12px 30px rgba(79, 195, 247, 0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #67CDF8;
}
.btn-store {
  background: var(--card-dark);
  color: var(--text-on-dark);
  border: 1px solid var(--divider-dark);
}
.btn-store:hover {
  background: var(--surface-dark);
  border-color: var(--primary);
}
.btn-ghost {
  color: var(--primary);
  border: 1px solid currentColor;
}
.btn-ghost:hover {
  background: rgba(79, 195, 247, 0.08);
}
.btn svg { width: 22px; height: 22px; }

/* ---------- Features ---------- */
.features-head { text-align: center; margin-bottom: 60px; }
.features-head p { max-width: 600px; margin: 14px auto 0; }
.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature {
  background: var(--surface);
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(79, 195, 247, 0.4);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.18), rgba(2, 136, 209, 0.10));
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p  { font-size: 0.95rem; }

/* ---------- How it works (alternating section) ---------- */
.alt {
  background: var(--surface-alt);
}
.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--divider);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.18;
  line-height: 1;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(ellipse at 80% 10%, rgba(79, 195, 247, 0.20), transparent 50%),
    var(--bg-dark);
  color: var(--text-on-dark);
  text-align: center;
}
.cta-band h2 { color: var(--text-on-dark); margin-bottom: 12px; }
.cta-band p {
  color: var(--text-on-dark-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-muted);
  padding: 56px 0 32px;
  border-top: 1px solid var(--divider-dark);
}
.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
  }
}
.footer-brand p { margin-top: 12px; font-size: 0.93rem; max-width: 320px; }
.footer h4 {
  color: var(--text-on-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  color: var(--text-on-dark-muted);
  font-size: 0.93rem;
  transition: color 180ms ease;
}
.footer ul a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--divider-dark);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  font-size: 0.86rem;
}
@media (min-width: 760px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- Policy / long-form pages ---------- */
.page-hero {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 80px 0 48px;
  text-align: center;
}
.page-hero h1 { color: var(--text-on-dark); }
.page-hero p { color: var(--text-on-dark-muted); margin-top: 12px; }
.page-hero .meta {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(79, 195, 247, 0.12);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.prose {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  margin: -28px auto 0;
  max-width: 820px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow);
  border: 1px solid var(--divider);
}
.prose h2 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 8px; }
.prose p, .prose li {
  font-size: 0.98rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.prose p { color: var(--text-secondary); }
.prose ul { margin: 8px 0 14px 18px; list-style: disc; }
.prose ul li { margin-bottom: 6px; color: var(--text-secondary); }
.prose a { color: var(--primary-dark); border-bottom: 1px solid currentColor; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose hr { margin: 36px 0; border: 0; border-top: 1px solid var(--divider); }
.callout {
  background: rgba(79, 195, 247, 0.08);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.callout strong { display: block; margin-bottom: 4px; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 10px;
  transition: border-color 180ms ease;
}
.faq details[open] { border-color: var(--primary); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 180ms ease;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: 12px;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

/* ---------- Form (data deletion) ---------- */
.form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.form input, .form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.96rem;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.18);
}
.form textarea { resize: vertical; min-height: 120px; }
.form .submit {
  background: var(--primary);
  color: #0B1220;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.form .submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(79, 195, 247, 0.35);
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.muted { color: var(--text-secondary); }
.mt-sm { margin-top: 12px; }
.mt { margin-top: 24px; }
.mt-lg { margin-top: 40px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
