/* ============================================
   MISSION PAGE - LUXURY AESTHETIC
   Minimal, breathable, timeless elegance
   ============================================ */

:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-dark: #1a1a1a;
    --color-gray: #4a4a4a;
    --color-gray-light: #e5e5e5;
    --color-off-white: #fafafa;
    --color-accent: #2a2a2a;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spacing: clamp(6rem, 12vw, 14rem);
}

/* ============================================
   HERO SECTION - WITH MOBILE VIEWPORT FIX
   ============================================ */

.opening-section {
    position: relative;
    height: 100vh;
    height: 100svh; /* Use small viewport height for better mobile support */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.opening-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.opening-bg-image {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.35) 100%
    ), url('mission.webp') center/cover no-repeat;
    will-change: transform;
}

.opening-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.opening-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.625rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.opening-header {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 9vw, 11rem);
    font-weight: 300;
    color: var(--color-white);
    line-height: 0.9;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
}

.opening-mission {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.8vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 0.01em;
}

.opening-label.animated,
.opening-header.animated,
.opening-mission.animated {
    animation: fadeUp 1s var(--ease) forwards;
}

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

/* ============================================
   PROBLEM SECTION
   ============================================ */

.problem-section {
    background: var(--color-off-white);
    padding: clamp(4rem, 8vw, 6rem) 2rem var(--spacing) 2rem;
}

.problem-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.problem-title {
    font-family: var(--font-sans);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-black);
    font-weight: 500;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--ease);
}

.problem-title.in-view {
    opacity: 1;
    transform: translateY(0);
}

.problem-intro {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--color-black);
    line-height: 1.25;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.1s var(--ease) 0.2s;
}

.problem-intro.in-view {
    opacity: 1;
    transform: translateY(0);
}

.problem-body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--color-gray);
    line-height: 2;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s var(--ease) 0.4s;
}

.problem-body.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESULT - PORTRAIT LEFT, LANDSCAPE + CONTENT RIGHT
   ============================================ */

.result-section {
    background: var(--color-off-white);
    padding: 4rem;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 5rem;
    align-items: center;
}

/* Left: Portrait image */
.result-image-portrait-left {
    height: 100%;
    min-height: 600px;
    overflow: hidden;
}

.result-image-portrait-left .result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right column: content only */
.result-right-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Content styling */
.result-text-content {
    max-width: 550px;
}

.result-text {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: var(--color-gray-dark);
    line-height: 1.9;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.result-text:last-child {
    margin-bottom: 0;
}

.result-text em {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.2em;
    color: var(--color-black);
}

/* ============================================
   HOW WE WORK DIFFERENTLY
   ============================================ */

.how-we-work-section {
    position: relative;
    padding: clamp(4rem, 8vw, 6rem) 2rem var(--spacing) 2rem;
    overflow: hidden;
}

.how-we-work-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('mi2.webp');
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.4);
    transform: scale(1.1);
    z-index: 0;
    will-change: transform;
}

.how-we-work-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 1;
}

.section-title-centered {
    font-family: var(--font-sans);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-white);
    font-weight: 500;
    text-align: center;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s var(--ease);
}

.section-title-centered.in-view {
    opacity: 1;
    transform: translateY(0);
}

.how-we-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-principle-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4rem 3rem;
    border-radius: 2px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s var(--ease);
}

.work-principle-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.work-principle-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.work-principle-card:nth-child(2) { transition-delay: 0.1s; }
.work-principle-card:nth-child(3) { transition-delay: 0.2s; }
.work-principle-card:nth-child(4) { transition-delay: 0.3s; }

.work-principle-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 2rem;
}

.work-principle-title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 400;
    color: var(--color-white);
    line-height: 1.3;
    margin: 0 0 1.5rem;
}

.work-principle-text {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
    font-weight: 300;
}

/* ============================================
   PRINCIPLES SECTION
   ============================================ */

.principles-section {
    position: relative;
    padding: clamp(4rem, 8vw, 6rem) 2rem var(--spacing) 2rem;
    overflow: hidden;
}

.principles-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('mi6.webp');
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.5);
    transform: scale(1.1);
    z-index: 0;
    will-change: transform;
}

.principles-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
}

.principles-header {
    text-align: center;
    margin-bottom: 5rem;
}

.principles-title {
    font-family: var(--font-sans);
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--color-white);
    font-weight: 500;
}

.principles-card {
    margin-bottom: 3rem;
}

.principles-card:last-child {
    margin-bottom: 0;
}

.principles-card-content {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: all 0.4s var(--ease);
}

.principles-card-content:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.principle-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.principle-name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-white);
    font-weight: 300;
    line-height: 1.1;
    margin: 0 0 2rem;
}

.principle-description {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   FOOTER - INVERTED COLORS
   ============================================ */

footer {
    background: var(--color-white);
}

footer .footer-logo,
footer .footer-tagline,
footer .footer-copyright {
    color: var(--color-black);
}

/* ============================================
   HAMBURGER MENU
   ============================================ */

.hamburger {
    display: none;
}

.hamburger-line {
    background: white !important;
}

#header.scrolled .hamburger-line {
    background: var(--color-black) !important;
}

.hamburger.active .hamburger-line {
    background: white !important;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        position: relative;
    }
    
    .hamburger-line {
        width: 100%;
        height: 2px;
        background: white;
        transition: all 0.3s ease;
    }
    
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #000000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    #navbar .nav-links .nav-link {
        font-size: 1.3rem;
        color: white !important;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        padding: 0.75rem 0;
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    #navbar .nav-links.active .nav-link {
        opacity: 1;
        transform: translateX(0);
        color: white !important;
    }
    
    .nav-links.active .nav-link:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active .nav-link:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active .nav-link:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active .nav-link:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active .nav-link:nth-child(5) { transition-delay: 0.3s; }
    
    .nav-link::after {
        display: none;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --spacing: clamp(4rem, 10vw, 8rem);
    }
    
    .result-section {
        padding: 3rem 2rem;
        height: auto;
        min-height: 100vh;
    }

    .result-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .result-image-portrait-left {
        height: 60vh;
    }
    
    .result-right-column {
        justify-content: flex-start;
    }

    .how-we-work-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific hero section fix */
    .opening-section {
        height: 100dvh; /* Dynamic viewport height */
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .opening-bg-image {
        min-height: 100%;
        background-size: cover;
        background-position: center center;
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    .opening-container {
        padding: 2rem 1.5rem;
        width: 100%;
    }
    
    .result-section {
        padding: 2rem 1.5rem;
    }
    
    .result-container {
        gap: 1.5rem;
    }
    
    .result-image-portrait-left {
        height: 50vh;
    }

    .work-principle-card {
        padding: 3rem 2rem;
    }

    .principles-card-content {
        padding: 3rem 1.5rem;
    }
}

/* iOS Safari specific fix for viewport height */
@supports (-webkit-touch-callout: none) {
    .opening-section {
        height: -webkit-fill-available;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.keyboard-navigation *:focus {
    outline: 2px solid var(--color-black);
    outline-offset: 4px;
}

.keyboard-navigation .principles-card-content:focus,
.keyboard-navigation .work-principle-card:focus {
    outline-color: var(--color-black);
}

@media print {
    .opening-bg-wrapper,
    .how-we-work-section::before,
    .principles-section::before {
        display: none;
    }
}