/* ============================================
   ENDORSED LABS — Design System v2
   Navy + Copper on Cream | Editorial / Scientific
   ============================================ */

:root {
    /* Colors */
    --bg: #f0ece4;
    --bg-dark: #1a2744;
    --bg-dark-lighter: #243352;
    --copper: #b87333;
    --copper-light: #d4915a;
    --copper-dim: #8b5a24;
    --copper-border: rgba(184, 115, 51, 0.25);
    --copper-glow: rgba(184, 115, 51, 0.1);
    --text-primary: #1a2744;
    --text-secondary: #5a6070;
    --text-muted: #6a6a7a;
    --bg-warm: #e8e2d6;
    --text-on-dark: #f0ece4;
    --text-on-dark-secondary: #a0aab8;
    --border: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-display: 'Vollkorn', Georgia, serif;
    --font-numbers: 'Bitter', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-gap: clamp(4rem, 8vw, 7rem);
    --container-max: 1100px;
    --container-narrow: 800px;
    --container-padding: clamp(1.5rem, 4vw, 3rem);
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--copper-dim); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Paragraph spacing */
.container-narrow p + p { margin-top: 1.25rem; }

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

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

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

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 2rem + 4vw, 3.75rem);
}

h2 {
    font-size: clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
    margin-bottom: 0.75rem;
}

.copper { color: var(--copper); }

.copper-underline {
    background: rgba(184, 115, 51, 0.25);
    padding: 0.02em 0.2em;
    border-radius: 3px;
}

/* ============================================
   Header / Nav
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(240, 236, 228, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo span { color: var(--copper); }

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:not([class*="btn"]) {
    padding: 0.5rem 0;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: var(--bg-dark);
    color: var(--text-on-dark);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.15);
    text-decoration: none;
}

.btn-ghost {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: transparent;
    color: var(--copper-dim);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--copper-border);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    border-color: var(--copper);
    background: var(--copper-glow);
    text-decoration: none;
}

.btn-primary-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-primary-block {
    width: 100%;
    text-align: center;
    display: block;
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ============================================
   Sections
   ============================================ */

section {
    padding: var(--section-gap) 0;
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.section-dark h2,
.section-dark h3 { color: var(--text-on-dark); }

.section-dark p { color: var(--text-on-dark-secondary); }

.section-header {
    margin-bottom: 3rem;
}

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

.section-header p {
    color: var(--text-secondary);
}

.section-dark .section-header p {
    color: var(--text-on-dark-secondary);
}

/* ============================================
   Hero
   ============================================ */

.hero {
    padding: 10rem 0 var(--section-gap);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: 'E';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: clamp(20rem, 35vw, 30rem);
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0.03;
    pointer-events: none;
    line-height: 0.8;
    user-select: none;
}

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

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem !important;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1;
    animation: heroFadeIn 0.5s ease-out both;
}

.hero-eyebrow::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--copper);
    margin-top: 1rem;
    animation: drawLine 0.5s ease-out 0.3s forwards;
}

@keyframes drawLine {
    to { width: 60px; }
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    font-size: clamp(2.5rem, 2rem + 4vw, 3.75rem);
    margin-bottom: 2rem;
    animation: heroFadeIn 0.5s ease-out 0.1s both;
}

.hero-body {
    max-width: 600px;
    animation: heroFadeIn 0.5s ease-out 0.2s both;
}

.hero-sub {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    border-left: 2px solid var(--copper);
    padding-left: 1.25rem;
}

.hero .btn-primary {
    background: var(--copper);
    color: var(--bg);
}

.hero .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(184, 115, 51, 0.25);
}

/* ============================================
   Stats Bar
   ============================================ */

.stats-context {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-on-dark-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 5vw, 3rem);
    padding: 2rem 0;
}

.stat {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--copper);
}

.stat-number {
    font-family: var(--font-numbers);
    font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
    font-weight: 700;
    color: var(--copper);
    line-height: 1;
}

.section-dark .stat { border-top-color: var(--copper); }
.section-dark .stat-number { color: var(--copper); }
.section-dark .stat-label { color: var(--text-on-dark-secondary); }
.section-dark .stat-source { color: var(--text-on-dark-secondary); }


.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.stat-source {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* ============================================
   AI Demo
   ============================================ */

.ai-demo {
    max-width: 720px;
    margin: 2.5rem auto;
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
}

.ai-demo-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-dark-lighter);
    color: var(--text-on-dark);
    font-size: 0.9rem;
}

.ai-demo-icon {
    color: var(--copper);
    font-size: 1rem;
}

.ai-demo-body {
    padding: 1.5rem;
}

.ai-demo-intro {
    font-size: 0.85rem;
    color: var(--text-on-dark-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.ai-demo-result {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-demo-result:last-of-type {
    padding-bottom: 0;
}

.ai-demo-result-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.ai-demo-name {
    font-weight: 600;
    color: var(--text-on-dark);
    font-size: 0.95rem;
}

.ai-demo-stars {
    color: var(--copper-light);
    font-size: 0.8rem;
}

.ai-demo-reviews {
    color: var(--text-on-dark-secondary);
    font-size: 0.75rem;
}

.ai-demo-summary {
    font-size: 0.8rem;
    color: var(--text-on-dark-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.ai-demo-details {
    display: flex;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-on-dark-secondary);
    flex-wrap: wrap;
}

.ai-demo-cta {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--copper-light);
    font-weight: 600;
}

.ai-demo-maps {
    font-size: 0.8rem;
    color: var(--text-on-dark-secondary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-demo-takeaway {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

/* AI demo scroll reveal */
.js .ai-demo-prompt,
.js .ai-demo-body > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.ai-demo.revealed .ai-demo-prompt { opacity: 1; transform: none; }
.ai-demo.revealed .ai-demo-body > * { opacity: 1; transform: none; }
.ai-demo.revealed .ai-demo-body > :nth-child(1) { transition-delay: 0.15s; }
.ai-demo.revealed .ai-demo-body > :nth-child(2) { transition-delay: 0.3s; }
.ai-demo.revealed .ai-demo-body > :nth-child(3) { transition-delay: 0.45s; }
.ai-demo.revealed .ai-demo-body > :nth-child(4) { transition-delay: 0.6s; }
.ai-demo.revealed .ai-demo-body > :nth-child(5) { transition-delay: 0.75s; }

@media (max-width: 768px) {
    .ai-demo-body { padding: 1.25rem; }
    .ai-demo-prompt { padding: 0.875rem 1.25rem; }
    .ai-demo-details { flex-direction: column; gap: 0.25rem; }
}

/* ============================================
   Feature Grid (3 columns)
   ============================================ */

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

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    border-color: var(--copper-border);
    transform: translateY(-4px);
}

.section-dark .feature-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.feature-card h3 { color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); }

.section-dark .feature-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.section-dark .feature-card:hover {
    border-color: var(--copper-border);
}

.section-dark .feature-card h3 { color: var(--text-on-dark); }
.section-dark .feature-card p { color: var(--text-on-dark-secondary); }

/* ============================================
   Audit Card
   ============================================ */

.audit-card {
    border: 1px solid var(--copper-border);
    border-radius: 16px;
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--bg-dark);
    color: var(--text-on-dark);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.audit-card::before {
    content: "AI VISIBILITY AUDIT";
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    padding: 0.2rem 1rem;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--copper-light);
    border: 1px solid var(--copper-border);
    border-radius: 4px;
}

.audit-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-on-dark);
}

.audit-price {
    font-family: var(--font-numbers);
    font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
    font-weight: 700;
    color: var(--copper);
    margin-bottom: 0.25rem;
}

.audit-price-note {
    font-size: 0.9rem;
    color: var(--text-on-dark-secondary);
    margin-bottom: 2rem;
}

.audit-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.audit-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.audit-list li::before {
    content: "✓ ";
    color: var(--copper-light);
    font-weight: 700;
}

.audit-list li:last-child { border-bottom: none; }

.audit-friction {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-on-dark-secondary);
    margin-top: 1rem;
}

/* ============================================
   Steps
   ============================================ */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    counter-reset: step;
}

.step {
    counter-increment: step;
    padding: 2rem;
    border-top: 2px solid var(--copper);
}

.step::before {
    content: "0" counter(step);
    display: block;
    font-family: var(--font-numbers);
    font-size: 2rem;
    font-weight: 700;
    color: var(--copper);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.step h3 { color: var(--text-primary); }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* ============================================
   Founder
   ============================================ */

.founder {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}

.founder-photo {
    width: 240px;
    height: 280px;
    border-radius: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--copper-border);
    overflow: hidden;
}

.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-bio p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ============================================
   FAQ
   ============================================ */

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

.faq-question {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0;
    line-height: 1.4;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--copper);
    transition: transform 0.2s;
}

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

.faq-answer {
    color: var(--text-secondary);
    padding-top: 1rem;
    line-height: 1.7;
    display: none;
}

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

/* ============================================
   Final CTA
   ============================================ */

.final-cta {
    text-align: center;
    padding: var(--section-gap) 0;
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.final-cta h2 {
    margin-bottom: 1rem;
    color: var(--text-on-dark);
}

.final-cta p {
    color: var(--text-on-dark-secondary);
    margin-bottom: 2rem;
}

.final-cta .btn-primary {
    background: var(--copper);
    color: var(--bg);
}

.final-cta .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(184, 115, 51, 0.25);
}

.final-cta .subtext {
    font-size: 0.85rem;
    color: var(--text-on-dark-secondary);
    margin-top: 1rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    list-style: none;
}

.footer-links a { color: var(--text-muted); padding: 0.5rem 0; }
.footer-links a:hover { color: var(--text-secondary); }

/* ============================================
   Mobile
   ============================================ */

@media (max-width: 768px) {
    .hero { padding: 8rem 0 var(--section-gap); }
    .founder { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .founder-photo { width: 200px; height: 240px; border-radius: 12px; }
    .nav-links { gap: 1rem; }
    .stats-bar { grid-template-columns: 1fr; gap: 1rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}

/* ============================================
   Score Preview
   ============================================ */

.score-preview {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: var(--bg-dark);
    border-radius: 12px;
    overflow: hidden;
}

.score-preview-label {
    padding: 0.75rem 1.5rem;
    background: var(--bg-dark-lighter);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-on-dark-secondary);
}

.score-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.score-card {
    padding: 1.5rem;
    background: var(--bg-dark);
}

.score-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-on-dark-secondary);
}

.score-number {
    font-family: var(--font-numbers);
    font-size: clamp(3rem, 2.5rem + 2vw, 4rem);
    font-weight: 700;
    color: var(--copper-light);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.score-number--good { color: #6ab86a; }
.score-number--fair { color: #c8af50; }

.score-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.score-badge--poor { background: rgba(196, 112, 80, 0.2); color: #d4915a; }
.score-badge--fair { background: rgba(200, 175, 80, 0.2); color: #c8af50; }
.score-badge--good { background: rgba(90, 160, 90, 0.2); color: #6ab86a; }

.score-card {
    text-align: center;
}

@media (max-width: 768px) {
    .score-preview-grid { grid-template-columns: 1fr 1fr; }
}

/* About page */
.hero--compact { padding-bottom: 3rem; }
.founder-subtitle { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.principles h3 + p { margin-bottom: 2rem; }
.principles > :last-child { margin-bottom: 0; }

@media (max-width: 480px) {
    .hero { padding: 7rem 0 3rem; }
    .audit-card { padding: 1.5rem; }
}
