/* ===== ProjEvo Website — Light Theme Matching App ===== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --emerald: #10b981;

  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: rgba(255,255,255,0.8);
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
html, body { overflow-x: clip; max-width: 100vw; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: var(--bg);
}

/* ── Ambient background effects ──────────────────── */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  will-change: transform;
}

.blob-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 70%);
  top: -200px;
  right: -100px;
  animation: blobFloat1 20s ease-in-out infinite;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.1), transparent 70%);
  bottom: -150px;
  left: -100px;
  animation: blobFloat2 24s ease-in-out infinite;
}

.blob-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.08), transparent 70%);
  top: 40%;
  left: 30%;
  animation: blobFloat3 18s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, 30px); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -30px) scale(1.1); }
}

/* ── Dot pattern ─────────────────────────────────── */
.bg-dots {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(99,102,241,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.35s ease;
}

.nav.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 12px 40px;
}

.nav-logo { text-decoration: none; display: flex; align-items: center; }
.nav-logo img { height: 28px; width: auto; }

.nav-right { display: flex; gap: 32px; align-items: center; }

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s;
}
.nav-link:hover { color: var(--text); }

.btn-nav-cta {
  padding: 10px 24px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.btn-nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

/* ── Hero ────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 110px 24px 80px;
  position: relative;
}

/* logo-container removed — hero logo no longer used */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: clamp(52px, 9vw, 96px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

h1 .line-1 {
  display: block;
  color: var(--text);
  animation: heroScaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s backwards;
}

h1 .line-2 {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 30%, var(--cyan) 65%, var(--emerald) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroScaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards, gradientShift 4s ease-in-out 1s infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes heroScaleIn {
  from { opacity: 0; transform: scale(1.15) translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.subtitle {
  width: min(680px, 92vw);
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.75;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease-out 0.45s backwards;
}
.subtitle strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Pill row ────────────────────────────────────── */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 40px;
  width: min(700px, 92vw);
  animation: fadeInUp 0.7s ease-out 0.6s backwards;
}

.pill {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 100px;
  background: white;
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.25s;
}
.pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}

/* ── Alerts ──────────────────────────────────────── */
#alertContainer { width: min(680px, 92vw); margin: 0 auto 14px; }
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  animation: alertSlide 0.4s ease;
  margin-bottom: 10px;
}
.alert-error { border-color: rgba(239,68,68,0.3); color: #dc2626; background: #fef2f2; }
.alert-success { border-color: rgba(16,185,129,0.3); color: #059669; background: #ecfdf5; }
@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Signup form ─────────────────────────────────── */
.form-container {
  width: min(680px, 92vw);
  margin: 0 auto;
  animation: fadeInUp 0.7s ease-out 0.75s backwards;
}

.form-glass {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  position: relative;
  transition: box-shadow 0.35s;
}
.form-glass:focus-within {
  box-shadow: 0 8px 40px rgba(99,102,241,0.1), 0 1px 2px rgba(0,0,0,0.04);
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.form-field { flex: 1; }

.form-field input,
.sms-phone-wrapper input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.25s;
}
.form-field input::placeholder,
.sms-phone-wrapper input::placeholder { color: var(--muted-light); }
.form-field input:focus,
.sms-phone-wrapper input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

/* ── Primary button ──────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 15px 28px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.3);
}
.btn-primary:active { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary span { position: relative; z-index: 1; }

/* ── Toggle components ───────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 12px;
  user-select: none;
}
.toggle-row:hover {
  border-color: var(--border);
  background: var(--bg-muted);
}
.toggle-row.active {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.04);
}
.toggle-row input[type="checkbox"] { display: none; }

.toggle-switch {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-row.active .toggle-switch {
  background: var(--primary);
}
.toggle-row.active .toggle-switch::after {
  transform: translateX(18px);
}

.toggle-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  text-align: left;
  flex: 1;
  min-width: 0;
}
.toggle-label strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 1px; }

/* ── Beta toggle ─────────────────────────────────── */
.toggle-row.beta-row {
  background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(139,92,246,0.03));
  border-color: rgba(99,102,241,0.15);
}
.toggle-row.beta-row:hover {
  border-color: rgba(99,102,241,0.3);
}

/* Beta checkbox */
.beta-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: white;
  transition: all 0.2s;
}
.beta-check svg { width: 13px; height: 13px; color: white; opacity: 0; transform: scale(0.8); transition: all 0.2s; }
.toggle-row.active .beta-check {
  background: var(--primary);
  border-color: var(--primary);
}
.toggle-row.active .beta-check svg { opacity: 1; transform: scale(1); }

.limited-tag {
  margin-left: auto;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
}

/* ── SMS details ─────────────────────────────────── */
.sms-details {
  display: none;
  margin-bottom: 12px;
  animation: slideDown 0.3s ease;
}
.sms-details.show { display: block; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sms-phone-wrapper { margin-bottom: 12px; }

.sms-consent-block {
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.sms-consent-block label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.sms-consent-block input[type="checkbox"] { display: none; }

.check-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
  background: white;
}
.check-box svg { width: 12px; height: 12px; color: white; opacity: 0; transform: scale(0.8); transition: all 0.2s; }
.sms-consent-block input:checked + label .check-box {
  background: var(--primary);
  border-color: var(--primary);
}
.sms-consent-block input:checked + label .check-box svg { opacity: 1; transform: scale(1); }

.sms-consent-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.sms-consent-text a { color: var(--primary); text-decoration: none; }
.sms-consent-text a:hover { text-decoration: underline; }

/* ── Features section ────────────────────────────── */
.features-section {
  padding: 80px 20px 100px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.section-tag svg { width: 14px; height: 14px; }

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
  color: var(--text);
}
.section-header p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}

/* Feature grid */
.feature-grid {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Scroll reveal animations ────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.feature-card {
  border-radius: 20px;
  background: white;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: rgba(99,102,241,0.2);
}

.card-media {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-subtle), white);
  border-bottom: 1px solid var(--border-light);
}
.card-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: 0.7;
  transition: all 0.3s;
}
.feature-card:hover .card-icon {
  opacity: 1;
  transform: scale(1.06);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  padding: 18px 20px 8px;
  color: var(--text);
}
.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  padding: 0 20px 20px;
}

/* ── Full-page success state ─────────────────────── */
.success-state {
  text-align: center;
  animation: successFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon-lg {
  width: 96px;
  height: 96px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: iconPulse 2s ease-in-out infinite;
}
.success-icon-lg svg { width: 48px; height: 48px; color: white; }

.success-heading {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.1;
}

.success-message {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 40px;
}

.btn-back-home {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border-radius: 14px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}
.btn-back-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.35);
}

@keyframes successFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Legacy success box (keep for compat) */
.success-box {
  width: min(680px, 92vw);
  margin: 0 auto;
  text-align: center;
  padding: 48px 36px;
  background: white;
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(16,185,129,0.08);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: iconPulse 2s ease-in-out infinite;
}
.success-icon svg { width: 32px; height: 32px; color: white; }
@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.25); }
  50% { box-shadow: 0 0 0 14px rgba(16,185,129,0); }
}
.success-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.success-sub { font-size: 15px; color: var(--muted); }

/* ── Footer ──────────────────────────────────────── */
footer {
  padding: 32px 40px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 13px;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}
footer a:hover { color: var(--primary); }
footer .footer-links { margin-top: 10px; font-size: 12px; }
footer .footer-divider { margin: 0 10px; opacity: 0.4; }

/* ── A11y ────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding: 12px 20px; }
  .nav-right .nav-link { display: none; }
  .hero { padding: 100px 20px 60px; }
  .form-row { flex-direction: column; }
  footer { padding: 24px 20px; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .pill-row { gap: 8px; }
  .pill { font-size: 11px; padding: 6px 12px; }
}

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