/* ============================================================
   LOVELING — Main Stylesheet
   Dark-first romantic design system matching the iOS app.
   ============================================================ */

/* --- CSS Custom Properties (Loveling Color Palette) --- */
:root {
  /* Backgrounds */
  --void-deep: #050510;
  --void: #0A0A1A;
  --surface: #111128;
  --surface-high: #1A1A36;
  --border: #252545;

  /* Love Accents */
  --love-primary: #FF3B7A;
  --love-secondary: #FF5E5B;
  --love-glow: #FF1A5C;
  --love-soft: #FFB3D1;
  --love-deep: #9D1B4A;

  /* Text */
  --text-primary: #FAFAFA;
  --text-secondary: #9D9DB5;
  --text-muted: #5C5C7A;

  /* Semantic */
  --success: #34D399;
  --warning: #FBBF24;
  --error: #FB7185;

  /* Typography */
  --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Phone frame */
  --phone-radius: 40px;
  --phone-border: 6px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background: var(--void-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--love-primary);
  color: white;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p  { color: var(--text-secondary); }

a {
  color: var(--love-primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--love-glow); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(37, 37, 69, 0.4);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--love-primary);
  letter-spacing: -0.02em;
}

.logo .heart {
  display: inline-block;
  animation: logoBeat 2s ease-in-out infinite;
}

@keyframes logoBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--love-primary);
  color: white;
  box-shadow: 0 0 30px rgba(255, 59, 122, 0.3);
}
.btn-primary:hover {
  background: var(--love-glow);
  box-shadow: 0 0 40px rgba(255, 59, 122, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--love-primary);
  border: 1px solid var(--love-primary);
}
.btn-outline:hover {
  background: rgba(255, 59, 122, 0.1);
  box-shadow: 0 0 20px rgba(255, 59, 122, 0.2);
}

/* --- Glass Card --- */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(255, 59, 122, 0.08);
  border-color: rgba(255, 59, 122, 0.3);
}

/* --- Phone Mockup --- */
.phone-frame {
  position: relative;
  background: #0a0a0f;
  border: var(--phone-border) solid #2a2a3a;
  border-radius: var(--phone-radius);
  overflow: hidden;
  box-shadow:
    0 0 0 2px #1a1a2a,
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(255, 59, 122, 0.06);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #0a0a0f;
  border-radius: 0 0 18px 18px;
  z-index: 2;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 59, 122, 0.12) 0%, var(--void-deep) 70%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-text h1 .gradient-text {
  background: linear-gradient(135deg, var(--love-primary), var(--love-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 59, 122, 0.4));
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  max-width: 480px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  max-width: 420px;
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-phone {
  flex-shrink: 0;
  width: 280px;
}

.hero-phone .phone-frame { border-color: #2a2a3a; }

/* --- Features Section --- */
.features {
  padding: var(--space-2xl) 0;
}

.features h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 0.95rem;
}

/* --- Gallery Section --- */
.gallery {
  padding: var(--space-2xl) 0;
}

.gallery h2 {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  justify-items: center;
}

.gallery-grid .phone-frame {
  max-width: 220px;
  transition: transform 0.3s;
}

.gallery-grid .phone-frame:hover {
  transform: translateY(-8px) rotate(-2deg);
}

/* --- Premium Section --- */
.premium {
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(157, 27, 74, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.premium-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-xl);
  position: relative;
  z-index: 1;
}

.premium-card h2 { margin-bottom: var(--space-sm); }

.premium-features {
  list-style: none;
  margin: var(--space-lg) 0;
  text-align: left;
  display: inline-block;
}

.premium-features li {
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.premium-features li::before {
  content: '✦';
  color: var(--love-primary);
  margin-right: var(--space-sm);
}

.premium-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--space-md) 0 var(--space-sm);
}

.premium-note {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Support Page --- */
.faq { margin-bottom: var(--space-xl); }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  background: var(--surface);
}

.faq-question {
  width: 100%;
  padding: var(--space-md);
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-stack);
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--love-primary);
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 var(--space-md) var(--space-md);
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 500px;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--love-primary);
  box-shadow: 0 0 0 3px rgba(255, 59, 122, 0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Privacy Page --- */
.privacy-content { max-width: 720px; }

.privacy-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.privacy-content p,
.privacy-content ul {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.privacy-content ul {
  padding-left: var(--space-md);
}

.privacy-content li {
  margin-bottom: var(--space-xs);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-in {
  animation: fadeInUp 0.8s ease forwards;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
  }

  .hero-text {
    order: 1;
  }

  .hero-phone {
    order: 0;
    width: 220px;
  }

  .hero-subtitle,
  .hero-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

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

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .gallery-grid .phone-frame {
    max-width: 160px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--surface-high);
    flex-direction: column;
    padding: 80px var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    transition: right 0.3s;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: flex;
    z-index: 101;
  }

  .hero-text h1 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .hero-phone {
    width: 180px;
  }
}

@media (max-width: 480px) {
  .hero-phone { width: 150px; }

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

  .gallery-grid .phone-frame {
    max-width: 200px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}
