@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
    --toyada-blue: #0B2AA5;
    --text-primary: #1A1A1A;
    --text-secondary: #475569;
    --bg-light: #F5F7FA;
    --border-color: #E2E8F0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);

    --max-width: 1200px;
    --section-spacing: 80px;
    --border-radius: 24px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: #FFFFFF;
    line-height: 1.6;
    overflow-x: clip;
    width: 100% !important;
    /* 100% is safer than 100vw for scrollbar math */
    position: relative;
    -webkit-font-smoothing: antialiased;
}

html {
    overflow-x: clip;
    width: 100%;
}

h1,
h2,
h3,
h4,
.semi-bold {
    font-weight: 600;
}

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

section {
    padding: var(--section-spacing) 0;
    overflow: hidden;
    /* Prevent absolute glows from leaking */
    width: 100%;
}

.tight-top {
    padding-top: 40px !important;
}

.tight-bottom {
    padding-bottom: 20px !important;
}

.section-divider {
    border-top: 1px solid var(--border-color);
}

/* Heading Scale */
h1 {
    font-size: clamp(32px, 8vw, 64px);
    /* Smaller min size for mobile */
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(32px, 5vw, 40px);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h3 {
    font-size: 24px;
}

p {
    font-size: 18px;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.small-text {
    font-size: 14px;
}

/* UI Elements */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 99px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn.small-text {
    padding: 10px 20px;
    font-size: 13px;
}

.btn-primary {
    background-color: var(--toyada-blue);
    color: #FFFFFF;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(11, 42, 165, 0.2);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: scale(1.02);
}

.rounded-container {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    max-width: 100% !important;
    /* Ensure containers never exceed viewport */
    overflow: hidden;
    /* Contain inner content */
}

/* Architecture Structural Classes */
.protoplatz-container {
    position: relative;
    padding: 40px;
    background: #FFFFFF;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 480px;
}

.embedded-module {
    /* Make ProtoAccess look like an internal module */
    width: 75%; /* Reduced by 25% */
    height: 60%; /* Reduced by 40% */
    margin-top: auto; /* Slight vertical offset, pushed to bottom-ish */
    margin-bottom: 20px;
    padding: 24px;
    background: var(--bg-light); /* Lighter contrast */
    border: 1px solid var(--border-color); /* Thinner border */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: none;
}

.embedded-module p, .embedded-module h3, .embedded-module h4 {
    font-size: 0.9em; /* Reduce font size by 10% */
    color: var(--text-secondary);
}

.embedded-module .module-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Navigation */
header {
    height: 110px;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}


header .container {
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

@media (max-width: 768px) {
    nav {
        width: 100%;
        justify-content: space-between;
    }

    .logo img {
        max-width: 200px;
        /* Cap mobile logo width */
    }

    .mobile-menu-btn {
        justify-self: end;
        display: block !important;
    }

    .protoplatz-container {
        padding: 24px 16px;
        min-height: auto;
    }

    .embedded-module {
        width: 100%;
        height: auto;
        padding: 16px;
    }
}

.logo {
    display: flex;
    align-items: center;
    margin-right: auto;
    flex-shrink: 0;
}

.logo img {
    height: 86px;
    /* Default desktop height */
    width: auto;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 24px;
    /* Reduced from 64px to accommodate more links */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    /* Slightly smaller to fit */
    transition: color 0.3s ease;
    white-space: nowrap;
    /* Prevent wrapping */
}

.nav-links a:hover {
    color: var(--toyada-blue);
}

.nav-cta {
    justify-self: end;
}

/* Specific Sections Placeholder */
.hero {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    background: #FFFFFF;
}

.hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(11, 42, 165, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero p {
    margin-bottom: 40px;
    font-size: 20px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    /* Prevent overflow on super small screens */
}

/* Footer Quote Bar */
.footer-quote-bar {
    background: linear-gradient(135deg, #0a1f7a 0%, #0F172A 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 32px 0;
    text-align: center;
}

.footer-quote-bar p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    font-style: italic;
    letter-spacing: 0.03em;
}

/* Footer */
footer {
    background: linear-gradient(160deg, #0F172A 0%, #0b1a36 100%);
    color: #FFFFFF;
    padding: 80px 0 40px;
}

.footer-three-col {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 60px;
    align-items: start;
}

.footer-logo img {
    height: 64px;
    width: auto;
    margin-bottom: 20px;
}

.footer-company-name {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 13px;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-location {
    font-size: 12px;
    color: #475569;
}

.footer-col-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748B;
    margin-bottom: 20px;
}

.footer-nav-list {
    list-style: none;
}

.footer-nav-list li {
    margin-bottom: 12px;
}

.footer-nav-list a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-nav-list a:hover {
    color: #93c5fd;
}

.footer-cta-link {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 4px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-cta-link:hover {
    color: #93c5fd;
    border-color: #93c5fd;
}

.footer-email a {
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-email a:hover {
    color: #94A3B8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #475569;
    font-size: 11px;
}

.footer-bottom p {
    font-size: 11px;
    color: #475569;
}

.footer-division {
    font-size: 11px;
    color: #334155;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 992px) {

    .editorial-grid,
    .card-grid,
    .snapshot-item,
    .diagram-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .snapshot-item .rounded-container {
        order: -1 !important;
    }

    .diagram-grid div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 80px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .nav-links,
    .nav-cta {
        display: none !important;
    }

    .container {
        padding: 0 16px !important;
        /* Slightly more space for content on tiny screens */
    }

    .mobile-menu-btn {
        display: block !important;
        cursor: pointer;
        color: var(--text-primary);
    }

    section {
        padding: 48px 0;
        /* Reduced spacing on mobile */
    }

    .container {
        padding: 0 20px;
        /* Standardize mobile padding */
    }

    .architecture-diagram {
        padding: 20px 10px !important;
    }

    .editorial-grid,
    .snapshot-item,
    .card-grid,
    .footer-content,
    .footer-three-col {
        grid-template-columns: 100% !important;
        /* Force true full width */
        width: 100% !important;
        gap: 40px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    img {
        max-width: 100% !important;
    }

    .hero-ctas .btn {
        width: 100%;
        /* Full width buttons on mobile */
    }

    header {
        height: auto;
        min-height: 80px;
        padding: 10px 20px;
        /* Removed overflow: hidden to allow mobile menu overlay */
    }

    /* Mobile Nav Overlay */
    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 80px;
        /* Target mobile header height */
        left: 0;
        right: 0;
        bottom: 0;
        background: #FFF;
        padding: 40px 24px;
        border-top: 1px solid var(--border-color);
        z-index: 999;
        gap: 32px;
        overflow-y: auto;
    }

    .nav-links.active a {
        font-size: 20px;
        color: var(--text-primary);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 12px;
    }

    .logo img {
        height: 54px;
        /* Scaled down for mobile */
    }
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.solution-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.architecture-diagram {
    transition: box-shadow 0.3s ease;
}

.architecture-diagram:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.zoom-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: none;
}

.zoom-container img {
    max-width: none;
    max-height: 100%;
    transform-origin: center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Tooltip Styles */
.coming-soon {
    position: relative;
    cursor: help !important;
}

.coming-soon::after {
    content: "Coming Soon";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--text-primary);
    color: #FFF;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.coming-soon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Deployment / Business Model / Execution Readiness Sections */
.model-step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.model-step {
    position: relative;
    padding: 36px 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #FFFFFF;
}

.model-step-num {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--toyada-blue);
    margin-bottom: 12px;
    display: block;
}

.model-step h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.model-step p {
    font-size: 14px;
}

.model-step-arrow {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    color: var(--border-color);
    font-size: 20px;
    z-index: 1;
}

.readiness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 48px;
}

.readiness-check-list {
    list-style: none;
}

.readiness-check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-primary);
}

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

.readiness-check-icon {
    width: 18px;
    height: 18px;
    color: var(--toyada-blue);
    flex-shrink: 0;
}

.readiness-remaining {
    padding: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
}

.readiness-remaining h4 {
    margin-bottom: 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.readiness-remaining ul {
    list-style: none;
}

.readiness-remaining li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.readiness-remaining li:last-child {
    border-bottom: none;
}

.closing-manifesto {
    background: #FFFFFF;
    text-align: center;
    padding: 100px 0;
}

.closing-manifesto h2 {
    font-size: clamp(28px,5vw,48px);
    margin-bottom: 32px;
    color: var(--text-primary);
}

.closing-manifesto p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.closing-manifesto .closing-anchor {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
}

@media (max-width: 768px) {
    .model-step-grid,
    .readiness-grid {
        grid-template-columns: 1fr !important;
    }

    .model-step-arrow {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}