/* ============================================================
   Secure Storage — Marketing Website
   ============================================================ */

:root {
  --bg-primary: #111315;
  --bg-surface: #1A1C1E;
  --bg-elevated: #1E2024;
  --bg-container: #2A2D32;
  --accent: #90C552;
  --accent-dark: #496329;
  --accent-glow: rgba(144, 197, 82, 0.15);
  --text-primary: #E2E8F0;
  --text-secondary: #C4C7CF;
  --text-muted: rgba(255, 255, 255, 0.38);
  --outline: rgba(142, 144, 153, 0.2);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --btn-on-accent: #0B2200;
}

/* Light theme overrides */
[data-theme="light"] {
  --bg-primary: #FFFFFF;
  --bg-surface: #F5F5F7;
  --bg-elevated: #EEEEF0;
  --bg-container: #E2E3E7;
  --accent: #7AB33E;
  --accent-dark: #496329;
  --accent-glow: rgba(144, 197, 82, 0.15);
  --text-primary: #1A1C1E;
  --text-secondary: #44474F;
  --text-muted: rgba(0, 0, 0, 0.38);
  --outline: rgba(0, 0, 0, 0.12);
  --btn-on-accent: #FFFFFF;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}
::selection { background: rgba(144, 197, 82, 0.35); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.text-accent { color: var(--accent); }
.mono { font-family: var(--font-mono); color: var(--accent); font-size: 0.9em; }

/* ---- Animations ---- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero reveal animation */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.reveal-line {
  display: block;
  opacity: 0;
  animation: reveal-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav-container {
  height: 100%;
}
.navbar.show-logo {
  background: color-mix(in srgb, var(--bg-primary) 95%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--outline);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.navbar.show-logo .nav-logo {
  opacity: 1;
  transform: translateY(0);
}
.nav-logo-icon {
  width: 64px;
  height: 44px;
  overflow: hidden;
  margin-right: -14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-icon:empty {
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent);
  color: var(--btn-on-accent) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: opacity 0.2s ease !important;
}
.nav-cta:hover { opacity: 0.9; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  padding: 0;
  margin-left: auto;
  margin-right: 16px;
}
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}
.icon-sun { opacity: 1; }
.icon-moon { opacity: 0; pointer-events: none; }
[data-theme="light"] .icon-sun { opacity: 0; pointer-events: none; }
[data-theme="light"] .icon-moon { opacity: 1; pointer-events: auto; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 56px 0 60px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -40px;
}
.hero-centered {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero-lottie {
  width: 340px;
  height: 170px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto -12px;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}
.hero-lottie svg {
  transform: scale(1.8);
}
.hero-lottie:empty {
  display: none;
}
.hero-title {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--btn-on-accent);
}
.btn-primary:hover {
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* Waitlist form */
.waitlist-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.waitlist-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.waitlist-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.waitlist-form input[type="email"]::placeholder {
  color: var(--text-muted);
}
.waitlist-form .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.waitlist-hint {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.waitlist-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  animation: reveal-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.waitlist-error {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: #E57373;
}

/* Phone mockup */
.phone-mockup {
  width: 280px;
  margin: 0 auto;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 36px;
  border: 1px solid var(--outline);
  box-shadow: 0 0 80px var(--accent-glow), 0 24px 48px rgba(0, 0, 0, 0.2);
}
.phone-screen {
  background: var(--bg-surface);
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  padding: 20px 16px;
}
.phone-status-bar {
  height: 32px;
  margin-bottom: 24px;
  background: var(--bg-container);
  border-radius: 16px;
  width: 40%;
  margin-left: auto;
  margin-right: auto;
}
.phone-placeholder-content { display: flex; flex-direction: column; gap: 12px; }
.placeholder-card {
  height: 100px;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-container));
  border-radius: var(--radius);
}
.placeholder-line {
  height: 12px;
  background: var(--bg-container);
  border-radius: 6px;
}
.placeholder-line.short { width: 60%; }

/* ============================================================
   Features
   ============================================================ */
.features {
  padding: 80px 0;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--accent-glow);
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-text { text-align: left; }
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   Security
   ============================================================ */
.security {
  padding: 80px 0;
  background: var(--bg-surface);
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.security-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}
.security-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.security-icon svg { width: 24px; height: 24px; }
.security-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.security-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   How It Works
   ============================================================ */
.how-it-works { padding: 80px 0; }
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
}
.step {
  text-align: center;
  max-width: 260px;
  flex: 1;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-on-accent);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.step-line {
  width: 80px;
  height: 2px;
  background: var(--outline);
  margin-top: 24px;
  flex-shrink: 0;
}

/* ============================================================
   Preview
   ============================================================ */
.preview {
  padding: 80px 0;
  background: var(--bg-surface);
}
.preview-mockups {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  margin-top: 48px;
}
.preview-phone {
  text-align: center;
}
.preview-screen {
  width: 180px;
  aspect-ratio: 9 / 19.5;
  background: var(--bg-elevated);
  border: 1px solid var(--outline);
  border-radius: 24px;
  padding: 20px 12px;
  transition: border-color 0.3s ease;
}
.preview-phone.featured .preview-screen {
  width: 200px;
  border-color: var(--accent-dark);
  box-shadow: 0 0 40px var(--accent-glow);
}
.preview-placeholder { display: flex; flex-direction: column; gap: 10px; }
.placeholder-card.wide {
  height: 80px;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-container));
  border-radius: 10px;
}
.placeholder-row {
  height: 44px;
  background: var(--bg-container);
  border-radius: 10px;
}
.preview-label {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.preview-caption {
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   Download CTA
   ============================================================ */
.download {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--accent-glow), color-mix(in srgb, var(--accent) 5%, transparent));
}
.download-content {
  text-align: center;
}
.download h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.download p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.coming-soon {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--outline);
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.footer-logo-icon {
  width: 56px;
  height: 56px;
  margin-right: -16px;
  flex-shrink: 0;
}
.footer-logo-icon:empty { display: none; }
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   Legal Pages (Privacy Policy, Terms of Service)
   ============================================================ */
.legal-page {
  padding: 100px 0 60px;
}
.legal-content {
  max-width: 720px;
  margin: 0 auto;
}
.legal-content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
}
.legal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}
.legal-content li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}
.legal-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover {
  opacity: 0.8;
}
.legal-content strong {
  color: var(--text-primary);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--outline);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 16px; padding: 14px 0; }
  .nav-links .nav-cta { display: none; }

  .hero { padding: 100px 0 48px; min-height: auto; }
  .hero-lottie { width: 280px; height: 140px; }
  .hero-title { font-size: clamp(32px, 8vw, 48px); }
  .hero-subtitle { font-size: 15px; }

  .waitlist-form {
    flex-direction: column;
    max-width: 360px;
  }
  .waitlist-form .btn { width: 100%; justify-content: center; }

  .features-grid { grid-template-columns: 1fr; }

  .security-grid { grid-template-columns: 1fr; }

  .steps { flex-direction: column; align-items: center; gap: 0; }
  .step-line {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .preview-mockups { gap: 12px; }
  .preview-screen { width: 120px !important; }
  .preview-phone.featured .preview-screen { width: 140px !important; }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
