/* ==========================================================================
   Time Release Safes — Marketing site styles
   Single shared stylesheet for all pages.
   Color palette and type scale match the app's canonical design system.
   ========================================================================== */

:root {
  /* Brand */
  --brand-purple-1: #7C58F6;
  --brand-purple-2: #5E7BFF;
  --bg-1: #0F1B4C;
  --bg-2: #1E1456;
  --bg-3: #2C0F66;
  --bg-deep: #0a0a0f;

  /* Semantic */
  --success: #10B981;
  --success-soft: #6EE7B7;
  --warning: #F59E0B;
  --warning-soft: #FCD34D;
  --danger: #DC2626;
  --danger-soft: #FCA5A5;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-tertiary: rgba(255, 255, 255, 0.55);
  --text-lavender: #C4B5FD;
  --text-on-light: #1E1456;

  /* Surfaces */
  --surface-card: rgba(255, 255, 255, 0.04);
  --surface-card-hover: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(167, 139, 250, 0.18);
  --border-medium: rgba(167, 139, 250, 0.3);
  --border-strong: rgba(167, 139, 250, 0.5);

  /* Type scale (matches app canonical) */
  --fs-caption: 12px;
  --fs-small: 14px;
  --fs-body: 16px;
  --fs-emphasis: 18px;
  --fs-title: 22px;
  --fs-hero: 32px;
  --fs-display: 56px;

  /* Spacing scale (4-based) */
  --sp-xs: 4px;
  --sp-s: 8px;
  --sp-m: 12px;
  --sp-l: 16px;
  --sp-xl: 24px;
  --sp-xxl: 32px;
  --sp-xxxl: 48px;
  --sp-huge: 80px;

  /* Layout */
  --max-content: 1120px;
  --max-narrow: 720px;

  /* Effects */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --shadow-purple: 0 12px 48px rgba(124, 88, 246, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--text-lavender); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Page background — soft purple gradient pinned behind everything */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124, 88, 246, 0.35), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
}

/* Layout containers */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}
.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(15, 27, 76, 0.55);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 14px var(--sp-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-l);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: var(--fs-emphasis);
  color: var(--text-primary);
}
.nav-brand-card {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(124, 88, 246, 0.45);
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 22px;
  height: 28px;
  color: #fff;
}
.nav-links {
  display: flex;
  gap: var(--sp-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  border-radius: var(--radius-s);
  color: #fff !important;
  font-size: var(--fs-small);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 88, 246, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 0;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 88, 246, 0.55);
}
.nav-mobile-toggle { display: none; background: transparent; border: 0; color: #fff; padding: 6px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-s);
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 88, 246, 0.4);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124, 88, 246, 0.55);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.btn-large {
  padding: 18px 28px;
  font-size: var(--fs-body);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: var(--sp-huge) 0;
}
.section-tight {
  padding: 56px 0;
}
.section-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(124, 88, 246, 0.15);
  border: 1px solid rgba(124, 88, 246, 0.4);
  border-radius: 99px;
  font-size: var(--fs-caption);
  color: var(--text-lavender);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-l);
}
.section-title {
  font-size: var(--fs-hero);
  font-weight: 700;
  margin-bottom: var(--sp-l);
}
.section-sub {
  font-size: var(--fs-emphasis);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.5;
}

/* ==========================================================================
   Hero (homepage)
   ========================================================================== */
.hero {
  padding: 80px 0 56px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(124, 88, 246, 0.15);
  border: 1px solid rgba(124, 88, 246, 0.4);
  border-radius: 99px;
  font-size: var(--fs-caption);
  color: var(--text-lavender);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-xl);
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 920px;
  margin: 0 auto var(--sp-l);
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: var(--fs-emphasis);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto var(--sp-xxl);
  line-height: 1.55;
}
.hero-actions {
  display: inline-flex;
  gap: var(--sp-m);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--sp-xxl);
}
.hero-trust {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-xl);
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-trust svg { color: var(--success-soft); }

/* ==========================================================================
   Phone mockup (illustrative)
   ========================================================================== */
.phone-stage {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-xxxl);
  perspective: 1200px;
}
.phone {
  width: 320px;
  height: 660px;
  background: linear-gradient(155deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
  border-radius: 36px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(124, 88, 246, 0.15);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transform: rotateX(2deg) rotateY(-4deg);
}
.phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 14px;
}
.phone-content {
  margin-top: 36px;
}

/* ==========================================================================
   Card grids
   ========================================================================== */
.grid {
  display: grid;
  gap: var(--sp-l);
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  background: var(--surface-card-hover);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-l);
  color: #fff;
}
.card-title {
  font-size: var(--fs-emphasis);
  font-weight: 700;
  margin-bottom: var(--sp-s);
}
.card-body {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Use case rows (alternating)
   ========================================================================== */
.use-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xxxl);
  align-items: center;
  padding: var(--sp-xxxl) 0;
  border-bottom: 1px solid var(--border-soft);
}
.use-row:last-child { border-bottom: 0; }
.use-row.reverse .use-text { order: 2; }
.use-row.reverse .use-visual { order: 1; }
.use-text h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--sp-l);
}
.use-text p {
  font-size: var(--fs-emphasis);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--sp-l);
}
.use-text .quote {
  font-style: italic;
  color: var(--text-lavender);
  font-size: var(--fs-small);
  border-left: 3px solid var(--brand-purple-1);
  padding-left: 14px;
}
.use-visual {
  background: linear-gradient(135deg, rgba(124, 88, 246, 0.18), rgba(94, 123, 255, 0.10));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Step list (how it works)
   ========================================================================== */
.steps {
  display: grid;
  gap: var(--sp-xl);
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-xl);
  align-items: flex-start;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 28px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--fs-emphasis);
  box-shadow: 0 6px 16px rgba(124, 88, 246, 0.4);
}
.step h3 {
  font-size: var(--fs-title);
  margin-bottom: var(--sp-s);
}
.step p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

/* ==========================================================================
   Pricing
   ========================================================================== */
.price-toggle {
  display: inline-flex;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  padding: 4px;
  margin: var(--sp-xl) auto;
}
.price-toggle button {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: 600;
  border-radius: 99px;
}
.price-toggle button.is-active {
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  color: #fff;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-l);
  margin-top: var(--sp-xxl);
}
.price-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: linear-gradient(180deg, rgba(124, 88, 246, 0.20), rgba(94, 123, 255, 0.06));
  border-color: var(--border-strong);
  box-shadow: var(--shadow-purple);
  position: relative;
}
.price-card.featured::after {
  content: "Most popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand-purple-1), var(--brand-purple-2));
  color: #fff;
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 99px;
}
.price-name {
  font-size: var(--fs-caption);
  color: var(--text-lavender);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-s);
}
.price-amount {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price-amount .unit {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 4px;
}
.price-frame {
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-l);
  min-height: 18px;
}
.price-features {
  list-style: none;
  padding: 0;
  margin: var(--sp-xl) 0;
  flex: 1;
}
.price-features li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.5;
}
.price-features li::before {
  content: "";
  flex: 0 0 16px;
  height: 16px;
  margin-top: 4px;
  background: var(--success-soft);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") no-repeat center / contain;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  display: grid;
  gap: var(--sp-m);
}
.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-m);
  padding: 4px 24px;
}
.faq-item summary {
  font-size: var(--fs-emphasis);
  font-weight: 600;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-l);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 24px;
  color: var(--text-lavender);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  padding-bottom: 18px;
  line-height: 1.65;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-xxl);
  padding-bottom: var(--sp-xxl);
}
.footer-grid h4 {
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-lavender);
  margin-bottom: var(--sp-l);
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-grid li {
  margin-bottom: 10px;
}
.footer-grid a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}
.footer-brand p {
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  margin-top: var(--sp-l);
  max-width: 320px;
  line-height: 1.6;
}
.footer-meta {
  border-top: 1px solid var(--border-soft);
  padding-top: var(--sp-xl);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-l);
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, rgba(124, 88, 246, 0.30), rgba(94, 123, 255, 0.18));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-purple);
  margin: 56px 0;
}
.cta-banner h2 {
  font-size: var(--fs-hero);
  margin-bottom: var(--sp-l);
}
.cta-banner p {
  font-size: var(--fs-emphasis);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--sp-xl);
  line-height: 1.55;
}

/* ==========================================================================
   Inline content (security, about, etc.)
   ========================================================================== */
.prose {
  max-width: var(--max-narrow);
  margin: 0 auto;
}
.prose h2 {
  font-size: 28px;
  font-weight: 700;
  margin: var(--sp-xxxl) 0 var(--sp-l);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: var(--fs-title);
  font-weight: 600;
  margin: var(--sp-xl) 0 var(--sp-m);
}
.prose p {
  font-size: var(--fs-emphasis);
  color: var(--text-secondary);
  margin-bottom: var(--sp-l);
  line-height: 1.7;
}
.prose ul {
  margin: 0 0 var(--sp-l);
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.prose ul li { margin-bottom: 8px; }
.prose strong { color: #fff; }
.callout {
  background: rgba(124, 88, 246, 0.08);
  border-left: 4px solid var(--brand-purple-1);
  border-radius: var(--radius-s);
  padding: var(--sp-l) var(--sp-xl);
  margin: var(--sp-xl) 0;
}
.callout p { color: var(--text-primary); margin: 0; font-size: var(--fs-small); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .use-row { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .use-row.reverse .use-text,
  .use-row.reverse .use-visual { order: initial; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 32px; }
  .cta-banner { padding: 40px 24px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .step { grid-template-columns: 1fr; }
}
