/* 
* Gabriel Finco Portfolio
* Style Guide: Apple x Cosmos.so (Minimal, Premium, Cinematic)
*/

:root {
    /* Palette */
    --bg-color: #F8F8FA;
    /* Off-white premium base */
    --surface-color: #FFFFFF;
    --text-primary: #111111;
    --text-secondary: #6e6e73;
    --accent-glow: rgba(0, 122, 255, 0.15);
    /* Very subtle blue hint */
    --border-light: rgba(0, 0, 0, 0.05);
    --accent-primary: #007AFF;
    --glass-bg: rgba(255, 255, 255, 0.7);

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-spacing: 120px;

    /* Animation */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --transition-slow: 0.8s var(--ease-out-expo);
    --transition-fast: 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-hero {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 700;
}

.text-section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 24px;
}

.text-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
}

.text-micro {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 12px;

}

.highlight-font {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav.scrolled {
    background-color: rgba(248, 248, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-cta {
    background: var(--text-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-cta:hover {
    transform: scale(1.05);
    background: black;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    /* Darken for readability */
}

/* Cinemagraphic Glow Effect on Hover/load */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 2;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out-expo) 0.5s forwards;
}

.hero-title {
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 32px;
    font-weight: 300;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 14px 28px;
    border-radius: 99px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
    opacity: 0.8;
}

/* Sections General */
section {
    padding: var(--section-spacing) 0;
    position: relative;
}

/* Grid Layouts (Bento/Cosmos) */
.grid-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 24px;
}

.card {
    background: var(--surface-color);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease, opacity 0.8s ease;
    border: 1px solid var(--border-light);
}

.card.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

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

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Special Offer Highlight */
.card-highlight {
    border: 1px solid var(--accent-primary) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%) !important;
    cursor: pointer;
}

.badge-float {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 32px;
    padding: 60px;
    position: relative;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.4s var(--ease-out-expo);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    cursor: pointer;
    background: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: #eee;
}

.sound-toggle {
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 99px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.price-box {
    background: var(--bg-color);
    padding: 24px;
    border-radius: 20px;
    margin-top: 32px;
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulseGlow {
    from {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Mobile Responsiveness Enhanced */
@media (max-width: 768px) {
    :root {
        --section-spacing: 60px;
    }

    .container {
        padding: 0 20px;
    }

    .modal-container {
        padding: 50px 24px 30px 24px;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 24px;
    }

    .text-hero {
        font-size: 2.2rem;
    }

    .text-section-title {
        font-size: 1.8rem;
    }

    .grid-bento {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .card {
        min-height: 250px !important;
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .hero {
        height: 80vh;
    }

    .hero-content {
        padding-top: 20px;
    }

    .nav-inner {
        padding: 0 16px;
    }

    .nav-logo {
        font-size: 1rem;
    }

    .nav-cta {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .nav-links {
        display: none;
    }

    .card-highlight {
        padding: 40px 24px !important;
    }

    .card-highlight h2 {
        font-size: 1.8rem !important;
    }
}