/* ===================================
   ABC Circle — Join the Network Page
   Unified Ivory/Teal Institutional Theme
   =================================== */

:root {
    --ivory: #FAFAF7;
    --surface: #FFFFFF;
    --teal-dark: #1A3A3A;
    --teal-mid: #2A5555;
    --teal-accent: #3D7A7A;
    --teal-light: #E8F0EF;
    --teal-subtle: #F2F7F6;
    --border: #E2E0DB;
    --border-dark: #C8C4BD;
    --text: #1C1C1C;
    --text-mid: #3A3A3A;
    --muted: #6B6B6B;
    --error: #C0392B;
    --success: #27AE60;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius: 4px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    background: var(--ivory);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--teal-light); color: var(--teal-dark); }

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    padding: 1.25rem 0;
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s var(--ease);
}

.nav.scrolled {
    padding: 0.875rem 0;
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 0.5rem; }

.logo-mark {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--teal-dark);
    background: var(--teal-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.nav-menu { display: flex; align-items: center; gap: 2.25rem; }

.nav-menu a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.3s var(--ease);
}

.nav-menu a:hover { color: var(--text); }

.nav-cta {
    background: var(--teal-dark) !important;
    color: var(--surface) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius);
    font-weight: 600 !important;
}

.nav-cta:hover { background: var(--teal-mid) !important; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); padding: 0.5rem 0; padding-top: 0.75rem; margin-top: 0; z-index: 9999; }
.nav-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu li { list-style: none; }
.dropdown-menu a { display: block; padding: 0.625rem 1.25rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted) !important; background: none !important; transition: all 0.2s ease; }
.dropdown-menu a:hover { color: var(--teal-dark) !important; background: var(--teal-subtle) !important; padding-left: 1.5rem; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 9001;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s var(--ease);
}

/* ===== BADGES & BUTTONS ===== */
.badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--teal-dark);
    background: var(--teal-light);
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    border: 1px solid rgba(26,58,58,0.08);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.btn-primary {
    background: var(--teal-dark);
    color: var(--surface);
}

.btn-primary:hover {
    background: var(--teal-mid);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,58,58,0.15);
}

.btn-outline {
    background: transparent;
    color: var(--teal-dark);
    border: 1.5px solid var(--border-dark);
}

.btn-outline:hover {
    border-color: var(--teal-dark);
    transform: translateY(-2px);
}

.btn-lg { padding: 1.125rem 2.5rem; font-size: 1rem; }

/* ===== PAGE HERO ===== */
.page-hero {
    position: relative;
    padding: 11rem 0 5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 50% 30%, var(--teal-subtle), transparent 60%);
}

.hero-content {
    position: relative;
    max-width: 640px;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--teal-dark);
    margin-bottom: 1.5rem;
}

.text-accent { color: var(--teal-accent); }

.page-subtitle {
    font-size: 1.0625rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 520px;
}

/* ===== FORM SECTION ===== */
.form-section {
    padding: 5rem 0 6rem;
    background: var(--ivory);
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: clamp(2rem, 5vw, 3.5rem);
    max-width: 760px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.form-header h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--teal-dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.form-header p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.7;
}

.required-mark {
    color: var(--error);
    font-weight: 600;
}

/* ===== FORM FIELDS ===== */
.join-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-half {
    max-width: 50%;
}

.form-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-mid);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--ivory);
    color: var(--text);
    transition: all 0.3s var(--ease);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal-accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(61,122,122,0.08);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.06);
}

.field-hint {
    font-size: 0.6875rem;
    color: var(--muted);
    font-style: italic;
}

/* ===== CHECKBOX GROUP ===== */
.checkbox-group {
    border: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--text-mid);
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.checkbox-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--teal-accent);
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== AGREEMENTS ===== */
.form-agreements {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-agreements h4 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--teal-dark);
    margin-bottom: 1.25rem;
}

.agreement-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.agreement-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 0.2rem;
    accent-color: var(--teal-accent);
    flex-shrink: 0;
    cursor: pointer;
}

.agreement-item label {
    font-size: 0.8125rem;
    color: var(--text-mid);
    line-height: 1.6;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

/* ===== SUBMIT ===== */
.form-submit {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.submit-note {
    font-size: 0.6875rem;
    color: var(--muted);
    font-style: italic;
}

/* ===== SUCCESS STATE ===== */
.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    color: var(--success);
    margin-bottom: 1.5rem;
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--teal-dark);
    margin-bottom: 0.75rem;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 440px;
    margin: 0 auto 2rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 4rem 0 2rem;
    background: var(--ivory);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}



.footer-brand p {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 320px;
}

.footer-nav-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.625rem; }

.footer-col a {
    font-size: 0.8125rem;
    color: var(--muted);
    transition: all 0.3s var(--ease);
}

.footer-col a:hover { color: var(--teal-dark); padding-left: 4px; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom > p { font-size: 0.6875rem; color: var(--border-dark); }

.portal-link {
    font-size: 0.625rem;
    color: var(--border-dark);
    border: 1px solid var(--border);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius);
    transition: all 0.3s var(--ease);
}

.portal-link:hover { color: var(--muted); border-color: var(--border-dark); }
.portal-link span { opacity: 0.6; font-style: italic; }

/* ===== ANIMATIONS ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; max-width: 340px;
        height: 100vh; height: 100dvh;
        background: var(--surface);
        border-left: 1px solid var(--border);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s var(--ease);
        z-index: 9000;
        box-shadow: -8px 0 32px rgba(0,0,0,0.05);
    }

    .nav-menu.active { right: 0; }
    .nav-toggle { display: flex; }

    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    .page-hero { padding: 9rem 0 3.5rem; }
    .page-title { font-size: 2.25rem; }

    .form-row-2 { grid-template-columns: 1fr; }
    .form-group-half { max-width: 100%; }
    .form-card { padding: 2rem; }

    .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .page-hero { padding: 8rem 0 3rem; }
    .page-title { font-size: 1.875rem; }
    .form-card { padding: 1.5rem; }
    .btn-lg { padding: 1rem 1.75rem; font-size: 0.875rem; }
}

/* ===== ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--teal-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    [data-animate] { opacity: 1; transform: none; }
}

/* ===== UNIT COST REFERENCE NOTE (Partner Sponsor page) ===== */
.unit-cost-note {
    margin-bottom: 2rem;
    padding: 1.125rem 1.5rem;
    background: var(--teal-subtle);
    border: 1px solid var(--teal-light);
    border-left: 3px solid var(--teal-accent);
    border-radius: 6px;
}

.unit-cost-note-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.unit-cost-note-inner svg {
    color: var(--teal-accent);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.unit-cost-note-inner div {
    font-size: 0.8125rem;
    color: var(--text-mid);
    line-height: 1.7;
}

.unit-cost-note-inner strong {
    color: var(--teal-dark);
}

.unit-cost-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--teal-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.unit-cost-link:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .unit-cost-note {
        padding: 1rem 1.125rem;
    }
    .unit-cost-note-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Transport sponsorship note within unit cost callout */
.unit-cost-transport {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--teal-dark);
}

/* ===== COMPASSION SIP NAV HIGHLIGHT ===== */
.nav-sip-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--teal-dark);
    color: #fff !important;
    padding: 0.4rem 0.875rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.25s ease;
}
.nav-sip-link:hover {
    background: var(--teal-mid);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 58, 58, 0.25);
}
.nav-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.4rem;
    border-radius: 8px;
    line-height: 1.4;
}
