/* ============================================
   PP405 - Pelage Pharmaceuticals
   Design System & Global Styles
   ============================================ */

/* --- CSS Variables --- */
:root {
  --black: #000000;
  --deep-black: #050508;
  --charcoal: #111118;
  --charcoal-light: #1a1a24;
  --charcoal-mid: #222230;
  --electric-blue: #00a8ff;
  --electric-blue-dim: rgba(0, 168, 255, 0.15);
  --electric-blue-glow: rgba(0, 168, 255, 0.4);
  --neon-green: #00e676;
  --neon-green-dim: rgba(0, 230, 118, 0.12);
  --neon-green-glow: rgba(0, 230, 118, 0.35);
  --white: #f0f0f5;
  --white-soft: #c8c8d0;
  --white-dim: #8888a0;
  --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--deep-black);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--electric-blue);
  text-decoration: none;
  transition: color 0.3s var(--transition-smooth);
}

a:hover {
  color: var(--neon-green);
}

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); }

p {
  color: var(--white-soft);
  font-size: 1.05rem;
  max-width: 720px;
}

.label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--electric-blue);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .label {
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--transition-smooth);
  background: transparent;
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 168, 255, 0.1);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
}

.nav-logo span {
  color: var(--electric-blue);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--white-soft);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--electric-blue);
  transition: width 0.3s var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--electric-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
  display: block;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1px solid var(--electric-blue);
  color: var(--electric-blue);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--electric-blue-dim), transparent);
  transition: left 0.5s var(--transition-smooth);
}

.btn:hover {
  color: var(--white);
  background: var(--electric-blue-dim);
  box-shadow: 0 0 30px var(--electric-blue-glow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--electric-blue);
  color: var(--deep-black);
  border-color: var(--electric-blue);
  font-weight: 600;
}

.btn-primary:hover {
  color: var(--deep-black);
  background: var(--white);
  border-color: var(--white);
}

.btn-green {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.btn-green:hover {
  background: var(--neon-green-dim);
  box-shadow: 0 0 30px var(--neon-green-glow);
  color: var(--white);
}

/* --- Cards --- */
.card {
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--electric-blue), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  border-color: rgba(0, 168, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--electric-blue-dim);
  color: var(--electric-blue);
  font-size: 1.4rem;
}

.card h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--white-dim);
}

/* --- Grid --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

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

.hero .label {
  margin-bottom: 24px;
  display: block;
}

.hero h1 {
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--white) 0%, var(--electric-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  margin: 0 auto 40px;
  font-size: 1.15rem;
}

/* --- Particle Canvas --- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* --- Glow Line --- */
.glow-line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--electric-blue), var(--neon-green));
  margin: 20px auto;
  box-shadow: 0 0 10px var(--electric-blue-glow);
}

/* --- Data Visualization Bars --- */
.data-bar-container {
  margin: 16px 0;
}

.data-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.data-bar-label span:first-child {
  color: var(--white-soft);
}

.data-bar-label span:last-child {
  color: var(--electric-blue);
  font-family: var(--font-display);
}

.data-bar {
  width: 100%;
  height: 6px;
  background: var(--charcoal-mid);
  overflow: hidden;
  position: relative;
}

.data-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--electric-blue), var(--neon-green));
  width: 0;
  transition: width 1.5s var(--transition-smooth);
  box-shadow: 0 0 10px var(--electric-blue-glow);
}

/* --- Disclaimer Banner --- */
.disclaimer {
  background: rgba(0, 168, 255, 0.06);
  border: 1px solid rgba(0, 168, 255, 0.15);
  padding: 16px 24px;
  font-size: 0.82rem;
  color: var(--white-dim);
  text-align: center;
  letter-spacing: 0.02em;
}

.disclaimer strong {
  color: var(--electric-blue);
}

/* --- Footer --- */
.footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--white-dim);
  max-width: 300px;
}

.footer h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--electric-blue);
  margin-bottom: 20px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul li a {
  color: var(--white-dim);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer ul li a:hover {
  color: var(--electric-blue);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white-dim);
  font-size: 1rem;
  transition: all 0.3s;
}

.footer-social a:hover {
  border-color: var(--electric-blue);
  color: var(--electric-blue);
  box-shadow: 0 0 15px var(--electric-blue-glow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--white-dim);
}

.footer-bottom a {
  color: var(--electric-blue);
}

/* --- Contact Form --- */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--electric-blue);
  box-shadow: 0 0 20px var(--electric-blue-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-color: rgba(0, 168, 255, 0.2);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 22px 28px;
  background: var(--charcoal);
  border: none;
  color: var(--white);
  font-family: var(--font-primary);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background 0.3s;
}

.faq-question:hover {
  background: var(--charcoal-light);
}

.faq-question .icon {
  font-size: 1.4rem;
  color: var(--electric-blue);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.active .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition-smooth), padding 0.4s;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 28px 22px;
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--white-dim);
  padding-top: 4px;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.lightbox-close:hover {
  border-color: var(--electric-blue);
  color: var(--electric-blue);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--electric-blue), var(--neon-green), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
  padding-left: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--electric-blue);
  box-shadow: 0 0 10px var(--electric-blue-glow);
}

.timeline-item h4 {
  color: var(--electric-blue);
  margin-bottom: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Stat Counters --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--charcoal);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--electric-blue);
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Animated Border Glow --- */
.border-glow {
  position: relative;
}

.border-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(45deg, var(--electric-blue), transparent, var(--neon-green), transparent);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.border-glow:hover::after {
  opacity: 1;
}

/* --- Password Page --- */
.password-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.password-container {
  text-align: center;
  position: relative;
  z-index: 2;
}

.password-container h2 {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 40px;
  font-weight: 400;
}

.password-input-wrap {
  position: relative;
  width: 340px;
  margin: 0 auto 24px;
}

.password-input-wrap input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-align: center;
  outline: none;
  transition: all 0.4s;
}

.password-input-wrap input:focus {
  border-color: var(--electric-blue);
  box-shadow: 0 0 30px var(--electric-blue-dim);
}

.password-input-wrap input::placeholder {
  color: var(--white-dim);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.password-error {
  color: #ff4444;
  font-size: 0.8rem;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.password-error.visible {
  opacity: 1;
}

.glitch-effect {
  animation: glitch 0.3s ease;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}

.morph-out {
  animation: morphOut 0.8s var(--transition-smooth) forwards;
}

@keyframes morphOut {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.1); filter: blur(10px); }
}

/* --- Page Transition --- */
.page-enter {
  animation: pageEnter 0.6s var(--transition-smooth) forwards;
}

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

/* --- Interactive Explainer --- */
.explainer-steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.explainer-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.4s;
}

.explainer-step:hover,
.explainer-step.active {
  background: var(--charcoal-light);
  border-color: rgba(0, 168, 255, 0.2);
}

.explainer-step.active {
  border-left: 3px solid var(--electric-blue);
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--electric-blue);
  text-align: center;
  line-height: 1;
}

.step-content h4 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.step-content p {
  font-size: 0.9rem;
  color: var(--white-dim);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s, opacity 0.4s;
  opacity: 0;
}

.explainer-step.active .step-content p {
  max-height: 200px;
  opacity: 1;
}

/* --- Image with clinical frame --- */
.clinical-image {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.clinical-image::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 168, 255, 0.15);
  z-index: 1;
  pointer-events: none;
}

.clinical-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--charcoal);
    flex-direction: column;
    padding: 80px 30px 30px;
    gap: 20px;
    transition: right 0.4s var(--transition-smooth);
    border-left: 1px solid rgba(0, 168, 255, 0.1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .hero { min-height: 90vh; }
  .section { padding: 60px 0; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .password-input-wrap { width: 280px; }
}
