/* ============================================================================
   Buckie & District Community Council — public website stylesheet
   Shared by every public page. Fonts are declared inline in each page <head>.
   ========================================================================== */

:root {
    --navy: #003764;
    --navy-dark: #002a4d;
    --navy-light: #004a87;
    --sky: #98D1DD;
    --sky-light: #b8e3ec;
    --teal: #00A0AF;
    --teal-dark: #008a97;
    --mint: #62CBC9;
    --forest: #2B713F;
    --green-bright: #009819;
    --lime: #8FD84A;
    --g50: #f9fafb;  --g100: #f3f4f6; --g200: #e5e7eb; --g300: #d1d5db;
    --g400: #9ca3af; --g500: #6b7280; --g600: #4b5563; --g700: #374151;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
    font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--g700);
    background: #fff;
    line-height: 1.55;
    /* Nothing may make the page wider than the screen. Phones ignore this when it is passed up to
       the page as a whole, so with html's clip above, body trims its own content instead (clip,
       unlike hidden, doesn't turn body into a scrolling box). Older browsers use hidden. */
    overflow-x: hidden;
    overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); }
strong { font-weight: 700; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
.container-narrow { max-width: 50rem; margin: 0 auto; padding: 0 1rem; }

.gradient-text { color: var(--mint); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.95rem;
    transition: all 0.3s var(--ease); white-space: nowrap;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
@media (max-width: 479px) {   /* phones: a label too long for the screen wraps rather than widening the page */
    .btn { white-space: normal; text-align: center; }
}
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); box-shadow: 0 12px 24px -8px rgba(0,160,175,0.45); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); box-shadow: 0 12px 24px -8px rgba(0,55,100,0.4); transform: translateY(-2px); }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: #235c33; transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(43,113,63,0.5); }
.btn-outline-forest { border: 2px solid var(--forest); color: var(--forest); background: transparent; }
.btn-outline-forest:hover { background: var(--forest); color: #fff; }
.btn-glass {
    background: rgba(255,255,255,0.12); color: #fff;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-glass:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }

.pulse-ring { animation: pulseRing 2s ease-out infinite; }
@keyframes pulseRing {
    0%   { box-shadow: 0 0 0 0 rgba(0,160,175,0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(0,160,175,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,160,175,0); }
}

.link-more {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--teal); font-weight: 700; font-size: 0.875rem; transition: gap 0.3s var(--ease);
}
.link-more:hover { gap: 0.8rem; }
.link-more svg { width: 1rem; height: 1rem; }

/* --- Badges / pills -------------------------------------------------------- */
.eyebrow {
    display: inline-block; padding: 0.375rem 1rem; border-radius: 9999px;
    background: rgba(152,209,221,0.25); color: var(--teal);
    font-size: 0.875rem; font-weight: 700; margin-bottom: 1.5rem;
}
.eyebrow-dark { background: rgba(255,255,255,0.1); color: var(--sky); }
.eyebrow-lime { background: rgba(143,216,74,0.2); color: var(--forest); }

.badge {
    display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px;
    font-size: 0.72rem; font-weight: 700; line-height: 1.4;
}
.badge-teal   { background: var(--teal);   color: #fff; }
.badge-navy   { background: var(--navy);   color: #fff; }
.badge-forest { background: var(--forest); color: #fff; }
.badge-lime   { background: var(--lime);   color: var(--navy); }
.badge-sky    { background: var(--sky);    color: var(--navy); }
.badge-mint   { background: var(--mint);   color: var(--navy); }

.badge-soft-pending   { background: #FEF3C7; color: #92400E; }
.badge-soft-approved  { background: #D1FAE5; color: #065F46; }
.badge-soft-refused   { background: #FEE2E2; color: #991B1B; }
.badge-soft-commented { background: #DBEAFE; color: #1E40AF; }
.badge-soft-withdrawn { background: var(--g200); color: var(--g600); }

.status-active     { background: rgba(0,160,175,0.12); color: var(--teal-dark); }
.status-monitoring { background: #FEF3C7; color: #92400E; }
.status-resolved   { background: #D1FAE5; color: #065F46; }
.status-closed     { background: var(--g200); color: var(--g600); }

/* --- Navigation -------------------------------------------------------------- */
#scroll-progress {
    position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 60;
    background: linear-gradient(to right, var(--teal), var(--mint), var(--lime));
    transform-origin: left; transform: scaleX(0);
}
.site-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    transition: background 0.5s, box-shadow 0.5s;
}
.site-nav.nav-solid, .site-nav.nav-scrolled {
    background: rgba(0,55,100,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-brand img {
    height: 3rem; width: 3rem; border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25); transition: transform 0.3s;
}
.nav-brand:hover img { transform: scale(1.1); }
.nav-brand-text { display: none; line-height: 1.2; }
.nav-brand-text .t1 { display: block; color: #fff; font-weight: 700; font-size: 1.05rem; }
.nav-brand-text .t2 { display: block; color: var(--sky); font-size: 0.85rem; }
@media (min-width: 640px) { .nav-brand-text { display: block; } }

.nav-links { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-link {
    color: rgba(255,255,255,0.9); padding: 0.5rem 0.9rem; border-radius: 0.5rem;
    font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.14); }
.nav-cta {
    margin-left: 0.5rem; background: var(--teal); color: #fff;
    padding: 0.625rem 1.25rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700;
    transition: all 0.3s;
}
.nav-cta:hover { background: var(--teal-dark); box-shadow: 0 8px 20px rgba(0,160,175,0.3); }

#menu-btn { display: block; color: #fff; padding: 0.5rem; border-radius: 0.5rem; transition: background 0.2s; }
#menu-btn:hover { background: rgba(255,255,255,0.1); }
#menu-btn svg { width: 1.5rem; height: 1.5rem; }
@media (min-width: 1024px) { #menu-btn { display: none; } }

.mobile-menu {
    position: fixed; top: 0; right: 0; bottom: 0; width: 20rem; max-width: 85vw; z-index: 55;
    background: rgba(0,42,77,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
    display: flex; flex-direction: column; padding: 6rem 2rem 2rem; overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-link {
    color: #fff; font-size: 1.1rem; padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1); transition: color 0.2s;
}
.mobile-link:hover { color: var(--sky); }
.mobile-link.cta {
    margin-top: 1.5rem; background: var(--teal); text-align: center;
    border-radius: 9999px; font-weight: 700; border-bottom: 0; padding: 0.75rem 1rem;
}
#close-menu { position: absolute; top: 1.5rem; right: 1.5rem; color: rgba(255,255,255,0.8); padding: 0.5rem; }
#close-menu:hover { color: #fff; }
#close-menu svg { width: 1.5rem; height: 1.5rem; }
.mobile-menu-foot { margin-top: auto; display: flex; gap: 1rem; padding-top: 2rem; }
.mobile-menu-foot a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.mobile-menu-foot a:hover { color: #fff; }
.mobile-menu-foot svg { width: 1.5rem; height: 1.5rem; }

/* --- Hero ------------------------------------------------------------------ */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background-position: center; background-size: cover;
}
@media (min-width: 769px) { .hero { background-attachment: fixed; } }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,55,100,0.7), rgba(0,55,100,0.5) 50%, rgba(0,55,100,0.8));
}
.hero-content { position: relative; z-index: 10; max-width: 64rem; margin: 0 auto; padding: 7rem 1rem 16rem; text-align: center; }
.hero-logo { margin: 0 auto 2rem; height: 7rem; width: auto; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.4)); }
@media (min-width: 640px) { .hero-logo { height: 9rem; } }
@media (min-width: 768px) { .hero-logo { height: 11rem; } }
.hero h1 {
    color: #fff; font-size: 2.5rem; font-weight: 700; margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5), 0 4px 30px rgba(0,0,0,0.3);
}
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 768px) { .hero h1 { font-size: 4.5rem; } }
.hero-sub {
    color: rgba(255,255,255,0.85); font-size: 1.125rem; font-weight: 300;
    max-width: 48rem; margin: 0 auto 1rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4), 0 3px 20px rgba(0,0,0,0.2);
}
@media (min-width: 640px) { .hero-sub { font-size: 1.25rem; } }
@media (min-width: 768px) { .hero-sub { font-size: 1.5rem; } }
.hero-loc { color: rgba(152,209,221,0.85); margin-bottom: 2.5rem; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.hero-ctas { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }

/* The hero waves (.ocean) are styled inline in index.php so a cached site.css can't break them */

/* --- Page hero (inner pages) -------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 70%, var(--teal-dark) 130%);
    padding: 8.5rem 0 4rem; position: relative; overflow: hidden;
}
.page-hero::after {
    content: ''; position: absolute; right: -8rem; top: -8rem; width: 24rem; height: 24rem;
    background: radial-gradient(circle, rgba(98,203,201,0.18), transparent 65%); border-radius: 50%;
}
.page-hero h1 { color: #fff; font-size: 2.25rem; margin-bottom: 0.75rem; }
@media (min-width: 768px) { .page-hero h1 { font-size: 3rem; } }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 44rem; }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.55); font-size: 0.85rem; margin-bottom: 1.25rem; }
.breadcrumb a:hover { color: var(--sky); }
.breadcrumb svg { width: 0.9rem; height: 0.9rem; }

/* --- Sections ------------------------------------------------------------------ */
.section { padding: 5rem 0; }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }
.section-tight { padding: 3.5rem 0; }
.section-alt { background: linear-gradient(to bottom, var(--g50), #fff); }
.section-dark {
    background: linear-gradient(to bottom, var(--navy), var(--navy-dark), var(--navy));
    position: relative; overflow: hidden;
}
.section-head { text-align: center; max-width: 42rem; margin: 0 auto 4rem; }
.section-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 1rem; }
@media (min-width: 640px)  { .section-title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .section-title { font-size: 3rem; } }
.section-dark .section-title { color: #fff; }
.section-lead { font-size: 1.125rem; color: var(--g500); }
.section-dark .section-lead { color: rgba(255,255,255,0.6); }
.section-foot { text-align: center; margin-top: 3rem; }

/* --- Quick links ------------------------------------------------------------------ */
.quick-links-band { position: relative; margin-top: -2rem; z-index: 20; padding-bottom: 4rem; }
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 72rem; margin: 0 auto; }
@media (min-width: 768px)  { .quick-links { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .quick-links { grid-template-columns: repeat(6, 1fr); } }
.quick-link {
    background: #fff; border-radius: 1rem; padding: 1.5rem 1rem; text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0,55,100,0.06); border: 1px solid var(--g100);
    transition: all 0.4s var(--ease);
}
.quick-link:hover { transform: translateY(-6px) scale(1.02); }
.quick-link h3 { font-size: 0.875rem; font-weight: 700; transition: color 0.2s; }
.quick-link:hover h3 { color: var(--teal); }
.quick-link p { font-size: 0.75rem; color: var(--g500); margin-top: 0.25rem; }
.ql-icon {
    width: 3.5rem; height: 3.5rem; margin: 0 auto 0.75rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.4s var(--ease);
}
.quick-link:hover .ql-icon { transform: scale(1.15); }
.ql-icon svg { width: 1.75rem; height: 1.75rem; color: #fff; }
.ql-navy { background: linear-gradient(135deg, var(--navy), var(--navy-light)); box-shadow: 0 8px 16px rgba(0,55,100,0.2); }
.ql-teal { background: linear-gradient(135deg, var(--teal), var(--mint)); box-shadow: 0 8px 16px rgba(0,160,175,0.2); }
.ql-forest { background: linear-gradient(135deg, var(--forest), var(--green-bright)); box-shadow: 0 8px 16px rgba(43,113,63,0.2); }
.ql-sky { background: linear-gradient(135deg, var(--sky), var(--sky-light)); box-shadow: 0 8px 16px rgba(152,209,221,0.25); }
.ql-sky svg { color: var(--navy); }
.ql-lime { background: linear-gradient(135deg, var(--lime), var(--green-bright)); box-shadow: 0 8px 16px rgba(143,216,74,0.25); }
.ql-mint { background: linear-gradient(135deg, var(--mint), var(--teal)); box-shadow: 0 8px 16px rgba(98,203,201,0.25); }

/* --- About ------------------------------------------------------------------------- */
.about-grid { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-copy h2 { font-size: 1.875rem; margin-bottom: 1.5rem; }
@media (min-width: 640px)  { .about-copy h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .about-copy h2 { font-size: 3rem; } }
.about-copy p { color: var(--g500); margin-bottom: 1.5rem; line-height: 1.7; }
.about-copy p:first-of-type { font-size: 1.125rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.stat { text-align: center; padding: 1rem; border-radius: 1rem; }
.stat:nth-child(1) { background: linear-gradient(135deg, rgba(0,55,100,0.05), transparent); }
.stat:nth-child(2) { background: linear-gradient(135deg, rgba(0,160,175,0.05), transparent); }
.stat:nth-child(3) { background: linear-gradient(135deg, rgba(43,113,63,0.05), transparent); }
.stat .num { font-size: 1.875rem; font-weight: 700; color: var(--navy); }
.stat:nth-child(2) .num { color: var(--teal); }
.stat:nth-child(3) .num { color: var(--forest); }
.stat .lbl { font-size: 0.875rem; color: var(--g400); margin-top: 0.25rem; }
@media (max-width: 359px) {   /* smallest phones: the three counters didn't fit side by side */
    .stats { gap: 0.5rem; }
    .stat { padding: 1rem 0.25rem; }
}

.collage { position: relative; }
.collage::before {
    content: ''; position: absolute; inset: -1rem; border-radius: 1.5rem; filter: blur(40px);
    background: linear-gradient(135deg, rgba(152,209,221,0.2), rgba(98,203,201,0.2), rgba(143,216,74,0.2));
}
.collage-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.collage-col { display: flex; flex-direction: column; gap: 1rem; }
.collage-col:last-child { padding-top: 2rem; }
.collage-grid img {
    width: 100%; object-fit: cover; border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}
.collage-grid .h-short { height: 12rem; }
.collage-grid .h-tall { height: 16rem; }

/* --- Councillors --------------------------------------------------------------------- */
.crew-heading { font-size: 1.25rem; font-weight: 700; margin-bottom: 2rem; }
.crew-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 4rem; }
@media (min-width: 640px)  { .crew-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .crew-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .crew-grid { grid-template-columns: repeat(6, 1fr); } }
.crew-grid.crew-ward { max-width: 32rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .crew-grid.crew-ward { grid-template-columns: repeat(3, 1fr); } }
.councillor-card { text-align: center; transition: transform 0.3s ease; }
.councillor-card:hover { transform: translateY(-4px); }
.councillor-img {
    width: 6rem; height: 6rem; margin: 0 auto 0.75rem; border-radius: 50%;
    border: 4px solid rgba(152,209,221,0.3); overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: all 0.3s;
}
.councillor-card:hover .councillor-img { border-color: var(--teal); box-shadow: 0 0 20px rgba(0,160,175,0.3); }
.councillor-img img { width: 100%; height: 100%; object-fit: cover; }
.councillor-card h4, .councillor-card h3 { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.councillor-card .role { font-size: 0.75rem; color: var(--g400); }
.councillor-card .role.officer { color: var(--teal); font-weight: 500; }
.councillor-card.ward .councillor-img { border-color: rgba(43,113,63,0.3); }
.councillor-card.ward:hover .councillor-img { border-color: var(--forest); box-shadow: 0 0 20px rgba(43,113,63,0.3); }
.councillor-card.ward .role { color: var(--forest); font-weight: 500; }

.join-cta {
    margin-top: 4rem; background: linear-gradient(to right, var(--navy), var(--navy-light));
    border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column;
    align-items: center; justify-content: space-between; gap: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,55,100,0.2); text-align: center;
}
@media (min-width: 768px) { .join-cta { flex-direction: row; padding: 3rem; text-align: left; } }
.join-cta h3 { color: #fff; font-size: 1.5rem; margin-bottom: 0.5rem; }
.join-cta p { color: rgba(152,209,221,0.8); }

/* Bio cards (councillors page) */
.bio-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .bio-grid { grid-template-columns: repeat(2, 1fr); } }
.bio-card {
    display: flex; gap: 1.25rem; background: #fff; border: 1px solid var(--g100);
    border-radius: 1rem; padding: 1.5rem; box-shadow: 0 10px 25px -5px rgba(0,55,100,0.06);
}
.bio-card .councillor-img { margin: 0; flex-shrink: 0; width: 5rem; height: 5rem; }
.bio-card h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.bio-card .role { font-size: 0.8rem; color: var(--teal); font-weight: 700; margin-bottom: 0.5rem; }
.bio-card.ward .role { color: var(--forest); }
.bio-card p.bio { font-size: 0.9rem; color: var(--g500); }

/* --- Generic cards (news / groups / documents) ----------------------------------------- */
.card-grid { display: grid; gap: 2rem; }
@media (min-width: 768px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
    background: #fff; border-radius: 1rem; overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,55,100,0.06); border: 1px solid var(--g100);
}
.card-hover { transition: all 0.4s var(--ease); }
.card-hover:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0,55,100,0.25); }
.img-card { display: block; position: relative; overflow: hidden; height: 12rem; }
/* Children clipped by a rounded parent leave a hairline of the parent's
   background on the curve — round the child's own top corners to match. */
.card > .img-card:first-child { border-radius: 1rem 1rem 0 0; }
.img-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.img-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,55,100,0.85), rgba(0,55,100,0.3) 50%, transparent);
    transition: opacity 0.4s;
}
.img-card:hover img { transform: scale(1.08); }
.img-card .corner-badge { position: absolute; top: 1rem; left: 1rem; z-index: 10; }
.img-card .img-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem; z-index: 10; }
.img-card .img-caption h3 { color: #fff; font-size: 1.25rem; }
.card-body { padding: 1.5rem; }
.card-date { font-size: 0.875rem; color: var(--g500); font-weight: 500; }
.card-title { font-size: 1.125rem; font-weight: 700; margin: 0.5rem 0 0.75rem; }
.card-title a:hover { color: var(--teal); }
.card-text { color: var(--g500); font-size: 0.875rem; margin-bottom: 1rem; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Document cards */
.doc-card { padding: 1.5rem; }
.doc-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.doc-icon {
    width: 3rem; height: 3rem; border-radius: 0.75rem; background: #FEF2F2;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-icon svg { width: 1.5rem; height: 1.5rem; color: #EF4444; }
.doc-card h3 { font-size: 1rem; }
.doc-card .doc-meta { font-size: 0.875rem; color: var(--g400); }

/* --- Events (dark cards) -------------------------------------------------------------- */
.glass-dark {
    background: rgba(0,55,100,0.7);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
}
a.card { display: block; }
a.card.card-hover:hover .card-title { color: var(--teal); }
.event-card { display: block; border-radius: 1rem; padding: 1.5rem; }
a.event-card:hover h3 { color: var(--mint); }
.event-card-inner { display: flex; align-items: flex-start; gap: 1rem; }
.event-date-chip {
    flex-shrink: 0; width: 4rem; height: 4rem; border-radius: 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff;
}
.event-date-chip .d { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.event-date-chip .m { font-size: 0.75rem; text-transform: uppercase; }
.chip-teal { background: linear-gradient(135deg, var(--teal), var(--mint)); box-shadow: 0 8px 20px rgba(0,160,175,0.3); }
.chip-lime { background: linear-gradient(135deg, var(--lime), var(--green-bright)); box-shadow: 0 8px 20px rgba(143,216,74,0.3); }
.chip-sky  { background: linear-gradient(135deg, var(--sky), var(--sky-light)); color: var(--navy); box-shadow: 0 8px 20px rgba(152,209,221,0.3); }
.chip-navy { background: linear-gradient(135deg, var(--navy-light), var(--navy)); box-shadow: 0 8px 20px rgba(0,55,100,0.4); }
.chip-forest { background: linear-gradient(135deg, var(--forest), var(--green-bright)); box-shadow: 0 8px 20px rgba(43,113,63,0.35); }
.chip-mint { background: linear-gradient(135deg, var(--mint), var(--teal)); box-shadow: 0 8px 20px rgba(98,203,201,0.3); }
.event-tag {
    display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px;
    font-size: 0.72rem; font-weight: 700; margin-bottom: 0.5rem;
}
.tag-teal { background: rgba(0,160,175,0.2); color: #3ec7d4; }
.tag-lime { background: rgba(143,216,74,0.2); color: var(--lime); }
.tag-sky  { background: rgba(152,209,221,0.2); color: var(--sky); }
.tag-mint { background: rgba(98,203,201,0.2); color: var(--mint); }
.tag-navy { background: rgba(255,255,255,0.14); color: var(--sky-light); }
.tag-forest { background: rgba(143,216,74,0.16); color: #a5e06f; }
.event-card h3 { color: #fff; font-size: 1.125rem; margin-bottom: 0.35rem; }
.event-meta { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.5); font-size: 0.875rem; margin-top: 0.25rem; }
.event-meta svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.event-desc { color: rgba(255,255,255,0.65); font-size: 0.875rem; margin-top: 0.65rem; }

.blob { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.blob-1 { top: 5rem; left: 2.5rem; width: 18rem; height: 18rem; background: rgba(0,160,175,0.05); }
.blob-2 { bottom: 5rem; right: 2.5rem; width: 24rem; height: 24rem; background: rgba(152,209,221,0.05); }

/* --- Calendar (events page) -------------------------------------------------------------- */
.calendar-wrap { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .calendar-wrap { grid-template-columns: minmax(0, 3fr) minmax(16rem, 1fr); align-items: start; } }
.calendar { border-radius: 1rem; padding: 1.25rem; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-toolbar h2 { color: #fff; font-size: 1.25rem; }
.cal-nav { display: flex; gap: 0.5rem; }
.cal-nav button {
    width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; color: #fff;
    background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.cal-nav button:hover { background: rgba(255,255,255,0.22); }
.cal-nav button svg { width: 1.1rem; height: 1.1rem; }
.cal-nav .cal-today-btn { width: auto; padding: 0 0.8rem; font-size: 0.8rem; font-weight: 700; }
/* minmax(0, 1fr): a long event name can't widen its column (names are cut short with "…") */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.3rem; }
.cal-dow { text-align: center; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.45); padding: 0.4rem 0; }
.cal-day {
    position: relative; min-width: 0; min-height: 6.4rem; border-radius: 0.6rem; padding: 0.35rem 0.4rem;
    background: rgba(255,255,255,0.05); border: 1px solid transparent;
    font-size: 0.8rem; color: rgba(255,255,255,0.75);
    display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem;
    transition: background 0.2s, border-color 0.2s; text-align: left;
}
.cal-day:not(.empty):hover { background: rgba(255,255,255,0.12); }
.cal-day:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.cal-day.empty { background: transparent; pointer-events: none; }
.cal-day.today { border-color: var(--mint); }
.cal-day.selected { background: rgba(0,160,175,0.25); border-color: var(--teal); }
.cal-day .num { font-weight: 700; }
.cal-day.today .num { color: var(--mint); }
.cal-day.past:not(.selected) > * { opacity: 0.5; }   /* days gone by */

/* Category colours on the calendar (light shades for the dark background) - js/calendar.js */
.cal-c-mint  { --c: #62CBC9; }
.cal-c-lime  { --c: #8FD84A; }
.cal-c-sky   { --c: #98D1DD; }
.cal-c-amber { --c: #FCD34D; }
.cal-c-rose  { --c: #F9A8D4; }
.cal-c-slate { --c: #CBD5E1; }

/* Events written into the day: time and name, over two lines at most */
.cal-evs { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.cal-ev {
    display: block; min-width: 0; padding: 0.15rem 0.35rem 0.15rem 0.4rem; border-radius: 0.3rem;
    border-left: 3px solid var(--c); background: rgba(255,255,255,0.09);
    font-size: 0.68rem; line-height: 1.3; color: #fff; overflow-wrap: break-word;
}
.cal-ev .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.cal-ev b { color: var(--c); font-weight: 700; }
/* A narrow day (under ~110px) gives the name both lines; the time is still in the tooltip, the panel
   and for screen readers. (The width measured is inside the day's padding.) */
.cal-day { container-type: inline-size; }
@container (max-width: 95px) { .cal-ev b { display: none; } }
/* The toolbar's high-contrast mode outlines everything inside a button; in a day, keep only the
   event bars and the phone marks */
html.a11y-contrast body .cal-grid .cal-day * { border: 0 !important; }
html.a11y-contrast body .cal-grid .cal-ev { border-left: 3px solid #ffe600 !important; }
html.a11y-contrast body .cal-grid .cal-mark { border: 0.25rem solid #ffe600 !important; }
.cal-ev[data-url]:hover { background: rgba(255,255,255,0.2); }
.cal-more { font-size: 0.66rem; font-weight: 700; color: rgba(255,255,255,0.75); padding-left: 0.45rem; }
/* Phones: too narrow for names, so a coloured mark per event (drawn with a border, which
   the toolbar's high-contrast mode keeps, where it removes backgrounds) */
.cal-marks { display: none; flex-wrap: wrap; gap: 0.2rem; }
.cal-mark { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 0.25rem solid var(--c); }
@media (max-width: 767px) {
    .cal-day { min-height: 3.25rem; }
    .cal-evs { display: none; }
    .cal-marks { display: flex; }
}

/* Key to the colours, under the calendar */
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.9rem; }
.cal-legend:empty { display: none; }
.cal-key { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: rgba(255,255,255,0.75); }
.cal-key::before { content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c); }

.cal-panel { border-radius: 1rem; padding: 1.25rem; min-height: 10rem; scroll-margin-top: 6rem; }
.cal-tag { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.45rem; padding: 0.15rem 0.6rem; border-radius: 9999px;
           font-size: 0.72rem; font-weight: 700; color: var(--c); background: rgba(255,255,255,0.08); }
.cal-tag::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c); }
.cal-panel h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.cal-panel .cal-empty { color: rgba(255,255,255,0.45); font-size: 0.875rem; }
.cal-panel .panel-event { display: block; padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cal-panel .panel-event:last-child { border-bottom: 0; }
.cal-panel .panel-event h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.25rem; transition: color 0.2s; }
.cal-panel a.panel-event:hover h4 { color: var(--mint); }

/* --- Planning ------------------------------------------------------------------------------ */
.planning-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .planning-grid { grid-template-columns: 2fr 1fr; } }
.plan-panel { background: var(--g50); border-radius: 1rem; padding: 1.5rem; border: 1px solid var(--g100); }
@media (min-width: 768px) { .plan-panel { padding: 2rem; } }
.plan-panel-title { display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; margin-bottom: 1.5rem; }
.plan-panel-title > svg, .plan-panel-title > .live-dot { flex-shrink: 0; }  /* icons keep their size beside a long heading */
.live-dot { width: 0.75rem; height: 0.75rem; background: var(--teal); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.plan-list { display: flex; flex-direction: column; gap: 1rem; }
.plan-card { background: #fff; border-radius: 0.75rem; padding: 1.25rem; border: 1px solid var(--g100); }
.plan-card-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.plan-ref { font-size: 0.875rem; color: var(--g400); }
.plan-card h4, .plan-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.plan-card .addr { font-size: 0.875rem; color: var(--g500); margin-bottom: 0.75rem; }
.plan-card-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.plan-card-bottom .when { font-size: 0.75rem; color: var(--g400); }
.plan-card-bottom a { color: var(--teal); font-size: 0.875rem; font-weight: 700; }
.plan-card-bottom a:hover { text-decoration: underline; }

.side-panel {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 1rem; padding: 1.5rem; color: #fff; height: 100%;
}
@media (min-width: 768px) { .side-panel { padding: 2rem; } }
.side-panel h3 { color: #fff; display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; margin-bottom: 1.5rem; }
.side-panel h3 svg { width: 1.5rem; height: 1.5rem; color: var(--sky); flex-shrink: 0; }
.side-panel p { color: rgba(255,255,255,0.7); font-size: 0.875rem; line-height: 1.7; margin-bottom: 1.5rem; }
.side-panel h4 { color: var(--sky); font-size: 0.875rem; margin-bottom: 0.75rem; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 2rem; }
.check-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: rgba(255,255,255,0.7); }
.check-list svg { width: 1rem; height: 1rem; color: var(--lime); flex-shrink: 0; margin-top: 0.15rem; }

/* --- Projects -------------------------------------------------------------------------------- */
.project-card { display: flex; flex-direction: column; }
.project-card .card-body { display: flex; flex-direction: column; flex: 1; }
.project-card .card-text { flex: 1; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.project-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.78rem; color: var(--g400); margin-bottom: 1rem; }
.project-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.project-meta svg { width: 0.95rem; height: 0.95rem; }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
    content: ''; position: absolute; left: 0.45rem; top: 0.4rem; bottom: 0.4rem; width: 2px;
    background: linear-gradient(to bottom, var(--teal), var(--mint));
    border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.75rem; top: 0.4rem;
    width: 0.95rem; height: 0.95rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--mint));
    box-shadow: 0 0 10px rgba(0,160,175,0.4); border: 2.5px solid #fff;
}
.timeline-item .when { font-size: 0.8rem; color: var(--g400); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.timeline-item h3 { font-size: 1.15rem; margin: 0.3rem 0 0.6rem; }
.timeline-item .body { color: var(--g600); font-size: 0.95rem; line-height: 1.7; }
.timeline-item .body p { margin-bottom: 0.75rem; }
.timeline-item .by { margin-top: 0.6rem; font-size: 0.78rem; color: var(--g400); }

.attach-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 640px) { .attach-images { grid-template-columns: repeat(3, 1fr); } }
.attach-images a { display: block; border-radius: 0.6rem; overflow: hidden; border: 1px solid var(--g200); }
.attach-images img { width: 100%; height: 8rem; object-fit: cover; transition: transform 0.4s var(--ease); }
.attach-images a:hover img { transform: scale(1.06); }
.attach-files { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.attach-file {
    display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.85rem;
    background: var(--g50); border: 1px solid var(--g200); border-radius: 0.6rem;
    font-size: 0.85rem; font-weight: 700; color: var(--navy); transition: border-color 0.2s, background 0.2s;
}
.attach-file:hover { border-color: var(--teal); background: rgba(0,160,175,0.06); }
.attach-file svg { width: 1.1rem; height: 1.1rem; color: var(--teal); flex-shrink: 0; }
.attach-file .size { margin-left: auto; color: var(--g400); font-weight: 400; font-size: 0.78rem; }

.project-hero-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; align-items: center; }
.project-hero-meta .badge { font-size: 0.8rem; padding: 0.35rem 0.9rem; }
.project-hero-meta .dates { color: rgba(255,255,255,0.6); font-size: 0.875rem; }

/* --- Split feature (BairnsBank) ----------------------------------------------------------------- */
.split { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; } }
.split-media { position: relative; border-radius: 1.5rem; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,55,100,0.2); }
.split-media img { width: 100%; height: 20rem; object-fit: cover; }
@media (min-width: 1024px) { .split-media img { height: 28rem; } }
.split-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,55,100,0.6), transparent); }
.split-media .glass-caption {
    position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem; z-index: 2;
    background: rgba(255,255,255,0.12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 0.75rem; padding: 1rem;
    color: #fff; font-size: 0.875rem; font-weight: 500;
}
.split-copy h2 { font-size: 1.875rem; margin-bottom: 1.5rem; }
@media (min-width: 640px)  { .split-copy h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .split-copy h2 { font-size: 3rem; } }
.split-copy p { color: var(--g500); margin-bottom: 1.5rem; line-height: 1.7; }
.split-copy p:first-of-type { font-size: 1.125rem; }
.split-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* --- CTA banner ----------------------------------------------------------------------------------- */
.cta-banner { position: relative; padding: 8rem 0; overflow: hidden; }
.cta-banner .bg { position: absolute; inset: 0; }
.cta-banner .bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-banner .bg::after { content: ''; position: absolute; inset: 0; background: rgba(0,42,77,0.75); }
.cta-banner-content { position: relative; z-index: 10; max-width: 56rem; margin: 0 auto; padding: 0 1rem; text-align: center; }
.cta-banner h2 { color: #fff; font-size: 1.875rem; margin-bottom: 1.5rem; }
@media (min-width: 640px)  { .cta-banner h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .cta-banner h2 { font-size: 3rem; } }
.cta-banner p { color: rgba(255,255,255,0.7); font-size: 1.25rem; max-width: 42rem; margin: 0 auto 2.5rem; }
.cta-banner .hero-ctas { margin: 0; }

/* --- Contact ----------------------------------------------------------------------------------------- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.form-grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: 0.75rem 1rem; border-radius: 0.75rem;
    border: 1px solid var(--g200); outline: none; transition: all 0.2s; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,160,175,0.15);
}
.field textarea { resize: vertical; min-height: 8rem; }
.form-note { font-size: 0.8rem; color: var(--g400); margin-top: -0.5rem; margin-bottom: 1.25rem; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.alert { padding: 1rem 1.25rem; border-radius: 0.75rem; margin-bottom: 1.5rem; font-size: 0.95rem; font-weight: 500; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }

.info-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.info-card {
    display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem;
    background: var(--g50); border-radius: 1rem; border: 1px solid var(--g100);
}
.info-icon {
    width: 3rem; height: 3rem; border-radius: 0.75rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.info-icon svg { width: 1.5rem; height: 1.5rem; color: #fff; }
.info-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.info-card a { color: var(--teal); }
.info-card a:hover { text-decoration: underline; }
.info-card p { color: var(--g500); font-size: 0.875rem; }
.info-card p.dim { color: var(--g400); }
.info-card strong { color: var(--navy); }
.info-card .report-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin: 0.6rem 0 0.75rem; }
.info-card .report-list li { position: relative; padding-left: 0.95rem; color: var(--g500); font-size: 0.875rem; }
.info-card .report-list li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--forest); }

/* --- Footer -------------------------------------------------------------------------------------------- */
.site-footer { background: var(--navy); padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.footer-brand img { height: 3rem; width: 3rem; border-radius: 50%; }
.footer-brand .t1 { color: #fff; font-weight: 700; display: block; }
.footer-brand .t2 { color: var(--sky); font-size: 0.875rem; display: block; }
.footer-about { color: rgba(255,255,255,0.5); font-size: 0.875rem; line-height: 1.7; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a { color: rgba(255,255,255,0.5); font-size: 0.875rem; transition: color 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-col a:hover { color: var(--sky); }
.footer-col svg { width: 1rem; height: 1rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem;
    color: rgba(255,255,255,0.3); font-size: 0.875rem; text-align: center;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; text-align: left; } }
.footer-bottom .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.5rem; }
.footer-bottom .site-credit { white-space: nowrap; }
.footer-bottom a { color: rgba(255,255,255,0.3); transition: color 0.2s; }
.footer-bottom a:hover { color: rgba(255,255,255,0.6); }

/* --- Back to top --------------------------------------------------------------------------------------- */
#back-to-top {
    /* sits above the accessibility button in the bottom-right corner */
    position: fixed; bottom: calc(var(--cb-h, 0px) + 5.5rem); right: 1.5rem; z-index: 50;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--teal); color: #fff;
    box-shadow: 0 10px 20px rgba(0,160,175,0.3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(1rem); transition: all 0.3s; pointer-events: none;
}
#back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { background: var(--teal-dark); transform: translateY(-4px); }
#back-to-top svg { width: 1.25rem; height: 1.25rem; }

/* --- Reveal animations ------------------------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal-scale { opacity: 0; transform: scale(0.9); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
/* Phones and portrait tablets (one column): slide up, not in from the side. Starting 60px off to
   the right made the page wider than the screen - a white strip down the right-hand side until
   every panel had been scrolled into view. */
@media (max-width: 1023px) {
    .reveal-left, .reveal-right { transform: translateY(40px); }
}
.reveal.active, .reveal-left.active, .reveal-right.active { opacity: 1; transform: translate(0, 0); }
.reveal-scale.active { opacity: 1; transform: scale(1); }
.stagger-children > * { transition-delay: calc(var(--i, 0) * 0.1s); }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* --- Article (single news post) ------------------------------------------------------------------------------ */
.article-hero-img { border-radius: 1.5rem; overflow: hidden; margin: -3.5rem auto 2.5rem; position: relative; z-index: 15; box-shadow: 0 25px 50px -12px rgba(0,55,100,0.25); }
.article-hero-img img { width: 100%; max-height: 26rem; object-fit: cover; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 2rem; color: var(--g400); font-size: 0.9rem; }
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--g600); }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2, .article-body h3, .article-body h4 { margin: 2rem 0 0.75rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body a { color: var(--teal); text-decoration: underline; }
.article-body img { border-radius: 0.75rem; margin: 1.5rem 0; }
.article-body blockquote { border-left: 4px solid var(--mint); padding: 0.5rem 0 0.5rem 1.25rem; color: var(--g500); font-style: italic; margin-bottom: 1.25rem; }
.article-back { margin-bottom: 2rem; }

/* --- Pagination ------------------------------------------------------------------------------------------------ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 2.5rem; height: 2.5rem; padding: 0 0.75rem; border-radius: 0.6rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700; color: var(--navy);
    border: 1px solid var(--g200); transition: all 0.2s;
}
.pagination a:hover { border-color: var(--teal); color: var(--teal); }
.pagination .current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pagination .gap { border: 0; }

/* --- Filter pills ------------------------------------------------------------------------------------------------ */
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.filter-pill {
    padding: 0.45rem 1.1rem; border-radius: 9999px; font-size: 0.85rem; font-weight: 700;
    border: 1px solid var(--g200); color: var(--g500); transition: all 0.2s; background: #fff;
}
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* --- Empty state ---------------------------------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--g400); }
.empty-state svg { width: 3rem; height: 3rem; margin: 0 auto 1rem; color: var(--g300); }
.empty-state p { font-size: 1rem; }
.section-dark .empty-state { color: rgba(255,255,255,0.5); }
.section-dark .empty-state svg { color: rgba(255,255,255,0.25); }

/* --- Decorative ------------------------------------------------------------------------------------------------------- */
.deco-circle {
    position: absolute; top: 0; right: 0; width: 24rem; height: 24rem;
    background: linear-gradient(to bottom left, rgba(152,209,221,0.1), transparent);
    border-radius: 50%; transform: translate(50%, -50%); pointer-events: none;
}
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* --- Community map ----------------------------------------------------------- */
#community-map {
    height: 60vh; min-height: 420px; width: 100%;
    border-radius: 1rem; overflow: hidden; z-index: 1;
    border: 1px solid var(--g200); box-shadow: 0 10px 25px -5px rgba(0,55,100,0.12);
    background: var(--g100);
}
.map-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.map-filter {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.4rem 0.9rem; border-radius: 9999px;
    font-size: 0.85rem; font-weight: 700; color: var(--g600);
    background: #fff; border: 1px solid var(--g200); cursor: pointer; transition: all 0.2s;
}
.map-filter:hover { border-color: var(--teal); color: var(--teal); }
.map-filter.off { opacity: 0.45; text-decoration: line-through; }
.map-filter .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; flex-shrink: 0; }

/* Leaflet divIcon pins */
.map-pin span {
    display: block; width: 16px; height: 16px; box-sizing: border-box;
    border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
.leaflet-popup-content { margin: 0.85rem 1rem; font-family: 'Lato', system-ui, sans-serif; }
.map-popup img { width: 100%; height: 7rem; object-fit: cover; border-radius: 0.4rem; margin-bottom: 0.5rem; }
.map-popup .cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.map-popup h3 { font-size: 1rem; margin: 0.15rem 0 0.3rem; color: var(--navy); }
.map-popup p { font-size: 0.85rem; color: var(--g600); margin: 0.3rem 0; line-height: 1.5; }
.map-popup a { color: var(--teal); font-weight: 700; }

.map-points-list { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px)  { .map-points-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .map-points-list { grid-template-columns: repeat(3, 1fr); } }
.map-point-card {
    background: #fff; border: 1px solid var(--g100); border-radius: 0.85rem;
    padding: 1.1rem 1.25rem; box-shadow: 0 6px 16px -8px rgba(0,55,100,0.1);
}
.map-point-card .cat-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; font-weight: 700; color: var(--g500); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.map-point-card .cat-badge .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.map-point-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.map-point-card p { font-size: 0.85rem; color: var(--g500); margin-bottom: 0.3rem; }
.map-point-card .pt-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.65rem; font-size: 0.82rem; font-weight: 700; }
.map-point-card .pt-actions a, .map-point-card .pt-actions button { color: var(--teal); display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.map-point-card .pt-actions button:hover, .map-point-card .pt-actions a:hover { color: var(--teal-dark); }

/* Map toolbar + public submission form */
.map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.map-toolbar .map-filters { margin-bottom: 0; }
.submit-panel { background: #fff; border: 1px solid var(--g200); border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 12px 28px -8px rgba(0,55,100,0.15); }
.submit-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.submit-panel-head h2 { font-size: 1.4rem; }
.submit-close { font-size: 1.9rem; line-height: 1; color: var(--g400); width: 2rem; height: 2rem; border-radius: 0.4rem; }
.submit-close:hover { color: var(--navy); background: var(--g100); }
.submit-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .submit-grid { grid-template-columns: 1fr 1fr; } }
#submit-picker, #sg-picker { height: 340px; border-radius: 0.6rem; overflow: hidden; border: 1px solid var(--g200); z-index: 1; background: var(--g100); }
.submit-label { display: block; font-size: 0.875rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.submit-label span { font-weight: 400; color: var(--g400); }
.submit-panel .geo-search { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.submit-panel .geo-search input { flex: 1; padding: 0.6rem 0.85rem; border: 1px solid var(--g200); border-radius: 0.6rem; outline: none; }
.submit-panel .geo-search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,160,175,0.15); }
.submit-form .field { margin-bottom: 0.85rem; }
.submit-form button[type="submit"] { margin-top: 1.5rem; }
.consent-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; color: var(--g600); margin-top: 0.5rem; cursor: pointer; }
.consent-row input { width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--teal); }

/* --- Preview bar (only rendered while holding mode is on) --------------------- */
.preview-bar {
    position: fixed; bottom: 1rem; left: 1rem; z-index: 55;
    display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
    max-width: calc(100vw - 6rem);
    background: rgba(0,42,77,0.94); color: #fff;
    border: 1px solid rgba(255,255,255,0.18); border-radius: 9999px;
    padding: 0.6rem 1.1rem; font-size: 0.82rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.preview-bar strong { color: var(--mint); }
.preview-bar-links { display: flex; gap: 0.75rem; }
.preview-bar a { color: var(--sky); font-weight: 700; text-decoration: underline; white-space: nowrap; }
.preview-bar a:hover { color: #fff; }
@media (max-width: 560px) { .preview-bar { left: 0.75rem; right: 4.5rem; bottom: 0.75rem; max-width: none; font-size: 0.75rem; } }

/* --- "More" dropdown in the desktop nav ------------------------------------- */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-more { display: inline-flex; align-items: center; gap: 0.2rem; cursor: pointer; }
.nav-chev { width: 0.85rem; height: 0.85rem; transition: transform 0.25s; }
.nav-dropdown:hover .nav-chev, .nav-dropdown:focus-within .nav-chev { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: 100%; right: 0; min-width: 12rem;
    background: #fff; border: 1px solid var(--g100); border-radius: 0.75rem;
    box-shadow: 0 14px 34px rgba(0,55,100,0.22); padding: 0.5rem; margin-top: 0.4rem;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 60;
}
/* invisible bridge so the pointer can cross the gap without the menu closing */
.nav-dropdown-menu::before { content: ''; position: absolute; top: -0.6rem; left: 0; right: 0; height: 0.6rem; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown:hover .nav-chev, .nav-dropdown.open .nav-chev { transform: rotate(180deg); }
.nav-dropdown-menu a { display: block; padding: 0.6rem 0.85rem; border-radius: 0.5rem; color: var(--navy); font-size: 0.9rem; font-weight: 500; }
.nav-dropdown-menu a:hover { background: var(--g50); color: var(--teal); }
.nav-dropdown-menu a.active { color: var(--teal); background: rgba(0,160,175,0.08); }
/* small "leaves this site" arrow on external menu links */
.ext-icon { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.35em; vertical-align: -0.05em; opacity: 0.6; }

/* --- Squeeze the desktop nav between 1024–1339px so all items fit ---------- */
@media (min-width: 1024px) and (max-width: 1339px) {
    .nav-links { gap: 0.1rem; }
    .nav-link { padding: 0.5rem 0.5rem; font-size: 0.8rem; }
    .nav-cta { padding: 0.5rem 0.85rem; font-size: 0.8rem; margin-left: 0.2rem; }
}

/* --- Resilience page ---------------------------------------------------------- */
.numbers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
@media (min-width: 640px)  { .numbers-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .numbers-grid { grid-template-columns: repeat(3, 1fr); } }
.number-card {
    display: flex; flex-direction: column; gap: 0.15rem;
    background: #fff; border: 1px solid var(--g200); border-left: 4px solid var(--teal);
    border-radius: 0.75rem; padding: 0.9rem 1.1rem;
    box-shadow: 0 6px 16px -10px rgba(0,55,100,0.12); transition: all 0.25s var(--ease);
}
.number-card:hover { transform: translateY(-3px); border-left-color: var(--navy); box-shadow: 0 12px 24px -10px rgba(0,55,100,0.2); }
.number-card .num-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--g500); }
.number-card .num-tel { font-size: 1.35rem; font-weight: 700; color: var(--navy); }
.number-card .num-note { font-size: 0.78rem; color: var(--g400); }

.tick-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.9rem; color: var(--g600); }
.tick-list li { padding-left: 1.4rem; position: relative; }
.tick-list li::before { content: '✓'; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.tick-list a { color: var(--teal); font-weight: 700; }

.kit-list { display: grid; grid-template-columns: 1fr; gap: 0.45rem; }
@media (min-width: 640px)  { .kit-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kit-list { grid-template-columns: repeat(3, 1fr); } }
.kit-list span {
    background: #fff; border: 1px solid var(--g200); border-radius: 0.6rem;
    padding: 0.55rem 0.8rem 0.55rem 2.2rem; font-size: 0.88rem; color: var(--g600); position: relative;
}
.kit-list span::before { content: '☐'; position: absolute; left: 0.8rem; color: var(--teal); font-weight: 700; }

/* --- Memory Lane ------------------------------------------------------------------ */
.memory-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 640px)  { .memory-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .memory-grid { grid-template-columns: repeat(3, 1fr); } }
.memory-grid.teaser { margin-top: 0; }
.memory-card {
    background: #fff; border: 1px solid var(--g100); border-radius: 1rem; overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,55,100,0.06); margin: 0;
}
.memory-img { display: block; height: 14rem; overflow: hidden; background: var(--g100); }
.memory-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.memory-card:hover .memory-img img { transform: scale(1.05); }
.memory-card figcaption { padding: 1rem 1.25rem 1.25rem; }
.memory-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.mem-meta { font-size: 0.8rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.03em; }
.mem-desc { font-size: 0.875rem; color: var(--g500); margin-top: 0.4rem; }
.mem-credit { font-size: 0.75rem; color: var(--g400); margin-top: 0.5rem; font-style: italic; }

/* Lightbox */
#lightbox {
    position: fixed; inset: 0; z-index: 100; background: rgba(0,23,42,0.92);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    padding: 2.5rem 1rem 1.5rem; cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: min(92vw, 70rem); max-height: 78vh; border-radius: 0.5rem; box-shadow: 0 25px 60px rgba(0,0,0,0.6); cursor: default; }
#lightbox p { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin-top: 1rem; text-align: center; }
#lightbox button {
    position: absolute; top: 1rem; right: 1.25rem; color: rgba(255,255,255,0.8);
    font-size: 2.4rem; line-height: 1; padding: 0.25rem 0.5rem;
}
#lightbox button:hover { color: #fff; }

/* --- Cookie / analytics consent banner ------------------------------------- */
#cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: rgba(0,42,77,0.97); color: #fff;
    border-top: 3px solid var(--teal);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.28);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cb-inner {
    max-width: 80rem; margin: 0 auto; padding: 1.1rem 1.25rem;
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cb-text { flex: 1; min-width: 16rem; }
.cb-text strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.cb-text p { font-size: 0.85rem; line-height: 1.55; color: rgba(255,255,255,0.8); margin: 0; }
.cb-text a { color: var(--sky); text-decoration: underline; }
.cb-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cb-btn {
    padding: 0.7rem 1.4rem; border-radius: 9999px;
    font-size: 0.9rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
/* Accept and reject are deliberately given equal visual weight */
.cb-yes { background: var(--teal); color: #fff; }
.cb-yes:hover { background: var(--teal-dark); }
.cb-no { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.cb-no:hover { background: rgba(255,255,255,0.22); }
.cb-btn:focus-visible { outline: 3px solid #F97316; outline-offset: 2px; }
@media (max-width: 640px) {
    .cb-inner { padding: 1rem; gap: 0.85rem; }
    .cb-actions { width: 100%; }
    .cb-btn { flex: 1; text-align: center; }
}
