@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Core Palette */
  --bg-primary: #0B1120;
  --bg-surface-dark: #111A2E;
  --bg-surface-elevated: #16223B;
  --bg-card: rgba(17, 26, 46, 0.85);
  
  --text-primary-light: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  
  /* Accent & Luxury Branding */
  --accent-gold: #D4AF37;
  --accent-gold-light: #E6CA65;
  --accent-gold-muted: rgba(212, 175, 55, 0.15);
  --accent-indigo: #1E1B4B;
  --accent-steel: #E2E8F0;
  
  /* Semantic Utilities */
  --utility-success: #10B981;
  --utility-success-bg: rgba(16, 185, 129, 0.12);
  --utility-error: #EF4444;
  --utility-warning: #F59E0B;
  --utility-info: #3B82F6;

  /* Typography */
  --font-primary-headings: 'Playfair Display', serif;
  --font-secondary-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent-serif: 'Cormorant Garamond', serif;

  /* Display Metrics */
  --size-h1: clamp(38px, 5vw, 64px);
  --size-h2: clamp(28px, 3.8vw, 44px);
  --size-h3: clamp(20px, 2.5vw, 28px);
  --size-body-large: 18px;
  --size-body: 15px;
  --size-caption: 12px;

  /* Spacing */
  --macro-section-padding: clamp(80px, 10vh, 130px) 0;
  --macro-container-width: 1400px;
  --macro-page-margins: 0 clamp(20px, 4vw, 60px);
  
  --micro-button-padding: 15px 32px;
  --micro-icon-gap: 12px;
  --micro-element-gap: 24px;

  /* Elevation */
  --z-sticky-nav: 1100;
  --z-floating-action: 500;
  --z-modal: 1200;

  /* Edge & Border */
  --radius-cards: 0px;
  --radius-buttons: 2px;
  --radius-pills: 9999px;
  --border-divider: 1px solid rgba(212, 175, 55, 0.18);
  --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
  --border-gold: 1px solid var(--accent-gold);

  /* Shadows & Depth */
  --shadow-soft-lift: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow-gold: 0 0 35px rgba(212, 175, 55, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary-headings);
  color: var(--text-primary-light);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); margin-bottom: 20px; }
h3 { font-size: var(--size-h3); }

p {
  font-size: var(--size-body);
  color: var(--text-muted);
  line-height: 1.7;
}

.kicker {
  display: inline-block;
  text-transform: uppercase;
  font-family: var(--font-secondary-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.container {
  max-width: var(--macro-container-width);
  margin: 0 auto;
  padding: var(--macro-page-margins);
}

/* Header & Global Reset */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px clamp(20px, 4vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: var(--z-sticky-nav);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-monogram {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary-headings);
  color: var(--accent-gold);
  font-size: 16px;
  font-weight: 600;
}

.brand-title {
  font-family: var(--font-primary-headings);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary-light);
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  display: block;
}

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

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-gold);
}

.nav-cta {
  padding: 10px 22px;
  font-size: 12px;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: radial-gradient(circle at 80% 30%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 10% 80%, rgba(30, 27, 75, 0.5) 0%, transparent 50%),
              var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: var(--utility-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--utility-success);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--utility-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--utility-success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content h1 span {
  color: var(--accent-gold);
  font-style: italic;
  font-family: var(--font-accent-serif);
}

.hero-content p {
  font-size: var(--size-body-large);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

/* Image Presentation */
.hero-image-container {
  position: relative;
}

.image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--bg-surface-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
  overflow: hidden;
  box-shadow: var(--shadow-soft-lift);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: contrast(1.05) brightness(0.95);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-frame:hover img {
  transform: scale(1.03);
}

.image-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 17, 32, 0.95) 90%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.image-badge h4 {
  font-size: 16px;
  font-family: var(--font-primary-headings);
  color: var(--text-primary-light);
}

.image-badge p {
  font-size: 12px;
  color: var(--accent-gold);
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--micro-icon-gap);
  padding: var(--micro-button-padding);
  font-family: var(--font-secondary-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-buttons);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: 1px solid var(--accent-gold);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
  background: var(--accent-gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-gold);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

/* Trust & Prestige Bar */
.trust-strip {
  padding: 40px 0;
  background: var(--bg-surface-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.trust-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-subtle);
  font-weight: 600;
}

.trust-affiliations {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-family: var(--font-primary-headings);
  font-size: 17px;
  letter-spacing: 0.02em;
}

.trust-item svg {
  color: var(--accent-gold);
}

/* Clinical Telemetry Bar */
.telemetry-section {
  padding: 60px 0;
  background: var(--bg-surface-elevated);
  border-bottom: var(--border-divider);
}

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

.telemetry-card {
  padding: 24px 20px;
  background: rgba(11, 17, 32, 0.6);
  border-left: 2px solid var(--accent-gold);
}

.telemetry-num {
  font-family: var(--font-primary-headings);
  font-size: 36px;
  color: var(--accent-gold);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
}

.telemetry-title {
  font-size: 13px;
  color: var(--text-primary-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.telemetry-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

/* Clinical Expertise Section */
.section-padding {
  padding: var(--macro-section-padding);
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 64px;
}

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

.card-luxury {
  background: var(--bg-card);
  padding: 48px 36px;
  border: var(--border-subtle);
  position: relative;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gold-muted);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  margin-bottom: 28px;
}

.card-luxury h3 {
  margin-bottom: 16px;
}

.card-luxury p {
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-spec-list {
  list-style: none;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-spec-list li {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-spec-list li::before {
  content: "—";
  color: var(--accent-gold);
}

/* Income Stream & Value Retention Matrix */
.retainer-section {
  background: radial-gradient(circle at 50% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
              var(--bg-surface-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.matrix-card {
  background: var(--bg-primary);
  border: var(--border-subtle);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.matrix-card.featured {
  border: 1px solid var(--accent-gold);
  background: linear-gradient(180deg, rgba(22, 34, 59, 0.9) 0%, rgba(11, 17, 32, 0.95) 100%);
  transform: scale(1.03);
  box-shadow: var(--shadow-glow-gold);
}

.matrix-tag {
  position: absolute;
  top: -12px;
  left: 32px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 4px 12px;
}

.matrix-tier-name {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 12px;
}

.matrix-price {
  font-family: var(--font-primary-headings);
  font-size: 40px;
  color: var(--text-primary-light);
  line-height: 1.1;
  margin-bottom: 6px;
}

.matrix-cycle {
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 24px;
}

.matrix-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 30px;
  min-height: 48px;
}

.matrix-features {
  list-style: none;
  margin-bottom: 36px;
  flex-grow: 1;
}

.matrix-features li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}

.matrix-features li svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

/* Administrative Fast-Track Dossier */
.dossier-section {
  background: var(--bg-primary);
}

.dossier-box {
  background: var(--bg-surface-dark);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.credential-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.credential-item {
  background: rgba(11, 17, 32, 0.7);
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.credential-item svg {
  color: var(--utility-success);
}

/* Footer */
footer {
  background: #070B14;
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-legal {
  font-size: 12px;
  color: var(--text-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Agentic Triage Assistant Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(16px);
  z-index: var(--z-modal);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-surface-dark);
  width: 100%;
  max-width: 580px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), var(--shadow-glow-gold);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 20;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: var(--accent-gold);
}

.modal-header {
  padding: 28px 32px 20px;
  background: #090E1A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-text h3 {
  font-size: 20px;
  margin-bottom: 2px;
}

.modal-header-text p {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 0;
}

.reset-agent {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 5px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-agent:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.modal-body {
  padding: 32px;
  background: var(--bg-surface-dark);
  min-height: 280px;
  max-height: 75vh;
  overflow-y: auto;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.chat-bubble {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 88%;
  animation: fadeIn 0.3s ease forwards;
}

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

.chat-bubble.agent {
  background: #16223B;
  color: var(--text-primary-light);
  border-left: 2px solid var(--accent-gold);
  align-self: flex-start;
}

.chat-bubble.user {
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-weight: 500;
  align-self: flex-end;
}

.triage-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.triage-btn {
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary-light);
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.triage-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  color: var(--accent-gold);
  padding-left: 22px;
}

.triage-btn::after {
  content: "→";
  color: var(--accent-gold);
  opacity: 0.5;
}

.triage-btn:hover::after {
  opacity: 1;
}

/* Fallback Webhook Form */
.webhook-form-box {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.webhook-form-box input,
.webhook-form-box textarea,
.webhook-form-box select {
  width: 100%;
  padding: 12px 14px;
  background: #090E1A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary-light);
  font-family: var(--font-secondary-body);
  font-size: 13px;
  margin-bottom: 12px;
  border-radius: var(--radius-buttons);
}

.webhook-form-box input:focus,
.webhook-form-box textarea:focus,
.webhook-form-box select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Responsive Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-image-container {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cards-grid,
  .matrix-grid {
    grid-template-columns: 1fr;
  }

  .matrix-card.featured {
    transform: none;
  }

  .dossier-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  nav {
    display: none;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .credential-checklist {
    grid-template-columns: 1fr;
  }
}
