/* ==========================================================================
   MADALAND — Geist / Vercel design system
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Brand & accent — blue system */
    --ink: #0a2540;
    --primary: #0070f3;
    --on-primary: #ffffff;
    --link: #0070f3;
    --link-deep: #0761d1;
    --link-soft: #d3e5ff;
    --violet: #7928ca;
    --cyan: #50e3c2;
    --pink: #ff0080;
    --magenta: #eb367f;

    /* Surface — cool blue-tinted neutrals */
    --canvas: #f5f8fd;
    --canvas-elevated: #ffffff;
    --hairline-soft: #eef3fb;
    --hairline: #e2e9f5;

    /* Text ladder — cool greys */
    --body: #475569;
    --mute: #64748b;
    --faint: #94a3b8;

    /* Semantic */
    --error: #ee0000;
    --error-deep: #c50000;
    --warning: #f5a623;
    --success: #0070f3;

    /* Brand gradients */
    --gradient-develop-start: #007cf0;
    --gradient-develop-end: #00dfd8;
    --gradient-preview-start: #7928ca;
    --gradient-preview-end: #ff0080;
    --gradient-ship-start: #ff4d4d;
    --gradient-ship-end: #f9cb28;

    /* Spacing (4px base) */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 40px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    --space-section: 128px;

    /* Radius */
    --rounded-none: 0;
    --rounded-sm: 6px;
    --rounded-md: 12px;
    --rounded-lg: 16px;
    --rounded-pill-category: 64px;
    --rounded-pill: 100px;
    --rounded-full: 9999px;

    /* Elevation */
    --shadow-whisper: 0 1px 1px rgba(0, 0, 0, 0.04);
    --shadow-floating: 0 2px 2px rgba(0, 0, 0, 0.04),
        0 8px 16px -4px rgba(0, 0, 0, 0.08);

    /* Layout */
    --container: 1200px;
    --gutter: var(--space-lg);
    --header-height: 64px;

    /* Typography */
    --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Arial, sans-serif;
    --font-mono: "Geist Mono", "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular",
        Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-lg));
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--canvas);
    color: var(--body);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

figure {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-deep);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

strong {
    color: var(--ink);
    font-weight: 600;
}

::selection {
    background: var(--link-soft);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.section-inner {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section-header {
    max-width: 720px;
    margin-bottom: var(--space-2xl);
}

.section-header .section-lead {
    margin-top: var(--space-md);
}

.section-kicker {
    margin-bottom: var(--space-sm);
    color: var(--link);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(28px, 4vw, 32px);
    line-height: 1.25;
    letter-spacing: -0.04em;
}

.section-lead {
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

section {
    padding-block: var(--space-4xl);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--rounded-pill);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.01em;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease,
        border-color 0.15s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--on-primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--link-deep);
    border-color: var(--link-deep);
    color: var(--on-primary);
}

.btn-secondary {
    background-color: var(--canvas-elevated);
    color: var(--ink);
    border-color: var(--hairline);
}

.btn-secondary:hover {
    border-color: var(--mute);
    color: var(--ink);
}

.btn-large {
    min-height: 48px;
    padding: 0 24px;
}

/* App / nav controls: tight 6px squares */
.btn-copy {
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--rounded-sm);
    font-size: 14px;
    width: 100%;
}

/* --------------------------------------------------------------------------
   5. Site header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(245, 248, 253, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--hairline);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    max-width: var(--container);
    min-height: var(--header-height);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--ink);
    border-radius: var(--rounded-full);
}

.brand:hover {
    color: var(--ink);
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--rounded-sm);
    background-color: var(--ink);
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.main-nav {
    margin-inline: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xxs);
}

.nav-link {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--rounded-full);
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background-color: var(--hairline-soft);
    color: var(--ink);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
}

/* Nav CTA: 6px square, not a pill */
.site-header .btn {
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--rounded-sm);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding-block: var(--space-section);
    background-color: var(--ink);
    border-bottom: 1px solid var(--hairline);
}

/* Minecraft photo background — slow Ken Burns zoom */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("images/Capture.PNG");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    pointer-events: none;
    animation: hero-zoom 36s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.1) translate3d(-1.5%, -1%, 0);
    }
}

/* Blue tint + readability gradient */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        100deg,
        rgba(245, 248, 253, 0.97) 0%,
        rgba(245, 248, 253, 0.88) 32%,
        rgba(10, 37, 64, 0.3) 62%,
        rgba(10, 37, 64, 0.6) 100%
    );
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.hero-title {
    margin-top: var(--space-lg);
    font-size: clamp(48px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--ink);
}

.hero-slogan {
    margin-top: var(--space-md);
    color: var(--ink);
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.hero-description {
    max-width: 560px;
    margin-top: var(--space-md);
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.hero-figure {
    position: relative;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    background-color: var(--ink);
    box-shadow: var(--shadow-floating);
}

.hero-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   7. Server info
   -------------------------------------------------------------------------- */

.server-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
}

.server-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    box-shadow: var(--shadow-whisper);
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.server-card-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background-color: var(--hairline-soft);
    flex-shrink: 0;
}

.server-card-title {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.server-card-details {
    display: grid;
    gap: var(--space-md);
    margin: 0;
}

.server-detail {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--hairline);
}

.server-detail-label {
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    text-transform: uppercase;
}

.server-detail-value {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 20px;
    text-align: right;
    word-break: break-all;
}


/* --------------------------------------------------------------------------
   8. About
   -------------------------------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: start;
}

.about-lead {
    color: var(--ink);
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.about-text {
    margin-top: var(--space-md);
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.about-figure {
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    overflow: hidden;
    background-color: var(--hairline-soft);
    box-shadow: var(--shadow-whisper);
}

.about-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.about-caption {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--canvas-elevated);
    border-top: 1px solid var(--hairline);
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
}

/* --------------------------------------------------------------------------
   10a. World Map
   -------------------------------------------------------------------------- */

.world-map {
    background-color: var(--hairline-soft);
    border-block: 1px solid var(--hairline);
}

.world-map-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    overflow: hidden;
    background-color: var(--ink);
    box-shadow: var(--shadow-floating);
}

.world-map-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.world-map-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
}

/* --------------------------------------------------------------------------
   10. Gameplay
   -------------------------------------------------------------------------- */

.gameplay-steps {
    border-top: 1px solid var(--hairline);
}

.gameplay-step {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
    padding-block: var(--space-lg);
    border-bottom: 1px solid var(--hairline);
}

.gameplay-step-number {
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
}

.gameplay-step-title {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.gameplay-step-description {
    max-width: 720px;
    margin-top: var(--space-xs);
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

/* --------------------------------------------------------------------------
   11. Team
   -------------------------------------------------------------------------- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.team-card {
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.team-card:hover {
    box-shadow: var(--shadow-floating);
}

.team-card article {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-lg);
    gap: var(--space-md);
}

.team-figure {
    display: flex;
    justify-content: center;
}

.team-avatar {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-full);
    background-color: var(--hairline-soft);
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xxs);
    flex-grow: 1;
}

.team-name {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
    text-align: center;
}

.team-username {
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    text-align: center;
}

.team-role {
    margin-top: var(--space-xxs);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
    text-transform: uppercase;
}

.team-description {
    margin-top: var(--space-xs);
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   11. Team & content creators
   -------------------------------------------------------------------------- */

.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
    max-width: 1040px;
    margin-inline: auto;
}

.creator-card article {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: var(--space-xl);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    text-align: center;
}

.creator-avatar {
    width: 120px;
    height: 120px;
    margin-bottom: var(--space-md);
    object-fit: cover;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-full);
    background-color: var(--hairline-soft);
}

.creator-name {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.creator-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   12. Sponsors
   -------------------------------------------------------------------------- */

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.sponsor-card article {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    height: 100%;
    padding: var(--space-xl);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
}

.sponsor-featured {
    grid-column: 1 / -1;
}

.sponsor-featured article {
    max-width: 480px;
    width: 100%;
    margin-inline: auto;
    text-align: center;
    align-items: center;
    box-shadow: var(--shadow-whisper);
}

.sponsor-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 168px;
    padding: var(--space-md);
    margin-bottom: var(--space-xs);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    background-color: var(--canvas);
}

.sponsor-logo {
    max-height: 136px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.sponsor-name {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.sponsor-description {
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
    flex-grow: 1;
}

.sponsor-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xxs);
    margin-top: var(--space-xs);
    color: var(--link);
    font-size: 14px;
    font-weight: 500;
}

.sponsor-link::after {
    content: "→";
}

.sponsor-link:hover {
    color: var(--link-deep);
}

.sponsors-cta {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */

.newsletter-form {
    display: grid;
    gap: var(--space-lg);
    max-width: 640px;
    padding: var(--space-xl);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-whisper);
}

.form-field {
    display: grid;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    border: 0;
}

.form-label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.28px;
}

.form-input {
    width: 100%;
    min-height: 40px;
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-sm);
    color: var(--ink);
    font-size: 14px;
    line-height: 20px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
    color: var(--faint);
}

.form-input:hover {
    border-color: #cdd8e8;
}

.form-input:focus {
    outline: none;
    border-color: var(--link);
    box-shadow: 0 0 0 3px var(--link-soft);
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.form-option {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-pill-category);
    background-color: var(--canvas-elevated);
    color: var(--ink);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.form-option:hover {
    border-color: var(--mute);
}

.form-option:has(.form-radio:checked) {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.form-option:has(.form-radio:focus-visible) {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

.form-radio {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ink);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--ink);
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.newsletter-note {
    color: var(--mute);
    font-size: 12px;
    line-height: 16px;
}

/* --------------------------------------------------------------------------
   14. Newsletter band
   -------------------------------------------------------------------------- */

.newsletter {
    background-color: var(--hairline-soft);
    border-block: 1px solid var(--hairline);
}

.newsletter-form {
    max-width: 560px;
}

/* --------------------------------------------------------------------------
   15. FAQ
   -------------------------------------------------------------------------- */

.faq-list {
    display: grid;
    gap: var(--space-sm);
    max-width: 800px;
}

.faq-item {
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.01em;
    list-style: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: "+";
    flex-shrink: 0;
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.faq-item[open] .faq-question::after {
    content: "−";
    color: var(--ink);
}

.faq-question:hover {
    background-color: var(--hairline-soft);
}

.faq-answer {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.faq-answer p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   16. Community
   -------------------------------------------------------------------------- */

.community .section-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    align-items: center;
}

.community-description {
    max-width: 560px;
    margin-top: var(--space-md);
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.community-figure {
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    overflow: hidden;
    background-color: var(--hairline-soft);
    box-shadow: var(--shadow-whisper);
}

.community-image {
    width: 100%;
    aspect-ratio: 12 / 7;
    object-fit: cover;
}

.community-caption {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--canvas-elevated);
    border-top: 1px solid var(--hairline);
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
}

/* --------------------------------------------------------------------------
   17. CTA band
   -------------------------------------------------------------------------- */

.cta {
    border-top: 1px solid var(--hairline);
    text-align: center;
}

.cta .section-inner {
    max-width: 860px;
}

.cta-title {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.cta-description {
    max-width: 640px;
    margin: var(--space-lg) auto 0;
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background-color: var(--canvas);
    border-top: 1px solid var(--hairline);
    padding-block: var(--space-3xl) var(--space-xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(0, 1fr));
    gap: var(--space-3xl) var(--space-xl);
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.brand-footer .brand-logo {
    width: 32px;
    height: 32px;
}

.footer-description {
    max-width: 320px;
    margin-top: var(--space-md);
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
}

.footer-title {
    margin-bottom: var(--space-md);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.footer-title-social {
    margin-top: var(--space-xl);
}

.footer-list {
    display: grid;
    gap: var(--space-xs);
}

.footer-link {
    display: inline-block;
    padding: 2px 0;
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--ink);
}

.footer-discord-text {
    margin-bottom: var(--space-md);
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.footer-social a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-pill);
    background-color: var(--canvas-elevated);
    color: var(--body);
    font-size: 12px;
    line-height: 16px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.footer-social a:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    max-width: var(--container);
    margin-top: var(--space-3xl);
    margin-inline: auto;
    padding: var(--space-lg) var(--gutter) 0;
    border-top: 1px solid var(--hairline);
}

.footer-copyright {
    color: var(--ink);
    font-size: 14px;
    line-height: 20px;
}

.footer-credit {
    color: var(--body);
    font-size: 14px;
    line-height: 20px;
}

.footer-note {
    color: var(--mute);
    font-size: 12px;
    line-height: 16px;
}

/* --------------------------------------------------------------------------
   18b. Pages légales
   -------------------------------------------------------------------------- */

.legal-updated {
    margin-top: var(--space-sm);
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
}

.legal-content {
    max-width: 760px;
}

.legal-content h2 {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--hairline);
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-content h3 {
    margin-top: var(--space-lg);
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.01em;
}

.legal-content p,
.legal-content li {
    font-size: 16px;
    line-height: 24px;
}

.legal-content p,
.legal-content ul {
    margin-top: var(--space-sm);
}

.legal-content ul {
    display: grid;
    gap: var(--space-xs);
}

.legal-content ul li {
    position: relative;
    padding-left: var(--space-lg);
}

.legal-content ul li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 6px;
    width: 5px;
    height: 5px;
    border-radius: var(--rounded-full);
    background-color: var(--faint);
}

.legal-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content code {
    padding: 1px 6px;
    border-radius: 4px;
    background-color: var(--hairline-soft);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
}

.legal-facts {
    display: grid;
    margin: var(--space-md) 0 0;
    padding: var(--space-xs) var(--space-lg);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    box-shadow: var(--shadow-whisper);
}

.legal-fact {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: var(--space-md);
    padding-block: var(--space-sm);
    border-bottom: 1px solid var(--hairline);
}

.legal-fact:last-child {
    border-bottom: 0;
}

.legal-fact dt {
    color: var(--mute);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 24px;
    text-transform: uppercase;
}

.legal-fact dd {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 24px;
    overflow-wrap: anywhere;
}

/* Champ à remplir avant la mise en ligne */
.legal-todo {
    padding: 1px 6px;
    border-radius: 4px;
    background-color: rgba(245, 166, 35, 0.2);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-3xl);
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background-color: var(--canvas-elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--rounded-md);
    box-shadow: var(--shadow-whisper);
}

.contact-card-title {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: -0.02em;
}

.contact-card-text {
    flex-grow: 1;
    color: var(--body);
    font-size: 16px;
    line-height: 24px;
}

.contact-card .btn {
    align-self: flex-start;
    margin-top: var(--space-xs);
}

/* Footer réduit des pages secondaires */
.site-footer-compact {
    padding-block: var(--space-2xl) var(--space-xl);
}

.site-footer-compact .footer-bottom {
    margin-top: var(--space-lg);
}

.footer-legal-nav {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.footer-legal-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-lg);
}

.footer-link[aria-current="page"] {
    color: var(--ink);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .header-inner {
        flex-wrap: wrap;
        padding-block: var(--space-sm);
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-inline: 0;
        padding-top: var(--space-sm);
        border-top: 1px solid var(--hairline);
    }

    .nav-list {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    .hero-inner {
        gap: var(--space-2xl);
    }

    .about-grid,
    .community .section-inner {
        gap: var(--space-2xl);
    }

    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2xl) var(--space-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    section {
        padding-block: var(--space-3xl);
    }

    .hero {
        padding-block: var(--space-4xl);
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-media {
        max-width: 440px;
    }

    .about-grid,
    .community .section-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .server-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .community-figure {
        max-width: 560px;
    }

    .contact-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .gameplay-step {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: var(--space-md);
    }

    .brand-name {
        font-size: 15px;
    }

    .hero-actions .btn,
    .cta-actions .btn,
    .form-actions .btn {
        width: 100%;
    }

    .hero-actions,
    .cta-actions,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .server-card,
    .sponsor-card article,
    .newsletter-form,
    .contact-card {
        padding: var(--space-lg);
    }

    .legal-fact {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-xxs);
    }

    .server-detail {
        flex-direction: column;
        gap: var(--space-xxs);
    }

    .server-detail-value {
        text-align: left;
    }

    .gameplay-step {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-xs);
    }

    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --------------------------------------------------------------------------
   20. Motion & print preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header,
    .hero-actions,
    .cta-actions,
    .form-actions {
        display: none;
    }

    body {
        background-color: #ffffff;
    }
}
