@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary-color: #1a252f;
    --secondary-color: #34495e;
    --accent-color: #27ae60;
    --accent-light: #2ecc71;
    --bg-color: #ffffff;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
blockquote {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

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

a:hover {
    font-weight: 700;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.lang-switch {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.lang-switch li {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.lang-switch a {
    color: var(--secondary-color);
    text-decoration: none;
    opacity: 0.6;
}

.lang-switch a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Main Layout */
main {
    width: 100%;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 5% 6rem;
    min-height: 90vh;
    /* Make it full screen almost */
}

/* Align text right of image for variation or standard text-left */
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 4.5rem;
    /* Bigger impact */
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 300;
    margin-top: 0;
    display: block;
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.hero-img-container {
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 100%;
    max-width: 450px;
    border-radius: 4px;
    /* classic portrait look */
    box-shadow: 20px 20px 0px var(--accent-light);
    /* Offset stylised shadow */
    object-fit: cover;
}

/* Quote Section */
.quote-section {
    position: relative;
    background-color: var(--primary-color);
    /* Image url set in HTML or assumes generic class usage */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--white);
    padding: 10rem 5%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 37, 47, 0.85);
    /* Dark overlay */
    z-index: 1;
}

.quote-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.quote-text {
    font-size: 2.5rem;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
    color: var(--white) !important;
    position: relative;
    z-index: 2;
}

.quote-author {
    display: block;
    margin-top: 2rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--accent-light);
}

/* Content Blocks */
.content-wrapper {
    max-width: 900px;
    /* Optimal reading width */
    margin: 6rem auto;
    padding: 0 5%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.content-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #4a5568;
}

.dropcap::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    float: left;
    margin-right: 1rem;
    line-height: 0.8;
    color: var(--accent-color);
    font-weight: 700;
}

/* Alternating Image Story */
.story-block {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 4rem;
}

.story-block.reversed {
    grid-template-columns: 1fr 1.2fr;
}

.story-block.reversed .story-text {
    order: 2;
}

.story-img img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.caption {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    font-style: italic;
    display: block;
    text-align: center;
}

/* Contact Section */
#contact {
    background: var(--light-gray);
    padding: 8rem 5%;
    text-align: center;
}

.contact-box {
    background: var(--white);
    padding: 4rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto;
}

.contact-box h2 {
    margin-top: 0;
    font-size: 2.5rem;
}

.contact-link {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--white);
    background: var(--accent-color);
    padding: 1rem 3rem;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
    transition: var(--transition);
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.4);
    color: var(--white);
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    color: var(--secondary-color);
    font-weight: 700;
}

footer {
    background: #1a252f;
    color: #bdc3c7;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 950px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 5%;
        gap: 3rem;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-img-container {
        order: -1;
    }

    .story-block,
    .story-block.reversed {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-block.reversed .story-text {
        order: 0;
        /* reset */
    }

    .quote-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-box {
        padding: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Contact Switch Mobile */
    .contact-selector {
        flex-direction: column;
        width: 100%;
        border-radius: 16px;
        padding: 6px;
        height: auto;
        display: flex;
        /* Ensure flex is applied if it was inline-flex */
    }

    .contact-option {
        width: 100%;
        margin-bottom: 2px;
    }

    .option-card {
        width: 100%;
        border-radius: 12px !important;
        /* Override 50px pill shape */
        text-align: center;
        padding: 1rem;
    }
}

/* Animations */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-in.visible {
    opacity: 1;
}

/* REFOOD Section */
.refood-section {
    background: #f0f7f4;
    /* Light greenish tint */
    border-left: 5px solid #2ecc71;
    padding: 3rem;
    margin: 4rem 0;
    border-radius: 4px;
}

.refood-logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #2ecc71;
}

/* Contact Form Selector - Segmented Toggle */
.contact-selector {
    display: inline-flex;
    background: #eef2f5;
    padding: 0.5rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.contact-option {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.contact-option input {
    display: none;
}

.option-card {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    display: block;
    border: none;
    background: transparent;
}

.contact-option input:checked+.option-card {
    background: var(--white);
    color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.contact-result {
    margin-top: 2rem;
    min-height: 80px;
    /* Prevent layout jump */
}

.email-display {
    display: none;
    animation: fadeIn 0.5s ease;
}

.email-display.active {
    display: block;
}

.email-display p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #7f8c8d;
}

.email-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* 404 Page Styles */
.error-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    min-height: 60vh;
    /* Ensure it takes up good space */
}

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 37, 47, 0.85);
    /* Matches primary color with opacity */
    z-index: 1;
}

.error-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 3rem;
    /* Optional: glass morphism effect for the card */
    /* background: rgba(255, 255, 255, 0.05); */
    /* backdrop-filter: blur(5px); */
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    border-radius: 12px;
}

.error-title {
    font-size: 8rem;
    line-height: 1;
    margin: 0;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.error-subtitle {
    font-size: 2.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    color: var(--white);
    font-weight: 300;
}

.error-text {
    font-size: 1.2rem;
    color: #bdc3c7;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.error-btn:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.4);
    color: var(--white);
}

/* Responsive Fixes - Moved to bottom for precedence */
@media (max-width: 950px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 5%;
        gap: 3rem;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-img-container {
        order: -1;
    }

    .story-block,
    .story-block.reversed {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-block.reversed .story-text {
        order: 0;
    }

    .quote-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .contact-box {
        padding: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-selector {
        flex-direction: column;
        width: 100%;
        border-radius: 20px;
        /* Reduced to match inner content + padding */
        padding: 6px;
        height: auto;
        display: flex;
    }

    .contact-option {
        width: 100%;
        margin-bottom: 2px;
    }

    .option-card {
        width: 100%;
        border-radius: 12px !important;
        text-align: center;
        padding: 1rem;
    }
}