/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;700&family=Passion+One&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --color-primary: #054272;
    --color-secondary: #072f54;
    --color-accent-teal: #8ececa;
    --color-accent-purple: #bb8ece;
    --color-light: #fffbf0;
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Passion One', Impact, 'Arial Black', sans-serif;
}

/* ============================================
   Reset and Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-light);
    background-color: var(--color-primary);
}
a {
    color: var(--color-accent-teal);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
a:active {
    color: var(--color-accent-purple);
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus,
button:focus,
input:focus,
[tabindex="0"]:focus {
    outline: 3px solid var(--color-accent-teal);
    outline-offset: 2px;
}

/* ============================================
   Sticky Header
   ============================================ */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.sticky-header.visible {
    transform: translateY(0);
}

.sticky-logo {
    width: 240px;
    height: 240px;
    opacity: 0;
    margin-left: auto;
    margin-right: 5%;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sticky-header.visible .sticky-logo {
    opacity: 1;
    transform: scale(1);
}

.sticky-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    opacity: 0.95;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #054272;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 66, 114, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 88px 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.125rem);
    line-height: 1.22;
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    max-width: 620px;
    margin: 0 auto 80px;
    opacity: 0.9;
}

.logo-container {
    margin-bottom: 60px;
}

.logo {
    width: 232px;
    height: 232px;
}

.scroll-indicator {
    color: var(--color-accent-teal);
    cursor: pointer;
    display: block;
    font-size: 2rem;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.scroll-indicator:hover,
.scroll-indicator:focus {
    transform: translateY(5px);
}

/* ============================================
   Main Content Section
   ============================================ */
.main-content {
    padding: 65px 20px 0;
    position: relative;
    overflow: visible;
}

.section-title {
    font-size: 4.125rem;
    line-height: 0.9;
    color: var(--color-accent-teal);
    margin-bottom: 31px;
}

/* ============================================
   Text Content Styles
   ============================================ */
.text-content {
    font-size: 1.125rem;
    font-weight: 500;
}

.text-content p {
    margin-bottom: 20px;
}

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

/* ============================================
   Quote Section
   ============================================ */
.quote-container {
    margin: 60px auto;
    position: relative;
    max-width: 720px;
}

.quote-content {
    background-color: var(--color-secondary);
    padding: 40px;
    position: relative;
    z-index: 2;
}

.quote-mark {
    font-size: 4rem;
    color: var(--color-accent-teal);
    position: absolute;
    top: -10px;
    left: -30px;
    font-family: serif;
}

.quote-text {
    font-size: 2.75rem;
    line-height: 1.22;
    color: var(--color-light);
    position: relative;
    z-index: 2;
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery-container {
    margin: 60px auto;
    max-width: 720px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ============================================
   Decorative Frame Elements
   ============================================ */
.decorative-frame {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    animation: fadeInFloat 2s ease-out forwards;
}

.decorative-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: gentleFloat 6s ease-in-out infinite;
}

/* Frame 8 - Right side floating */
.decorative-frame--frame-8 {
    top: -42%;
    right: -50%;
    transform: translateY(-50%);
    width: 300px;
    height: 320px;
    animation-delay: 0.5s;
}

.decorative-frame--frame-8 img {
    animation-delay: 2.5s;
}

/* Frame 9 - Left side floating */
.decorative-frame--frame-9 {
    top: 10%;
    left: -40%;
    transform: translateY(-50%);
    width: 200px;
    height: 200px;
    animation-delay: 1s;
}

.decorative-frame--frame-9 img {
    animation-delay: 3s;
}

/* Hover Effects for Decorative Frames */
.decorative-frame:hover img {
    animation-play-state: paused;
    transform: scale(1.05) rotate(2deg);
    transition: transform 0.3s ease;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(1deg);
    }
    50% {
        transform: translateY(-4px) rotate(0deg);
    }
    75% {
        transform: translateY(-12px) rotate(-1deg);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator:hover,
    .scroll-indicator:focus {
        transform: none;
    }
}

/* ============================================
   Bottom Section
   ============================================ */
.bottom-section {
    padding: 80px 0;
    background: var(--color-primary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 10px;
    align-items: stretch;
    min-height: 0; 
}

/* ============================================
   Newsletter Signup
   ============================================ */
.newsletter-signup {
    background: var(--color-light);
    padding: 40px;
    color: var(--color-primary);
}

.newsletter-signup h3 {
    font-size: 2.25rem;
    line-height: 1.22;
    margin-bottom: 20px;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-primary);
}

.form-group input {
    padding: 10px 12px;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    font-size: 1.125rem;
    font-family: var(--font-primary);
    background: white;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: var(--color-accent-teal);
}

.form-group input::placeholder {
    opacity: 0.6;
    color: var(--color-primary);
}

/* Form validation states - only show after interaction */
.form-group input:user-invalid:not(:placeholder-shown) {
    border-color: #d32f2f;
}

.form-group input:user-valid:not(:placeholder-shown) {
    border-color: #388e3c;
}

/* Fallback for browsers that don't support :user-invalid/:user-valid */
.form-group input:focus:invalid:not(:placeholder-shown) {
    border-color: #d32f2f;
}

.form-group input:focus:valid:not(:placeholder-shown) {
    border-color: #388e3c;
}

.submit-btn {
    background: var(--color-accent-teal);
    color: var(--color-primary);
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 800;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: auto;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #7bc1bd;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ============================================
   Connect Section
   ============================================ */
.connect-section {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Allows the flex container to shrink below its content size */
}

.connect-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.connect-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.connect-cta {
    background: var(--color-light);
    color: var(--color-primary);
    padding: 10px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 2.25rem;
    font-family: var(--font-heading);
    width: fit-content;
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.connect-cta:hover {
    background-color: var(--color-accent-teal);
    transform: translateY(-2px);
}

.connect-cta:active {
    transform: translateY(0);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background-color: var(--color-light);
    text-align: center;
    padding: 40px 0;
}

.footer-logo {
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .sticky-logo {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 920px) {
    .sticky-logo {
        display: none;
    }
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    .quote-content {
        padding: 30px;
    }
    
    .quote-text {
        font-size: 2rem;
    }
    
    .quote-mark {
        left: -20px;
        top: -25px;
        font-size: 3rem;
    }
    
    .main-content {
        padding: 80px 20px;
    }

    .bottom-section {
        padding: 0 0 10px;
    }
    
    .hero-subtitle,
    .text-content {
        font-size: 1rem;
    }
    
    /* Hide decorative frames on mobile for performance */
    .decorative-frame--frame-8,
    .decorative-frame--frame-9 {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content {
        padding: 60px 15px;
    }
    
    .newsletter-signup {
        padding: 30px 20px;
    }
    
    .connect-cta {
        font-size: 1.5rem;
        padding: 8px 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sticky-header,
    .scroll-indicator,
    .decorative-frame,
    .newsletter-signup,
    .connect-cta {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-background {
        display: none;
    }
}