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

:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.82);
    --text-primary: #0f172a;
    --text-secondary: #5b6170;
    --accent-green: #24c17b;
    --accent-blue: #1d4ffe;
    --accent-gradient: linear-gradient(128deg, #1e3dea 0%, #24c7a0 100%);
    --border: rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 30px 60px rgba(15, 23, 42, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition-fast: 0.25s ease;
    --nav-height: 88px;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid rgba(29, 79, 254, 0.6);
    outline-offset: 4px;
}

.page-shell {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-shell::before,
.page-shell::after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(36, 193, 123, 0.25), transparent 70%);
    filter: blur(10px);
    z-index: -1;
}

.page-shell::before {
    top: -200px;
    left: -80px;
}

.page-shell::after {
    bottom: -260px;
    right: -120px;
    background: radial-gradient(circle, rgba(29, 79, 254, 0.25), transparent 70%);
}

.container {
    width: min(1200px, 100% - 40px);
    margin: 0 auto;
}

.page-shell > main {
    flex: 1 1 auto;
}

.page-shell > footer,
.page-shell > .site-footer {
    margin-top: auto;
}

.section-padding {
    padding: 96px 0;
}

.section-heading {
    max-width: 640px;
    margin-bottom: 48px;
}

.hero-section,
.missions-section,
.rating-section,
.reviews-section,
.section-padding {
    scroll-margin-top: 120px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(29, 79, 254, 0.08);
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    font-size: clamp(32px, 5vw, 44px);
    letter-spacing: -0.04em;
    margin: 18px 0 14px;
}

.section-heading p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* NAVIGATION */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: nowrap;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.03em;
    flex: 0 0 auto;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    font-size: 20px;
}

.nav-links {
    display: flex;
    gap: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-wrap: nowrap;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 999px;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.08);
}

.auth-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-chip .tag {
    background: rgba(36, 193, 123, 0.18);
    color: var(--accent-green);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.chip-name {
    font-weight: 600;
    color: var(--text-primary);
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 14px 26px rgba(29, 63, 234, 0.22);
}

.btn-primary.wide {
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(29, 79, 254, 0.3);
}

.btn-primary.large {
    padding: 16px 28px;
    font-size: 16px;
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
}

.btn-ghost.alt {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.12);
}

/* HERO */
.hero-section {
    padding: 120px 0 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero-kicker {
    color: var(--accent-blue);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
}

.hero-content h1 {
    font-size: clamp(42px, 7vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 520px;
    overflow-wrap: anywhere;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.metric-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.metric-card h3 {
    font-size: 32px;
    margin-bottom: 6px;
}

.metric-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

.hero-visual {
    position: relative;
}

.hero-card-stack {
    display: grid;
    gap: 20px;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-card.accent {
    background: #0f172a;
    color: #fff;
    border: none;
}

.hero-card small {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.6);
}

.hero-card.accent small {
    color: rgba(255, 255, 255, 0.7);
}

.hero-card h4 {
    font-size: 20px;
}

.hero-card p {
    color: inherit;
}

.avatar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-row span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(36, 193, 123, 0.18);
    display: grid;
    place-items: center;
    font-weight: 600;
}

.blur-pill {
    position: absolute;
    inset: auto 24px -40px auto;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
}

/* MISSIONS */
.missions-section {
    padding: 40px 0 100px;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.mission-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.mission-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 32px 70px rgba(15, 23, 42, 0.14);
}

.mission-cover {
    width: 100%;
    height: 180px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: linear-gradient(135deg, #d1f6e8, #dce7ff);
}

.mission-cover--fill {
    object-fit: fill;
    background: transparent;
    padding: 0;
}

.mission-tag {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(36, 193, 123, 0.12);
    color: var(--accent-green);
    font-size: 13px;
    font-weight: 600;
}

.mission-title {
    font-size: 24px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.mission-desc {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.mission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.mission-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mission-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mission-footer .btn-primary {
    flex-shrink: 0;
}

.mission-footer strong {
    font-size: 18px;
}

.pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 13px;
    white-space: nowrap;
}

/* RATING */
.rating-section {
    padding: 40px 0 100px;
}

.rating-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.rating-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 16px;
}

.rating-card span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(29, 79, 254, 0.12);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--accent-blue);
}

.rating-card strong {
    font-size: 17px;
}

.rating-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* REVIEWS */
.reviews-section {
    padding: 40px 0 120px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.review-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.review-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(29, 79, 254, 0.12);
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-blue);
}

.review-author {
    font-weight: 600;
}

.review-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.review-body {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 32px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.06);
    text-align: center;
    color: var(--text-secondary);
}

/* FOOTER */
.site-footer {
    background: #0f172a;
    color: #e5ecff;
    padding: 72px 0 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-brand p {
    color: rgba(229, 236, 255, 0.8);
    margin-top: 16px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(229, 236, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(229, 236, 255, 0.7);
}

/* UTILITIES */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 13px;
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
}

.alert-error {
    background: rgba(255, 94, 94, 0.12);
    color: #b3203b;
    border: 1px solid rgba(255, 94, 94, 0.4);
}

/* FORM / MODAL */
.form-backdrop {
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(29, 79, 254, 0.08), transparent 60%), var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.form-dialog {
    width: min(640px, 100%);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin: 0 auto;
}

.form-dialog.wide {
    width: 100%;
}

.form-dialog h1 {
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 12px;
}

.form-dialog p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
}

.form-field input,
.form-field textarea,
.form-field select {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    background: #f9fafc;
    transition: border var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.form-field textarea {
    min-height: 140px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(29, 79, 254, 0.12);
}

.helper-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.choice-pill {
    position: relative;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
}

.choice-pill input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.choice-pill span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    transition: all var(--transition-fast);
}

.choice-pill input:checked + span {
    background: rgba(29, 79, 254, 0.12);
    color: var(--accent-blue);
    border-color: rgba(29, 79, 254, 0.4);
}

/* VOLUNTEER PASSPORT */
.passport-hero {
    padding: 80px 0 30px;
    text-align: center;
}

.passport-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 12px;
}

.passport-hero p {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.passport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.passport-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.passport-card h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.passport-card strong {
    font-size: 26px;
}

.history-list {
    display: grid;
    gap: 18px;
}

.history-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}

.status-chip--approved {
    background: rgba(36, 193, 123, 0.16);
    color: var(--accent-green);
}

.status-chip--pending {
    background: rgba(255, 184, 0, 0.18);
    color: #b67800;
}

.status-chip--rejected {
    background: rgba(255, 92, 92, 0.15);
    color: #d14b4b;
}

.table-shell {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.table-shell table {
    width: 100%;
    border-collapse: collapse;
}

.table-shell th,
.table-shell td {
    padding: 18px 22px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.table-shell th {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.status-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status-form select {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background: #f8f9fc;
    font-size: 14px;
    min-width: 160px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .nav-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-section {
        padding-top: 80px;
    }

    .hero-actions,
    .auth-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .form-dialog {
        padding: 32px;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(100%, 100% - 28px);
    }
    
    .nav-links {
        flex-wrap: wrap;
    }

    .hero-metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .mission-card {
        padding: 22px;
    }

    .form-dialog {
        padding: 24px;
    }

    .table-shell th,
    .table-shell td {
        padding: 14px 16px;
    }
}
