@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
    --ink: #1C2B2A;
    --lagoon: #1F6F78;
    --lagoon-deep: #144C53;
    --sand: #F3EEE2;
    --sand-deep: #E9E1CE;
    --clay: #C1542C;
    --clay-deep: #A0431F;
    --foam: #E4EEE9;
    --white: #FFFFFF;
    --amber: #C98A2B;
    --olive: #5F7350;
    --ok: #3D7A4E;
    --line: rgba(28, 43, 42, 0.14);
    --shadow: 0 6px 24px rgba(20, 40, 40, 0.10);
    --radius: 6px;
    --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Public Sans', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--sand);
    line-height: 1.55;
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: 'Zilla Slab', Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--lagoon-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--clay);
    outline-offset: 2px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
}

.brand .brand-mark {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--lagoon);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.brand small {
    display: block;
    font-family: 'Public Sans', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--lagoon-deep);
    letter-spacing: 0.02em;
}

nav.main-nav { display: flex; align-items: center; gap: 28px; }
nav.main-nav a {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.94rem;
}
nav.main-nav a:hover { color: var(--lagoon-deep); text-decoration: none; }

.nav-actions { display: flex; gap: 10px; align-items: center; }

.nav-actions-mobile { display: none; }

.menu-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    font-size: 1.6rem; color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--clay); color: var(--white); }
.btn-primary:hover { background: var(--clay-deep); }
.btn-secondary { background: var(--lagoon); color: var(--white); }
.btn-secondary:hover { background: var(--lagoon-deep); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--lagoon-deep); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--lagoon-deep) 0%, var(--lagoon) 62%, #2C8890 100%);
    color: var(--white);
    padding: 76px 0 96px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 0.85rem;
    color: var(--sand);
    opacity: 0.85;
    margin-bottom: 10px;
}

.hero h1 { color: var(--white); margin-bottom: 0.35em; }
.hero h1 .locality { color: #FFD9BF; }

.hero p.lead {
    color: rgba(255,255,255,0.9);
    font-size: 1.12rem;
    max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-figure {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 10px;
    padding: 26px;
    backdrop-filter: blur(2px);
}

.hero-figure h3 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }

.stat-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-num { font-family: 'Zilla Slab', serif; font-size: 1.5rem; font-weight: 700; color: var(--white); }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.8); }

.tide-divider {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: -1px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--foam); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .kicker { color: var(--clay-deep); font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }

/* ---------- Service grid ---------- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--lagoon);
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    box-shadow: var(--shadow);
}
.service-card.accent-clay { border-left-color: var(--clay); }
.service-card.accent-amber { border-left-color: var(--amber); }
.service-card.accent-olive { border-left-color: var(--olive); }

.service-card h3 { margin-bottom: 6px; font-size: 1.08rem; }
.service-card p { font-size: 0.92rem; color: #3E4C4B; margin-bottom: 14px; }
.service-card a.card-link { font-weight: 600; font-size: 0.9rem; }

/* ---------- CAB sessions ---------- */
.session-list { display: flex; flex-direction: column; gap: 14px; }
.session-item {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
}
.session-date {
    text-align: center;
    background: var(--lagoon-deep);
    color: var(--white);
    border-radius: var(--radius);
    padding: 8px 14px;
    min-width: 64px;
    font-family: 'Zilla Slab', serif;
}
.session-date .day { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.session-date .mon { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.session-item .session-meta { color: #5A6867; font-size: 0.9rem; }

/* ---------- Timeline (tracking) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    position: relative;
    padding: 0 0 28px 34px;
    border-left: 2px solid var(--line);
}
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before {
    content: '';
    position: absolute;
    left: -7px; top: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--line);
    border: 2px solid var(--sand);
}
.timeline li.done::before { background: var(--ok); }
.timeline li.current::before { background: var(--clay); box-shadow: 0 0 0 4px rgba(193,84,44,0.18); }
.timeline li.resolved-final::before {
    background: var(--ok);
    box-shadow: 0 0 0 5px rgba(61,122,78,0.18);
    animation: resolvedPop 0.6s ease;
}
@keyframes resolvedPop {
    0% { transform: scale(0.4); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.timeline .t-status { font-weight: 600; }
.timeline .t-time { font-size: 0.82rem; color: #6A7877; }
.timeline .t-note { font-size: 0.92rem; color: #3E4C4B; margin-top: 4px; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 560px;
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.form-group .hint { font-size: 0.8rem; color: #6A7877; margin-top: 4px; }
input, select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--lagoon);
    box-shadow: 0 0 0 3px rgba(31,111,120,0.15);
}
textarea { resize: vertical; min-height: 110px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    margin-bottom: 18px;
}
.alert-error { background: #FCE8E2; color: #8A2E12; border: 1px solid #F0BFA9; }
.alert-success { background: #E1EFE3; color: #245431; border: 1px solid #B7D8BD; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
}
.badge-submitted { background: #E7E2D3; color: #5A5340; }
.badge-under_review { background: #DCEAF2; color: #1D5A78; }
.badge-referred { background: #EBE0F2; color: #5A2E78; }
.badge-in_progress { background: #FCEBD9; color: #8A5615; }
.badge-resolved { background: #DCEFE0; color: #236B3A; }
.badge-closed { background: #E2E2E2; color: #4A4A4A; }
.badge-rejected { background: #F5DCDC; color: #8A2E2E; }

/* ---------- Footer ---------- */
footer.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.78);
    padding: 48px 0 28px;
    margin-top: 60px;
}
footer.site-footer .container {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}
footer.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 12px; }
footer.site-footer a { color: rgba(255,255,255,0.78); font-size: 0.9rem; }
footer.site-footer a:hover { color: var(--white); }
footer.site-footer .foot-bottom {
    max-width: var(--max-width);
    margin: 32px auto 0;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Utility ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.mt-0 { margin-top: 0; }
.text-muted { color: #5A6867; }

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s cubic-bezier(.22,.61,.36,1), transform 0.65s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; opacity: 1; transform: none; }
}

/* ---------- Hero decoration ---------- */
.hero { isolation: isolate; }
.hero-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}
.hero .container, .hero-figure { position: relative; }

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-14px) translateX(6px); }
}
.hero-decor circle { animation: floatSlow 9s ease-in-out infinite; transform-origin: center; }
.hero-decor circle:nth-child(2) { animation-duration: 12s; animation-delay: -3s; }
.hero-decor circle:nth-child(3) { animation-duration: 7s; animation-delay: -1.5s; }

/* ---------- Card hover lift ---------- */
.service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(20,40,40,0.14);
}
.session-item { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.session-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.btn { transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,40,40,0.18); }

/* ---------- Category icons ---------- */
.card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    background: rgba(31,111,120,0.12);
    color: var(--lagoon-deep);
}
.service-card.accent-clay .card-icon { background: rgba(193,84,44,0.12); color: var(--clay-deep); }
.service-card.accent-amber .card-icon { background: rgba(201,138,43,0.14); color: var(--amber); }
.service-card.accent-olive .card-icon { background: rgba(95,115,80,0.14); color: var(--olive); }
.card-icon svg { width: 22px; height: 22px; }

/* ---------- Status pulse ---------- */
.badge-in_progress, .badge-referred { position: relative; padding-left: 20px; }
.badge-in_progress::before, .badge-referred::before {
    content: '';
    position: absolute; left: 8px; top: 50%;
    width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.5; }
}

/* ---------- How it works steps ---------- */
.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    position: relative;
}
.steps-row::before {
    content: '';
    position: absolute;
    top: 26px; left: 12%; right: 12%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
    z-index: 0;
}
.step-item { position: relative; z-index: 1; text-align: left; }
.step-num {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--lagoon-deep);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Zilla Slab', serif; font-weight: 700; font-size: 1.2rem;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(20,60,64,0.25);
}
.step-item:nth-child(2) .step-num { background: var(--clay); box-shadow: 0 6px 16px rgba(193,84,44,0.25); }
.step-item:nth-child(3) .step-num { background: var(--olive); box-shadow: 0 6px 16px rgba(95,115,80,0.25); }

/* ---------- Mobile floating action button ---------- */
.mobile-fab {
    position: fixed;
    bottom: 18px; left: 50%;
    transform: translate(-50%, 120%);
    z-index: 200;
    display: none;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 24px rgba(20,40,40,0.3);
}
.mobile-fab.show { transform: translate(-50%, 0); }

@media (max-width: 640px) {
    .mobile-fab { display: inline-flex; }
    .steps-row { grid-template-columns: 1fr; gap: 24px; }
    .steps-row::before { display: none; }
}

/* ---------- MP portrait ---------- */
.mp-photo {
    float: left;
    width: 190px;
    margin: 4px 24px 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
    border: 3px solid var(--lagoon);
}
.mp-photo img { display: block; width: 100%; height: auto; }

@media (max-width: 640px) {
    .mp-photo { float: none; display: block; width: 160px; margin: 0 auto 20px; }
}

.mp-avatar-sm {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    background: #000;
    border: 2px solid var(--lagoon);
    flex-shrink: 0;
}

/* ---------- Link pills (social / reference links) ---------- */
.link-pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; clear: left; }
.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.link-pill:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--lagoon);
    color: var(--lagoon-deep);
}
.link-pill svg { width: 16px; height: 16px; }

/* ---------- Points of interest ---------- */
.poi-category { margin-bottom: 36px; }
.poi-category h3 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.05rem;
    margin-bottom: 16px;
}
.poi-category h3 .card-icon { margin-bottom: 0; width: 34px; height: 34px; }
.poi-category h3 .card-icon svg { width: 18px; height: 18px; }
.poi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.poi-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}
.poi-item .poi-name { font-weight: 600; font-size: 0.94rem; margin-bottom: 2px; }
.poi-item .poi-desc { font-size: 0.85rem; color: #5A6867; }

@media (max-width: 640px) {
    .poi-grid { grid-template-columns: 1fr; }
}

/* ---------- iOS install banner ---------- */
.ios-install-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    transform: translateY(100%);
    transition: transform 0.35s ease;
    z-index: 300;
    background: var(--ink);
    color: var(--white);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0,0,0,0.2);
}
.ios-install-banner.show { transform: translateY(0); }
.ios-install-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.ios-install-icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--lagoon);
    display: flex; align-items: center; justify-content: center;
}
.ios-install-text { font-size: 0.88rem; flex: 1; line-height: 1.4; }
.ios-share-glyph {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 7px;
    font-weight: 600;
}
.ios-install-close {
    background: none; border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
}
.ios-install-close:hover { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .hero .container { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    footer.site-footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    nav.main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 20px;
        border-bottom: 1px solid var(--line);
        gap: 14px;
    }
    nav.main-nav.open { display: flex; }
    .menu-toggle { display: block; }
    .nav-actions { display: none; }
    nav.main-nav .nav-actions-mobile { display: flex; gap: 10px; margin-top: 8px; }
    .service-grid { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    footer.site-footer .container { grid-template-columns: 1fr; }
    .hero { padding: 52px 0 72px; }
    .session-item { flex-direction: column; align-items: flex-start; }
}
