@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Design Tokens & Variables */
:root {
  --font-title: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;

  /* Color Palette */
  --bg-main: #0c080d; /* Extremely deep dark amethyst-black */
  --bg-card: #16101b; /* Soft dark plum */
  --bg-card-hover: #221829;
  --primary: #d4a373; /* Rich gold/copper */
  --primary-glow: rgba(212, 163, 115, 0.15);
  --secondary: #e8a598; /* Warm rose gold */
  --secondary-glow: rgba(232, 165, 152, 0.15);
  --accent: #b56576; /* Soft rose-mauve */
  --text-main: #f5f2f5;
  --text-muted: #bdaebf;
  --border-color: rgba(212, 163, 115, 0.2);
  --border-color-hover: rgba(232, 165, 152, 0.4);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

strong {
  color: var(--secondary);
  font-weight: 500;
}

/* Common Layout Elements */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Styling */
section {
  padding: 8rem 0;
  position: relative;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(12, 8, 13, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 163, 115, 0.1);
  transition: var(--transition-smooth);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.1em;
}

.logo span {
  color: var(--secondary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 0;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(12, 8, 13, 0.2) 0%, rgba(12, 8, 13, 0.9) 80%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 2rem;
}

.hero-tagline {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--text-main);
  text-shadow: 0 0 20px rgba(12, 8, 13, 0.8);
}

.hero-title span {
  display: block;
  font-size: 1.8rem;
  font-weight: 300;
  margin-top: 1rem;
  color: var(--primary);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: var(--transition-fast);
}

.scroll-indicator:hover {
  color: var(--primary);
}

.scroll-indicator-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  margin-top: 8px;
  animation: scrollDown 2s infinite;
  transform-origin: top;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); opacity: 0; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.5); opacity: 0; }
}

/* Content Columns & Presentation Layout */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.section-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin: 1.5rem auto 0;
}

/* Info Grid Layout (Text + Image Side-by-Side) */
.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 6rem;
}

.info-row.reversed {
  direction: rtl;
}

.info-row.reversed .info-text {
  direction: ltr;
}

.info-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.info-image-container {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.info-image-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-color);
  z-index: 2;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.info-image-container:hover::before {
  border-color: var(--border-color-hover);
  box-shadow: inset 0 0 20px var(--primary-glow);
}

.info-image {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%);
  transition: var(--transition-smooth);
}

.info-image-container:hover .info-image {
  transform: scale(1.03);
  filter: grayscale(0%);
}

/* Cards & Science/Curiosity elements */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

.card {
  background-color: var(--bg-card);
  padding: 3rem 2.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-8px);
  background-color: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 30px rgba(212, 163, 115, 0.05);
}

.card-num {
  font-family: var(--font-title);
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.5;
  margin-bottom: 1.5rem;
  display: block;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.card p {
  font-size: 1rem;
  margin: 0;
}

/* Step by Step Section */
.steps-container {
  max-width: 800px;
  margin: 4rem auto 0;
  position: relative;
  padding-left: 2.5rem;
}

.steps-container::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}

.step-item {
  position: relative;
  margin-bottom: 4rem;
}

.step-item:last-child {
  margin-bottom: 0;
}

.step-bullet {
  position: absolute;
  left: calc(-2.5rem - 6px);
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--primary);
  z-index: 2;
  transition: var(--transition-smooth);
}

.step-item:hover .step-bullet {
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}

.step-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-number {
  font-family: var(--font-title);
  color: var(--accent);
  font-size: 1.2rem;
}

.step-title {
  font-size: 1.4rem;
  font-weight: 600;
}

.step-desc {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Safety & Partners Section */
.safety-content {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(22, 16, 27, 0.4) 100%);
  padding: 5rem 4rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.safety-header {
  margin-bottom: 3rem;
}

.safety-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.safety-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.links-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 8, 13, 0.5);
  border: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  border-radius: 6px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.action-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.action-link .link-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.action-link .link-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.action-link .link-main {
  font-size: 1.05rem;
  font-family: var(--font-title);
  letter-spacing: 0.05em;
}

.action-link .link-arrow {
  color: var(--secondary);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.action-link:hover .link-arrow {
  transform: translateX(5px);
}

/* Partners List */
.partners-block {
  margin-top: 3.5rem;
}

.partners-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  border-bottom: 1px solid rgba(212, 163, 115, 0.2);
  padding-bottom: 0.75rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.partner-item {
  background: rgba(12, 8, 13, 0.3);
  border: 1px solid rgba(212, 163, 115, 0.1);
  padding: 1.2rem 1.5rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  transition: var(--transition-fast);
}

.partner-item:hover {
  background: rgba(22, 16, 27, 0.8);
  border-color: var(--primary);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(212, 163, 115, 0.05);
}

/* Footer */
footer {
  background-color: #060407;
  padding: 4rem 0;
  border-top: 1px solid rgba(212, 163, 115, 0.1);
  text-align: center;
}

footer p {
  margin-bottom: 1rem;
}

.footer-credits {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------- */
/* SCROLL-DRIVEN ANIMATIONS & INTERSECTION OBSERVER    */
/* ---------------------------------------------------- */

/* Base setup for scroll animation elements when JS or native is active */
.reveal {
  opacity: 1;
}

/* CSS Scroll-Driven Animations (Native Chrome/Safari support) */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .reveal-scroll {
    animation: revealFadeIn linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

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

  /* Parallax for images */
  .parallax-image-wrapper {
    view-timeline: --image-timeline;
    overflow: hidden;
  }

  .parallax-image-wrapper img {
    animation: parallaxImage linear both;
    animation-timeline: --image-timeline;
    animation-range: entry 0% exit 100%;
    transform-origin: center;
  }

  @keyframes parallaxImage {
    from {
      transform: scale(1.08) translateY(-20px);
    }
    to {
      transform: scale(1.08) translateY(20px);
    }
  }
}

/* Standard animation fallback class added by JS (IntersectionObserver) */
.js-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.js-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal-scroll, .js-reveal, .parallax-image-wrapper img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .info-row {
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
  }
  
  .info-row.reversed {
    direction: ltr;
  }

  .safety-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 2.75rem;
  }
  
  .hero-title span {
    font-size: 1.5rem;
  }
  
  section {
    padding: 6rem 0;
  }
}

@media (max-width: 768px) {
  nav .container {
    height: 70px;
  }
  
  .nav-links {
    display: none; /* Keep it clean and mobile simple */
  }

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

  .hero-title span {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .safety-content {
    padding: 3rem 2rem;
  }

  .partners-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .partner-item {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
}
