/* ============================================================
   STUDIFI LANDING PAGE — Design System & Styles
   ============================================================ */

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

:root {
  /* Brand Colors */
  --navy-deep: #001A33;
  --navy-mid: #051329;
  --navy-light: #0A2540;
  --navy-card: #0D2E4D;

  --accent-blue: #7BC1F9;
  --accent-blue-hover: #9DD3FF;
  --accent-blue-dim: #4A8BCC;
  --accent-gradient: linear-gradient(135deg, #7BC1F9 0%, #4A8BCC 50%, #61A1D6 100%);

  --white: #FFFFFF;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-05: rgba(255, 255, 255, 0.05);

  --success: #4ADE80;
  --error: #F87171;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 60px rgba(123, 193, 249, 0.15);
  --shadow-button: 0 4px 20px rgba(123, 193, 249, 0.3);

  /* Glass */
  --glass-bg: rgba(13, 46, 77, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--navy-deep);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-blue-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ---------- Background Accents ---------- */
.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
.bg-glow--top {
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 193, 249, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.bg-glow--bottom {
  bottom: -300px;
  left: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(97, 161, 214, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.navbar.scrolled {
  background: rgba(0, 26, 51, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 1px 0 var(--glass-border);
  padding: 10px 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.navbar__name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}
.navbar__name span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent-gradient);
  color: var(--navy-deep);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.navbar__cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-button);
  color: var(--navy-deep);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__content {
  position: relative;
  z-index: 1;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--white-05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 500;
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}
.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero__title-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subtitle {
  font-size: 1.15rem;
  color: var(--white-70);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__phone {
  width: 380px;
  max-width: 100%;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.hero__phone-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(123, 193, 249, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent-gradient);
  color: var(--navy-deep);
  box-shadow: var(--shadow-button);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(123, 193, 249, 0.4);
  color: var(--navy-deep);
}
.btn--secondary {
  background: var(--white-10);
  color: var(--white);
  border: 1px solid var(--white-20);
  backdrop-filter: blur(10px);
}
.btn--secondary:hover {
  background: var(--white-20);
  transform: translateY(-2px);
  color: var(--white);
}

/* ---------- Section Common ---------- */
.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
}
.section__header {
  text-align: center;
  margin-bottom: 64px;
}
.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-blue);
  margin-bottom: 16px;
}
.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section__description {
  font-size: 1.05rem;
  color: var(--white-70);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Features ---------- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(123, 193, 249, 0.2);
}
.feature-card:hover::before {
  opacity: 1;
}
.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(123, 193, 249, 0.15) 0%, rgba(123, 193, 249, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.feature-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-card__text {
  font-size: 0.95rem;
  color: var(--white-70);
  line-height: 1.6;
}

/* ---------- How It Works ---------- */
.steps {
  background: linear-gradient(180deg, transparent 0%, rgba(13, 46, 77, 0.3) 50%, transparent 100%);
}
.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.steps__grid::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-blue-dim), transparent);
  opacity: 0.3;
}
.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-card__number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--navy-deep);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 4px 24px rgba(123, 193, 249, 0.25);
  position: relative;
}
.step-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-card__text {
  font-size: 0.95rem;
  color: var(--white-70);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ---------- Waitlist / CTA ---------- */
.waitlist {
  padding: 120px 0;
}
.waitlist__card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
}
.waitlist__card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.waitlist__icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}
.waitlist__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.waitlist__subtitle {
  font-size: 1.05rem;
  color: var(--white-70);
  margin-bottom: 36px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.waitlist__form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.waitlist__input {
  flex: 1;
  padding: 14px 20px;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: var(--radius-full);
  color: var(--white);
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.waitlist__input::placeholder {
  color: var(--white-50);
}
.waitlist__input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(123, 193, 249, 0.15);
}
.waitlist__input--error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
}
.waitlist__submit {
  padding: 14px 28px;
  background: var(--accent-gradient);
  color: var(--navy-deep);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.waitlist__submit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-button);
}
.waitlist__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.waitlist__feedback {
  margin-top: 16px;
  font-size: 0.9rem;
  min-height: 24px;
  transition: opacity 0.3s ease;
}
.waitlist__feedback--success {
  color: var(--success);
}
.waitlist__feedback--error {
  color: var(--error);
}
.waitlist__count {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--white-50);
}

/* ---------- Store Badges ---------- */
.store-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  border-radius: var(--radius-md);
  color: var(--white-70);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: default;
}
.store-badge svg {
  width: 22px;
  height: 22px;
  fill: var(--white-70);
}
.store-badge__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  display: block;
}
.store-badge__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white-90);
  display: block;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}
.footer__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white-70);
}
.footer__copy {
  font-size: 0.85rem;
  color: var(--white-50);
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer__link {
  font-size: 0.85rem;
  color: var(--white-50);
  transition: color 0.2s ease;
}
.footer__link:hover {
  color: var(--accent-blue);
}

/* ---------- Animations: Fade In on Scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Loading Spinner for Button ---------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--navy-deep);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__visual {
    order: -1;
  }
  .hero__phone {
    width: 280px;
  }
  .features__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
  .steps__grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }
  .steps__grid::before {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 70px 0;
  }
  .navbar__cta span {
    display: none;
  }
  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: 60px;
  }
  .hero__title {
    font-size: 2rem;
  }
  .waitlist__card {
    padding: 40px 24px;
  }
  .waitlist__form {
    flex-direction: column;
  }
  .waitlist__submit {
    width: 100%;
  }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
  .store-badges {
    flex-direction: column;
    align-items: center;
  }
}
