/* PharmDex Landing Page — Light Theme, Modern Design */

/* ===== TOKENS ===== */
:root {
    --maroon: #570036;
    --maroon-dark: #3d0026;
    --maroon-deep: #29001a;
    --maroon-subtle: rgba(87, 0, 54, 0.06);
    --gold: #c78c36;
    --gold-light: #f5d590;
    --gold-pale: #fcedc2;

    --white: #ffffff;
    --bg: #fafafa;
    --bg-tinted: #f5f3f7;
    --surface: #ffffff;
    --border: #eae7ee;
    --border-hover: rgba(87, 0, 54, 0.15);

    --text-dark: #1a1523;
    --text-body: #4a4358;
    --text-muted: #7c7589;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'DM Serif Display', Georgia, serif;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --radius: 16px;
    --radius-sm: 10px;

    --shadow-sm: 0 2px 8px rgba(87, 0, 54, 0.04);
    --shadow-md: 0 8px 30px rgba(87, 0, 54, 0.06);
    --shadow-lg: 0 20px 60px rgba(87, 0, 54, 0.08);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.loader--hide {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    height: 180px;
    width: auto;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.96); }
}

.loader-bar {
    width: 160px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.loader-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    border-radius: 3px;
    animation: loaderProgress 1.3s var(--ease) forwards;
}

@keyframes loaderProgress {
    to { width: 100%; }
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(250, 250, 250, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--maroon);
}

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.nav-link:hover { color: var(--maroon); }
.nav-link i { font-size: 0.68rem; transition: transform 0.3s; }
.nav-link:hover i { transform: translate(2px, -2px); }

/* ===== HERO ===== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 110px 24px 40px;
    overflow: hidden;
    background: var(--white);
}

/* Ambient glow */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    opacity: 0.5;
}

.hero-glow--1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(87, 0, 54, 0.1), transparent 70%);
    top: -120px;
    right: -80px;
    animation: glowDrift 12s ease-in-out infinite alternate;
}

.hero-glow--2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(199, 140, 54, 0.1), transparent 70%);
    bottom: -80px;
    left: -60px;
    animation: glowDrift 14s ease-in-out infinite alternate-reverse;
}

@keyframes glowDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(25px, -15px) scale(1.06); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

/* Founder intro block */
.founder-intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    animation: fadeUp 0.7s var(--ease) both;
}

.founder-avatar-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--maroon), var(--gold));
    padding: 3px;
    flex-shrink: 0;
}

.founder-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--white);
}

.founder-intro-text {
    text-align: left;
}

.founder-intro-name {
    display: block;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--maroon);
    line-height: 1.2;
}

.founder-intro-org {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* "is proud to announce" */
.hero-announce {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 8px;
    animation: fadeUp 0.7s var(--ease) 0.08s both;
}

/* Product name */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 400;
    color: var(--maroon);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
    animation: fadeUp 0.7s var(--ease) 0.15s both;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.hero-tagline {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 24px;
    animation: fadeUp 0.7s var(--ease) 0.2s both;
}

.hero-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    margin: 0 auto 22px;
    border-radius: 2px;
    animation: scaleX 0.6s var(--ease) 0.3s both;
}

@keyframes scaleX {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.hero-description {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-body);
    max-width: 540px;
    margin: 0 auto 32px;
    animation: fadeUp 0.7s var(--ease) 0.25s both;
}

.hero-description strong {
    color: var(--maroon);
    font-weight: 600;
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    animation: fadeUp 0.7s var(--ease) 0.3s both;
}

.stat { text-align: center; }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--maroon);
    letter-spacing: -0.5px;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* Neural network building animation */
.building-anim {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.nn-visual {
    display: flex;
    align-items: center;
    gap: 0;
    height: 64px;
}

.nn-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nn-node {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: relative;
}

.nn-node--api {
    background: var(--maroon);
    animation: nodeFlicker 2.5s ease-in-out infinite;
}

.nn-node--api:nth-child(1) { animation-delay: 0s; }
.nn-node--api:nth-child(2) { animation-delay: 0.4s; }

.nn-node--exc {
    background: var(--gold);
    animation: nodeFlicker 2.5s ease-in-out infinite 0.8s;
}

.nn-node--hidden {
    background: #7c7589;
    animation: nodeFlicker 2s ease-in-out infinite;
}

.nn-node--hidden:nth-child(1) { animation-delay: 0.2s; }
.nn-node--hidden:nth-child(2) { animation-delay: 0.6s; }
.nn-node--hidden:nth-child(3) { animation-delay: 1.0s; }

.nn-node--out {
    width: 16px;
    height: 16px;
    border: 2px solid var(--maroon);
    background: var(--white);
}

.nn-node--pulse {
    animation: outputPulse 2s ease-in-out infinite;
}

.nn-node--pulse2 {
    animation: outputPulse 2s ease-in-out infinite 1s;
}

@keyframes nodeFlicker {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50%      { opacity: 1; transform: scale(1.1); }
}

@keyframes outputPulse {
    0%, 100% { background: var(--white); box-shadow: none; }
    50%      { background: rgba(87, 0, 54, 0.15); box-shadow: 0 0 8px rgba(87, 0, 54, 0.2); }
}

/* Connection lines */
.nn-connections {
    width: 32px;
    height: 56px;
    flex-shrink: 0;
}

.nn-lines {
    width: 100%;
    height: 100%;
}

.nn-line {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 4 3;
    animation: dashFlow 1.5s linear infinite;
}

.nn-line--1  { animation-delay: 0s; stroke: var(--maroon); stroke-opacity: 0.3; }
.nn-line--2  { animation-delay: 0.15s; stroke: var(--maroon); stroke-opacity: 0.2; }
.nn-line--3  { animation-delay: 0.3s; stroke: var(--maroon); stroke-opacity: 0.15; }
.nn-line--4  { animation-delay: 0.1s; stroke: var(--maroon); stroke-opacity: 0.25; }
.nn-line--5  { animation-delay: 0.25s; stroke: var(--maroon); stroke-opacity: 0.35; }
.nn-line--6  { animation-delay: 0.4s; stroke: var(--maroon); stroke-opacity: 0.2; }
.nn-line--7  { animation-delay: 0.2s; stroke: var(--gold); stroke-opacity: 0.25; }
.nn-line--8  { animation-delay: 0.35s; stroke: var(--gold); stroke-opacity: 0.3; }
.nn-line--9  { animation-delay: 0.5s; stroke: var(--gold); stroke-opacity: 0.2; }
.nn-line--10 { animation-delay: 0.6s; stroke: var(--gold); stroke-opacity: 0.6; }
.nn-line--11 { animation-delay: 0.7s; stroke: var(--gold); stroke-opacity: 0.5; }
.nn-line--12 { animation-delay: 0.65s; stroke: var(--gold); stroke-opacity: 0.65; }
.nn-line--13 { animation-delay: 0.75s; stroke: var(--gold); stroke-opacity: 0.45; }
.nn-line--14 { animation-delay: 0.8s; stroke: var(--gold); stroke-opacity: 0.55; }
.nn-line--15 { animation-delay: 0.85s; stroke: var(--gold); stroke-opacity: 0.5; }
.nn-line--16 { animation-delay: 0.9s;  stroke-opacity: 0.3; }
.nn-line--17 { animation-delay: 0.95s; stroke-opacity: 0.25; }
.nn-line--18 { animation-delay: 1.0s;  stroke-opacity: 0.35; }
.nn-line--19 { animation-delay: 1.05s; stroke-opacity: 0.2; }
.nn-line--20 { animation-delay: 1.1s;  stroke-opacity: 0.3; }
.nn-line--21 { animation-delay: 1.15s; stroke-opacity: 0.25; }

@keyframes dashFlow {
    from { stroke-dashoffset: 14; }
    to   { stroke-dashoffset: 0; }
}

/* API-Excipient match animation */
.nn-match {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.nn-match-pair {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nn-match-pill {
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

.nn-match-pill--api {
    background: var(--maroon);
    color: var(--white);
}

.nn-match-pill--exc {
    background: var(--gold);
    color: var(--white);
}

.nn-match-link {
    font-size: 0.5rem;
    color: var(--text-muted);
    animation: matchPulse 1.5s ease-in-out infinite;
}

@keyframes matchPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50%      { opacity: 1; transform: scaleX(1.1); }
}

.nn-match-score {
    width: 100%;
}

.nn-match-bar {
    display: block;
    width: 56px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.nn-match-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    border-radius: 2px;
    animation: matchFill 2.5s ease-in-out infinite;
}

@keyframes matchFill {
    0%   { width: 0%; }
    60%  { width: 75%; }
    80%  { width: 75%; }
    100% { width: 0%; }
}

.building-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 10px;
    animation: labelPulse 2s ease-in-out infinite;
}

.building-label i {
    font-size: 0.72rem;
    color: var(--gold);
}

@keyframes labelPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* Launch pill */
.hero-launch {
    margin-bottom: 28px;
    animation: fadeUp 0.7s var(--ease) 0.35s both;
}

.launch-pill {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    color: var(--white);
    padding: 14px 28px;
    border-radius: 100px;
    box-shadow: 0 8px 28px rgba(87, 0, 54, 0.2);
    position: relative;
    overflow: hidden;
}

.launch-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: sweepShine 3s ease-in-out infinite;
}

@keyframes sweepShine {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.launch-pill-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.launch-pill-icon i {
    animation: rocketBob 2.5s ease-in-out infinite;
}

@keyframes rocketBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px) rotate(5deg); }
}

.launch-pill-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-pale);
}

.launch-pill-date {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

/* Tags */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    animation: fadeUp 0.7s var(--ease) 0.4s both;
}

.htag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 100px;
    transition: all 0.3s var(--ease);
    cursor: default;
}

.htag:hover {
    color: var(--maroon);
    border-color: var(--border-hover);
    background: var(--maroon-subtle);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.htag i {
    font-size: 0.68rem;
    color: var(--gold);
}

/* Scroll hint */
.hero-scroll-hint {
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    animation: fadeUp 0.7s var(--ease) 0.55s both;
}

.scroll-arrow {
    width: 18px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: 10px;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    width: 3px;
    height: 7px;
    background: var(--gold);
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50%      { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 80px 0;
    background: var(--white);
}

.section--tinted {
    background: var(--bg-tinted);
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 10px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-dark);
    margin-bottom: 18px;
}

.section-subheading {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 36px;
}

/* ===== ABOUT ===== */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-body {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--text-body);
    margin-bottom: 14px;
}

.about-body:last-child { margin-bottom: 0; }

.about-body strong {
    color: var(--maroon);
    font-weight: 600;
}

.about-visual {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.about-card {
    background: var(--bg-tinted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    width: 160px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.about-card--accent {
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    border-color: transparent;
    color: var(--white);
}

.about-card--accent .about-card-label { color: var(--white); }
.about-card--accent .about-card-detail { color: var(--gold-pale); }
.about-card--accent .about-card-icon { color: var(--gold); }

.about-card-icon {
    font-size: 1.5rem;
    color: var(--maroon);
    margin-bottom: 12px;
}

.about-card-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.about-card-detail {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.about-card-arrow {
    color: var(--gold);
    font-size: 1.1rem;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}

/* ===== BENTO GRID ===== */
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.bento-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.35s var(--ease);
    position: relative;
}

.bento-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.bento-card--wide {
    grid-column: span 2;
}

.bento-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gold-light);
    margin-bottom: 16px;
}

.bento-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.bento-card p {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-body);
}

.bento-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    background: rgba(199, 140, 54, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
    margin-top: 16px;
}

/* ===== FLAGSHIP SECTION ===== */
.flagship-header {
    margin-bottom: 32px;
}

/* 3D Hero Card */
.flagship-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

.flagship-hero-visual {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    position: relative;
    overflow: hidden;
}

.flagship-hero-text {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flagship-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    background: rgba(199,140,54,0.1);
    border: 1px solid rgba(199,140,54,0.2);
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
    width: fit-content;
}

.flagship-badge i { font-size: 0.6rem; }

.flagship-hero-text h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.flagship-hero-text p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-body);
    margin-bottom: 20px;
}

.flagship-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flagship-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-body);
}

.flagship-features li i {
    color: var(--gold);
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

/* --- 3D Molecule Viewer (Three.js) --- */
#mol3d-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    position: relative;
    z-index: 1;
}

.mol3d-labels {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 24px;
    z-index: 2;
}

.mol3d-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 100px;
}

.mol3d-label--api {
    color: #1565C0;
    background: rgba(21,101,192,0.12);
}

.mol3d-label--exc {
    color: #c62828;
    background: rgba(198,40,40,0.1);
}

/* Viewer brand logo */
.mol3d-watermark {
    position: absolute;
    top: 12px;
    right: 12px;
    pointer-events: none;
    z-index: 2;
}

.mol3d-watermark-logo {
    height: 80px;
    width: auto;
    opacity: 1;
}

/* Atom Legend */
.mol3d-legend {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.mol3d-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.58rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mol3d-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.mol3d-dot--c  { background: #42A5F5; }
.mol3d-dot--o  { background: #E53935; }
.mol3d-dot--n  { background: #1565C0; }
.mol3d-dot--p  { background: #FF8F00; }
.mol3d-dot--ca { background: #00897B; }

/* --- Output Grid --- */
.output-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.output-card {
    background: var(--bg-tinted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.35s var(--ease);
}

.output-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.output-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--maroon-subtle), rgba(199,140,54,0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--maroon);
}

.output-card-icon--gauge {
    background: none;
}

.output-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.output-card p {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--text-body);
}

/* --- Mini Gauge (CSS-only) --- */
.mini-gauge {
    width: 44px;
    height: 24px;
    border-radius: 44px 44px 0 0;
    background: conic-gradient(
        from 180deg at 50% 100%,
        #e74c3c 0deg,
        #f39c12 60deg,
        #f1c40f 100deg,
        #2ecc71 180deg
    );
    position: relative;
    overflow: hidden;
}

.mini-gauge-fill {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 14px;
    background: var(--bg-tinted);
    border-radius: 28px 28px 0 0;
}

.mini-gauge-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 18px;
    background: var(--text-dark);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(30deg);
    border-radius: 1px;
    animation: needleSweep 3s ease-in-out infinite alternate;
}

@keyframes needleSweep {
    0%   { transform: translateX(-50%) rotate(-60deg); }
    100% { transform: translateX(-50%) rotate(50deg); }
}

/* ===== STEPS ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 10px;
    background: var(--maroon-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.step-card {
    padding: 32px 28px;
    text-align: center;
    background: var(--white);
    transition: background 0.3s var(--ease);
}

.step-card:hover { background: var(--bg-tinted); }

.step-card:not(:last-child) {
    border-right: 1px solid var(--border);
}

.step-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 14px;
    line-height: 1;
}

.step-line {
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, var(--maroon), var(--gold));
    border-radius: 2px;
    margin: 0 auto 14px;
}

.step-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-body);
}

/* ===== TIERS ===== */
.tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tier {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all 0.35s var(--ease);
    position: relative;
}

.tier:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.tier--featured {
    border-color: var(--maroon);
    box-shadow: 0 4px 24px rgba(87, 0, 54, 0.08);
}

.tier-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    background: linear-gradient(135deg, var(--maroon), var(--gold));
    padding: 4px 14px;
    border-radius: 100px;
    white-space: nowrap;
}

.tier-head {
    text-align: center;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.tier-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tier-price {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tier-list li {
    font-size: 0.84rem;
    color: var(--text-body);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tier-list li i {
    color: var(--gold);
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* ===== AUDIENCE ===== */
.audience {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.audience-item {
    text-align: center;
    padding: 36px 24px;
    background: var(--bg-tinted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.35s var(--ease);
}

.audience-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.audience-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--maroon-subtle), rgba(199,140,54,0.08));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--maroon);
}

.audience-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.audience-item p {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-body);
}

/* ===== SCIENCE GRID ===== */
.science-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 10px;
}

.science-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.35s var(--ease);
}

.science-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.science-card > i {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 12px;
    display: block;
}

.science-card h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.science-card p {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-body);
}

/* ===== CTA ===== */
.section--cta {
    background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199,140,54,0.12), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-container { position: relative; z-index: 1; }

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    color: var(--white);
    margin-bottom: 12px;
}

.cta-desc {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
    max-width: 460px;
    margin: 0 auto 24px;
}

.cta-desc strong {
    color: var(--gold-light);
    font-weight: 600;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--maroon-deep);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    padding: 14px 30px;
    border-radius: 100px;
    transition: all 0.35s var(--ease);
    box-shadow: 0 4px 20px rgba(199,140,54,0.25);
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(199,140,54,0.4);
}

.cta-btn:active { transform: translateY(0) scale(0.98); }
.cta-btn i { font-size: 0.72rem; }

/* ===== FOOTER ===== */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 28px 0;
}

.footer-inner { text-align: center; }

.footer-brand {
    display: block;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--maroon);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.footer-dev {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-dev a {
    color: var(--maroon);
    font-weight: 600;
    transition: color 0.3s;
}

.footer-dev a:hover { color: var(--gold); }

/* ===== ANIMATION ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .bento-card--wide { grid-column: span 2; }
}

@media (max-width: 768px) {
    .navbar { padding: 12px 20px; }
    .hero { padding: 100px 20px 50px; }

    .hero-stats { gap: 20px; }
    .stat-value { font-size: 1.3rem; }

    .section { padding: 56px 0; }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .bento-card--wide {
        grid-column: span 1;
    }

    .flagship-hero {
        grid-template-columns: 1fr;
    }

    .flagship-hero-visual {
        min-height: 260px;
    }

    .flagship-hero-text {
        padding: 28px 24px;
    }

    .output-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .step-card:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .tiers {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .audience { grid-template-columns: 1fr; }
    .science-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.8rem; }

    .hero-stats {
        flex-direction: column;
        gap: 14px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .about-visual { flex-direction: column; }
    .about-card-arrow { transform: rotate(90deg); }
    .about-card { width: 100%; }

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

    .launch-pill { padding: 12px 22px; }
    .launch-pill-date { font-size: 1.05rem; }

    .hero-scroll-hint { display: none; }

    .founder-intro { gap: 10px; }
    .founder-avatar-wrap { width: 64px; height: 64px; }
}