/* ============================================
   ELLS — SHARED STYLES
   Loaded on every page (homepage, form pages,
   about/contact/gallery, etc.)

   The header (.site-header) and footer
   (.footer / .footer-grid) below are the ONE
   version used everywhere — no per-page variant.

   home.css (homepage-only: hero, mission,
   transparency, pillars, involved) loads AFTER
   this file, only on index.html.
   ============================================ */

:root {
    /* Base palette pulled directly from the ELLS crest: deep oxblood
       maroon field with gold linework. --brick is a slightly lifted,
       more saturated wine tone for interactive UI (buttons/links/hover)
       so it reads clearly on white; --brick-deep is the crest's exact
       maroon, used for dark gradients and hover-darker states.
       --marigold is the crest's exact gold, used only on dark
       backgrounds (kickers, badges) where it has full contrast. */
    --paper: #FFFFFF;
    --paper-deep: #F5EFE7;
    --ink: #1C1210;
    --ink-soft: #654D49;
    --ink-deep: #000000;
    --brick: #95041E;
    --brick-deep: #520412;
    --marigold: #F4B84A;
    --teal: #2A5247;
    --moss: #6B6142;
    --line: rgba(28, 18, 16, 0.14);
    --line-light: rgba(255, 255, 255, 0.18);

    /* Solid (non-transparent) tints of --brick, pre-mixed with --paper.
       Use these instead of rgba(149,4,30, 0.0x) for light backgrounds/
       borders on top of white or paper — a translucent maroon over a
       light surface reads as pink; these stay in the same wine family,
       mixed at a strong enough ratio to read as a deep/intense tone,
       not a pale wash. */
    --brick-tint: #F6E4E7;
    --brick-tint-strong: #ECACB7;

    /* Warm, very light parchment backdrop used ONLY to make the "Get
       involved" forms section read as a distinct, spotlighted block
       against the plain white sections around it. --brick-glow is the
       soft radial glow behind that section's heading. */
    --spotlight: #FAF7F2;
    --brick-glow: rgba(149, 4, 30, 0.14);

    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;

    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.25rem;
    --space-5: 3.5rem;
    --space-6: 5rem;
    --space-7: 7rem;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-full: 999px;
    --max-width: 1180px;
}

/* ---------- Reset & base type ---------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0;
    line-height: 1.15;
    font-weight: 600;
}

p {
    margin: 0;
    color: var(--ink-soft);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    display: block;
}

ul {
    margin: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 0.75rem 1.25rem;
    z-index: 200;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2.5px solid var(--brick);
    outline-offset: 3px;
}

/* ---------- Section headings (reusable anywhere) ---------- */

.section-head {
    max-width: 46ch;
    margin: 0 auto var(--space-5);
    text-align: center;
}

.section-head h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.2rem);
    margin-bottom: var(--space-1);
}

.section-head p {
    font-size: 1.05rem;
}

.section-head-light h2 {
    color: var(--paper);
}

.section-head-light p {
    color: rgba(255, 255, 255, 0.75);
}

.accent-underline {
    position: relative;
    display: inline-block;
}

.accent-underline::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 0.06em;
    height: 0.14em;
    background: var(--brick);
    opacity: 0.35;
    border-radius: 2px;
    z-index: -1;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid transparent;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.btn:active {
    transform: scale(0.96);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--brick);
    color: var(--paper);
    box-shadow: 0 6px 18px rgba(149, 4, 30, 0.28);
}

.btn-primary:hover {
    background: var(--brick-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(149, 4, 30, 0.34);
}

.btn-ghost-light {
    background: transparent;
    border-color: var(--line-light);
    color: var(--paper);
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--paper);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 6px 18px rgba(28, 18, 16, 0.18);
}

.btn-light:hover {
    background: var(--paper-deep);
    transform: translateY(-2px);
}

.btn-whatsapp {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
    background: transparent;
    border-color: var(--line);
    color: var(--ink-soft);
}

.btn-whatsapp:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ============================================
   SHARED SITE HEADER — used on EVERY page
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.9rem var(--space-3) 0;
    background: linear-gradient(rgba(245, 239, 231, 0.9), rgba(245, 239, 231, 0));
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0.6rem 0.6rem 0.6rem 1.2rem;
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(28, 18, 16, 0.10);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-right: auto;
    min-width: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--ink);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.site-nav>a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-soft);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.site-nav>a:hover,
.site-nav>a.active {
    color: var(--brick);
    border-color: var(--brick);
}

/* "Our work" dropdown */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink-soft);
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-dropdown-btn:hover {
    color: var(--brick);
    border-color: var(--brick);
}

.nav-dropdown-btn svg {
    transition: transform 0.18s ease;
}

.nav-dropdown.open .nav-dropdown-btn svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.14);
    padding: 0.4rem;
    min-width: 180px;
    display: grid;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 50;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    padding: 0.55rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.nav-dropdown-menu a:hover {
    background: var(--paper-deep);
    color: var(--brick);
}

.nav-dropdown-empty {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.header-cta {
    white-space: nowrap;
    padding: 0.65rem 1.3rem;
    font-size: 0.9rem;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span {
    top: 19px;
}

.nav-toggle span::before {
    top: -7px;
}

.nav-toggle span::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
    .site-nav {
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        right: 0;
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        box-shadow: 0 16px 34px rgba(28, 18, 16, 0.16);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-2) var(--space-3);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .site-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav>a {
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-dropdown {
        border-bottom: 1px solid var(--line);
    }

    .nav-dropdown-btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.7rem 0;
        border-bottom: none;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--paper-deep);
        display: none;
        min-width: 0;
        margin-bottom: 0.4rem;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: grid;
        /* The desktop rule .nav-dropdown.open .nav-dropdown-menu sets
           transform: translateX(-50%) translateY(0) to center the panel
           under the nav-dropdown-btn. It has higher specificity than the
           plain .nav-dropdown-menu { transform: none; } above, so on
           mobile it was still applying — shifting the (now full-width,
           static) panel left by half its own width and pushing it
           off-screen. Reset it explicitly here so mobile stays static. */
        transform: none;
    }

    .header-actions {
        display: none;
    }

    .nav-toggle {
        display: block;
    }
}

/* ---------- Tab bar (optional strip under the header — form pages only) ---------- */

.tab-bar {
    display: flex;
    gap: 0.3rem;
    overflow-x: auto;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-3);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab-bar:empty {
    display: none;
    border-bottom: none;
}

.tab-bar a,
.tab-bar button {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.87rem;
    color: var(--ink-soft);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.tab-bar a:hover,
.tab-bar button:hover {
    color: var(--brick);
}

.tab-bar a.active,
.tab-bar button.active {
    color: var(--brick);
    border-color: var(--brick);
}

/* ---------- Generic page content wrapper (form pages, sub-pages) ---------- */

.content {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-3);
}

/* Small heading block form/sub-pages can use at the top of .content
   for a page-specific title/status line (the shared header no longer
   carries per-page text). */
.page-heading {
    margin-bottom: var(--space-3);
}

.page-heading h1 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.page-heading p {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* ============================================
   SHARED FOOTER — one layout, used on EVERY page
   ============================================ */

.footer {
    background: linear-gradient(340deg, var(--brick) 0%, var(--brick-deep) 48%, var(--ink) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-6) var(--space-3) var(--space-3);
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-4);
}

.footer-col h4 {
    color: var(--paper);
    font-size: 0.95rem;
    margin-bottom: var(--space-2);
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.6rem;
    transition: color 0.18s ease;
}

.footer-col a:hover {
    color: var(--marigold);
}

.footer-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.7rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.72);
    ;
}

.footer-gand {
    color: rgba(255, 255, 255, 0.72);
}

.footer-brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--paper);
    display: block;
    margin-bottom: 0.3rem;
}

.footer-forms-empty {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.footer-tagline {
    font-size: 0.9rem;
    max-width: 26ch;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: var(--space-2);
}

.footer-social a {
    display: flex;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72);
    transition: color 0.18s ease;
}

.footer-social a:hover {
    color: var(--marigold);
}

.footer-bottom-inner {
    max-width: var(--max-width);
    margin: var(--space-4) auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: var(--space-3);
    border-top: 1px solid var(--line-light);
    font-size: 0.85rem;
}

.footer-credit a {
    color: var(--marigold);
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .tab-bar {
        padding: 0 var(--space-2);
    }

    .content {
        padding: var(--space-2);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}