/* ============================================================
   Technorazum — SpaceX-dark Theme Stylesheet
   Mobile-first | 320px → 480px → 768px → 1024px → 1280px → 1920px
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f35;
  --accent-cyan: #00d4ff;
  --accent-purple: #8b5cf6;
  --accent-teal: #14b8a6;
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #1e293b;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.3s ease;
  --t-slow: 0.6s ease;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);

  /* Z-index layers */
  --z-header: 1000;
  --z-burger: 1100;
  --z-mega: 900;
  --z-cursor: 9999;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--accent-purple);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* ---------- Custom Cursor (desktop only) ---------- */
.cursor-dot,
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: var(--radius-full);
  mix-blend-mode: difference;
  transition: transform 0.1s ease, width var(--t-base), height var(--t-base);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
}

.cursor-follower {
  width: 50px;
  height: 50px;
  border: 2px solid var(--accent-cyan);
  opacity: 0.5;
}

@media (max-width: 1023px) {
  .cursor-dot,
  .cursor-follower {
    display: none;
  }
}

/* ---------- Atom SVG Animations ---------- */
.atom-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.atom-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  transform-origin: center;
  opacity: 0.6;
}

.atom-orbit--1 {
  width: 180px;
  height: 70px;
  margin-top: -35px;
  margin-left: -90px;
  animation: atomOrbit1 4s linear infinite;
}

.atom-orbit--2 {
  width: 180px;
  height: 70px;
  margin-top: -35px;
  margin-left: -90px;
  animation: atomOrbit2 6s linear infinite;
  transform: rotate(60deg);
}

.atom-orbit--3 {
  width: 180px;
  height: 70px;
  margin-top: -35px;
  margin-left: -90px;
  animation: atomOrbit3 8s linear infinite;
  transform: rotate(-60deg);
}

.atom-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  background: var(--accent-cyan);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow-cyan);
  animation: pulse 2s ease-in-out infinite;
}

.atom-electron {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-purple);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-purple);
}

@keyframes atomOrbit1 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes atomOrbit2 {
  from { transform: rotate(60deg); }
  to   { transform: rotate(420deg); }
}

@keyframes atomOrbit3 {
  from { transform: rotate(-60deg); }
  to   { transform: rotate(300deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.7; }
}

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--t-base);
}

.site-header--scrolled {
  background: rgba(10, 14, 26, 0.95);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1920px;
  margin: 0 auto;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav__logo span {
  color: var(--accent-cyan);
}

/* Burger menu */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  z-index: var(--z-burger);
  background: none;
  border: none;
  cursor: pointer;
}

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

.burger--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger--active span:nth-child(2) {
  opacity: 0;
}

.burger--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav links — hidden on mobile by default */
.nav__menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  padding: 5rem 1.5rem 2rem;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  transition: transform var(--t-base);
  transform: translateX(100%);
}

.nav__menu--open {
  display: flex;
  transform: translateX(0);
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
}

.nav__link:hover,
.nav__link:focus {
  background: var(--bg-card);
  color: var(--accent-cyan);
}

/* Accordion submenus (mobile) */
.nav__submenu {
  display: none;
  flex-direction: column;
  padding-left: 1.5rem;
  gap: 0.25rem;
}

.nav__item--expanded .nav__submenu {
  display: flex;
}

.nav__submenu .nav__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}

.nav__toggle {
  position: absolute;
  right: 0.5rem;
  top: 0.75rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform var(--t-base);
}

.nav__item--expanded .nav__toggle {
  transform: rotate(180deg);
}

/* ---------- Card System ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}

.card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-card);
  transform: translateY(-4px);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card__text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* ---------- Section ---------- */
.section {
  padding: var(--space-lg) 1rem;
  max-width: 1920px;
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  margin: 0.75rem auto 0;
  border-radius: var(--radius-full);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.8s ease forwards;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), var(--border-color));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item__dot {
  position: absolute;
  left: -1.625rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-cyan);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.timeline-item:hover .timeline-item__dot {
  border-color: var(--accent-purple);
  box-shadow: 0 0 12px var(--accent-purple);
}

.timeline-item__date {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.timeline-item__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-item__text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-base), border-color var(--t-base);
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border: 2px solid var(--accent-cyan);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
}

.btn-secondary:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.btn-cta {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: var(--text-primary);
  border: 2px solid transparent;
  box-shadow: var(--shadow-glow-purple);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-purple), var(--shadow-glow-cyan);
}

/* ---------- Forms ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form__label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--text-muted);
}

.form__textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-md) 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 1920px;
  margin: 0 auto;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--t-fast);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   BREAKPOINTS — Mobile-first ascending
   ============================================================ */

/* ---------- ≥480px ---------- */
@media (min-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.375rem; }

  .section { padding: var(--space-lg) 1.5rem; }

  .card { padding: 2rem; }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-cta {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
  }
}

/* ---------- ≥768px ---------- */
@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .section { padding: var(--space-lg) 2rem; }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

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

  .form { max-width: 600px; }

  .timeline { padding-left: 2.5rem; }

  .atom-wrapper { width: 280px; height: 280px; }
  .atom-orbit--1,
  .atom-orbit--2,
  .atom-orbit--3 {
    width: 250px;
    height: 95px;
    margin-top: -47.5px;
    margin-left: -125px;
  }
}

/* ---------- ≥1024px — Desktop / PC ---------- */
@media (min-width: 1024px) {
  /* Burger hidden on desktop */
  .burger { display: none; }

  /* Nav menu: inline horizontal with mega-menu dropdowns */
  .nav__menu {
    display: flex;
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: none;
    border: none;
    padding: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    transform: none;
    overflow: visible;
  }

  .nav__link {
    padding: 0.5rem 1rem;
  }

  .nav__toggle { display: none; }

  /* Mega-menu dropdowns — hover on PC */
  .nav__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    padding: 0.5rem;
    flex-direction: column;
    gap: 0;
    z-index: var(--z-mega);
  }

  .nav__item:hover .nav__submenu,
  .nav__item:focus-within .nav__submenu {
    display: flex;
  }

  .nav__submenu .nav__link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
  }

  /* Cards 4-up on large screens */
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .section { padding: var(--space-xl) 3rem; }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }

  .atom-wrapper { width: 320px; height: 320px; }
  .atom-orbit--1,
  .atom-orbit--2,
  .atom-orbit--3 {
    width: 290px;
    height: 110px;
    margin-top: -55px;
    margin-left: -145px;
  }
}

/* ---------- ≥1280px ---------- */
@media (min-width: 1280px) {
  .section { padding: var(--space-xl) 4rem; }

  .card-grid { gap: 2rem; }

  h1 { font-size: 3.5rem; }

  .nav { padding: 1rem 2rem; }

  .container { padding: 0 2rem; }
}

/* ---------- ≥1920px ---------- */
@media (min-width: 1920px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 2.75rem; }

  .section { padding: var(--space-xl) 6rem; }

  .card { padding: 2.5rem; }

  .atom-wrapper { width: 400px; height: 400px; }
  .atom-orbit--1,
  .atom-orbit--2,
  .atom-orbit--3 {
    width: 360px;
    height: 135px;
    margin-top: -67.5px;
    margin-left: -180px;
  }
}

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

  .atom-orbit--1,
  .atom-orbit--2,
  .atom-orbit--3 {
    animation: none;
  }

  .atom-nucleus {
    animation: none;
  }
}