/* 
   GTM Playbook: Discover Section Shared CSS
   Premium Design System v1.0
*/

:root {
    /* Colors */
    --ink: #1e1b4b;
    --paper: #F8F4E8;
    --lime: #D2E823;
    --purple: #8B5CF6;
    --purple-light: rgba(139, 92, 246, 0.1);
    --white: #ffffff;
    --slate: #475569;
    --glass: rgba(255, 255, 255, 0.8);
    --border: rgba(30, 27, 75, 0.1);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--ink), #312e81);
    --grad-soft: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(248, 244, 232, 0.5) 100%);

    /* Typography */
    --font-serif: 'Instrument Serif', serif;
    --font-sans: 'Outfit', sans-serif;

    /* Layout */
    --container-width: 1240px;
    --article-padding: 48px;
    --radius-lg: 24px;
    --radius-md: 12px;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    height: 40px;
}

/* Typography Scale */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    margin: 0 0 1rem 0;
    font-weight: 400;
}

.text-display-lg {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.text-eyebrow {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--purple);
    font-size: 0.875rem;
}

/* Content Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 60px 0;
}

@media (min-width: 900px) {
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Article Styling */
article {
    background: white;
    padding: var(--article-padding);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px -10px rgba(30, 27, 75, 0.05);
}

article h2 {
    margin-top: 60px;
    font-size: 3rem;
    border-bottom: 4px solid var(--lime);
    display: inline-block;
    padding-bottom: 8px;
    margin-bottom: 32px;
}

article h3 {
    margin-top: 48px;
    font-size: 2.25rem;
    color: var(--ink);
    border-left: 4px solid var(--purple);
    padding-left: 24px;
}

article p {
    font-size: 1.25rem;
    margin-bottom: 28px;
    color: var(--slate);
}

article ul,
article ol {
    margin-bottom: 40px;
    padding-left: 30px;
}

article li {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--slate);
}

/* "Value Add" Blocks & Templates */
.value-box {
    background: var(--purple-light);
    border-left: 6px solid var(--purple);
    padding: 40px;
    margin: 48px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    position: relative;
    overflow: hidden;
}

.value-box::after {
    content: "TEMPLATE";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 900;
    letter-spacing: 0.1em;
    opacity: 0.3;
}

.value-box h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 16px;
}

.value-box pre {
    background: rgba(255, 255, 255, 0.6);
    padding: 24px;
    border-radius: 8px;
    font-family: 'Space Grotesk', monospace;
    font-size: 1rem;
    white-space: pre-wrap;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Sidebar Components */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.cta-card {
    background: var(--grad-primary);
    color: white;
    padding: 40px;
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
    opacity: 0.2;
}

/* Buttons */
.btn {
    display: inline-flex;
    background: var(--lime);
    color: var(--ink);
    padding: 18px 36px;
    border-radius: 99px;
    font-weight: 700;
    width: 100%;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px -10px rgba(210, 232, 35, 0.4);
}

/* Tables */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 48px 0;
    font-family: var(--font-sans);
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.matrix-table th {
    background: var(--ink);
    color: white;
    padding: 20px;
    text-align: left;
    font-family: var(--font-sans);
    font-weight: 600;
}

.matrix-table td {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--slate);
    font-size: 1.1rem;
}

/* Premium Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 48px 0;
    font-family: var(--font-sans);
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.comparison-table th {
    text-align: left;
    padding: 24px;
    background: var(--ink);
    color: white;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
}

.comparison-table td {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.15rem;
    vertical-align: top;
    color: var(--slate);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Checklist Grid */
.checklist-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 32px 0;
    list-style: none !important;
    padding-left: 0 !important;
}

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

.check-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0 !important;
    font-size: 1.1rem !important;
}

.check-item strong {
    color: var(--purple);
    font-family: var(--font-sans);
    font-weight: 700;
}

/* Script & Example Boxes */
.script-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    margin: 48px 0;
    box-shadow: 0 10px 30px -10px rgba(30, 27, 75, 0.05);
}

.script-line {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f1f5f9;
}

.script-line:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.script-line b {
    display: block;
    color: var(--purple);
    font-family: var(--font-sans);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.script-line i {
    display: block;
    margin-top: 12px;
    font-size: 1rem;
    color: var(--slate);
    font-style: italic;
    opacity: 0.8;
}

.example-box {
    background: rgba(139, 92, 246, 0.03);
    border-left: 4px solid var(--purple);
    padding: 32px;
    margin: 32px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.15rem;
    color: var(--slate);
}

.example-box strong {
    color: var(--ink);
    display: block;
    margin-bottom: 8px;
}

/* FAQ */
.faq-box {
    margin-top: 80px;
    border-top: 2px solid var(--border);
}

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

.faq-question {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--ink);
}

.faq-answer {
    font-size: 1.15rem;
    color: var(--slate);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeIn 0.8s ease forwards;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE OVERRIDES
   ============================================ */

/* Mobile: 0-767px */
@media (max-width: 767px) {
    /* Container & Layout */
    .container {
        padding: 0 16px;
    }

    /* Navigation */
    nav {
        padding: 12px 16px;
    }

    .nav-logo {
        height: 32px;
    }

    nav .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    /* Hero */
    header {
        padding: 60px 0 40px 0 !important;
    }

    .text-display-lg {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    .text-eyebrow {
        font-size: 0.75rem;
    }

    /* Content Grid - Stack on Mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 0;
    }

    /* Article */
    article {
        padding: 24px 20px;
    }

    article h2 {
        font-size: 1.75rem !important;
        margin-top: 40px;
        border-bottom-width: 2px;
    }

    article h3 {
        font-size: 1.35rem !important;
        margin-top: 32px;
        padding-left: 16px;
        border-left-width: 3px;
    }

    article p {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    article li {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }

    /* Sidebar - Unstick on Mobile */
    .sidebar {
        position: static;
        top: auto;
    }

    .cta-card {
        padding: 28px 24px;
    }

    /* Buttons */
    .btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Tables - Horizontal Scroll Wrapper */
    .matrix-table,
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.95rem;
    }

    .matrix-table th,
    .matrix-table td,
    .comparison-table th,
    .comparison-table td {
        padding: 14px;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .comparison-table th {
        font-size: 1.15rem;
    }

    /* Value Boxes */
    .value-box {
        padding: 24px 20px;
        margin: 32px 0;
    }

    .value-box pre {
        padding: 16px;
        font-size: 0.9rem;
    }

    /* Script Boxes */
    .script-box {
        padding: 24px 20px;
        margin: 32px 0;
    }

    .script-line {
        margin-bottom: 24px;
        padding-bottom: 24px;
    }

    .script-line b {
        font-size: 0.8rem;
    }

    /* Example Boxes */
    .example-box {
        padding: 20px 16px;
        font-size: 1rem;
    }

    /* FAQ */
    .faq-box {
        margin-top: 60px;
    }

    .faq-item {
        padding: 24px 0;
    }

    .faq-question {
        font-size: 1.2rem;
    }

    .faq-answer {
        font-size: 1rem;
    }

    /* Checklist Grid - Single Column */
    .checklist-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 24px 0;
    }

    .check-item {
        padding: 16px;
        font-size: 1rem !important;
    }
}

/* Tablet: 768px-899px */
@media (min-width: 768px) and (max-width: 899px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    article {
        padding: 36px 32px;
    }

    article h2 {
        font-size: 2.25rem;
    }

    article h3 {
        font-size: 1.75rem;
    }

    .sidebar {
        position: static;
    }
}