:root {
    --primary: #1B5E3B;
    --primary-dark: #134428;
    --primary-light: rgba(27, 94, 59, 0.12);
    --accent: #C8963C;
    --accent-light: rgba(200, 150, 60, 0.15);
    --bg-main: #F0EBE0;
    --bg-card: rgba(255, 255, 255, 0.55);
    --bg-white: #FAF8F3;
    --text-main: #3B2415;
    --text-muted: #6B5744;
    --glass-border: rgba(59, 36, 21, 0.12);
    --field-tan: #A89968;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0;
    overflow: visible;
}

.hero-image-frame {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-image-frame:hover {
    transform: scale(1.02) rotate(1deg);
}

.btn-primary {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    background: var(--primary);
    color: #FAF8F3;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(27, 94, 59, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(27, 94, 59, 0.35);
    background: var(--primary-dark);
}

.btn-secondary {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    background: transparent;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--text-main);
}

.hero-content {
    max-width: 800px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(27, 94, 59, 0.25);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Images */
.section-image {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    object-fit: cover;
    aspect-ratio: 4/3;
}

.tall-image {
    aspect-ratio: 3/4;
}

/* specific sections */
.problem-section {
    background: linear-gradient(to bottom, transparent, rgba(255,0,0,0.02));
}

.solution-section {
    position: relative;
}

.solution-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(27, 94, 59, 0.05) 0%, transparent 70%);
    z-index: -1;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid rgba(27, 94, 59, 0.2);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
    .grid-3 { grid-template-columns: md; }
    .reverse-mobile { flex-direction: column-reverse; display: flex; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .grid-3 { grid-template-columns: 1fr; }
    section { padding: 4rem 0; }
    .glass { padding: 2rem; }
}

/* Tables */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.comparison-table th, .comparison-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.comparison-table th {
    background: rgba(0, 0, 0, 0.04);
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

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

.comparison-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.highlight-positive {
    color: var(--primary);
    font-weight: 600;
}

/* Timeline / Phases */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0 auto;
}

.phase-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.phase-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    bottom: -40px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    z-index: 0;
}

.phase-item:last-child::before {
    display: none;
}

.phase-number {
    min-width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FAF8F3;
    font-weight: 800;
    z-index: 1;
    box-shadow: 0 0 20px rgba(27, 94, 59, 0.35);
}

.phase-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    flex: 1;
    transition: all 0.3s ease;
}

.phase-content:hover {
    border-color: var(--primary);
    background: rgba(27, 94, 59, 0.03);
}

.phase-title {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

@keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-pulse-soft {
    animation: pulse-soft 3s infinite ease-in-out;
}

/* ===== BUSINESS MODEL CANVAS ===== */
.bmc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    border: 2px solid rgba(27, 94, 59, 0.3);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.01);
}

.bmc-cell {
    border: 1px solid var(--glass-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
    transition: all 0.3s ease;
}

.bmc-cell:hover {
    background: rgba(27, 94, 59, 0.03);
    transform: translateY(-2px);
    box-shadow: inset 0 0 15px rgba(27, 94, 59, 0.05);
    z-index: 2;
}

.bmc-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    pointer-events: none;
}

.bmc-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    width: 100%;
    min-height: 100px;
}

.bmc-input::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

.bmc-input:focus {
    background: rgba(27, 94, 59, 0.04);
    border-radius: 4px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.view-more-btn {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}




/* Grid placement — classic Osterwalder layout */
.bmc-partners {
    grid-column: 1;
    grid-row: 1;
}

.bmc-col-split {
    display: flex;
    flex-direction: column;
}

.bmc-col-split:nth-of-type(1) {
    grid-column: 2;
    grid-row: 1;
}

.bmc-col-split:nth-of-type(2) {
    grid-column: 4;
    grid-row: 1;
}

.bmc-col-split .bmc-cell {
    flex: 1;
}

.bmc-value {
    grid-column: 3;
    grid-row: 1;
}

.bmc-segments {
    grid-column: 5;
    grid-row: 1;
}

.bmc-costs {
    grid-column: 1 / 4;
    grid-row: 2;
    min-height: 140px;
}

.bmc-revenue {
    grid-column: 4 / 6;
    grid-row: 2;
    min-height: 140px;
}

/* BMC Responsive */
@media (max-width: 992px) {
    .bmc-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .bmc-partners { grid-column: 1; grid-row: auto; }
    .bmc-col-split:nth-of-type(1) { grid-column: 2; grid-row: auto; }
    .bmc-value { grid-column: 1 / 3; grid-row: auto; }
    .bmc-col-split:nth-of-type(2) { grid-column: 1; grid-row: auto; }
    .bmc-segments { grid-column: 2; grid-row: auto; }
    .bmc-costs { grid-column: 1 / 3; grid-row: auto; }
    .bmc-revenue { grid-column: 1 / 3; grid-row: auto; }
}

@media (max-width: 600px) {
    .bmc-grid {
        grid-template-columns: 1fr;
    }
    .bmc-partners,
    .bmc-col-split:nth-of-type(1),
    .bmc-value,
    .bmc-col-split:nth-of-type(2),
    .bmc-segments,
    .bmc-costs,
    .bmc-revenue {
        grid-column: 1;
        grid-row: auto;
    }
}

/* Scroll Down Arrow */
.scroll-down-wrapper {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
}

.scroll-down-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-down-arrow i {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.scroll-down-arrow:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(27, 94, 59, 0.15);
    transform: translateY(-2px);
    color: var(--primary-dark);
}

.scroll-down-arrow:hover i {
    background: var(--primary);
    color: #ffffff;
    animation: none; /* Stop bounce on hover for control */
    transform: translateY(2px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* --- Global Nav Styles --- */
.main-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: rgba(240, 235, 224, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.nav-logo {
    height: 48px;
    width: auto;
    border-radius: 8px;
}
.nav-brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
}

/* --- Global Mobile Overrides --- */
@media (max-width: 768px) {
    /* Navbar fixes */
    .main-nav {
        flex-direction: column !important;
        padding: 0.75rem !important;
        gap: 0.75rem !important;
    }
    .nav-logo {
        height: 40px !important;
    }
    .nav-links {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: 100% !important;
        justify-content: flex-start !important;
        padding-bottom: 4px !important;
        gap: 1.2rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links::-webkit-scrollbar {
        height: 2px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--primary-light);
    }
    
    /* Typography fixes */
    h1 {
        font-size: 2.5rem !important;
    }
    h2 {
        font-size: 2rem !important;
        padding: 0 1rem;
    }
    
    /* Hero fixes */
    .hero {
        padding-top: 150px !important;
        text-align: center;
    }
    .hero .hero-content > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    .hero .btn-primary, .hero .btn-secondary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    /* Overlapping Image Card Fix */
    .hero-image-frame > div:last-child {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: -20px !important;
        margin-left: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .hero-image-frame > div:first-child {
        display: none !important;
    }

    /* Paddings */
    section {
        padding: 4rem 0 !important;
    }
    .glass {
        padding: 1.5rem !important;
    }
    .container {
        padding: 0 1rem !important;
    }
}

/* ===== PRINT STYLES FOR PERFECT PDF ===== */
@media print {
    /* 1. Force ALL colors, backgrounds, gradients to print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* 2. Page size - landscape A3 gives more horizontal space to match the website */
    @page {
        size: A3 landscape;
        margin: 0.75cm;
    }

    /* 3. Fix body background */
    body {
        background-color: #F0EBE0 !important;
    }

    /* 4. Fix sections with fixed background-attachment (they don't print) */
    section[style*="fixed"] {
        background-attachment: scroll !important;
    }

    /* 5. Hide UI-only elements and Canvas Section */
    .main-nav,
    .scroll-down-wrapper,
    button,
    #print-toast,
    .view-more-btn,
    #canvas-section {
        display: none !important;
    }

    /* 6. Shrink hero so it doesn't eat an entire page */
    .hero {
        min-height: auto !important;
        padding: 1.5rem 0 !important;
    }
    .hero .hero-content h1 {
        font-size: 3rem !important;
    }

    /* 7. CRITICAL: Force all reveal elements to be visible
       (without this, anything not yet scrolled-to is opacity:0 and invisible) */
    .reveal,
    .reveal.active {
        opacity: 1 !important;
        transform: none !important;
    }

    /* 8. BMC Grid - force full 5-column desktop layout regardless of print width */
    .bmc-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        border: 2px solid #1B5E3B !important;
    }
    .bmc-partners    { grid-column: 1     !important; grid-row: 1 !important; }
    .bmc-col-split   { grid-row: 1        !important; }
    .bmc-col-split:first-of-type  { grid-column: 2 !important; }
    .bmc-col-split:last-of-type   { grid-column: 4 !important; }
    .bmc-value       { grid-column: 3     !important; grid-row: 1 !important; }
    .bmc-segments    { grid-column: 5     !important; grid-row: 1 !important; }
    .bmc-costs       { grid-column: 1 / 4 !important; grid-row: 2 !important; }
    .bmc-revenue     { grid-column: 4 / 6 !important; grid-row: 2 !important; }

    .bmc-cell {
        border: 1px solid #1B5E3B !important;
        background: rgba(27, 94, 59, 0.04) !important;
        min-height: 120px !important;
    }

    /* 9. Style the temp divs that replace textareas */
    .print-temp-div {
        font-family: 'Inter', sans-serif !important;
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
        color: #3B2415 !important;
        white-space: pre-wrap !important;
        word-break: break-word !important;
    }

    /* 10. Only avoid breaks inside small cards, NOT entire sections */
    .glass,
    .phase-item,
    .node-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}
