/*
 * Kester Ancestral Research - Bespoke Design System
 * Adheres to British English, WCAG 2.1 AA Accessibility, and AGENTS.md standards.
 */

:root {
    /* Colour Tokens */
    --navy-deep: #0B132B;
    --navy-dark: #121C38;
    --navy-surface: #18254A;
    --navy-card: #1D2D59;
    --navy-light: #2C3E6B;
    
    --gold-primary: #C5A059;
    --gold-light: #E0C075;
    --gold-dark: #9A7730;
    --gold-glow: rgba(197, 160, 89, 0.25);
    
    --parchment-bg: #FBF9F4;
    --parchment-card: #F4EFE6;
    --parchment-border: #E5DEC9;
    
    --text-primary: #1C222F;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --text-light: #F7FAFC;
    --text-gold: #D4AF37;
    
    --success: #2A7B4C;
    --error: #C53030;
    --info: #2B6CB0;
    
    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Shadows & Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 4px rgba(11, 19, 43, 0.05);
    --shadow-md: 0 6px 16px rgba(11, 19, 43, 0.08);
    --shadow-lg: 0 12px 32px rgba(11, 19, 43, 0.12);
    --shadow-gold: 0 4px 20px rgba(197, 160, 89, 0.25);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body.site-body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--parchment-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Accessibility Focus States */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--navy-deep);
    color: var(--gold-light);
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    border-radius: var(--radius-sm);
    transition: top var(--transition-fast);
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

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

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

/* Headings Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--navy-deep);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

a {
    color: var(--gold-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    color: var(--navy-deep);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(197, 160, 89, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-light);
    border-color: var(--gold-primary);
}

.btn-secondary:hover {
    background: rgba(197, 160, 89, 0.1);
    color: #fff;
    border-color: var(--gold-light);
    transform: translateY(-2px);
}

.btn-dark {
    background: var(--navy-deep);
    color: var(--gold-light);
}

.btn-dark:hover {
    background: var(--navy-surface);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--navy-deep);
    border-color: var(--navy-deep);
}

.btn-outline-dark:hover {
    background: var(--navy-deep);
    color: var(--gold-light);
}

.btn-sm {
    padding: 0.5rem 1.15rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.1rem 2.25rem;
    font-size: 1.05rem;
}

/* Announcement Top Bar */
.top-announcement-bar {
    background: #080D1D;
    color: #CBD5E0;
    font-size: 0.825rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    text-align: center;
}

.bar-content p {
    margin: 0;
    color: #E2E8F0;
}

.pulse-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #48BB78;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(72, 187, 120, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(72, 187, 120, 0); }
    100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0); }
}

.bar-link {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: underline;
}

/* Site Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 19, 43, 0.96) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    transition: all var(--transition-fast);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
}

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

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-primary);
    font-weight: 500;
    margin-top: 2px;
}

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

.nav-link {
    font-size: 0.925rem;
    font-weight: 500;
    color: #E2E8F0;
    position: relative;
    padding: 0.35rem 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: width var(--transition-fast);
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--gold-light);
    transition: var(--transition-fast);
}

/* Hero Section (Dark & Atmospheric) */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 80% 20%, #1A2850 0%, var(--navy-deep) 70%);
    color: var(--text-light);
    padding: 5.5rem 0 6rem;
    overflow: hidden;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 90%, rgba(197, 160, 89, 0.08) 0%, transparent 40%),
        linear-gradient(to right, rgba(11, 19, 43, 0.95), rgba(11, 19, 43, 0.7));
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(197, 160, 89, 0.12);
    border: 1px solid rgba(197, 160, 89, 0.35);
    color: var(--gold-light);
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}

.hero-heading {
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
}

.hero-heading .gold-text {
    color: var(--gold-light);
    font-style: italic;
}

.hero-subtext {
    font-size: 1.15rem;
    color: #CBD5E0;
    line-height: 1.7;
    margin-bottom: 2.25rem;
}

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    padding-top: 1.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #A0AEC0;
    margin-top: 0.35rem;
}

/* Hero Visual / Radial Teaser Card */
.hero-visual-card {
    background: var(--navy-surface);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.visual-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold-primary);
    color: var(--navy-deep);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
}

.radial-teaser-svg {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.visual-caption {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: #CBD5E0;
    margin-bottom: 0;
}

/* Page Header (Subpages) */
.subpage-header {
    background: radial-gradient(circle at 70% 30%, #17244B 0%, var(--navy-deep) 100%);
    color: #FFFFFF;
    padding: 4.5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
    position: relative;
}

.subpage-badge {
    display: inline-block;
    color: var(--gold-primary);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.subpage-title {
    color: #FFFFFF;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    margin-bottom: 1rem;
}

.subpage-desc {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #CBD5E0;
}

/* Sections & Layout Blocks */
.section {
    padding: 5rem 0;
}

.section-dark {
    background: var(--navy-deep);
    color: #FFFFFF;
}

.section-dark h2, .section-dark h3, .section-dark h4 {
    color: #FFFFFF;
}

.section-dark p {
    color: #CBD5E0;
}

.section-parchment {
    background: var(--parchment-card);
    border-top: 1px solid var(--parchment-border);
    border-bottom: 1px solid var(--parchment-border);
}

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

.section-eyebrow {
    display: block;
    color: var(--gold-dark);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-dark .section-eyebrow {
    color: var(--gold-light);
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.075rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.section-dark .section-subtitle {
    color: #CBD5E0;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: center;
}

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

/* Feature Cards & Pillar Cards */
.pillar-card {
    background: #FFFFFF;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-md);
    padding: 2.25rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.pillar-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.pillar-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.45rem;
}

.pillar-card p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.pillar-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-deep);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pillar-link:hover {
    color: var(--gold-dark);
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.pricing-card {
    background: #FFFFFF;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border: 2px solid var(--gold-primary);
    background: linear-gradient(180deg, #FFFFFF 0%, #FAF7F0 100%);
    box-shadow: var(--shadow-gold);
}

.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-deep);
    color: var(--gold-light);
    border: 1px solid var(--gold-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
}

.pricing-header {
    text-align: center;
    border-bottom: 1px solid var(--parchment-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.pricing-tier-name {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.pricing-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pricing-amount {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--navy-deep);
    line-height: 1;
}

.pricing-unit {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.feature-check {
    color: var(--gold-dark);
    font-weight: bold;
    flex-shrink: 0;
}

/* Interactive Calculator Box */
.calculator-box {
    background: var(--navy-deep);
    color: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: var(--shadow-lg);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.calc-controls {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.calc-group label {
    display: block;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.calc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calc-slider {
    flex-grow: 1;
    accent-color: var(--gold-primary);
    cursor: pointer;
}

.calc-val-display {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
    min-width: 60px;
    text-align: right;
}

.calc-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.calc-option-btn {
    background: var(--navy-surface);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: #CBD5E0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    text-align: left;
    transition: all var(--transition-fast);
}

.calc-option-btn.selected, .calc-option-btn:hover {
    background: rgba(197, 160, 89, 0.2);
    border-color: var(--gold-light);
    color: #FFFFFF;
}

.calc-summary-panel {
    background: var(--navy-surface);
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: var(--radius-md);
    padding: 2.25rem 2rem;
    text-align: center;
}

.calc-est-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.calc-total-price {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.calc-est-notes {
    font-size: 0.825rem;
    color: #A0AEC0;
    margin-bottom: 1.5rem;
}

/* Case Study & Paleography Viewer */
.case-study-card {
    background: #FFFFFF;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3.5rem;
}

.case-study-header {
    background: var(--navy-deep);
    color: #FFFFFF;
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.case-study-tag {
    background: rgba(197, 160, 89, 0.2);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.case-study-body {
    padding: 2.5rem;
}

.paleography-comparator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    background: var(--parchment-card);
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}

.palaeo-box h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: var(--navy-deep);
}

.palaeo-script-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
    background: #EFE8DA;
    padding: 1.25rem;
    border-left: 3px solid var(--gold-primary);
    border-radius: var(--radius-sm);
    color: #2D3748;
}

.palaeo-transcription {
    font-size: 0.925rem;
    line-height: 1.6;
    background: #FFFFFF;
    padding: 1.25rem;
    border-left: 3px solid var(--navy-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

/* Interactive SVG Archival Pedigree Tree Explorer */
.chart-explorer-wrap {
    background: var(--navy-deep);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: #FFFFFF;
    margin-bottom: 3.5rem;
}

.chart-explorer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 2.5rem;
    align-items: center;
}

.pedigree-svg-container,
.radial-svg-container {
    background: #080D1D;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}

.pedigree-chart-svg,
.radial-chart-svg {
    width: 100%;
    height: auto;
    max-height: 520px;
}

.chart-node {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chart-node:hover {
    filter: brightness(1.25);
    stroke: var(--gold-light);
    stroke-width: 2px;
}

.chart-node.active {
    stroke: #FFFFFF;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 6px rgba(224, 192, 117, 0.8));
}

.chart-inspector-panel {
    background: var(--navy-surface);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.inspector-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold-primary);
    margin-bottom: 0.35rem;
}

.inspector-name {
    font-size: 1.75rem;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.inspector-meta {
    font-size: 0.875rem;
    color: #CBD5E0;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.inspector-details-list {
    list-style: none;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.inspector-details-list li {
    padding: 0.4rem 0;
    color: #E2E8F0;
}

.inspector-details-list strong {
    color: var(--gold-light);
}

/* Contact & Onboarding Form */
.onboarding-card {
    background: #FFFFFF;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow-md);
}

.form-fieldset {
    border: none;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--parchment-border);
}

.form-fieldset:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.fieldset-legend {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy-deep);
    margin-bottom: 0.5rem;
    padding: 0;
}

.fieldset-desc {
    font-size: 0.925rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-deep);
    margin-bottom: 0.4rem;
}

.form-label .required {
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: var(--parchment-bg);
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.form-control:focus {
    background-color: #FFFFFF;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.consent-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.consent-checkbox-wrap input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--gold-dark);
    width: 18px;
    height: 18px;
}

.consent-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Alert Boxes */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.alert-success {
    background: #E6FFFA;
    border: 1px solid #81E6D9;
    color: #234E52;
}

.alert-error {
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    color: #742A2A;
}

/* FAQ Accordion Component */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #FFFFFF;
    border: 1px solid var(--parchment-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

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

.faq-question-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--navy-deep);
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--gold-dark);
    transition: transform var(--transition-fast);
}

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

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    display: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.faq-item.open .faq-answer {
    display: block;
}

/* Site Footer */
.site-footer {
    background: #080E20;
    color: #CBD5E0;
    border-top: 1px solid rgba(197, 160, 89, 0.25);
    margin-top: auto;
}

.footer-trust-strip {
    background: var(--navy-deep);
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    padding: 1.25rem 0;
}

.trust-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.trust-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #E2E8F0;
}

.trust-icon {
    color: var(--gold-light);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 4.5rem 1.5rem 3.5rem;
}

.footer-brand .brand-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-brand .brand-subtitle {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-top: 2px;
    margin-bottom: 1.25rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: #A0AEC0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-contact-items p {
    font-size: 0.85rem;
    color: #CBD5E0;
    margin-bottom: 0.4rem;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--gold-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: #A0AEC0;
    transition: color var(--transition-fast);
}

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

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

.footer-bottom p {
    margin: 0;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-legal-links a {
    color: #A0AEC0;
}

.footer-legal-links a:hover {
    color: var(--gold-light);
}

.footer-legal-links .sep {
    color: #4A5568;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy-deep);
    color: var(--gold-light);
    border: 1px solid var(--gold-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold-primary);
    color: var(--navy-deep);
    transform: translateY(-3px);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .grid-3, .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-explorer-grid, .calc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navy-deep);
        border-bottom: 1px solid var(--gold-primary);
        padding: 1.5rem;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .mobile-toggle {
        display: flex;
    }
    .grid-3, .grid-2, .grid-4, .pricing-grid {
        grid-template-columns: 1fr;
    }
    .paleography-comparator {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .onboarding-card {
        padding: 2rem 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
