/* ============================================================
   FORMULATIONS SCIENCE - DESIGN SYSTEM & STYLESHEET
   Pharmacist Ben Fuchs, R.Ph. Compounding Library
   ============================================================ */

:root {
    /* Color Palette */
    --bg-primary: #080c16;
    --bg-secondary: #0d1222;
    --bg-card: #13192c;
    --bg-card-hover: #192138;
    --bg-elevated: #1e2742;
    --bg-glass: rgba(19, 25, 44, 0.75);
    
    --text-primary: #f0f4fc;
    --text-secondary: #94a1be;
    --text-muted: #627091;
    
    --accent-teal: #00d4aa;
    --accent-teal-glow: rgba(0, 212, 170, 0.25);
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #8b5cf6 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
    --gradient-hero: linear-gradient(180deg, #080c16 0%, #0d1326 40%, #111832 100%);
    --gradient-card: linear-gradient(160deg, rgba(25, 33, 56, 0.9) 0%, rgba(15, 21, 38, 0.9) 100%);
    
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-accent: rgba(0, 212, 170, 0.35);
    --border-card: rgba(255, 255, 255, 0.08);
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 35px rgba(0, 212, 170, 0.15);
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Dimensions & Spacing */
    --container-max: 1280px;
    --container-padding: clamp(1.25rem, 4vw, 2.5rem);
    --section-padding: clamp(4.5rem, 7vw, 7.5rem);
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 180ms;
    --duration-normal: 350ms;
    --duration-slow: 600ms;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
}

/* ============================
   RESET & GLOBAL BASE
   ============================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

a:hover {
    color: #40f7d2;
}

::selection {
    background: rgba(0, 212, 170, 0.3);
    color: #fff;
}

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

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.85rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 22px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.45);
    color: #ffffff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1.5px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--accent-teal);
    background: rgba(0, 212, 170, 0.08);
    color: var(--accent-teal);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.4rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
}

/* ============================
   SECTION HEADERS
   ============================ */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-teal);
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
}

/* ============================
   NAVIGATION
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 12, 22, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--duration-normal) ease;
}

.navbar.scrolled {
    background: rgba(8, 12, 22, 0.96);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-primary);
}

.nav-logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.75rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

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

.logo-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--accent-teal);
    font-weight: 500;
}

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

.nav-links a {
    padding: 0.55rem 0.95rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    padding: 0.55rem 1.35rem !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.35);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--duration-fast) ease;
}

/* ============================
   HERO SECTION
   ============================ */
.hero {
    min-height: 94vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 86px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -5%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.09) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: -5%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.09) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 3.5rem var(--container-padding);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4.5rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-teal);
    background: rgba(0, 212, 170, 0.09);
    border: 1px solid rgba(0, 212, 170, 0.25);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-teal);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.8vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
}

.hero-line.accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-bottom: 2.25rem;
}

.hero-sub strong {
    color: var(--text-primary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-credentials {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.credential {
    text-align: center;
}

.credential-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credential-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.credential-divider {
    width: 1px;
    height: 38px;
    background: var(--border-subtle);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
}

.hero-image-frame {
    position: relative;
    width: 360px;
    height: 440px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    background: var(--bg-card);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.hero-image-badge {
    position: absolute;
    bottom: 20px;
    right: -10px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.hero-image-badge span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-image-badge strong {
    font-size: 0.95rem;
    color: var(--accent-teal);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, var(--accent-teal), transparent);
}

/* ============================
   FORMULATIONS DATABASE SECTION
   ============================ */
.formulations-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.library-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    font-size: 1.15rem;
    opacity: 0.6;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--duration-fast) ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.55rem 1.15rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-card-hover);
}

.filter-btn.active {
    background: var(--accent-teal);
    color: #080c16;
    font-weight: 600;
    border-color: var(--accent-teal);
    box-shadow: 0 2px 12px rgba(0, 212, 170, 0.3);
}

/* Ingredient Tag Strip */
.ingredient-filter-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.strip-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ingredient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ing-tag {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.ing-tag:hover {
    color: var(--accent-teal);
    border-color: rgba(0, 212, 170, 0.3);
}

.ing-tag.active {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-teal);
    border-color: var(--accent-teal);
    font-weight: 600;
}

.toolbar-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.count-badge {
    color: var(--accent-teal);
    font-weight: 600;
    font-family: var(--font-mono);
}

.reference-note {
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* ============================
   FORMULATIONS CARDS GRID
   ============================ */
.formulations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.75rem;
}

.formula-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.formula-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-teal), transparent);
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
}

.formula-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.formula-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.category-pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.formula-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-teal);
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    white-space: nowrap;
}

.card-header-group {
    margin-bottom: 1.25rem;
}

.formula-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.formula-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.card-actives {
    margin-bottom: 1.25rem;
}

.actives-heading {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.actives-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.active-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    color: var(--accent-teal);
    border-radius: 4px;
    font-weight: 500;
}

.active-pill.highlight {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--accent-amber);
    font-weight: 600;
}

.card-rationale {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.ing-count {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(0, 212, 170, 0.25);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.btn-detail:hover {
    background: var(--accent-teal);
    color: #080c16;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-subtle);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================
   MODAL INSPECTOR
   ============================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 7, 14, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-xl);
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalScale 0.3s var(--ease-out) both;
}

@keyframes modalScale {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.modal-close:hover {
    background: var(--accent-rose);
    color: #fff;
    border-color: var(--accent-rose);
}

.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.modal-subtitle {
    font-size: 1.05rem;
    color: var(--accent-teal);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 2rem;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.modal-box-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-ingredient-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.modal-ingredient-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.ing-bullet {
    color: var(--accent-teal);
    font-weight: 700;
}

.rationale-box {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
}

.rationale-text p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.compounding-signature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.sig-icon {
    font-size: 1.6rem;
    color: var(--accent-teal);
}

.compounding-signature small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.modal-cta-box {
    background: rgba(0, 212, 170, 0.06);
    border: 1px solid rgba(0, 212, 170, 0.25);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.modal-cta-box strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.modal-cta-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================
   PHILOSOPHY & VEHICLE SECTIONS
   ============================ */
.philosophy-section, .delivery-section {
    background: var(--bg-primary);
}

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

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    transition: all var(--duration-normal) var(--ease-out);
}

.philosophy-card:hover {
    border-color: rgba(0, 212, 170, 0.25);
    transform: translateY(-3px);
}

.card-icon {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

.philosophy-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.philosophy-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.card-callout {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-teal);
    font-weight: 600;
}

/* Delivery Section */
.delivery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.delivery-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.del-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.delivery-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.delivery-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.delivery-specs {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-teal);
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ============================
   ABOUT SECTION
   ============================ */
.about-section {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
    align-items: center;
}

.about-image-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--border-card);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

.about-photo {
    width: 100%;
    height: 480px;
    object-fit: cover;
    object-position: top center;
}

.about-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(8, 12, 22, 0.95), transparent);
    display: flex;
    flex-direction: column;
}

.overlay-title {
    font-weight: 700;
    font-size: 1.15rem;
}

.overlay-sub {
    font-size: 0.82rem;
    color: var(--accent-teal);
}

.about-content-col .section-tag {
    margin-bottom: 0.75rem;
}

.about-content-col .section-title {
    text-align: left;
    margin-bottom: 1.25rem;
}

.about-lead {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-content-col p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-credentials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

.about-cred {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.cred-icon {
    font-size: 1.6rem;
}

.about-cred strong {
    display: block;
    font-size: 0.92rem;
}

.about-cred span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================
   CONTACT / CTA SECTION
   ============================ */
.contact-section {
    background: var(--bg-primary);
}

.cta-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: clamp(3rem, 6vw, 4.5rem) 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.cta-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-card h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.cta-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background: #050811;
    border-top: 1px solid var(--border-subtle);
    padding: 5rem 0 2.5rem;
}

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

.footer-brand .nav-logo {
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links-col h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

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

.footer-links-col a {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.footer-links-col a:hover {
    color: var(--accent-teal);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-disclaimer {
    font-size: 0.78rem;
    line-height: 1.6;
}

/* ============================
   RESPONSIVE DESIGN
   ============================ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-sub {
        margin: 0 auto 2rem;
    }

    .hero-actions, .hero-credentials {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-content-col .section-title {
        text-align: center;
    }

    .about-content-col {
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-lg);
    }

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

    .about-credentials {
        grid-template-columns: 1fr;
    }

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

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

/* ============================
   CONTACT FORM
   ============================ */
.netlify-contact-form {
    margin-top: 2rem;
    text-align: left;
    background: rgba(11, 19, 43, 0.4);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.netlify-contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.netlify-contact-form .form-group {
    margin-bottom: 1.5rem;
}

.netlify-contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.netlify-contact-form input,
.netlify-contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--duration-fast) ease;
}

.netlify-contact-form input:focus,
.netlify-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.netlify-contact-form .w-full {
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .netlify-contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
