/* =====================================================================
   DOCTUROLOGY™ — FOUNDATION DESIGN SYSTEM
   Extracted verbatim from the approved homepage (index.html) styles.
   Single source of truth for typography, color, spacing, and components.
   Do not duplicate these rules in individual page <style> blocks.
   ===================================================================== */

/* Astra & Elementor Compatible Global Variables */
:root {
    /* Dark Cinematic Documentary Palette */
    --bg-primary: #030407;        /* Ultra Deep Black */
    --bg-secondary: #0A0D14;      /* Rich Dark Surface */
    --bg-tertiary: #111520;       /* Elevated Surface */

    --accent-primary: #D4AF37;    /* Classic Academic Gold */
    --accent-hover: #F3E5AB;      /* Light Gold Hover */
    --accent-muted: rgba(212, 175, 55, 0.1);

    --text-primary: #F3F4F6;      /* Crisp Off-White */
    --text-secondary: #9CA3AF;    /* Muted Reading Gray */
    --text-dark: #030407;         /* For inverted elements */

    /* Typography Scale */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-hi: 'Noto Serif Devanagari', serif;

    --spacing-section: 6rem;
    --container-width: 1200px;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-subtle: 1px solid rgba(255, 255, 255, 0.05);
    --shadow-cinematic: 0 30px 60px rgba(0, 0, 0, 0.8);

    /* Semantic tokens (v1.0 RC — additive, map onto the existing palette above) */
    --color-primary: var(--accent-primary);
    --color-primary-hover: var(--accent-hover);
    --color-surface: var(--bg-tertiary);
    --color-surface-raised: var(--bg-secondary);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(212, 175, 55, 0.4);
    --color-focus-ring: var(--accent-primary);
    --color-selection-bg: rgba(212, 175, 55, 0.25);
    --color-selection-text: var(--text-primary);
    --color-success: #4ADE80;
    --color-warning: #FBBF24;
    --color-info: #60A5FA;
    --color-muted: var(--text-secondary);

    /* Editorial reading rhythm */
    --content-measure: 68ch;      /* optimal line length for long-form paragraphs */
    --leading-tight: 1.3;
    --leading-body: 1.8;
    --rhythm-paragraph: 1.2rem;   /* space between paragraphs within one block */
}

/* Text selection */
::selection { background: var(--color-selection-bg); color: var(--color-selection-text); }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Respect prefers-contrast: more — strengthen borders and muted text (already AA-passing; this pushes further for users who ask) */
@media (prefers-contrast: more) {
    :root { --text-secondary: #C3C9D1; --border-subtle: 1px solid rgba(255, 255, 255, 0.18); }
    a, button { text-decoration-thickness: 2px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

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

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 10px; }

/* Typography */
h1, h2, h3, h4, .title-font { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.01em; }
.hi-font { font-family: var(--font-hi); font-weight: 400; }
.text-muted { color: var(--text-secondary); }
.label { font-size: 0.85rem; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-primary); font-weight: 600; display: block; margin-bottom: 1rem; }

.gold-gradient {
    background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B59410 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 5%; position: relative; z-index: 2; }
section { padding: var(--spacing-section) 0; border-bottom: var(--border-subtle); position: relative; }
.section-dark { background-color: var(--bg-secondary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

/* Header */
header { position: fixed; top: 0; width: 100%; padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; background-color: rgba(3, 4, 7, 0.85); backdrop-filter: blur(15px); z-index: 1000; transition: var(--transition-smooth); border-bottom: var(--border-subtle); }
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 5%; }
.logo { display: flex; align-items: center; font-family: var(--font-heading); font-size: 1.6rem; color: var(--text-primary); text-decoration: none; font-weight: 700; gap: 10px; }
.logo img { height: 40px; width: auto; }
.logo span.hi-name { font-family: var(--font-hi); font-size: 1.2rem; color: var(--accent-primary); }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; transition: var(--transition-smooth); display: inline-block; padding: 0.5rem 0; }
nav a:hover { color: var(--accent-primary); }

/* Mobile nav toggle (new — see changelog; hidden on desktop) */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--color-border); border-radius: 4px; width: 44px; height: 44px; padding: 0; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text-primary); transition: var(--transition-smooth); }
.nav-toggle span { top: 21px; }
.nav-toggle span::before { content: ''; top: -7px; }
.nav-toggle span::after { content: ''; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn-group { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 2.5rem; border-radius: 2px; text-decoration: none; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; transition: var(--transition-smooth); }
.btn-primary { background-color: var(--accent-primary); color: var(--text-dark); border: 1px solid var(--accent-primary); }
.btn-primary:hover { background-color: transparent; color: var(--accent-primary); box-shadow: 0 0 20px var(--accent-muted); }
.btn-outline { border: 1px solid rgba(255,255,255,0.2); color: var(--text-primary); background: transparent; }
.btn-outline:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* Floating Glow Effects */
.ambient-glow { position: absolute; border-radius: 50%; filter: blur(100px); z-index: 1; pointer-events: none; opacity: 0.4; }
.glow-top { top: -10%; left: -10%; width: 600px; height: 600px; background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%); }
.glow-bottom { bottom: 10%; right: -5%; width: 700px; height: 700px; background: radial-gradient(circle, rgba(17, 24, 39, 0.6) 0%, transparent 70%); }

/* Glass Cards */
.glass-card { background: rgba(17, 21, 32, 0.5); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 3rem; border: var(--border-subtle); border-radius: 8px; transition: var(--transition-smooth); }
.glass-card:hover { border-color: rgba(212, 175, 55, 0.4); transform: translateY(-5px); box-shadow: var(--shadow-cinematic); }

/* 1. Hero Cinematic Section */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, var(--bg-tertiary) 0%, var(--bg-primary) 80%); text-align: center; padding-top: 6rem; position: relative; }
.hero-content { max-width: 900px; z-index: 2; }
.hero h1 { font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.1; margin-bottom: 0.5rem; }
.hero .hi-title { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 2rem; color: var(--text-primary); }
.hero h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 400; margin-bottom: 1rem; color: var(--text-secondary); }
.hero .hi-subtitle { font-size: clamp(1.2rem, 2.5vw, 1.6rem); color: var(--text-secondary); margin-bottom: 3rem; }

/* Compact page hero (for sub-pages, no full 100vh) */
.hero-compact { min-height: auto; padding-top: 9rem; padding-bottom: 3rem; }
.hero-compact h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }

/* 2. Rethink. Rebuild. Reform. */
.rrr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; text-align: center; }
.rrr-card { border-top: 3px solid var(--accent-primary); }
.rrr-card h3 { font-size: 2rem; color: var(--accent-primary); margin-bottom: 1rem; }
.rrr-card p { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.5rem; }

/* 3. Definitions (Docturology & DOCTURE) */
.def-section { background: var(--bg-primary); }
.def-box { margin-bottom: 3rem; border-left: 4px solid var(--accent-primary); }
.def-box h2 { font-size: 2.5rem; color: var(--text-primary); margin-bottom: 1rem; }
.def-box .acronym { font-family: var(--font-heading); font-size: 1.4rem; color: var(--accent-primary); font-weight: 600; margin-bottom: 1.5rem; }
.def-box p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1rem; color: var(--text-secondary); }

/* 4. Core Theories / Concept Grid (reusable for any 3-6 item concept grid) */
.theories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 4rem; }
.theory-card { border-top: 3px solid transparent; }
.theory-card:hover { border-top-color: var(--accent-primary); }
.theory-card h3 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.theory-card .hi-head { font-family: var(--font-hi); font-size: 1.1rem; color: var(--accent-primary); margin-bottom: 1rem; display: block; }
.theory-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* 5. Human Rights / Callout Banner */
.rights-banner { text-align: center; background: var(--bg-secondary); padding: 5rem 5%; border-radius: 8px; margin: 4rem 0; border: var(--border-subtle); }
.rights-banner h2 { font-size: 3rem; margin-bottom: 1.5rem; }
.rights-banner p { font-size: 1.4rem; font-style: italic; max-width: 800px; margin: 0 auto; color: var(--text-secondary); }

/* 6. Research & Book & About */
.media-image { width: 100%; border-radius: 8px; box-shadow: var(--shadow-cinematic); border: 1px solid rgba(255,255,255,0.1); transition: var(--transition-smooth); }
.media-image:hover { transform: scale(1.02); border-color: var(--accent-primary); }

.author-photo-img { aspect-ratio: 1/1; border-radius: 50%; width: 70%; margin: 0 auto; border: 4px solid var(--accent-primary); object-fit: cover; filter: grayscale(100%); transition: var(--transition-smooth); display: block; }
.author-photo-img:hover { filter: grayscale(0%); box-shadow: 0 0 30px var(--accent-muted); }

/* 7. Quotes & Power Lines */
.quote-block { text-align: center; max-width: 900px; margin: 4rem auto; }
.quote-block h3 { font-size: 2.8rem; font-style: italic; color: var(--text-primary); margin-bottom: 1.5rem; line-height: 1.3; }
.quote-block .hi-quote { font-size: 1.8rem; color: var(--accent-primary); }

/* Inline pull-quote (reusable on any content page) */
.pull-quote { margin-top: 2.5rem; background: var(--bg-tertiary); border-left: 4px solid var(--accent-primary); padding: 2rem; font-size: 1.2rem; color: var(--text-primary); border-radius: 4px; }

/* 8. Disclaimer / Note box */
.disclaimer { background: rgba(212, 175, 55, 0.05); padding: 2rem; border-radius: 8px; text-align: center; font-size: 0.95rem; margin-top: 4rem; border: var(--border-subtle); }

/* 9. Premium Footer */
footer { background: #010101; padding: 5rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; margin-bottom: 4rem; }
.footer-logo { font-size: 2.5rem; font-family: var(--font-heading); color: var(--accent-primary); margin-bottom: 0.5rem; }
.footer-links { display: flex; flex-direction: column; }
.footer-links a { color: var(--text-secondary); text-decoration: none; margin-bottom: 1rem; transition: var(--transition-smooth); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-links a:hover { color: var(--accent-primary); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

/* Inline emphasis utility (reusable — replaces one-off inline color:accent styles) */
.highlight { color: var(--accent-primary); font-weight: 600; }

/* Editorial text-block rhythm (reusable — replaces repeated inline paragraph styles) */
.text-block { max-width: var(--content-measure); font-size: 1.1rem; line-height: var(--leading-body); color: var(--text-secondary); margin-bottom: var(--rhythm-paragraph); }
.text-block-hi { max-width: var(--content-measure); font-size: 1.05rem; line-height: var(--leading-body); color: var(--text-secondary); margin-bottom: var(--rhythm-paragraph); }
.text-block:last-child, .text-block-hi:last-child { margin-bottom: 0; }

/* Section heading rhythm (reusable — replaces repeated inline h2 styles) */
.section-heading { font-size: 2.5rem; color: var(--text-primary); margin-bottom: 2rem; line-height: var(--leading-tight); }

/* Hero lead paragraph (reusable — sub-page hero intro text) */
.hero-lead { max-width: 800px; margin: 0 auto; color: var(--text-secondary); font-size: 1.15rem; }
.hero-lead-hi { max-width: 800px; margin: 1.5rem auto 0; color: var(--text-secondary); font-size: 1.1rem; }

/* Footer component utilities (reusable — shared footer appears on every page) */
.footer-label-white { color: #fff; }
.footer-description { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1rem; max-width: 300px; }
.footer-tagline-hi { font-size: 1.5rem; color: var(--text-secondary); margin-bottom: 1rem; }
.footer-hashtag { color: var(--accent-primary); font-family: monospace; letter-spacing: 4px; margin-top: 1.5rem; display: inline-block; }

/* Small single-property utilities (reusable — replace repeated one-property inline styles) */
.text-left { text-align: left; }
.text-center { text-align: center; }
.font-serif { font-family: var(--font-heading); }
.text-primary-color { color: var(--text-primary); }
.divider-top { border-top: var(--border-subtle); padding-top: 1rem; margin-top: 1rem; }
.mt-1 { margin-top: 1rem; }
.mt-lg { margin-top: 3rem; }

/* Accessibility: skip link (new — see changelog) */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent-primary); color: var(--text-dark); padding: 1rem 1.5rem; z-index: 2000; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Visible keyboard focus (new — see changelog) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 3px; border-radius: 2px; }

/* Responsive */
@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .author-photo-img { width: 50%; }
    .nav-toggle { display: block; }
    nav { position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 80vw); background: var(--bg-secondary); border-left: var(--border-subtle); padding: 6rem 2rem 2rem; transform: translateX(100%); transition: var(--transition-smooth); overflow-y: auto; }
    nav.nav-open { transform: translateX(0); box-shadow: var(--shadow-cinematic); }
    .nav-backdrop { display: none; }
    .nav-backdrop.nav-backdrop-visible { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
    nav ul { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    nav a { display: block; width: 100%; padding: 0.9rem 0; font-size: 0.9rem; }
    :root { --spacing-section: 5rem; }
    .def-box { text-align: left; }
}
@media (max-width: 768px) {
    .hero { padding-top: 7rem; padding-bottom: 3rem; }
    .hero h1 { font-size: 3rem; }
    .btn-group { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
    .quote-block h3 { font-size: 2rem; }
}
