/* ==========================================================================
   THE HOLY SHROUD OF TURIN - SCIENTIFIC CASE FOR AUTHENTICITY
   Aesthetic Design System: Sacred Obsidian & Divine Gold
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #07090e;
  --bg-secondary: #0d121c;
  --bg-tertiary: #131b28;
  --bg-card: rgba(19, 27, 40, 0.75);
  --bg-glass: rgba(13, 18, 28, 0.85);

  --text-main: #f0f4f8;
  --text-muted: #9aa8bc;
  --text-parchment: #e9dec9;
  
  --gold-primary: #d4af37;
  --gold-light: #f5dc89;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-border: rgba(212, 175, 55, 0.35);
  
  --crimson-blood: #a42325;
  --crimson-glow: rgba(164, 35, 37, 0.3);
  
  --cyan-science: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.2);

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: 1px solid var(--gold-border);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px var(--gold-glow);
  --shadow-science: 0 0 20px var(--cyan-glow);

  /* Fonts */
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.68;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 70%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.04) 0%, transparent 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography Helpers */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.25; margin-bottom: 1rem; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.35; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; color: var(--gold-light); }

p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

p.lead {
  font-size: 1.25rem;
  color: var(--text-parchment);
  font-weight: 300;
  line-height: 1.6;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--gold-glow);
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
}

/* Header & Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(7, 9, 14, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid var(--gold-border);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #ffffff;
  text-decoration: none;
}

.logo-cross {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-primary), #997520);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--gold-glow);
  color: #07090e;
  font-size: 1.3rem;
  font-weight: bold;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #ffffff;
}

.logo-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0.2rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.nav-btn {
  background: linear-gradient(135deg, var(--gold-primary), #997520);
  color: #07090e !important;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: 6px;
  box-shadow: 0 4px 15px var(--gold-glow);
  transition: var(--transition-bounce);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  text-shadow: none;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-science);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-crimson {
  background: rgba(164, 35, 37, 0.15);
  color: #f87171;
  border: 1px solid rgba(164, 35, 37, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.32;
  filter: brightness(0.85) contrast(1.15);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(180deg, 
    rgba(7, 9, 14, 0.85) 0%, 
    rgba(7, 9, 14, 0.6) 40%,
    rgba(7, 9, 14, 0.95) 85%,
    var(--bg-primary) 100%
  );
}

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

.hero-title {
  margin-top: 1.2rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, var(--gold-light) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary), #a67c1e);
  color: #07090e;
  box-shadow: 0 6px 20px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.45);
  color: #000000;
}

.btn-outline {
  background: rgba(19, 27, 40, 0.6);
  border: 1px solid var(--gold-border);
  color: var(--text-parchment);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-light);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Quick Stats Bar */
.stats-banner {
  position: relative;
  z-index: 10;
  margin-top: -3rem;
  margin-bottom: 4rem;
}

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

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--gold-primary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-glow);
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Section Common */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-dark {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
}

.section-header p {
  font-size: 1.15rem;
}

/* Cards & Evidence Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.evidence-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
}

.evidence-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-glow);
}

.evidence-img-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.evidence-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.evidence-card:hover .evidence-img {
  transform: scale(1.06);
}

.evidence-body {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.evidence-card h3 {
  color: #ffffff;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.evidence-subtitle {
  color: var(--gold-light);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.evidence-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.evidence-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.evidence-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold-primary);
  font-size: 0.8rem;
}

.evidence-citation {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
}

/* Feature Split Showcase */
.showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.showcase-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gold-border);
}

.showcase-media img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-badge-float {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Interactive Hotspot Inspector */
.viewer-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.hotspot-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-subtle);
}

.hotspot-stage img {
  width: 100%;
  display: block;
  user-select: none;
}

.hotspot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, var(--crimson-blood) 35%, rgba(164, 35, 37, 0.4) 70%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 0 15px var(--crimson-blood);
  z-index: 10;
}

.hotspot-pin:hover, .hotspot-pin.active {
  transform: translate(-50%, -50%) scale(1.3);
  background: var(--gold-primary);
  border-color: #ffffff;
  box-shadow: 0 0 25px var(--gold-primary);
  color: #000;
}

.hotspot-pin::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hotspot-details-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(13, 18, 28, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
}

.hotspot-empty-notice {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 3rem 1rem;
}

.hotspot-detail-box {
  animation: fadeIn 0.4s ease;
}

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

/* Image Before/After Comparison Slider */
.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold-border);
  box-shadow: var(--shadow-lg);
  user-select: none;
}

.comparison-before,
.comparison-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.comparison-after {
  width: 50%;
  border-right: 2px solid var(--gold-light);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
  z-index: 5;
}

.comparison-before img,
.comparison-after img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold-primary), #997520);
  border: 2px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 10px var(--gold-glow);
  color: #000;
  font-weight: bold;
}

.comparison-label {
  position: absolute;
  bottom: 1rem;
  padding: 0.35rem 0.85rem;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-parchment);
  z-index: 6;
}

.comparison-label.label-left { left: 1rem; }
.comparison-label.label-right { right: 1rem; }

/* Filter Tabs */
.tabs-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  border-color: var(--gold-border);
  color: var(--text-main);
}

.tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* FAQ Accordion */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item:hover {
  border-color: var(--gold-border);
}

.faq-question {
  width: 100%;
  padding: 1.4rem 1.75rem;
  text-align: left;
  background: none;
  border: none;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.faq-question:hover {
  color: var(--gold-light);
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--gold-primary);
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.75rem;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.75rem 1.5rem;
}

.faq-answer p {
  color: #cbd5e1;
  margin-bottom: 0;
}

/* Researcher Spotlight Grid */
.researcher-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

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

.researcher-name {
  color: var(--gold-light);
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.researcher-title {
  font-size: 0.88rem;
  color: var(--cyan-science);
  margin-bottom: 1rem;
}

.researcher-quote {
  margin-top: auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid var(--gold-primary);
  border-radius: 4px;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-parchment);
}

/* Call to Action Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(19, 27, 40, 0.95), rgba(7, 9, 14, 0.98)),
              radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  margin: 4rem auto;
  max-width: 1040px;
}

/* Footer */
.site-footer {
  background: #040508;
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 380px;
}

.footer-heading {
  font-family: var(--font-serif);
  color: #ffffff;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .showcase-split, .viewer-container {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transition: left 0.3s ease;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-menu.open {
    left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: 70vh;
    padding: 3rem 0;
  }
}
