/* ============================================================
   MDDE — Medieval Dawn Dragon and Engineering
   Medieval Minecraft Server Website Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-deep:    #080604;
    --bg-dark:    #12100a;
    --bg-stone:   #1c1810;
    --bg-card:    #241f14;
    --border:     #6b4f10;
    --border-dim: #3d2e08;
    --gold:       #c9972a;
    --gold-light: #e8c55a;
    --gold-dim:   #7a5a12;
    --red:        #8b1a1a;
    --red-light:  #c0392b;
    --text:       #e0c98a;
    --text-dim:   #9a856a;
    --text-light: #f5e8c0;
    --white:      #fdf6e3;

    --font-title: 'Cinzel Decorative', 'Cinzel', serif;
    --font-head:  'Cinzel', serif;
    --font-body:  'Crimson Text', Georgia, serif;
    --radius:     4px;
    --shadow:     0 4px 24px rgba(0,0,0,.7);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Noise texture overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--gold-light); line-height: 1.2; }
h1 { font-family: var(--font-title); }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }
p { margin-bottom: 1rem; }

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2rem 0;
    color: var(--gold-dim);
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.divider-icon { font-size: 1.4rem; }

/* ── Section ── */
section { position: relative; z-index: 1; padding: 4rem 1rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.section-title {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    text-align: center;
    margin-bottom: .4rem;
    letter-spacing: .04em;
    text-shadow: 0 0 24px rgba(201,151,42,.35);
}
.section-sub {
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 2.5rem;
}

/* ───────────────────────────────────────────
   NAV
─────────────────────────────────────────── */
#nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(8,6,4,.97) 0%, rgba(8,6,4,.85) 100%);
    border-bottom: 1px solid var(--border-dim);
    backdrop-filter: blur(6px);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: .7rem 1.5rem;
}
.nav-logo {
    font-family: var(--font-title);
    font-size: 1.35rem;
    color: var(--gold-light);
    letter-spacing: .05em;
    text-shadow: 0 0 14px rgba(201,151,42,.5);
}
.nav-logo .logo-accent { color: var(--white); }
.nav-logo .logo-short { display: none; }
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}
.nav-links a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--gold);
    margin: 5px 0;
    transition: .3s;
}

/* ───────────────────────────────────────────
   HERO
─────────────────────────────────────────── */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8,6,4,1) 0%, rgba(8,6,4,0) 15%, rgba(8,6,4,0) 70%, rgba(8,6,4,1) 100%),
        linear-gradient(90deg, rgba(8,6,4,.7) 0%, rgba(8,6,4,0) 50%, rgba(8,6,4,.7) 100%);
    z-index: 1;
}
.hero-bg-img {
    position: absolute;
    inset: 0;
    background: url('../resources/Bef/2026-05-12_18.47.56.png') center/cover no-repeat;
    filter: brightness(.45) saturate(.7);
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1.15); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}
.hero-ornament {
    font-size: 2rem;
    color: var(--gold-dim);
    letter-spacing: .2em;
    display: block;
    margin-bottom: .5rem;
    animation: fadeDown .8s ease both;
}
.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 7vw, 4.0rem);
    font-weight: 700;
    color: var(--gold-light);
    text-shadow:
        0 2px 4px rgba(0,0,0,.8),
        0 0 40px rgba(201,151,42,.4),
        0 0 80px rgba(201,151,42,.15);
    letter-spacing: .06em;
    line-height: 1.15;
    animation: fadeDown .9s .1s ease both;
}
.hero-subtitle {
    font-family: var(--font-head);
    font-size: clamp(.85rem, 2.5vw, 1.15rem);
    color: var(--text-dim);
    letter-spacing: .2em;
    text-transform: uppercase;
    margin: .8rem 0 2rem;
    animation: fadeDown 1s .2s ease both;
}
.hero-ip-box {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(36,31,20,.85);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .7rem 1.4rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
    animation: fadeUp 1s .35s ease both;
}
.hero-ip-label {
    font-family: var(--font-head);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-dim);
}
.hero-ip-value {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--gold-light);
    letter-spacing: .05em;
    cursor: pointer;
    transition: text-shadow .2s;
}
.hero-ip-value:hover { text-shadow: 0 0 12px var(--gold); }
.copy-btn {
    background: var(--border-dim);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-dim);
    padding: .2rem .55rem;
    font-size: .78rem;
    cursor: pointer;
    transition: background .2s, color .2s;
    font-family: var(--font-head);
    letter-spacing: .05em;
}
.copy-btn:hover { background: var(--gold-dim); color: var(--white); }
.copy-btn.copied { background: #1a4a1a; color: #5f9; border-color: #2d6b2d; }

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 1s .45s ease both;
}

/* Buttons */
.btn {
    font-family: var(--font-head);
    font-size: .9rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .7rem 2rem;
    border-radius: var(--radius);
    border: 1px solid;
    cursor: pointer;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, transparent 100%);
    pointer-events: none;
}
.btn-primary {
    background: linear-gradient(180deg, #b8881e 0%, #8b6410 100%);
    border-color: var(--gold);
    color: var(--white);
    box-shadow: 0 0 20px rgba(201,151,42,.25);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #d4a030 0%, #a07820 100%);
    box-shadow: 0 0 30px rgba(201,151,42,.45);
    color: var(--white);
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-secondary:hover {
    background: rgba(107,79,16,.2);
    border-color: var(--gold-dim);
    color: var(--gold-light);
    transform: translateY(-1px);
}

/* ───────────────────────────────────────────
   SERVER STATUS BAR
─────────────────────────────────────────── */
#status-bar {
    background: var(--bg-stone);
    border-top: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
    padding: 1rem 1rem;
    z-index: 1;
}
.status-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.status-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-head);
    font-size: .82rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.status-item .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse 2s infinite;
}
.status-item .dot.offline { background: #e74c3c; box-shadow: 0 0 8px #e74c3c; animation: none; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.status-val { color: var(--gold-light); }

/* ───────────────────────────────────────────
   ABOUT / INTRO
─────────────────────────────────────────── */
#about {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-dark) 100%);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.about-text .lead {
    font-size: 1.3rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.2rem;
}
.about-img-wrap {
    position: relative;
}
.about-img-wrap img {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border-dim);
    filter: brightness(.9) saturate(.85);
    box-shadow: var(--shadow);
}
.about-img-wrap::before {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    pointer-events: none;
}
.corner-ornament {
    position: absolute;
    width: 18px; height: 18px;
    border-color: var(--gold-dim);
    border-style: solid;
    border-width: 0;
}
.corner-ornament.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.corner-ornament.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.corner-ornament.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.corner-ornament.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ───────────────────────────────────────────
   FEATURES
─────────────────────────────────────────── */
#features {
    background: var(--bg-stone);
    border-top: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    position: relative;
    transition: border-color .25s, transform .25s, box-shadow .25s;
}
.feature-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 20px rgba(201,151,42,.08);
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 40%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.feature-icon {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 0 8px rgba(201,151,42,.4));
}
.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: .5rem;
    letter-spacing: .04em;
}
.feature-card p {
    color: var(--text-dim);
    font-size: .97rem;
    margin: 0;
}

/* ───────────────────────────────────────────
   GALLERY
─────────────────────────────────────────── */
#gallery {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-dim);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border-dim);
    aspect-ratio: 16/9;
    cursor: pointer;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(.8) saturate(.75);
    transition: filter .35s, transform .35s;
}
.gallery-item:hover img {
    filter: brightness(1) saturate(1);
    transform: scale(1.05);
}
.gallery-item::after {
    content: '⛶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold);
    opacity: 0;
    background: rgba(0,0,0,.4);
    transition: opacity .3s;
}
.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
#lightbox.open { display: flex; }
#lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(0,0,0,.8);
}
#lightbox-close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-size: 2rem;
    color: var(--text-dim);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color .2s;
}
#lightbox-close:hover { color: var(--gold-light); }

/* ───────────────────────────────────────────
   DOWNLOAD
─────────────────────────────────────────── */
#download {
    background: var(--bg-stone);
    border-top: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
}
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.dl-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color .25s;
}
.dl-card:hover { border-color: var(--gold-dim); }
.dl-card-icon { font-size: 2.5rem; }
.dl-card h3 { font-size: 1.2rem; }
.dl-card p { color: var(--text-dim); font-size: .95rem; flex: 1; }
.dl-version {
    font-family: var(--font-head);
    font-size: .7rem;
    letter-spacing: .1em;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: -.5rem;
}

/* ───────────────────────────────────────────
   RULES
─────────────────────────────────────────── */
#rules {
    background: var(--bg-dark);
}
.rules-list {
    max-width: 700px;
    margin: 0 auto;
    counter-reset: rules;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.rules-list li {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: .9rem 1.2rem .9rem 3.5rem;
    position: relative;
    counter-increment: rules;
    font-size: 1rem;
}
.rules-list li::before {
    content: counter(rules);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--gold-dim);
    font-weight: 700;
    width: 1.6rem;
    text-align: center;
}

/* ───────────────────────────────────────────
   FOOTER
─────────────────────────────────────────── */
footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-dim);
    padding: 2.5rem 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-logo {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--gold-dim);
    margin-bottom: .5rem;
}
footer p {
    color: var(--text-dim);
    font-size: .88rem;
    margin: .2rem 0;
}

/* ───────────────────────────────────────────
   ANIMATIONS
─────────────────────────────────────────── */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ───────────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────────── */
/* ── Language toggle ── */
.lang-btn {
    font-family: var(--font-head);
    font-size: .72rem;
    letter-spacing: .12em;
    background: transparent;
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    color: var(--text-dim);
    padding: .28rem .7rem;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 1rem;
}
.lang-btn:hover {
    background: rgba(107,79,16,.2);
    border-color: var(--gold-dim);
    color: var(--gold-light);
}

@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-img-wrap { order: -1; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(8,6,4,.98); padding: 1rem 1.5rem 1.5rem; gap: 1rem; border-bottom: 1px solid var(--border-dim); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .status-inner { gap: 1.5rem; }
    .hero-ip-box { flex-direction: column; gap: .5rem; }
    .nav-logo .logo-full { display: none; }
    .nav-logo .logo-short { display: inline; }
}
