@import "./tokens.css";

/* ==========================================================================
   CRO AUDITS STYLESHEET
   Reuses visual tokens from style.css (colors, fonts, dot grid, borders)
   Uses 100% native vertical scroll — no GSAP, no ScrollTrigger.
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Space Mono', monospace;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-image: radial-gradient(var(--dot-color) var(--dot-size), transparent var(--dot-size));
    background-size: var(--dot-spacing) var(--dot-spacing);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.brand-font {
    font-family: 'Boldonse', system-ui, sans-serif;
    font-weight: 400;
}

h1.brand-font {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 12px;
}

h2 {
    font-family: 'Boldonse', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
}

h3 {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
}

h4 {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 15px;
}

p, li, span {
    font-size: 15px;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.cro-container {
    width: 90%;
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 0 64px 0;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.cro-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: var(--card-border);
    border-radius: 16px;
    padding: 12px 24px;
    margin-bottom: 40px;
    background-color: var(--bg-color);
}

.cro-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.cro-nav-link:hover {
    opacity: 0.7;
}

.cro-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
}

.cro-nav-brand img {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   HERO / HEADER (HUB & DETAIL)
   ========================================================================== */
.cro-hero {
    margin-bottom: 40px;
}

.cro-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background-color: rgba(51, 51, 51, 0.08);
    border: 1px solid rgba(51, 51, 51, 0.2);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    margin-bottom: 16px;
}

.cro-hero-desc {
    font-size: 16px;
    color: #444444;
    max-width: 680px;
    line-height: 1.6;
}

/* ==========================================================================
   HUB: AUDIT LIST & CARDS
   ========================================================================== */
.cro-list-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.cro-list-title {
    font-size: 20px;
}

.cro-count {
    font-size: 13px;
    font-weight: 700;
    color: #666666;
}

.cro-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.audit-card-link {
    display: block;
}

.audit-card {
    background: var(--white);
    border: var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.audit-card-link:hover .audit-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.audit-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.audit-store-tag {
    font-size: 12px;
    font-weight: 700;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 3px 8px;
    border-radius: 4px;
}

.audit-date {
    font-size: 12px;
    color: #666666;
}

.audit-card-title {
    font-family: 'Boldonse', system-ui, sans-serif;
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.audit-card-finding {
    font-size: 14px;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 16px;
}

.audit-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px dashed rgba(51, 51, 51, 0.2);
    padding-top: 14px;
}

.audit-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    padding: 2px 8px;
    background-color: var(--bg-color);
}

.audit-read-action {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-read-action .arrow {
    transition: transform 0.2s ease;
}

.audit-card-link:hover .audit-read-action .arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   INDIVIDUAL AUDIT ARTICLE STYLING
   ========================================================================== */
.audit-article {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.audit-article-header {
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 20px;
}

.audit-article-header h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-top: 12px;
    margin-bottom: 12px;
}

/* Meta Bar */
.audit-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #555555;
}

.audit-meta-bar .store-badge {
    font-weight: 700;
    color: var(--text-color);
    background: rgba(51, 51, 51, 0.08);
    border: 1px solid rgba(51, 51, 51, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
}

/* Context Callout Box */
.audit-context-card {
    background: var(--white);
    border: var(--card-border);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.audit-context-title {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    color: #666666;
    margin-bottom: 12px;
}

.audit-context-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.context-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.context-label {
    font-weight: 700;
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.context-value {
    color: var(--text-color);
}

.context-highlight {
    font-weight: 700;
    color: #111111;
}

/* Framing Formula Card */
.audit-framing-card {
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Finding Blocks */
.finding-block {
    background: var(--white);
    border: var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.finding-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(51, 51, 51, 0.08);
    border: 1px solid rgba(51, 51, 51, 0.2);
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 10px;
}

.finding-title {
    font-family: 'Boldonse', system-ui, sans-serif;
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.finding-layout {
    display: flex;
    flex-direction: column;
}

.finding-content {
    display: contents;
}

.finding-body {
    order: 1;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #333333;
}

/* Finding Block Screenshots (Static, vertical scroll only) */
.finding-figure {
    order: 2;
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.finding-img {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* Why It Matters Callout */
.why-matters-box {
    order: 3;
    background: rgba(51, 51, 51, 0.04);
    border-left: 3px solid var(--text-color);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.why-matters-label {
    font-weight: 700;
    display: inline;
    margin-right: 4px;
}

/* Gaps Callout */
.gaps-box {
    order: 4;
    margin-top: 14px;
    background: #fff8eb;
    border: 1px solid #d4a359;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #614000;
}

.gaps-label {
    font-weight: 700;
    display: inline;
    margin-right: 4px;
}

/* ==========================================================================
   PERFORMANCE COMPARISON GRID
   ========================================================================== */
.perf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
}

@media (min-width: 640px) {
    .perf-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.perf-card {
    background: var(--bg-color);
    border: 1px solid rgba(51, 51, 51, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.perf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dashed rgba(51, 51, 51, 0.2);
    padding-bottom: 8px;
}

.perf-source-name {
    font-size: 13px;
    font-weight: 700;
}

.perf-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

.perf-badge-pass {
    background: #e6f7ec;
    color: #0d6832;
    border: 1px solid #7cd39e;
}

.perf-badge-fail {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f87171;
}

.perf-stat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
}

.perf-stat-item {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.perf-stat-label {
    color: #555555;
}

.perf-stat-value {
    font-weight: 700;
    font-family: var(--font-mono);
}

/* ==========================================================================
   HYPOTHESES SECTION & CARDS
   ========================================================================== */
.hypotheses-block {
    background: var(--white);
    border: var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.hypotheses-intro {
    font-size: 14px;
    color: #555555;
    margin-bottom: 20px;
    border-left: 3px solid var(--text-color);
    padding-left: 12px;
}

.hypotheses-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hypothesis-item {
    background: var(--bg-color);
    border: 1px solid rgba(51, 51, 51, 0.2);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.hypothesis-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hypothesis-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    background: rgba(51, 51, 51, 0.08);
    border: 1px solid rgba(51, 51, 51, 0.2);
}

.hypothesis-effort {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

.effort-low {
    background: #eef4ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.effort-med {
    background: #fff8eb;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.effort-high {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.hypothesis-item-title {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hypothesis-statement {
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
}

.hypothesis-statement strong {
    color: #111111;
}

/* Takeaway Section */
.takeaway-card {
    background: var(--white);
    border: var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.takeaway-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: 4px;
    padding: 3px 8px;
    margin-bottom: 12px;
}

.takeaway-title {
    font-family: 'Boldonse', system-ui, sans-serif;
    font-size: 20px;
    margin-bottom: 12px;
}

.takeaway-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
}

/* Back Link & Navigation */
.audit-bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 2px solid var(--text-color);
    padding-top: 24px;
    margin-top: 12px;
}

.audit-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid var(--text-color);
    border-radius: 8px;
    padding: 10px 16px;
    background: var(--white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.audit-nav-btn:hover {
    background: #eaeaea;
    transform: translateY(-1px);
}

/* Footer */
.cro-footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px dashed rgba(51, 51, 51, 0.2);
    font-size: 12px;
    color: #777777;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (min-width: 768px) {
    h1.brand-font { font-size: 36px; }
    .audit-article-header h1 { font-size: 34px; }
    .audit-card { padding: 28px 32px; }
    .audit-card-title { font-size: 22px; }
    .finding-block { padding: 28px 32px; }
    .hypotheses-block { padding: 28px 32px; }
    .takeaway-card { padding: 28px 32px; }
    .context-row { flex-direction: row; gap: 8px; }
    .context-label { min-width: 170px; }
    .finding-layout {
        display: flex;
        flex-direction: row;
        gap: 28px;
        align-items: flex-start;
        margin-bottom: 0;
    }
    .finding-figure {
        order: initial;
        flex: 0 0 172px;
        max-width: 172px;
        margin: 0;
    }
    .finding-img {
        max-width: 172px;
    }
    .finding-content {
        display: flex;
        flex-direction: column;
        gap: 14px;
        flex: 1;
        order: initial;
    }
    .finding-body {
        order: initial;
        margin-bottom: 0;
    }
    .why-matters-box {
        order: initial;
    }
    .gaps-box {
        order: initial;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .cro-navbar { padding: 10px 16px; }
    .cro-nav-brand span { display: none; }
    .audit-card { padding: 18px 16px; }
    .audit-card-footer { flex-direction: column; align-items: flex-start; }
    .audit-framing-card { font-size: 13px; }
    .finding-img { max-width: 100%; }
}
