/* ============================================
   🌙 LIGHT + DARK MODE BASE TOKENS
============================================ */

:root {
  --bg: #0b0e14;
  --bg-alt: #131823;
  --card-bg: #10141f;

  --primary: #2f6dff;      /* blue (navbar, footer, buttons) */
  --primary-soft: #467bff; /* hover blue */
  --accent: #f2b705;       /* gold */
  --accent-soft: #f5cf4f;

  --text: #f7f8ff;
  --muted: #a4acc4;

  --border-soft: #20263a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --radius-card: 16px;
  --radius-pill: 999px;
}

/* Light Theme (default) */
:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --border-soft: #d8d8d8;

  --primary: #0053ff;
  --primary-soft: #003fcc;
  --accent: #f2b705;
}

/* Dark Theme */
:root[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-alt: #131823;
  --card-bg: #10141f;
  --text: #f7f8ff;
  --muted: #a4acc4;
  --border-soft: #20263a;
  --primary: #2f6dff;
  --primary-soft: #467bff;
  --accent: #f2b705;
}

/* ============================================
   GLOBAL RESET + BASE
============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  position: relative;
  min-height: 100vh;
}

/* Subtle radial glow behind content */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: -30%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(47, 109, 255, 0.09) 0%,
    transparent 70%
  );
  z-index: -1;
}

/* Main layout container */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ============================================
   NAVBAR — BLUE + GLASS + UNDERLINE
============================================ */

.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;

  backdrop-filter: blur(14px);
  background: var(--primary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding: 14px 0;

  transition: padding 0.25s ease, background 0.25s ease,
              box-shadow 0.25s ease;
}

/* Optional "shrink on scroll" class (JS hook) */
.navbar.shrink {
  padding: 8px 0;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.nav-container {
  width: 90%;
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.04em;
  position: relative;
}

/* Subtle glow on logo hover */
.nav-logo::after {
  content: "";
  position: absolute;
  inset: -6px -10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 207, 79, 0);
  box-shadow: 0 0 0 rgba(242, 183, 5, 0);
  transition: 0.25s ease;
}

.nav-logo:hover::after {
  border-color: rgba(245, 207, 79, 0.65);
  box-shadow: 0 0 18px rgba(242, 183, 5, 0.55);
}

.nav-right {
  display: flex;
  gap: 22px;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

/* Blue → Gold underline animation */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

/* ============================================
   TITLE SECTION — GRADIENT + ANIMATION
============================================ */

.title-section {
  width: 100%;
  margin-top: 60px;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.title-container {
  max-width: 900px;
  padding: 0 20px;
}

.title-gradient {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(92deg, #2f6dff, #00aaff 40%, #00e1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeSlide 0.7s ease-out both;
}

.title-subtitle {
  margin: 14px auto 0;
  max-width: 780px;
  font-size: 1.15rem;
  color: var(--muted);
  animation: fadeSlide 1s ease-out both;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: var(--primary);
  margin: 24px auto 0;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlide 1.2s ease-out forwards;
}

@keyframes fadeSlide {
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTION HEADER CARD
============================================ */

.section-header-card {
  background: rgba(15, 20, 35, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 50px 40px;
  margin: 0 auto 80px;
  max-width: 900px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  animation: fadeSlide 0.8s ease-out both;
  transition: transform 0.25s ease, border-color 0.25s ease,
              box-shadow 0.25s ease;
}

:root[data-theme="light"] .section-header-card {
  background: rgba(255, 255, 255, 0.9);
}

.section-header-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.48);
}

.section-header-card .section-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(92deg, #2f6dff, #00aaff 40%, #00e1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header-card .section-subtitle {
  margin-top: 12px;
  color: var(--muted);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   SECTIONS
============================================ */

.section {
  padding: 110px 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 12px;
  font-weight: 700;
  text-align: center;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
}

/* Subtle divider between sections */
.section:not(:last-of-type)::after {
  content: "";
  display: block;
  width: 90%;
  max-width: 950px;
  height: 1px;
  margin: 80px auto 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  opacity: 0.6;
}

/* ============================================
   CARDS — PARALLAX + GLOW
============================================ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

/* Gold titles */
.card h3,
.flagship-card h3,
.app-card h3,
.project-card h3 {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

/* Gold glow + slight tilt */
.card:hover {
  border-color: var(--accent);
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(242, 183, 5, 0.25);
  transform: translateY(-6px) rotateX(4deg) rotateY(-4deg);
}

/* Animated sheen */
.card::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -120%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0) 60%
  );
  transform: rotate(12deg);
  transition: 0.75s ease;
  pointer-events: none;
}

.card:hover::before {
  top: -20%;
  left: -20%;
}

.card-btn {
  margin-top: 18px;
  float: right;
}

/* ============================================
   FLAGSHIP GRID (2 CARDS)
============================================ */

.flagship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
  max-width: 900px; /* match header width */
  margin-left: auto;
  margin-right: auto;
}

.flagship-card ul {
  margin-top: 12px;
  padding-left: 20px;
  color: var(--muted);
}

.flagship-card ul li {
  margin-bottom: 6px;
}

/* ============================================
   HERO APPS GRID (4 + 3, centered)
============================================ */

.hero-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 30px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ============================================
   PROJECTS GRID (4 + 3, centered)
============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 32px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ============================================
   CTA BUTTONS — UNIFIED STYLE
============================================ */

.cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.btn,
button,
input[type="button"],
input[type="submit"] {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-block;

  background: var(--primary);
  color: #ffffff;
  transition: background 0.25s ease, transform 0.2s ease,
              box-shadow 0.25s ease;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.btn.primary {
  /* same as base */
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--primary);
  color: #ffffff;
}

.btn:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: var(--primary-soft);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

/* ============================================
   FOOTER — BLUE BAR
============================================ */

.site-footer {
  margin-top: 80px;
  padding: 35px 0;
  text-align: center;
  backdrop-filter: blur(12px);
  background: var(--primary);
  border-top: 1px solid rgba(0, 0, 0, 0.25);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 16px;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.site-footer p {
  color: #ffffff;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.site-footer p:hover {
  color: var(--accent);
}

/* ============================================
   THEME TOGGLE — FLOATING GLASS BUTTON
============================================ */

.theme-toggle {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 2000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

/* Optional toast for theme change (JS hook) */
.theme-toast {
  position: fixed;
  bottom: 90px;
  right: 26px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(15, 20, 35, 0.95);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   FADE-IN UTILITY (for .fade-in class)
============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ============================================
   NAV + FOOTER DEFAULT & HOVER (GOLD)
============================================ */

.nav-link,
.footer-links a,
.site-footer p {
  color: #ffffff;
}

.nav-link:hover,
.footer-links a:hover,
.site-footer p:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
============================================ */

@media (max-width: 1200px) {
  .hero-apps-grid,
  .projects-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 960px) {
  .nav-right {
    gap: 14px;
    font-size: 0.9rem;
  }

  .hero-apps-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
    max-width: 700px;
  }

  .flagship-grid {
    grid-template-columns: 1fr;
    max-width: 700px;
  }

  .section {
    padding: 90px 0;
  }
}

@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 10px;
  }

  .hero-apps-grid,
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .flagship-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .section-header-card {
    margin-bottom: 60px;
    padding: 32px 24px;
  }

  .title-gradient {
    font-size: 2.2rem;
  }
}

/* ======================================================
   UNIFY ALL BUTTONS — MATCH "Launch Assistant"
   Every .btn becomes a filled primary pill button
====================================================== */

.btn,
.btn.primary,
.btn.ghost,
button,
input[type="button"],
input[type="submit"] {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-radius: var(--radius-pill) !important;
  padding: 12px 22px !important;
  font-weight: 600 !important;
  border: none !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: 0.25s ease !important;
}

/* Hover — same as Launch Assistant */
.btn:hover,
.btn.primary:hover,
.btn.ghost:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: var(--primary-soft) !important;
  color: #ffffff !important;
}
