/* ============================================
   SafePing — Marketing Site
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&family=Syne:wght@400;500;600;700;800&family=Karla:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --red: #E53935;
  --red-dark: #C62828;
  --red-light: #FFEBEE;
  --red-glow: rgba(229, 57, 53, 0.3);
  --green: #4CAF50;
  --text: #212121;
  --text-secondary: #424242;
  --text-tertiary: #757575;
  --text-muted: #9E9E9E;
  --bg: #FFFFFF;
  --bg-off: #F5F5F5;
  --border: #E8E8E8;
  --dark: #0C0C0C;
  --dark-surface: #161616;
  --dark-border: #2a2a2a;
  --white: #FFFFFF;

  --font-display: 'Syne', sans-serif;
  --font-body: 'Karla', sans-serif;

  --header-height: 72px;
  --section-padding: 120px;
  --container-width: 1120px;
  --radius: 12px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

/* ============================================
   Header / Navigation
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.page-legal .site-header {
  background: var(--dark);
}

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

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1.4;
}

.logo-accent {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--dark);
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

/* Ping Pulse Animation */
.ping-visual {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 48px;
}

.ping-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px var(--red-glow), 0 0 80px rgba(229, 57, 53, 0.12);
  z-index: 2;
}

.ping-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ping-expand 3.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  opacity: 0;
}

.ping-ring:nth-child(2) { animation-delay: 0s; }
.ping-ring:nth-child(3) { animation-delay: 0.8s; }
.ping-ring:nth-child(4) { animation-delay: 1.6s; }
.ping-ring:nth-child(5) { animation-delay: 2.4s; }

@keyframes ping-expand {
  0% {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    border-width: 2px;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
    border-width: 1px;
  }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--red);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.75;
}

/* Beta Signup Form */
.beta-form {
  margin-bottom: 48px;
}

.beta-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 14px;
}

.beta-input-row {
  display: flex;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--dark-border);
  transition: border-color 0.3s;
}

.beta-input-row:focus-within {
  border-color: var(--red);
}

.beta-input-row input {
  flex: 1;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--dark-surface);
  border: none;
  outline: none;
}

.beta-input-row input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.beta-input-row button {
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.beta-input-row button:hover {
  background: var(--red-dark);
}

.beta-input-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.beta-message {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.beta-message.success {
  color: var(--green);
}

.beta-message.error {
  color: var(--red);
}

.beta-message.info {
  color: rgba(255, 255, 255, 0.6);
}

.badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badge-img {
  height: 52px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.store-badge-img.badge-google {
  height: 76px;
  margin: -12px 0;
}

.store-badge-img:hover {
  opacity: 1;
}

.badge-wrapper {
  position: relative;
  display: inline-block;
}

.badge-coming-soon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(15deg);
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   Sections — Shared
   ============================================ */

.section {
  padding: var(--section-padding) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-bottom: 16px;
  color: var(--text);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-tertiary);
  max-width: 520px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 12px;
}

/* ============================================
   Features Grid
   ============================================ */

.features {
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 36px 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
  border-color: var(--red);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================
   How It Works
   ============================================ */

.how-it-works {
  background: var(--bg-off);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 28px);
  right: calc(12.5% + 28px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(229, 57, 53, 0.25);
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--dark);
  padding: 64px 0;
  color: rgba(255, 255, 255, 0.45);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-left .footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-left .footer-copyright {
  font-size: 0.85rem;
}

.footer-left .footer-contact {
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-left .footer-contact a {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.footer-left .footer-contact a:hover {
  color: var(--white);
}

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

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}

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

/* ============================================
   Legal Pages
   ============================================ */

.legal-hero {
  background: var(--dark);
  padding: 160px 0 80px;
  text-align: center;
}

.legal-hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 12px;
}

.legal-hero .last-updated {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 120px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 48px;
  margin-bottom: 12px;
  color: var(--text);
}

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

.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul {
  margin: 12px 0 16px 24px;
  list-style: disc;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.65;
}

.legal-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: var(--red-dark);
}

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  :root {
    --section-padding: 80px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .steps::before {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 60px;
    --header-height: 64px;
  }

  body {
    font-size: 16px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(12, 12, 12, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-top: 1px solid var(--dark-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .footer-links {
    justify-content: center;
  }

  .ping-visual {
    width: 160px;
    height: 160px;
    margin-bottom: 36px;
  }

  @keyframes ping-expand {
    0% {
      width: 18px;
      height: 18px;
      opacity: 0.7;
      border-width: 2px;
    }
    100% {
      width: 160px;
      height: 160px;
      opacity: 0;
      border-width: 1px;
    }
  }

  .badges {
    flex-direction: column;
    align-items: center;
  }

  .legal-content {
    padding: 40px 20px 80px;
  }

  .legal-hero {
    padding: 130px 0 60px;
  }
}
