/* ---- tokens ---- */
:root {
    --color-bg: #f7f7f9;
    --color-surface: #ffffff;
    --color-border: #e3e4ea;
    --color-text: #191b23;
    --color-text-muted: #666b78;
    --color-primary: #24306b;
    --color-primary-dark: #171f49;
    --color-primary-tint: #edeff8;
    --color-accent: #b3872f;
    --color-accent-dark: #93701f;
    --color-accent-tint: #faf1de;
    --color-success: #1e7e34;
    --color-success-tint: #e6f4ea;
    --color-danger: #c0392b;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 17, 22, 0.06);
    --shadow-md: 0 8px 24px rgba(23, 31, 73, 0.10);
    --shadow-lg: 0 16px 40px rgba(23, 31, 73, 0.16);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 44px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
a { color: var(--color-primary); }
p { margin: 0 0 12px; }

/* ---- layout ---- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 10;
}
header.site-header .header-inner,
main, .messages-wrap, .footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
header a.brand, footer span.brand {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--color-primary); color: #fff;
    font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: 0.02em;
}
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
nav a { font-weight: 500; font-size: 14px; color: var(--color-text-muted); text-decoration: none; }
nav a:hover { color: var(--color-primary); }
nav .btn { margin-left: 4px; }

main { padding-top: 36px; padding-bottom: 72px; }

/* ---- footer ---- */
footer.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.7); margin-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 28px; }
footer span.brand { color: #fff; margin-bottom: 10px; }
footer .footer-brand p { font-size: 13.5px; color: rgba(255,255,255,0.55); max-width: 320px; }
.footer-col h4 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); margin: 0 0 12px; }
.footer-col a { display: block; color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    max-width: 1080px; margin: 0 auto; padding: 18px 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45); font-size: 12.5px;
}

/* ---- hero ---- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(circle at 15% 20%, #323e82 0%, transparent 45%),
                linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: 16px;
    padding: 56px 48px;
    margin-bottom: 36px;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(120deg, rgba(0,0,0,0.9), transparent 60%);
    mask-image: linear-gradient(120deg, rgba(0,0,0,0.9), transparent 60%);
    pointer-events: none;
}
.hero > * { position: relative; }
.hero .kicker {
    display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: 12px;
    letter-spacing: 0.10em; text-transform: uppercase; color: #e8c887; margin-bottom: 14px;
}
.hero h1 { font-size: 2.6rem; max-width: 640px; }
.hero p.lead { font-size: 1.08rem; max-width: 560px; color: rgba(255,255,255,0.85); font-family: var(--font-body); }
.hero-cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--color-primary); }
.hero .btn-primary:hover { background: var(--color-accent-tint); }
.hero .btn-outline { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.5); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }

/* ---- stats ---- */
.stats-row { display: flex; gap: 16px; margin: 24px 0 8px; flex-wrap: wrap; }
.stat {
    flex: 1 1 160px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.stat-value { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; margin-bottom: 4px; }
.stat-label { display: block; font-size: 13px; color: var(--color-text-muted); }

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 24px 0 40px; }
.step { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px 22px; }
.step-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--color-primary-tint); color: var(--color-primary);
    margin-bottom: 14px;
}
.step-icon svg { width: 22px; height: 22px; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--color-text-muted); font-size: 14px; margin: 0; }

/* ---- project grid / cards ---- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.project-grid .card { margin-bottom: 0; }
.project-grid .card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #d3d6e6; }
.card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.card h3 a { text-decoration: none; color: var(--color-text); }
.card h3 a:hover { color: var(--color-primary); }

/* ---- badges / tags ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-right: 6px; }
.badge-open { background: var(--color-success-tint); color: var(--color-success); }
.badge-slots { background: var(--color-primary-tint); color: var(--color-primary); }
.tag { display: inline-block; background: #f1f1f5; color: #444; border-radius: 999px; padding: 3px 10px; font-size: 12px; margin: 0 6px 6px 0; }

/* ---- forms ---- */
form { max-width: 560px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; margin-top: 14px; }
form input[type=text], form input[type=email], form input[type=password], form input[type=tel],
form input[type=number], form input[type=datetime-local], form textarea, form select {
    width: 100%; padding: 10px 12px; margin: 0 0 4px;
    border: 1px solid var(--color-border); border-radius: 8px;
    background: var(--color-surface); font-size: 14px; font-family: inherit; color: var(--color-text);
    box-sizing: border-box;
}
form input:focus, form textarea:focus, form select:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-tint);
}
form input[type=checkbox] { width: auto; }

/* ---- buttons ---- */
button, .btn {
    background: var(--color-primary); color: white; border: none;
    padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none; display: inline-block;
    transition: background 0.15s ease, transform 0.1s ease;
}
button:hover, .btn:hover { background: var(--color-primary-dark); }
button:active, .btn:active { transform: translateY(1px); }
button[value=reject] { background: #9aa0ab; }
button[value=reject]:hover { background: #7d838d; }

.btn-outline {
    background: transparent; color: var(--color-primary);
    border: 1px solid var(--color-border);
}
.btn-outline:hover { background: var(--color-primary-tint); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.btn-danger { background: var(--color-danger); }
.btn-danger:hover { background: #9c2e22; }
.btn-danger-outline { background: transparent; color: var(--color-danger); border: 1px solid #e8b7b0; }
.btn-danger-outline:hover { background: #fdf0ee; }

.danger-zone {
    border: 1px solid #e8b7b0; border-radius: var(--radius);
    padding: 16px 18px; margin-top: 32px; background: #fdf6f5;
}
.danger-zone h3 { color: var(--color-danger); }

/* ---- data table (admin lists) ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--color-border); }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); background: #fafafc; }
.data-table tr:last-child td { border-bottom: none; }
.data-table-wrap { overflow-x: auto; }

/* ---- search bar ---- */
.search-bar { display: flex; gap: 8px; margin-bottom: 24px; max-width: none; }
.search-bar input[type=text] { flex: 1; margin: 0; }
.search-bar button { flex-shrink: 0; }

/* ---- admin ---- */
.admin-actions { margin: 20px 0; }

/* ---- flash messages ---- */
.messages { list-style: none; padding: 0; margin-top: 24px; }
.messages li {
    padding: 10px 14px; border-radius: 8px; margin-bottom: 8px;
    background: var(--color-accent-tint); color: #6b5300; font-size: 14px;
    border-left: 3px solid var(--color-accent);
}

.muted { color: var(--color-text-muted); font-size: 14px; }
.error { color: var(--color-danger); font-size: 14px; }

/* ---- responsive ---- */
@media (max-width: 780px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .steps { grid-template-columns: 1fr; }
    .hero { padding: 36px 26px; }
    .hero h1 { font-size: 1.9rem; }
    .stats-row { flex-direction: column; }
    .footer-inner { grid-template-columns: 1fr; }
}
