:root {
    --bg-gradient-start: #F6F6F6;
    --bg-gradient-end: #FFFFFF;
    --text-primary: #1C1C1C;
    --text-secondary: #4B4B4B;
    --primary-red: #D7263D;

    --button-bg: #000000;
    --button-text: #FFFFFF;
    --glass-surface: rgba(255, 255, 255, 0.8);

    --font-head: 'Poppins', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #fff;
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    font-family: var(--font-body);
    width: 100%;
    min-height: 100dvh;
    padding: 5vh 1rem 80px 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    /* Simplified animation to prevent Safari hangs */
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Fix for iOS viewport bounce and horizontal scroll */
html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* --- BACKGROUND ANIMATION --- */
/* Optimized for mobile: Fixed position and 100vw/vh to prevent layout shifts */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        radial-gradient(circle at 50% 50%, rgba(215, 38, 61, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(215, 38, 61, 0.05) 0%, transparent 30%);
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0;
    will-change: opacity, transform;
    animation: atmosphereFadeIn 3s ease-in 1s forwards, atmosphereMove 30s infinite alternate ease-in-out;
}

@keyframes atmosphereFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes atmosphereMove {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

/* --- INITIAL VIEW ELEMENTS --- */
.logo-center {
    width: 300px;
    max-width: 600px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0;
    position: relative;
    animation: logoCinemaReveal 1.5s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes logoCinemaReveal {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .logo-center {
        width: 85%;
    }

    body {
        padding-top: 5vh;
    }
}

.container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: filter 0.5s var(--ease-smooth);
}

.assistant-display {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--text-primary);
    min-height: 3.9em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .assistant-display {
        font-size: 2.2rem;
        min-height: 3em;
    }
}

.interaction-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 650px;
    align-items: center;
}

/* --- BUTTONS --- */
.option-btn {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(215, 38, 61, 0.1);
    padding: 0;
    width: 100%;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    opacity: 0;
}

.option-btn.animate-in {
    animation: buttonCinematicEntry 0.5s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

@keyframes buttonCinematicEntry {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(215, 38, 61, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(215, 38, 61, 0.08);
}

.option-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-red);
    stroke-width: 2;
    fill: none;
    transition: all 0.3s;
}

.btn-text {
    padding: 14px 20px;
    text-align: left;
    flex-grow: 1;
}

.option-btn:hover {
    transform: translateY(-3px);
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.option-btn:hover svg {
    stroke: #fff;
}

.soft-info-btn {
    margin: 2rem auto 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s;
    animation: fadeInUp 0.8s ease forwards 0.5s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.soft-info-btn:hover {
    background: #fff;
    color: var(--primary-red);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* --- ARCHITECTURE V2: DISCOVERY VIEW (FIXED GRID) --- */
.discovery-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fbfbfb;
    z-index: 1100;
    display: none;
    flex-direction: column;
    align-items: center;
    /* No scroll on the grid view itself on PC */
    overflow: hidden;
}

.discovery-view.active {
    display: flex;
}

.discovery-header {
    width: 100%;
    max-width: 1200px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

.header-brand {
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0.8;
    letter-spacing: -0.5px;
}

.discovery-back-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.discovery-back-btn:hover {
    background: #000;
    color: #fff;
}

/* FIXED GRID: Ensures it fits in one screen */
.map-container {
    width: 100%;
    max-width: 1200px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center Vertically */
    padding: 2rem;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    /* Fixed rows */
    gap: 1.5rem;
    height: 100%;
    max-height: 80vh;
    /* Limit height to viewport */
}

/* Blocks are now buttons to open overlay */
.map-block {
    background: #fff;
    border: 1px solid #eee;
    padding: 2.5rem;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.4s var(--ease-smooth);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.map-block:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
    border-color: rgba(215, 38, 61, 0.2);
    z-index: 2;
}

.block-tag {
    font-size: 0.8rem;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.map-block h4 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
}

@media (max-width: 850px) {
    .map-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        max-height: none;
    }

    .map-block {
        min-height: 180px;
        padding: 2rem;
    }

    .map-container {
        padding: 1rem;
    }
}

/* --- ARCHITECTURE V2: FOCUS OVERLAY (MODAL) --- */
.focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center on PC */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.focus-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.focus-card {
    background: #fff;
    width: 90%;
    max-width: 900px;
    height: 85%;
    /* Fixed height window */
    border-radius: 32px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    border: 1px solid #f0f0f0;
}

.focus-overlay.active .focus-card {
    transform: scale(1) translateY(0);
}

.focus-header {
    padding: 2rem 3rem;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    z-index: 10;
}

.focus-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.focus-close-btn:hover {
    background: #000;
    color: #fff;
    transform: rotate(90deg);
}

.focus-content {
    flex-grow: 1;
    padding: 3rem;
    overflow-y: auto;
    /* Internal scroll only */
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.focus-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.focus-content ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.focus-content li {
    margin-bottom: 0.5rem;
}

.focus-content p {
    margin-bottom: 1rem;
}

.focus-actions {
    padding: 2rem 3rem;
    border-top: 1px solid #f5f5f5;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* --- MOBILE BREAKPOINTS --- */
@media (max-width: 850px) {
    .discovery-view {
        overflow-y: auto;
    }

    /* Allow main scroll on mobile if needed */
    .map-container {
        block-size: auto;
        padding: 1rem;
    }

    .map-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        max-height: none;
        gap: 1rem;
        display: flex;
        flex-direction: column;
    }

    .map-block {
        min-height: 180px;
        padding: 2rem;
    }

    .focus-card {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-width: none;
    }

    .focus-header {
        padding: 1.5rem;
    }

    .focus-content {
        padding: 1.5rem;
    }

    .focus-actions {
        padding: 1.5rem;
        flex-direction: column-reverse;
    }

    .focus-actions button {
        width: 100%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-emoji {
    font-family: var(--font-body);
}

/* --- CONSOLIDATED STYLES FROM HTML --- */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 5;
    pointer-events: none;
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
    pointer-events: all;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--primary-red);
}

@media (max-width: 768px) {
    .focus-card {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .focus-header,
    .focus-content,
    .focus-actions {
        padding: 1.5rem;
    }

    .focus-actions {
        flex-direction: column-reverse;
    }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--primary-red);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.modal-overlay {
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    backdrop-filter: blur(10px);
}

.intro-modal {
    max-width: 500px;
    padding: 3rem;
    text-align: center;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.4s var(--ease-smooth);
}

.intro-modal .tagline {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-head);
}

.intro-modal .intro-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.modal-actions,
.module-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
}

.ghost-btn {
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ghost-btn.secondary {
    border: 1px solid #ddd;
    background: #fff;
    color: var(--text-secondary);
}

.ghost-btn.secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.ghost-btn.primary {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.ghost-btn.primary:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    box-shadow: 0 10px 20px rgba(215, 38, 61, 0.2);
}

/* WhatsApp override for primary */
#whatsapp-link {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

#whatsapp-link:hover {
    background: #000;
    border-color: #000;
}

.module-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: var(--font-head);
}

#module-content {
    margin-top: 20px;
    text-align: left;
}


.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay.active .intro-modal {
    transform: translateY(0);
}


.content-module {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.module-card {
    background: #fff;
    padding: 4rem;
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.08);
    max-width: 700px;
    width: 92%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.4s var(--ease-smooth);
}

.content-module.active {
    opacity: 1;
    pointer-events: all;
}

.content-module.active .module-card {
    transform: scale(1);
}


@media (max-width: 768px) {
    .module-card {
        padding: 2rem;
    }
}