/* ============================================
   HUMPHREY STUDIO — SEO Report Stylesheet
   ============================================ */

/* --- FONTS --- */
@font-face {
    font-family: 'BB Torsos Pro';
    src: url('../fonts/BBTorsosProSemiRegular-930191481.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'BB Torsos Pro';
    src: url('../fonts/BBTorsosProRegular-930191485.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Triest DT';
    src: url('../fonts/TriestDTItalic-9524449.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* --- PRINT --- */
@page {
    size: A4;
    margin: 48px 56px 60px 56px;
}

@page :first {
    margin: 0;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --fg: #1a1a1a;
    --fg-light: #555;
    --fg-muted: #888;
    --bg: #faf9f7;
    --bg-subtle: #f2f1ef;
    --border: #e0dedb;
    --accent-blue: #5b7ff5;
    --accent-green: #5dd8a5;
    --accent-pink: #f0c8e0;
    --green: #5dd8a5;
    --green-light: #eafaf1;
    --amber: #e8b84a;
    --amber-light: #fef9e7;
    --red: #e05858;
    --red-light: #fdf0ee;
    --blue: #5b7ff5;
    --blue-light: #eef2fe;
    --brand-dark: #0a0a0a;
    --brand-warm-white: #efeee8;
    --brand-warm-grey: #b0afa8;
    --brand-dark-grey: #6b6a65;
}

body {
    font-family: 'BB Torsos Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    font-weight: 400;
    overflow-x: hidden;
}

/* ============================================
   COVER / HERO
   ============================================ */
.cover {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 60px 80px 48px;
    background: url('../images/report-background-gran-NEW.png') center center / cover no-repeat;
    text-align: center;
    page-break-after: always;
}

.cover-logo {
    width: clamp(220px, 30vw, 340px);
    margin-bottom: clamp(50px, 10vw, 100px);
    opacity: 1;
}

.cover-logo svg {
    width: 100%;
    height: auto;
}

.cover-logo svg .st0 {
    fill: var(--brand-dark);
}

.cover-badge {
    display: inline-block;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(10, 10, 10, 0.7);
    margin-bottom: 8px;
}

.cover h1 {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: clamp(28px, 4.5vw, 40px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--brand-dark);
    margin-bottom: 8px;
}

.cover h1 span,
.cover h1 .accent {
    color: var(--accent-blue);
}

.cover .subtitle {
    font-size: clamp(12px, 1.8vw, 16px);
    color: rgba(10, 10, 10, 0.45);
    margin-bottom: 0;
    font-weight: 400;
}

.cover-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: flex-start;
    margin-top: 32px;
    padding: 24px 0 0;
    border-top: 1px solid rgba(10, 10, 10, 0.08);
    background: none;
    border-radius: 0;
    border-right: none;
    border-left: none;
    border-bottom: none;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.cover-meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    text-align: left;
}

.cover-meta-item + .cover-meta-item {
    border-left: none;
}

.cover-meta-label {
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(10, 10, 10, 0.4);
}

.cover-meta-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-dark);
}

/* Cover score */
.cover-score-section {
    margin-top: auto;
    padding: 0;
    border-top: none;
    background: none;
    border-radius: 0;
    border: none;
    display: block;
    text-align: center;
    align-self: center;
}

.cover-score-label {
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(10, 10, 10, 0.4);
    margin-bottom: 8px;
}

.cover-score {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: clamp(56px, 8vw, 80px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.cover-score span {
    font-size: 0.4em;
    color: rgba(10, 10, 10, 0.3);
    font-weight: 400;
}

.cover-score.poor { color: var(--red); }
.cover-score.fair { color: var(--amber); }
.cover-score.good { color: var(--accent-green); }

.cover-credit,
.cover-logo-text {
    margin-top: 60px;
    font-size: 11px;
    color: rgba(10, 10, 10, 0.25);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.cover-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    margin: 24px auto 0;
    border-radius: 2px;
}

/* ============================================
   GRADIENT DIVIDER
   ============================================ */
.gradient-divider {
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent 0%, var(--accent-blue) 25%, var(--accent-green) 50%, var(--accent-pink) 75%, transparent 100%);
    opacity: 0.35;
    margin: 0;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page {
    page-break-after: always;
    padding: 32px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.page:last-child {
    page-break-after: avoid;
}

.content {
    padding: 32px 40px;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-family: 'BB Torsos Pro', -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-number {
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-dark-grey);
    margin-bottom: 4px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-number::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--brand-dark-grey);
}

h2 {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--fg);
    margin-bottom: 16px;
    line-height: 1.2;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 1px;
}

h3 {
    font-size: 13px;
    color: var(--fg);
    margin-top: 20px;
    margin-bottom: 8px;
}

h4 {
    font-size: 10px;
    font-weight: 600;
    color: var(--fg-light);
    margin-top: 14px;
    margin-bottom: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

p {
    margin-bottom: 10px;
    color: var(--fg-light);
    line-height: 1.7;
}

.accent-text {
    font-family: 'Triest DT', 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
}

/* ============================================
   SCORE OVERVIEW
   ============================================ */
.score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0 24px;
}

.score-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(239, 238, 232, 0.3);
    transition: all 0.2s ease;
}

.score-card:hover {
    border-color: rgba(91, 127, 245, 0.2);
    background: rgba(91, 127, 245, 0.03);
}

.score-card-label {
    font-size: 10px;
    color: var(--fg-light);
}

.score-card-value {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.score-card-value.poor { color: var(--red); }
.score-card-value.fair { color: var(--amber); }
.score-card-value.good { color: var(--accent-green); }

.score-bar-track {
    height: 4px;
    background: var(--bg-subtle);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.score-bar-fill.poor { background: var(--red); }
.score-bar-fill.fair { background: var(--amber); }
.score-bar-fill.good { background: var(--accent-green); }

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px;
    font-size: 9.5px;
}

thead th {
    text-align: left;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-dark-grey);
    padding: 10px 12px;
    border-bottom: 2px solid var(--fg);
    font-weight: 600;
}

tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--fg-light);
    vertical-align: top;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody td:first-child {
    color: var(--fg);
    font-weight: 400;
}

tbody tr:hover {
    background: rgba(91, 127, 245, 0.02);
}

/* ============================================
   STATUS PILLS
   ============================================ */
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pill-pass { background: var(--green-light); color: #2d9d6a; }
.pill-fail { background: var(--red-light); color: var(--red); }
.pill-warn { background: var(--amber-light); color: #c8962e; }
.pill-info { background: var(--blue-light); color: var(--accent-blue); }
.pill-webflow { background: #f0edf5; color: #6b5b95; }

.webflow-note {
    display: block;
    margin-top: 4px;
    font-size: 8px;
    color: #6b5b95;
    font-style: italic;
    line-height: 1.4;
}

/* ============================================
   FINDING CARDS
   ============================================ */
.finding {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: rgba(239, 238, 232, 0.2);
    transition: all 0.2s ease;
}

.finding:hover {
    border-color: rgba(91, 127, 245, 0.15);
    background: rgba(91, 127, 245, 0.02);
}

.finding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.finding-title {
    font-weight: 600;
    color: var(--fg);
    font-size: 10.5px;
}

.finding-impact {
    font-size: 8px;
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.impact-critical { background: var(--red-light); color: var(--red); }
.impact-high { background: var(--amber-light); color: #c8962e; }
.impact-medium { background: var(--blue-light); color: var(--accent-blue); }

.finding-body {
    color: var(--fg-light);
    font-size: 9.5px;
    line-height: 1.6;
}

.finding-lift {
    margin-top: 8px;
    font-size: 9px;
    color: #2d9d6a;
    font-weight: 600;
}

/* ============================================
   ACTION ITEMS
   ============================================ */
.action-list {
    list-style: none;
    padding: 0;
}

.action-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.action-item:last-child {
    border-bottom: none;
}

.action-num {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
    min-width: 24px;
}

.action-content {
    flex: 1;
}

.action-title {
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 3px;
    font-size: 10px;
}

.action-desc {
    color: var(--fg-light);
    font-size: 9.5px;
    line-height: 1.6;
}

/* ============================================
   ROADMAP / TIMELINE
   ============================================ */
.roadmap-week {
    border-left: 2px solid transparent;
    border-image: linear-gradient(180deg, var(--accent-blue), var(--accent-green)) 1;
    padding-left: 18px;
    margin-left: 8px;
    margin-bottom: 24px;
    position: relative;
}

.roadmap-week::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent-blue);
}

.roadmap-label {
    font-size: 8px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-dark-grey);
    margin-bottom: 4px;
}

.roadmap-title {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 8px;
}

.roadmap-tasks {
    list-style: none;
    padding: 0;
}

.roadmap-tasks li {
    color: var(--fg-light);
    font-size: 9.5px;
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.roadmap-tasks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 1px;
    background: var(--brand-dark-grey);
}

/* ============================================
   SCREENSHOTS
   ============================================ */
.screenshot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.screenshot-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-caption {
    padding: 10px 12px;
    font-size: 8px;
    color: var(--brand-dark-grey);
    letter-spacing: 0.04em;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* ============================================
   EXEC SUMMARY
   ============================================ */
.exec-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.exec-highlight {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(239, 238, 232, 0.4);
    border: 1px solid rgba(239, 238, 232, 0.6);
}

.exec-highlight-label {
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-dark-grey);
    margin-bottom: 4px;
}

.exec-highlight-value {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

/* ============================================
   SUMMARY GRID (h1 audit)
   ============================================ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.summary-card {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(239, 238, 232, 0.4);
    border: 1px solid rgba(239, 238, 232, 0.6);
    text-align: center;
}

.summary-card .number {
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.summary-card .label {
    font-size: 8px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-dark-grey);
    margin-top: 4px;
}

/* ============================================
   PROJECTION
   ============================================ */
.projection {
    background: rgba(239, 238, 232, 0.4);
    border: 1px solid rgba(239, 238, 232, 0.6);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 16px 0;
}

.projection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.projection-label {
    font-size: 9.5px;
    color: var(--fg-light);
}

.projection-value {
    font-family: 'BB Torsos Pro', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.projection-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.projection-bar-current {
    height: 100%;
    background: var(--red);
    border-radius: 4px 0 0 4px;
}

.projection-bar-gain {
    height: 100%;
    background: var(--accent-green);
    opacity: 0.6;
}

/* ============================================
   UTILITIES
   ============================================ */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-sm { font-size: 9px; }
.text-muted { color: var(--fg-muted); }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================
   PAGE FOOTER
   ============================================ */
.page-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: none;
    position: relative;
    font-size: 8px;
    color: var(--brand-dark-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-blue) 25%, var(--accent-green) 50%, var(--accent-pink) 75%, transparent 100%);
    opacity: 0.3;
}

/* ============================================
   REPORT FOOTER (full-width)
   ============================================ */
.report-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: url('../images/report-background-gran-NEW.png') center center / cover no-repeat;
    page-break-before: always;
    padding: 40px;
}

.report-footer .footer-glow {
    display: none;
}

.report-footer .footer-logo {
    width: clamp(200px, 28vw, 320px);
    margin: 0 auto;
    opacity: 0.9;
}

.report-footer .footer-logo svg {
    width: 100%;
    height: auto;
}

.report-footer .footer-logo img {
    width: 100%;
    height: auto;
}

.report-footer p {
    display: none;
}

/* ============================================
   PAGE CARDS (h1 audit per-page cards)
   ============================================ */
.page-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: rgba(239, 238, 232, 0.2);
    page-break-inside: avoid;
}

.page-card h3 {
    margin-top: 0;
}

.page-card .url {
    font-size: 9px;
    color: var(--brand-dark-grey);
    word-break: break-all;
}

.page-card .current-h1,
.page-card .recommended-h1 {
    font-size: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 6px 0;
}

.page-card .current-h1 {
    background: var(--red-light);
    border-left: 3px solid var(--red);
}

.page-card .recommended-h1 {
    background: var(--green-light);
    border-left: 3px solid var(--accent-green);
}

/* ============================================
   PRIORITY LABELS
   ============================================ */
.priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 7.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.priority-critical { background: var(--red-light); color: var(--red); }
.priority-high { background: var(--amber-light); color: #c8962e; }
.priority-medium { background: var(--blue-light); color: var(--accent-blue); }
.priority-low { background: #f0f0ee; color: var(--brand-dark-grey); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   DOWNLOAD BUTTON
   ============================================ */
.download-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(10, 10, 10, 0.12);
    color: var(--brand-dark);
    padding: 10px 20px;
    font-family: 'BB Torsos Pro', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(10, 10, 10, 0.18);
    transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cover-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .score-grid,
    .exec-highlights {
        grid-template-columns: 1fr;
    }

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

    .two-col {
        grid-template-columns: 1fr;
    }

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

    .page {
        padding: 24px 20px;
    }
}

/* ============================================
   PRINT OVERRIDES
   ============================================ */
@media print {
    body {
        background: white;
        font-size: 9px;
    }

    .cover {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cover-logo svg .st0 {
        fill: var(--brand-dark);
    }

    .download-btn {
        display: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .score-card,
    .finding,
    .exec-highlight,
    .page-card,
    .projection {
        background: white;
        border-color: var(--border);
    }

    .report-footer {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .report-footer p {
        display: none;
    }

    h2::after {
        display: none;
    }
}
