:root {
    /* Colors */
    --color-bg: #F8F9F7;
    --color-text: #111827;
    --color-muted: #6B7280;
    --color-accent: #1F7A5C;
    --color-border: #E5E7EB;

    /* Spacing */
    --space-y-section: 6rem;
    /* py-24 ~ 96px */
    --space-container-x: 2rem;
    /* px-8 */
    --space-gap: 2rem;
    /* space-y-8 */
    --max-width: 56rem;
    /* max-w-4xl */
}

[data-theme="dark"] {
    --color-bg: #0F172A;
    --color-text: #E5E7EB;
    --color-muted: #9CA3AF;
    --color-accent: #34D399;
    --color-border: #1F2937;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    /* text-4xl */
    line-height: 1.1;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    /* text-2xl */
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

p,
li {
    font-size: 1rem;
    /* text-base */
    color: var(--color-text);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--color-muted);
    margin-bottom: 2rem;
    font-weight: 400;
}

.meta-line {
    font-size: 0.875rem;
    /* text-sm */
    color: var(--color-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
}

.big-text {
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-text);
}

.brand-text {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    color: var(--color-muted);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--space-container-x);
    padding-right: var(--space-container-x);
}

.content-column {
    max-width: 42rem;
    /* Narrower column for reading */
}

.section {
    padding-top: var(--space-y-section);
    padding-bottom: var(--space-y-section);
}

/* Header */
.header {
    padding: 1rem 0;
    /* Minimal height - Reduced from 1.5rem */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    /* Opaque for scrolling or transparent depending on pref, sticking to specs 'fixed' */
    z-index: 100;
    /* Optional: subtle border or none? "Minimal" usually implies none or very light one. */
}

/* Language Switcher */
.lang-switch {
    font-size: 0.875rem;
    color: var(--color-muted);
    font-weight: 500;
}

.lang-option {
    cursor: pointer;
    transition: color 0.2s;
}

.lang-option:hover {
    color: var(--color-text);
}

.lang-option.active {
    color: var(--color-text);
    font-weight: 700;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 70px;
    /* Original height */
    width: auto;
    display: block;
    transition: height 0.3s ease;
    /* Smooth resizing */
}

/* Helper for JS scroll state */
.header.scrolled .logo {
    height: 48px;
    /* Reduced height on scroll */
}

.contact-link {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hero */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    /* Offset for fixed header - Increased from 6rem */
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-accent);
    color: white;
    font-weight: 500;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Manifesto */
.manifesto p {
    margin-bottom: 1.5rem;
}

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

/* What We Do */
.simple-list li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-border);
}

.schema {
    margin-bottom: 3rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.05em;
}

.schema-separator {
    color: var(--color-muted);
    margin: 0 0.5rem;
}

/* For Whom */
.for-whom h2 {
    color: var(--color-text);
}

/* Closing */
.closing {
    padding-top: 8rem;
    padding-bottom: 8rem;
    text-align: center;
    /* Generally centers nicely for "Que respire" */
}

.closing-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Default align left, but maybe center for 'claim'? Specs said "Grande, casi vacio". Let's stick to consistent alignment. */
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--color-muted);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Media Queries */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
        /* text-5xl on desktop */
    }

    .text-center-mobile {
        text-align: left;
        align-items: flex-start;
        /* For flex container in hero */
    }

    .footer-content {
        flex-direction: row;
        gap: 2rem;
    }

    .closing-content {
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center;
        justify-content: center;
        /* Center horizontally in flex */
        flex-direction: column;
    }

    .text-center-mobile .max-w-4xl {
        margin: 0 auto;
    }

    .header {
        padding: 1rem 0;
    }

    /* Center closing on mobile too? */
    .closing-content {
        align-items: center;
        text-align: center;
    }

    /* Mobile Header Optimizations */
    .logo {
        height: 48px;
    }

    .contact-text {
        display: none;
    }

    .contact-icon {
        display: block;
    }

    /* Compact Language Switcher */
    .lang-switch-wrapper {
        position: relative;
        display: inline-block;
    }

    .lang-switch {
        /* Default static/relative behavior */
        position: relative;
        display: block;
        /* or inline-block */
    }

    /* Hide inactive options unless expanded */
    .lang-switch:not(.expanded) .lang-option:not(.active) {
        display: none;
    }

    .lang-switch.expanded {
        position: absolute;
        /* top offset calculated in JS */
        /* centered horizontally via js or left 0? */
        left: -0.5rem;
        /* Padding adjustment */
        width: max-content;
        /* Ensure it takes needed width */
        min-width: 100%;

        background: var(--color-bg);

        border: 1px solid var(--color-border);
        padding: 0.5rem;
        border-radius: 4px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 101;
    }

    .lang-switch.expanded .lang-option {
        display: block;
    }

    /* Reordering for PT to keep it visible */
    /* Standard Order: ES(1), EN(2), PT(3) */
    .lang-switch .lang-option[data-lang="es"] {
        order: 1;
    }

    .lang-switch .lang-option[data-lang="en"] {
        order: 2;
    }

    .lang-switch .lang-option[data-lang="pt"] {
        order: 3;
    }

    /* When PT is active: EN(1), PT(2), ES(3) */
    .lang-switch.reorder-pt .lang-option[data-lang="en"] {
        order: 1;
    }

    .lang-switch.reorder-pt .lang-option[data-lang="pt"] {
        order: 2;
    }

    .lang-switch.reorder-pt .lang-option[data-lang="es"] {
        order: 3;
    }
}

/* Desktop Styles for new elements */
/* Hide icon on desktop */
@media (min-width: 768px) {
    .contact-icon {
        display: none;
    }

    /* Separators for desktop language switcher */
    .lang-switch {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .lang-option:not(:last-child)::after {
        content: "|";
        margin-left: 0.5rem;
        color: var(--color-muted);
        font-weight: 400;
        opacity: 0.5;
    }
}

/* Animations */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
    opacity: 0;
    /* Star invisible */
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}