/* ==========================================================================
   XÍTER.NET — Design system
   Shared tokens, reset, typography, navigation, buttons and footer.
   Loaded before every page stylesheet.
   ========================================================================== */

:root {
    /* Colour */
    --bg: #08080b;
    --bg-soft: #0c0c10;
    --surface: #111116;
    --surface-2: #16161c;
    --surface-3: #1c1c24;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f5f5f7;
    --text-muted: #a7a7b1;
    --text-dim: #7a7a85;
    --accent: #ff3048;
    --accent-strong: #d9162f;
    --accent-soft: rgba(255, 48, 72, 0.12);
    --accent-line: rgba(255, 48, 72, 0.34);
    --success: #3ddc97;

    /* Type */
    --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
    --step-0: clamp(0.94rem, 0.9rem + 0.16vw, 1.02rem);
    --step-1: clamp(1.08rem, 1.02rem + 0.3vw, 1.25rem);
    --step-2: clamp(1.45rem, 1.28rem + 0.8vw, 1.9rem);
    --step-3: clamp(2rem, 1.55rem + 2.1vw, 3.1rem);
    --step-4: clamp(2.55rem, 1.7rem + 4.2vw, 4.6rem);

    /* Space */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 2.5rem;
    --space-8: 3rem;
    --space-9: 4rem;
    --space-10: 5rem;

    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --wrap: 1220px;
    --header-h: 72px;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -30px rgba(0, 0, 0, 0.9);
    --shadow-2: 0 30px 80px -40px rgba(0, 0, 0, 0.95);
    --glow: 0 0 40px rgba(255, 48, 72, 0.18);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur: 0.26s;
}

/* Reset ------------------------------------------------------------------ */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(70% 45% at 78% -5%, rgba(255, 48, 72, 0.07), transparent 62%),
        radial-gradient(50% 40% at 0% 100%, rgba(255, 48, 72, 0.04), transparent 60%);
}

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

img {
    height: auto;
}

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

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.15;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* Layout ----------------------------------------------------------------- */

.container {
    width: min(100% - (var(--gutter) * 2), var(--wrap));
    margin-inline: auto;
}

.wrap {
    width: min(100% - (var(--gutter) * 2), var(--wrap));
    margin-inline: auto;
}

main {
    display: block;
}

section {
    scroll-margin-top: calc(var(--header-h) + 1rem);
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2000;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--accent-strong);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Typography ------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.35rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.17em;
    line-height: 1;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: var(--text);
    max-width: 100%;
}

.section-title::before {
    content: "";
    display: block;
    width: 32px;
    height: 2px;
    margin-bottom: 1.1rem;
    background: var(--accent);
    border-radius: 2px;
}

.section-title span,
.highlight {
    color: var(--accent);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
    margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.section-head .section-title {
    margin-bottom: 0;
}

/* Links ------------------------------------------------------------------ */

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
    transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-arrow:hover {
    text-decoration-color: var(--accent);
}

.link-arrow .icon {
    width: 0.9em;
    height: 0.9em;
    transition: transform var(--dur) var(--ease);
}

.link-arrow:hover .icon {
    transform: translate(2px, -2px);
}

/* Icons ------------------------------------------------------------------ */

.icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

.icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.78rem 1.3rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--accent-strong);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.005em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 14px 30px -18px rgba(255, 48, 72, 0.8);
    transition:
        transform 0.18s var(--ease),
        background-color 0.18s var(--ease),
        border-color 0.18s var(--ease),
        box-shadow 0.18s var(--ease),
        color 0.18s var(--ease);
}

.btn:hover {
    background: #ea1c36;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.24) inset,
        0 18px 36px -18px rgba(255, 48, 72, 0.9);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(1px) scale(0.995);
}

.btn .icon {
    width: 1rem;
    height: 1rem;
    transition: transform var(--dur) var(--ease);
}

.btn:hover .icon {
    transform: translateX(2px);
}

.btn-secondary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    box-shadow: none;
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    box-shadow: none;
}

/* Remote announcement banner --------------------------------------------- */

.top-banner {
    position: relative;
    z-index: 120;
    padding: 0.72rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.top-banner a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Header ----------------------------------------------------------------- */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 11, 0.72);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

header.is-scrolled {
    background: rgba(8, 8, 11, 0.92);
    border-bottom-color: var(--line);
    box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.9);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    min-height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.logo::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
}

.logo span {
    color: var(--accent);
}

#mainNav ul {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.4vw, 1.3rem);
    list-style: none;
}

#mainNav a:not(.btn) {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.2rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

#mainNav a:not(.btn)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.55rem;
    left: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--dur) var(--ease);
}

#mainNav a:not(.btn):hover {
    color: var(--text);
}

#mainNav a:not(.btn):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

#mainNav .btn {
    min-height: 38px;
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.mobile-menu-btn:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}

.menu-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.menu-icon path {
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
    transform-origin: center;
}

.mobile-menu-btn[aria-expanded="true"] .menu-icon .line-1 {
    transform: translateY(5px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .menu-icon .line-2 {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .menu-icon .line-3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Footer ----------------------------------------------------------------- */

footer {
    position: relative;
    padding: clamp(3.5rem, 7vw, 5rem) 0 1.75rem;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr 1.2fr 1.1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer-column h3 {
    margin-bottom: 1.15rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}

.footer-column p {
    margin-bottom: 0.55rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-column p a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.footer-column p a:hover {
    color: var(--text);
}

.footer-column:first-child h3 {
    margin-bottom: 0.9rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.footer-column:first-child p {
    max-width: 30ch;
}

.footer-column p .icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    color: var(--text-dim);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    transition:
        transform 0.18s var(--ease),
        border-color 0.18s var(--ease),
        background-color 0.18s var(--ease),
        color 0.18s var(--ease);
}

.social-links a:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transform: translateY(-2px);
}

.social-links .icon {
    width: 17px;
    height: 17px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--text-dim);
    font-size: 0.78rem;
    max-width: 100%;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.footer-bottom a:hover {
    color: var(--text);
}

/* Focus ------------------------------------------------------------------ */

:where(a, button, summary, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Motion ----------------------------------------------------------------- */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    [data-enter] .hero-text > * {
        animation: rise 0.7s var(--ease) both;
    }

    [data-enter] .hero-text > *:nth-child(1) {
        animation-delay: 0.04s;
    }

    [data-enter] .hero-text > *:nth-child(2) {
        animation-delay: 0.1s;
    }

    [data-enter] .hero-text > *:nth-child(3) {
        animation-delay: 0.17s;
    }

    [data-enter] .hero-text > *:nth-child(4) {
        animation-delay: 0.24s;
    }

    [data-enter] .hero-text > *:nth-child(5) {
        animation-delay: 0.31s;
    }

    [data-enter] .hero-visual {
        animation: fade 0.9s var(--ease) 0.12s both;
    }
}

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

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .footer-column:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    :root {
        --header-h: 64px;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    #mainNav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        padding: 0.75rem var(--gutter) 1.25rem;
        border-bottom: 1px solid var(--line);
        background: rgba(10, 10, 13, 0.98);
        box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
    }

    #mainNav.active {
        display: block;
    }

    #mainNav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    #mainNav a:not(.btn) {
        width: 100%;
        min-height: 48px;
        border-bottom: 1px solid var(--line);
        font-size: 0.95rem;
    }

    #mainNav a:not(.btn)::after {
        display: none;
    }

    #mainNav .btn {
        width: 100%;
        min-height: 44px;
        margin-top: 0.75rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-column:last-child {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
