/*
 * WEB3 / ULTRA DESIGN PALETTE
 * This design uses a dark theme with vibrant, glowing accents and glassmorphism.
 */

:root {
  /* Colors */
  --color-bg-primary: #080712;
  /* Corrected variable name and value from last footer snippet */
  --color-primary: #a335f0;
  /* Purple */
  --color-secondary: #ff4081;
  /* Pink */
  --color-accent: #00e5ff;
  /* Cyan */
  --color-text: #e0e0e0;
  --color-text-muted: #8a8a8a;
  --color-glass-bg: rgba(22, 21, 45, 0.5);
  --color-glass-border: rgba(255, 255, 255, 0.1);

  /* Variable Fixes for Footer/Links */
  --color-bg: var(--color-bg-primary);
  --color-link: var(--color-accent);
  /* Used for link hover state */
  --color-border: var(--color-glass-border);
  /* Used for consistency */

  /* Gradients */
  --gradient-primary: linear-gradient(90deg,
      var(--color-primary),
      var(--color-secondary));
  /* New Gradient for Animation (Extended to ensure a smooth loop) */
  --gradient-animated: linear-gradient(90deg,
      var(--color-primary) 0%,
      var(--color-secondary) 30%,
      var(--color-primary) 70%,
      var(--color-secondary) 100%);
  --gradient-accent: linear-gradient(90deg,
      var(--color-accent),
      var(--color-primary));

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-heading: "Satoshi", sans-serif;
}

/* --- Global Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  /* Prevent horizontal scroll from glow effects */
  background-image: radial-gradient(circle at 10% 20%,
      rgba(163, 53, 240, 0.2),
      transparent 30%),
    radial-gradient(circle at 90% 80%,
      rgba(255, 64, 129, 0.2),
      transparent 40%);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Typography --- */
h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 2.5rem);
  /* Responsive font size */
  text-align: center;
  margin-bottom: 1rem;

  /* Gradient text effect for headers */
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-description {
  max-width: 650px;
  margin: 0 auto 3rem auto;
  text-align: center;
  color: var(--color-text-muted);
}

/* --- Header & Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  background: var(--color-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-glass-border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  /* Indicate it's interactive */
  transition: transform 0.3s ease;
  /* For a subtle lift on hover */
}

.logo-wrapper:hover {
  transform: translateY(-2px);
  /* Subtle lift effect */
}

.logo-icon {
  height: 2.1rem;
  width: auto;
  /* Apply base transition for the filter glow */
  transition: filter 0.3s ease;
}

.logo {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--color-accent);
  line-height: 1;
  /* Apply base transition for the text glow */
  transition: text-shadow 0.3s ease;
}

/* Logo Glow on Hover */
.logo-wrapper:hover .logo {
  /* text shadow for the text glow effect */
  text-shadow: 0 0 8px var(--color-accent), 0 0 15px rgba(0, 229, 255, 0.5);
}

.logo-wrapper:hover .logo-icon {
  /* Strong filter glow for the icon */
  filter: drop-shadow(0 0 5px var(--color-accent)) drop-shadow(0 0 10px rgba(0, 229, 255, 0.8));
}

.navbar nav {
  display: flex;
  gap: 1.5rem;
}

.navbar nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar nav a:hover {
  color: var(--color-accent);
}

/* --- Sections --- */
section {
  padding: 1rem 0;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 0;
  position: relative;

  /* Background Image Placeholder Styles */
  background-image:
    linear-gradient(rgba(8, 7, 18, 0.7), rgba(8, 7, 18, 0.7)),
    url('assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
}

/* Decorative glow effect */
.hero-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle,
      rgba(163, 53, 240, 0.3) 0%,
      transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

.hero-section .subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-section h1 {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 10vw, 7rem);
  /* Responsive H1 */
  font-weight: 1000;
  background: none;
  color: var(--color-text);
  -webkit-background-clip: unset;
  background-clip: unset;
  margin: 0;
  letter-spacing: -2px;
}

/* NEW: Animated Text Class for "Phycs 3" */
.hero-section h1 .animated-text {
  background: var(--gradient-animated);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: AnimateGradientFlow 3s ease-in-out infinite;
  display: inline-block;
}

.hero-section h3 {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

/* --- Hero Button with Animation --- */
.btn-primary {
  display: inline-block;
  background: var(--gradient-animated);
  background-size: 200% 100%;
  color: #fff;
  padding: 1rem 2.5rem;
  text-decoration: none;
  font-size: 1.2rem;
  /* Adjusted down from 2rem for better proportion */
  font-weight: 600;
  /* Adjusted from 300 to 600 for better button weight */
  border-radius: 50px;
  border: none;
  cursor: pointer;
  animation: AnimateGradientFlow 3s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(163, 53, 240, 0.3);
}

.btn-primary:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 64, 129, 0.4);
  animation-play-state: paused;
}

/* Keyframes for the animation (Updated to ease-in-out for smoothness) */
@keyframes AnimateGradientFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}


/* --- Video Section --- */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- About Section (Bento Grid) --- */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.example-card {
  background: var(--color-glass-bg);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid var(--color-glass-border);
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.example-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 229, 255, 0.3);
}

/* Pop up on click/tap */
.example-card:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
  box-shadow: 0 5px 20px rgba(0, 229, 255, 0.5);
}

/* Restore the existing hover effect on the active element to prevent flickering */
.example-card:hover:active {
  transform: translateY(0) scale(0.98);
}

.plot-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.caption {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.how-to-use-text {
  text-align: center;
  font-style: italic;
  color: var(--color-accent);
  margin-top: 2rem;
}

/* --- Footer --- */
footer {
  background-color: var(--color-bg-primary);
  padding: 2rem 0;
  border-top: 1px solid var(--color-glass-border);
  text-align: center;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Styles for the icon/text links */
.footer-links .icon-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Styles for the social media icons */
.social-icon {
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;


  /*brightness and add a subtle, cool-toned glow */
  filter: brightness(0.9) drop-shadow(0 0 1px rgba(0, 229, 255, 0.3));
  transition: filter 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-links a:hover .social-icon {
  filter: brightness(1.8) drop-shadow(0 0 5px var(--color-accent)) drop-shadow(0 0 10px rgba(0, 229, 255, 0.8));
}

/* --- Media Query for Responsiveness --- */
@media (max-width: 768px) {

  section {
    padding: 0.4rem 0;
  }

  .navbar .container,
  footer .container {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-links {
    justify-content: center;
  }

  .hero-section {
    min-height: 70vh;
  }
}