:root {
    --bg: #f5f1e8;
    --surface: #fffdf7;
    --surface-2: #ebe5d8;
    --ink: #171914;
    --muted: #6d7066;
    --line: rgba(23, 25, 20, .10);
    --lime: #b9f34b;
    --lime-dark: #86bd25;
    --orange: #ff9b62;
    --red: #ef6657;
    --shadow: 0 18px 45px rgba(28, 32, 18, .09);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 88% 7%, rgba(185,243,75,.22), transparent 24rem),
        radial-gradient(circle at 7% 35%, rgba(255,155,98,.10), transparent 22rem),
        var(--bg);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

body::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    background: rgba(245,241,232,.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(23,25,20,.07);
}

.header-inner {
    max-width: 1440px;
    height: 62px;
    margin: 0 auto;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: "Manrope", sans-serif;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -.055em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--lime);
    transform: rotate(-7deg);
    transition: transform .45s var(--ease);
}

.logo:hover .logo-mark { transform: rotate(5deg) scale(1.08); }

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: .94rem;
    transition: color .25s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 4px;
    border-radius: 10px;
    background: var(--lime);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 17px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700 !important;
    transition: transform .25s var(--ease), background .25s ease;
}

.btn-login:hover {
    color: var(--ink) !important;
    background: var(--lime);
    transform: translateY(-2px);
}

/* Main content */
.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 88px);
}

/* Footer */
.main-footer {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    padding: 30px 20px;
    background: #191b17;
    color: rgba(255,255,255,.68);
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: .84rem;
}

.footer-brand {
    color: #fff;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-links a:hover { color: var(--lime); }

/* HTMX swapping animation */
.htmx-swapping {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}

@media (max-width: 820px) {
    .main-header { padding: 8px 14px; }
    .header-inner { height: auto; min-height: 58px; }
    .nav-links { gap: 16px; }
    .nav-links a:not(.btn-login) { display: none; }
    .btn-login { padding: 9px 13px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}