@font-face {
    font-family: 'Manrope';
    src: url('fonts/manrope-variable.woff2') format('woff');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FleurDeLeah';
    src: url('fonts/fleur-de-leah.woff2') format('woff');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #ffffff;
    --text-color: #1f2937;
    --primary-color: #6366f1; /* indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #f3f4f6; /* light grey */
    --secondary-text: #374151;
    --border-color: #e5e7eb;
    --accent-amber: #f59e0b;
    --accent-teal: #14b8a6;
}

/* Dark theme overrides when body has .dark class */
body.dark {
    --bg-color: #0e1420;
    --text-color: #f3f4f6;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #1f2937;
    --secondary-text: #d1d5db;
    --border-color: #374151;
}

body {
    margin: 0;
    font-family: 'Manrope', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Navigation bar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

#site-logo {
    width: 165px;
}

.logo .badge {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.1rem 0.5rem;
    margin-left: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.logo-font {
    font-family: 'FleurDeLeah', 'Manrope', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

#theme-toggle {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--secondary-color);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#theme-toggle:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

#theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 512px) {
    .nav-links {
        display: none;
    }

    .nav-actions {
        justify-content: flex-end;
    }

    #theme-toggle {
        padding: 0.45rem 0.75rem;
    }
}

/* Hero section */
.hero {
    padding: 4rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--bg-color) 50%);
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 0;
}

.hero::before {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-teal));
    top: -140px;
    right: -120px;
}

.hero::after {
    width: 260px;
    height: 260px;
    background: linear-gradient(135deg, var(--accent-amber), var(--primary-hover));
    bottom: -100px;
    left: -80px;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin: 0.25rem 0 1rem;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--secondary-text);
    text-align: left;
}

.hero-actions .btn {
    margin: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 100%;
    height: 100%;
}

.hero-copy {
    text-align: left;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    padding: 4px 32px 4px 16px !important;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}

.eyebrow .small {
    margin-top: 2px;
    width: 32px;
    height: 32px;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.icon-circle.small {
    width: 32px;
    height: 32px;
}

.icon-circle svg {
    width: 22px;
    height: 22px;
}

.hero-highlights {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.highlight {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    backdrop-filter: blur(4px);
}

.highlight-title {
    margin: 0;
    font-weight: 700;
}

.highlight-desc {
    margin: 0.25rem 0 0;
    color: var(--secondary-text);
    font-size: 0.95rem;
}

.hero-visual {
    position: relative;
}

@media (max-width: 1024px) {
    .hero-inner {
        display: block;
    }

    .hero-visual {
        display: none;
    }
}

.photo-stack {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.photo-frame {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    transform: rotate(-4deg);
}

.photo-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-frame.primary {
    transform: rotate(-2deg);
}

.photo-frame.secondary {
    position: absolute;
    top: 12%;
    right: -6%;
    width: 55%;
    transform: rotate(6deg);
    filter: saturate(1.05) brightness(1.05);
}

.photo-frame figcaption {
    position: absolute;
    bottom: 0.5rem;
    left: 0.75rem;
    padding: 0.35rem 0.65rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.floating-card {
    position: absolute;
    bottom: -1.5rem;
    left: -1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.05rem;
    border-radius: 0.95rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.floating-title {
    margin: 0;
    font-weight: 700;
    text-align: left;
}

.floating-desc {
    margin: 0.2rem 0 0;
    color: var(--secondary-text);
    font-size: 0.95rem;
}

.floating-card .icon-circle {
    background: rgba(20, 184, 166, 0.16);
    color: var(--accent-teal);
}

/* Feature section */
.features {
    padding: 3rem 1.5rem;
    background-color: var(--secondary-color);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon title"
        "text text";
    column-gap: 0.65rem;
    row-gap: 0.45rem;
    align-items: center;
}

.feature h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    align-self: center;
    grid-area: title;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    background: rgba(99, 102, 241, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.18);
    align-self: center;
    grid-area: icon;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature p {
    grid-area: text;
    margin: 0.35rem 0 0;
}

/* Why section */
.why {
    padding: 3rem 1.5rem;
}

.why h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.why-item {
    background-color: var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.why-item h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Join section */
.join {
    padding: 3rem 1.5rem;
    background-color: var(--secondary-color);
    text-align: center;
}

.join h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.join p {
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--secondary-text);
}

.join-actions .btn {
    margin: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.join {
    position: relative;
    overflow: hidden;
}

.join::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 50% 10%, rgba(99, 102, 241, 0.12), transparent 55%);
    z-index: 0;
}

.join > * {
    position: relative;
    z-index: 1;
}

/* Servers page */
.servers {
    padding: 3.5rem 1.5rem 4rem;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--bg-color) 75%);
}

.servers-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.servers-header {
    text-align: center;
    display: grid;
    gap: 0.35rem;
    justify-items: center;
}

.servers-kicker {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.servers h1 {
    margin: 0.35rem 0 0.15rem;
    font-size: 2.1rem;
    font-weight: 800;
}

.servers-lede {
    margin: 0;
    max-width: 760px;
    color: var(--secondary-text);
    font-size: 1.05rem;
}

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

.server-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.server-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
}

.server-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.server-body {
    padding: 1rem 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.server-tag {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--secondary-text);
}

.server-name {
    margin: 0;
    font-size: 1.2rem;
}

.server-desc {
    margin: 0 0 0.5rem;
    color: var(--secondary-text);
    font-size: 0.95rem;
}

.server-footer {
    padding: 1rem 1.2rem 1.2rem;
    margin-top: auto;
}

.server-footer .btn {
    width: 100%;
    box-sizing: border-box;
    display: block;
    text-align: center;
}

@media (max-width: 640px) {
    .servers {
        padding: 2.5rem 1.1rem 3rem;
    }

    .servers h1 {
        font-size: 1.9rem;
    }
}

.donate {
    padding: 3.5rem 1.5rem 4rem;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(99, 102, 241, 0.04) 100%);
    position: relative;
    overflow: hidden;
}

.donate::before,
.donate::after {
    content: "";
    position: absolute;
    filter: blur(90px);
    opacity: 0.55;
    transform: translateZ(0);
}

.donate::before {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 30% 30%, rgba(79, 70, 229, 0.3), transparent 60%);
    top: -80px;
    left: -60px;
}

.donate::after {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at 70% 70%, rgba(20, 184, 166, 0.3), transparent 60%);
    bottom: -80px;
    right: -40px;
}

.donate-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.75rem;
}

.donate-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.donate-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.4rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.donate h2 {
    font-size: 2rem;
    margin: 0.75rem 0 0.5rem;
    font-weight: 800;
}

.donate-lede {
    margin: 0 auto;
    color: var(--secondary-text);
    font-size: 1.05rem;
}

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

.donate-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    padding: 1.75rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
}

.donate-card.primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.05));
    border-color: rgba(99, 102, 241, 0.2);
}

.donate-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.donate-card p {
    margin: 0;
    color: var(--secondary-text);
}

.donate-card-head {
    display: grid;
    gap: 0.6rem;
    justify-items: center;
    flex-grow: 2;
}

.donate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.donate-icon.patreon {
    width: 200px;
    height: 60px;
}

.donate-icon.stripe {
    width: 100px;
    height: 60px;
}

.donate-icon.patreon svg {
    width: 220px;
}

.donate-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.donate-card .btn {
    align-self: center;
}

.btn-dropdown {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.btn-dropdown .dropdown-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid var(--primary-color);
}

.btn-dropdown .dropdown-toggle {
    padding-top: 8px;
    padding-bottom: 12px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.btn-dropdown .dropdown-toggle .chevron {
    font-size: 2rem;
    line-height: 1;
}

.btn-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% - 210px);
    right: 0;
    min-width: 220px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 0.35rem 0;
    display: none;
    z-index: 2;
}

.btn-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    word-break: keep-all;
}

.btn.primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn.large {
    font-size: 1.125rem;
}

/* Footer */
.site-footer {
    background-color: var(--bg-color);
    color: var(--secondary-text);
    padding: 2rem 1.5rem;
    text-align: center;
}

.site-footer .links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.25rem;
    font-weight: 500;
}

.site-footer .links a:hover {
    text-decoration: underline;
}

/* Responsive typography */
@media (max-width: 600px) {
    .hero {
        padding: 3rem 1.25rem;
    }
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-copy {
        text-align: left;
    }
    .hero-highlights {
        grid-template-columns: 1fr;
    }
    .photo-frame.secondary {
        position: relative;
        width: 70%;
        margin: 0.75rem auto 0;
        right: 0;
        top: 0;
    }
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .features h2,
    .why h2,
    .join h2,
    .donate h2 {
        font-size: 1.75rem;
    }
}
