/* ==========================================================================
   THE KETTLETOWN BOTANICAL ESTATE & INNOVATION CAMPUS
   Bespoke Ultra-Luxury Editorial Design System
   (No generic cookie-cutter styles: bespoke dark emerald obsidian, brass & parchment)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Inviting Warm Estate Color Palette (Soft botanical charcoal, warm slate & amber glass) */
  --bg-obsidian: #0e1520;
  --bg-estate-gradient: radial-gradient(circle at 50% 0%, #152232 0%, #0d1622 55%, #080d15 100%);
  --bg-card: rgba(22, 35, 52, 0.72);
  --bg-card-hover: rgba(30, 48, 70, 0.88);
  
  --emerald-primary: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --emerald-deep: #064e3b;
  --emerald-light: #6ee7b7;
  
  --gold-primary: #e5c158;
  --gold-light: #fef3c7;
  --gold-glow: rgba(229, 193, 88, 0.3);
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fef3c7 100%);
  
  --border-subtle: rgba(229, 193, 88, 0.22);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-emerald: rgba(16, 185, 129, 0.35);
  
  --text-pure: #ffffff;
  --text-muted: #cbd5e1;
  --text-champagne: #fdfbf7;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-obsidian);
  background-image: var(--bg-estate-gradient);
  background-attachment: fixed;
  color: var(--text-champagne);
  overflow-x: hidden;
  line-height: 1.65;
  selection-background-color: var(--emerald-primary);
  selection-color: #000;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #060b13;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Typography Classes */
.font-display {
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
}

.text-gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-emerald-gradient {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Luxury Cards */
.luxury-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(255, 255, 255, 0.05);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.luxury-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(229, 193, 88, 0.45);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65), 0 0 25px -5px var(--gold-glow);
  transform: translateY(-2px);
}

.luxury-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.75s ease;
}

.luxury-card:hover::before {
  left: 100%;
}

/* Gold Button */
.btn-gold {
  background: var(--gold-gradient);
  color: #060b13;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-gold:hover {
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.45);
  transform: translateY(-1px) scale(1.02);
}

/* Emerald Outline Button */
.btn-emerald-outline {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--emerald-primary);
  color: #34d399;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-emerald-outline:hover {
  background: var(--emerald-primary);
  color: #060b13;
  box-shadow: 0 4px 20px var(--emerald-glow);
}

/* Custom Interactive Map */
#campus-map {
  height: 580px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: #060b13;
  z-index: 10;
}

/* Blueprint Interactive Viewer */
.blueprint-modal-viewport {
  background-color: #040810;
  background-image: 
    radial-gradient(rgba(212, 175, 55, 0.15) 1px, transparent 0),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px, 64px 64px;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.blueprint-modal-viewport:active {
  cursor: grabbing;
}

.blueprint-img-viewer {
  transition: transform 0.1s ease-out;
  transform-origin: center center;
  user-select: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8)) contrast(1.2);
}

/* Tab Navigation */
.master-tab {
  color: #94a3b8;
  padding: 0.65rem 0.9rem;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px;
}

.master-tab:hover {
  color: var(--gold-light);
}

.master-tab.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  text-shadow: 0 0 12px var(--gold-glow);
}

/* Pillar Tabs */
.pillar-selector-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(16, 185, 129, 0.15));
  border-color: var(--gold-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--gold-glow);
}

/* Key Metrics Counter Badge */
.metric-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

/* Image Hover Zoom */
.render-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.render-card img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.render-card .overlay-gradient {
  background: linear-gradient(to top, rgba(14, 21, 32, 0.92) 0%, rgba(14, 21, 32, 0.5) 45%, rgba(14, 21, 32, 0.1) 85%, transparent 100%);
}

/* Interactive Split-Comparison & Opacity Evolution Slider */
.comparison-slider-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.comparison-before-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-right: 2px solid #e5c158;
  box-shadow: 0 0 20px rgba(229, 193, 88, 0.5);
  z-index: 20;
}

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

.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #8a6b10);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 30;
  pointer-events: none;
}

/* Print Overrides */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  header, nav, .no-print {
    display: none !important;
  }
}
