/* Layout System */
.container {
    min-height: 200vh;
    position: relative;
    background: url('../assets/apps.png') center var(--bgY, 50%)/cover no-repeat;
    background-attachment: fixed;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(34, 139, 34, 0.1);
}

.nav-brand h1 {
    color: #228B22;
    font-size: 1.5rem;
    font-weight: 700;
}

.main-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas: "col1 col2";
    height: calc(100vh - 80px);
    align-items: stretch;
    padding: 0;
    gap: 0;
}

/* Scroll states */
.hero-section.columns-hidden .column {
    opacity: 0;
    transform: translateY(40px);
}

.hero-section.columns-visible .column {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.column-1 {
    grid-area: col1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 2rem;
}

.column-2 {
    grid-area: col2;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: transparent; /* see-through so we can reveal true page background */
    position: relative;
    height: 100%;
}

.device-showcase { display: none; }

.content-wrapper {
    max-width: 300px;
    text-align: left;
}

/* Column 2 internal layout */
.col2-content {
    display: grid;
    grid-template-rows: auto 1fr auto; /* text, overlay fills, footer sits at bottom */
    grid-template-columns: 100%;
    align-items: end;
    padding: 2rem;
    width: 100%;
    height: 100%;
    padding-bottom: 0;
}

/* Remove per-element background image; use SVG mask to reveal real background */
.brand-cutout { display: none; }

/* Full-area overlay that is black except where the text is punched out */
.cutout-overlay {
    width: 100%;
    height: 100%;
    align-self: stretch;
    justify-self: stretch;
    z-index: 1;
    pointer-events: none;
    grid-row: 2; /* Position in the middle row */
}

/* Make sure content like footer sits above overlay */
.col2-content, .col2-footer { position: relative; z-index: 2; }

/* Responsive text sizing via CSS applied to the SVG <text> */
.cutout-text {
    font-weight: 800;
    letter-spacing: -1px;
    dominant-baseline: text-after-edge;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    /* keep a consistent visual width while respecting column padding */
    /* the SVG uses viewBox units; the right margin below prevents clipping */
}

/* Size and position the cutout word near bottom-right similar to previous layout */
/* Use viewBox units; set font-size in percentage of SVG height */
@media (min-width: 0px) { .cutout-text { font-size: 12px; } }
@media (min-width: 480px) { .cutout-text { font-size: 16px; } }
@media (min-width: 768px) { .cutout-text { font-size: 20px; } }
@media (min-width: 1024px) { .cutout-text { font-size: 24px; } }
@media (min-width: 1440px) { .cutout-text { font-size: 28px; } }

.col2-footer {
    margin-top: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    align-items: flex-end;
    justify-content: flex-end;
    margin-left: auto;
    margin-bottom: -0.25rem;
    text-align: right;
    grid-row: 3; /* Position in the bottom row */
}

.contextual-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 139, 34, 0.95);
    position: relative;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contextual-section.visible {
    transform: translateY(0);
}

.footer { display: none; }

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "col1"
            "col2";
        text-align: left;
        gap: 0;
        padding: 0;
    }
    
    .column-1,
    .column-2 {
        padding: 2rem 1rem;
        justify-content: flex-start;
    }
    
    .content-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .navigation {
        padding: 1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .content-wrapper {
        max-width: 90%;
    }
}
