/* ============================================================
   Technorazum — Main (Home) Page Styles
   Minimalist hero + atom animation + news slide-up + about popup
   Mobile-first
   ============================================================ */

/* ---------- Color palette (Technorazum) ---------- */
:root {
  --tz-bg-dark: #0a0a0f;
  --tz-bg-deep: #0f0f17;
  --tz-text: #ffffff;
  --tz-text-muted: #e5e7eb;
  --tz-accent: #8B5CF6;
  --tz-accent-2: #3B82F6;
  --tz-accent-3: #06B6D4;
  --tz-gradient: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 50%, #06B6D4 100%);

  --z-header: 1000;
  --z-toggle: 1000;
  --z-panel: 999;
  --z-popup: 1100;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem 1.5rem 6rem;
  text-align: center;
  background: var(--tz-bg-dark);
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Atom animation (CSS-only, 3 elliptical orbits) ---------- */
.atom-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  max-width: 130vw;
  max-height: 130vw;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
}

.atom-orbital {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.35);
  transform: translate(-50%, -50%);
}

.atom-orbital--1 {
  width: 90%;
  height: 90%;
  transform: translate(-50%, -50%) rotate(60deg);
  animation: orbit-rotate 8s linear infinite;
}
.atom-orbital--2 {
  width: 70%;
  height: 70%;
  transform: translate(-50%, -50%) rotate(120deg);
  animation: orbit-rotate 12s linear infinite;
}
.atom-orbital--3 {
  width: 50%;
  height: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  animation: orbit-rotate 16s linear infinite reverse;
}

.atom-electron {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  margin-left: -5px;
  background: var(--tz-accent);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--tz-accent), 0 0 4px #ffffff;
}

.atom-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  background: var(--tz-text);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

@keyframes orbit-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Hero content ---------- */
.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--tz-text-muted);
  margin-bottom: 1.5rem;
  background: var(--tz-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: clamp(2rem, 5vw + 1rem, 4.25rem);
  line-height: 1.1;
  font-weight: 800;
  color: var(--tz-text);
  max-width: 900px;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.25rem);
  line-height: 1.65;
  color: var(--tz-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- News slide-up panel ---------- */
.news-toggle {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tz-accent);
  color: #fff;
  padding: 0.875rem 1.75rem;
  border-radius: 12px 12px 0 0;
  border: none;
  cursor: pointer;
  z-index: var(--z-toggle);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 -4px 20px rgba(139, 92, 246, 0.35);
  transition: transform 0.3s ease, background 0.3s ease;
  font-family: inherit;
}

.news-toggle:hover,
.news-toggle:focus-visible {
  transform: translateX(-50%) translateY(-4px);
  background: #7c4ef0;
  outline: none;
}

.news-toggle[aria-expanded="true"] {
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-bottom: none;
  transform: translateX(-50%) translateY(0);
}

.news-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70vh;
  max-height: 720px;
  background: rgba(15, 15, 23, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(139, 92, 246, 0.3);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: var(--z-panel);
  padding: 2.5rem 1.5rem 2rem;
  overflow-y: auto;
  visibility: hidden;
}

.news-panel.active {
  transform: translateY(0);
  visibility: visible;
}

.news-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.news-panel__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tz-text);
}

.news-panel__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--tz-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  font-family: inherit;
}

.news-panel__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.news-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  max-width: 1280px;
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}

.news-grid::-webkit-scrollbar {
  height: 6px;
}
.news-grid::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.4);
  border-radius: 3px;
}

.news-card {
  flex: 0 0 320px;
  min-width: 320px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
}

.news-card__date {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tz-accent-3);
}

.news-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tz-text);
  line-height: 1.3;
}

.news-card__excerpt {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--tz-text-muted);
  flex-grow: 1;
}

.news-card__link {
  color: var(--tz-accent-3);
  font-weight: 600;
  font-size: 0.9rem;
  align-self: flex-start;
  transition: gap 0.2s ease;
}

.news-card__link:hover {
  color: #38bdf8;
}

/* ---------- Feature card (reusable component) ---------- */
.feature-card {
  position: relative;
  padding: 2rem;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: card-cycle 12s ease-in-out infinite;
  min-height: 180px;
}

.feature-card:hover {
  transform: translateX(10px);
  animation-play-state: paused;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes card-cycle {
  0%, 33%   { opacity: 1; }
  34%, 100% { opacity: 0.7; }
}

.feature-card--white {
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0f;
}
.feature-card--blue-light {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--tz-text);
}
.feature-card--blue-dark {
  background: rgba(30, 64, 175, 0.3);
  border: 1px solid rgba(30, 64, 175, 0.5);
  color: var(--tz-text);
}
.feature-card--green-light {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--tz-text);
}
.feature-card--green-dark {
  background: rgba(22, 101, 52, 0.4);
  border: 1px solid rgba(22, 101, 52, 0.6);
  color: var(--tz-text);
}

.feature-card .atom-mini {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 48px;
  height: 48px;
  opacity: 0.85;
}

.feature-card .card-content {
  margin-left: 64px;
  padding-top: 0.5rem;
}

.feature-card .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card .card-text {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--tz-bg-deep);
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--tz-text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--tz-text-muted);
  margin: 0 0.5rem;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--tz-accent-3);
}

.site-footer__socials {
  margin-top: 0.75rem;
}

/* ---------- About popup modal ---------- */
.about-popup {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-popup);
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.about-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.about-popup__dialog {
  background: var(--tz-bg-deep);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.about-popup.active .about-popup__dialog {
  transform: translateY(0) scale(1);
}

.about-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--tz-text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
}

.about-popup__close:hover {
  color: var(--tz-text);
}

.about-popup__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: var(--tz-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-popup__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tz-text-muted);
  margin-bottom: 1.5rem;
}

.about-popup__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.about-popup__stat {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--tz-text-muted);
}

.about-popup__stat strong {
  color: var(--tz-text);
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .hero {
    padding: 3rem 2rem 6rem;
  }
  .news-panel {
    padding: 3rem 2.5rem 2rem;
  }
  .feature-card .card-text {
    font-size: 1rem;
  }
  .about-popup__stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .news-card {
    flex-basis: 360px;
    min-width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atom-orbital--1,
  .atom-orbital--2,
  .atom-orbital--3 {
    animation: none;
  }
  .feature-card {
    animation: none;
  }
  .news-panel {
    transition: none;
  }
}
