/* ============================================================
   layout.css — container, header, hero, sections, footer
   ============================================================ */

/* ── Container ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

/* ── Main (full-width; sections own their containers) ────────── */
#main-content {
    display: block;
    width: 100%;
}

/* ── Site Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* Glassmorphism */
    background: rgba(252, 249, 248, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    transition: box-shadow 0.25s;
}
.site-header.scrolled {
    box-shadow: 0 4px 24px rgba(28, 27, 27, 0.07);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-lg);
    height: 68px;
}

.site-logo           { flex-shrink: 0; min-width: 0; }
.site-logo img       { height: 30px; width: auto; display: block; }

.main-nav            { justify-self: center; }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    justify-self: end;
}

/* ── Page Hero — single-column editorial page header ────────── */
/* Use by adding .page-hero to a <section> and optionally:
   - <p class="eyebrow"> above the h1
   - <p class="page-hero-sub"> below the h1
   Activate in markdown pages via frontmatter: label, subtitle    */
.page-hero {
    background: var(--surface);
    background-image:
        radial-gradient(circle at 80% 20%, rgba(37, 211, 102, 0.07) 0%, transparent 50%),
        radial-gradient(circle at 15% 90%, rgba(18, 140, 126, 0.05) 0%, transparent 45%);
    padding: var(--space-2xl) 0 var(--space-xl);
    border-bottom: 1px solid var(--surface-border);
}

.page-hero .container { position: relative; }

.page-hero-inner { max-width: 760px; }

.page-hero h1 {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--color-ink);
    margin-bottom: 0;
    padding-left: 0;
}

.page-hero-sub {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    max-width: 620px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .page-hero { padding-bottom: var(--space-lg); }
}

/* ── Hero — two-column homepage hero ────────────────────────── */
.hero {
    background: var(--surface);
    background-image:
        radial-gradient(circle at 75% 15%, rgba(37, 211, 102, 0.09) 0%, transparent 50%),
        radial-gradient(circle at 20% 85%, rgba(18, 140, 126, 0.05) 0%, transparent 45%);
    padding: var(--space-2xl) 0 var(--space-xl);
    overflow: hidden;
}

.hero .container { position: relative; }

/* Two-column hero layout */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-copy { /* text column — inherits left alignment */ }

.hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-media img {
    width: 100%;
    max-width: 560px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.hero h1 {
    max-width: 680px;
    margin-bottom: var(--space-lg);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 540px;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.hero-note {
    font-size: 0.85rem;
    color: var(--color-ink-muted);
    font-style: italic;
}

/* ── Generic sections ────────────────────────────────────────── */
.section     { padding: var(--space-xl) 0; background: var(--surface); }
.section-alt { padding: var(--space-xl) 0; background: var(--surface-low); }

/* Dark teal CTA section */
.section-cta {
    padding: var(--space-xl) 0;
    background: var(--color-primary-dk);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(37, 211, 102, 0.15) 0%, transparent 65%);
    pointer-events: none;
}
.section-cta .container { position: relative; }
.section-cta h2,
.section-cta .section-title    { color: #fff; }
.section-cta .section-subtitle { color: rgba(255, 255, 255, 0.75); }
.section-cta p                 { color: rgba(255, 255, 255, 0.8); }

/* Trust / announcement banner */
.section-banner {
    padding: 0.65rem 0;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    background: var(--surface-low);
    border-bottom: 1px solid var(--surface-border);
}

/* ── Site Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--color-primary-dk); /* brand dark teal, not generic black */
    color: #fff;
    border-top: 3px solid var(--color-primary); /* WhatsApp green accent stripe */
    padding-top: var(--space-xl);
    padding-bottom: var(--space-lg);
}

.footer-top {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--space-lg);
}

.footer-brand         { flex: 0 0 220px; }
.footer-brand img     { display: block; }
.footer-brand p       {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: var(--space-sm);
    line-height: 1.65;
    margin-bottom: 0;
}
.footer-nav  { flex: 1; }

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.footer-col          { min-width: 120px; }
.footer-heading {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary); /* green label, on-brand and readable */
    margin-bottom: var(--space-sm);
    font-weight: 700;
}
.footer-col ul        { list-style: none; padding: 0; }
.footer-col li + li   { margin-top: 0.35rem; }
.footer-col a         { color: rgba(255, 255, 255, 0.6); font-size: 0.875rem; transition: color 0.15s; }
.footer-col a:hover   { color: #fff; text-decoration: none; }
.footer-ext-icon {
    font-size: 0.65em;
    margin-left: 0.3em;
    vertical-align: 0.1em;
    opacity: 0.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}
.footer-bottom a       { color: rgba(255, 255, 255, 0.4); transition: color 0.15s; }
.footer-bottom a:hover { color: rgba(255, 255, 255, 0.75); text-decoration: none; }

.footer-legal-links         { list-style: none; padding: 0; display: flex; gap: var(--space-md); }
.footer-legal-links a       { color: rgba(255, 255, 255, 0.35); }
.footer-legal-links a:hover { color: rgba(255, 255, 255, 0.7); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .main-nav.is-open { display: block; }

    /* Collapse header to logo + actions only — prevents logo squeeze */
    .header-inner {
        grid-template-columns: auto 1fr;
        gap: var(--space-sm);
    }
    .main-nav { grid-column: 1 / -1; }  /* full-width row when open */
    .header-actions { justify-self: end; }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-media { order: -1; }
    .hero-media img { max-width: 420px; margin-inline: auto; }
    /* Tighten hero padding for landscape/tablet mobile (769–900px) */
    .hero { padding: var(--space-xl) 0; }
}

@media (max-width: 768px) {
    :root { --space-xl: 3rem; --space-2xl: 4rem; }

    .hero { padding-top: var(--space-xl); }
    .hero h1 { max-width: 100%; }

    .footer-top { flex-direction: column; gap: var(--space-lg); }
    .footer-brand { flex: 1 1 auto; }
    .footer-grid { gap: var(--space-lg); }

    .section-cta .cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding-inline: var(--space-md); }
}
