/* =========================================================
   SAMUEL APRIL — GLOBAL SYSTEM
   Clean base styles, shared modal/player, footer, navigation
========================================================= */

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

:root {
    --bg: #090a0b;
    --bg-soft: #0f1113;
    --surface: #151719;
    --surface-light: #202225;

    --text: #eee9e1;
    --muted: #9d968c;

    --accent: #c96a47;
    --accent-bright: #df805d;
    --accent-soft: #f0d2c5;

    --violet: #8f5f50;
    --warm: #f97316;
    --gold: #fbbf24;
    --gold-soft: #fef3c7;

    --glass: rgba(255,255,255,0.06);
    --glass-strong: rgba(255,255,255,0.10);
    --glass-border: rgba(255,255,255,0.11);

    --radius-lg: 34px;
    --radius-md: 24px;
    --radius-pill: 999px;

    --shadow-soft: 0 24px 80px rgba(0,0,0,0.30);
    --shadow-heavy: 0 34px 110px rgba(0,0,0,0.58);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100svh;
    overflow-x: hidden;

    color: var(--text);
    background: var(--bg);

    font-family: "Bricolage Grotesque", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -10;
    pointer-events: none;

    opacity: 0.055;

    background-image:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 76px 76px;
}

body.modal-open {
    overflow: hidden;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

/* Width/height HTML attributes reserve space for CLS, but responsive images
   must keep their intrinsic aspect ratio when CSS changes their width. */
img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1200px, 90%);
    margin-inline: auto;
}

.page {
    opacity: 1;
}

/* =========================================================
   NAVIGATION
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(2,6,23,0.68);
    border-bottom: 1px solid rgba(255,255,255,0.075);
    backdrop-filter: blur(18px);

    transition:
        transform 0.28s ease,
        background 0.28s ease,
        border-color 0.28s ease;
    will-change: transform;
}

.site-header.nav-hidden {
    transform: translateY(-110%);
}

.navbar {
    min-height: 82px;
    display: flex;
    align-items: center;
}

.nav-container,
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;

    color: #ffffff;
    font-weight: 900;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.logo.active {
    color: #df805d;
}


.logo::before {
    content: "";

    width: 10px;
    height: 10px;
    margin-right: 8px;

    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 22px rgb(201 106 71);
}

.logo::before.active {
    background: #df805d;
    box-shadow: 0 0 22px rgb(201 106 71);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 7px;
    border-radius: var(--radius-pill);

    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
}

.nav-link.active {
    color: #fff;
    background: rgb(199 176 201 / 0.27);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgb(107 233 255 / 0.37);
}

.nav-links a {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: 38px;
    padding: 0 14px;

    border-radius: var(--radius-pill);

    color: #b8c5d6;
    font-size: 0.9rem;
    font-weight: 700;

    transition:
        color 0.22s ease,
        background 0.22s ease,
        transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #ffffff;
    background: rgba(201,106,71,0.10);
    transform: translateY(-1px);
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    padding: clamp(64px, 9vw, 110px) 0 44px;

    background:
        radial-gradient(circle at 50% 0%, rgba(201,106,71,0.12), transparent 34%),
        linear-gradient(180deg, #090a0b 0%, #0f1113 100%);

    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 0;

    pointer-events: none;

    opacity: 0.09;

    background-image:
        linear-gradient(rgba(201,106,71,0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,106,71,0.22) 1px, transparent 1px);
    background-size: 70px 70px;

    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.footer-content {
    position: relative;
    z-index: 2;

    width: min(980px, 90%);
    min-height: 300px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);

    overflow: hidden;

    text-align: center;

    border-radius: var(--radius-lg);

    background:
        linear-gradient(180deg, rgba(15,23,42,0.82), rgba(2,6,23,0.76));

    border: 1px solid rgba(255,255,255,0.10);

    box-shadow:
        0 28px 90px rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.05);

    backdrop-filter: blur(22px);
}

.footer-content h3 {
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
    margin-bottom: 14px;
}

.footer-content p {
    color: #a9b7c9;
    line-height: 1.7;
}

.footer-links,
.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 22px;
}

.footer-links a,
.social-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;

    padding: 0 14px;

    border-radius: var(--radius-pill);

    color: #d9d1c6;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.10);

    font-size: 0.86rem;
    font-weight: 800;

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.gram-pin{
    width: 50px;
}

.app-pin {
    width: 50px;
}

.footer-links a:hover,
.social-links a:hover {
    transform: translateY(-2px);
    border-color: rgba(201,106,71,0.34);
    background: rgba(201,106,71,0.10);
}

.copyright {
    margin-top: 28px;
    font-size: 0.82rem;
    color: #7890aa !important;
}

/* =========================================================
   BACK TO TOP
========================================================= */

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 8000;

    width: 48px;
    height: 48px;

    border: 0;
    border-radius: 50%;

    color: #090a0b;
    background: var(--accent-bright);

    font-weight: 900;
    font-size: 1.15rem;

    box-shadow:
        0 18px 48px rgba(201,106,71,0.24),
        0 0 0 1px rgba(255,255,255,0.12);

    opacity: 0;
    pointer-events: none;

    transform: translateY(16px) scale(0.92);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    box-shadow:
        0 22px 60px rgba(201,106,71,0.34),
        0 0 0 1px rgba(255,255,255,0.14);

    transform: translateY(-3px) scale(1);
}

/* =========================================================
   RESPONSIVE GLOBALS
========================================================= */

@media (max-width: 760px) {
    .navbar {
        min-height: auto;
        padding: 15px 0;
    }

    .nav-container,
    .navbar .container {
        flex-direction: column;
        gap: 14px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 22px;
    }

    .nav-links a {
        min-height: 34px;
        font-size: 0.82rem;
        padding: 0 11px;
    }

    .container {
        width: min(100% - 32px, 1200px);
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* =========================================================
   PERFORMANCE GUARDRAILS
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
