:root {
    --color-main: #062925;
    --color-secondary: #044a42;
    --color-tertiary: #3a9188;
    --color-light: #b8e1dd;
    --ink: #f2fbfa;
    --muted: rgba(184, 225, 221, 0.72);
    --soft: rgba(184, 225, 221, 0.12);
    --panel: rgba(4, 22, 20, 0.76);
    --line: rgba(184, 225, 221, 0.18);
    --shadow: rgba(0, 0, 0, 0.58);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;
    background: #020706;
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

button {
    font: inherit;
}

.page-bg,
.page-bg__motion,
.page-bg__shade,
.page-bg__grid {
    position: fixed;
    inset: 0;
}

.page-bg {
    z-index: 0;
    overflow: hidden;
    background: var(--color-main);
}

.page-bg__motion {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transform: scale(1.04);
}

.page-bg__shade {
    background:
        radial-gradient(circle at 18% 22%, rgba(58, 145, 136, 0.42), transparent 26rem),
        radial-gradient(circle at 72% 74%, rgba(184, 225, 221, 0.16), transparent 24rem),
        linear-gradient(90deg, rgba(2, 7, 6, 0.9), rgba(6, 41, 37, 0.64) 50%, rgba(2, 7, 6, 0.92));
}

.page-bg__grid {
    background:
        linear-gradient(rgba(184, 225, 221, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 225, 221, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
    opacity: 0.58;
}

.entry-gate {
    position: fixed;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    inset: 0;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(58, 145, 136, 0.24), transparent 28rem),
        rgba(2, 7, 6, 0.96);
    text-align: center;
    transition: opacity 420ms ease, visibility 420ms ease;
}

.entry-gate::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(6, 41, 37, 0.72), transparent 22rem),
        #020706;
    content: "";
    opacity: 1;
    pointer-events: none;
    transition: opacity 700ms ease, visibility 700ms ease;
}

.entry-gate.is-menu-ready::before {
    visibility: hidden;
    opacity: 0;
}

.entry-gate.is-open {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.logo-transition {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: min(72vw, 560px);
    min-width: 240px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    filter: drop-shadow(0 0 34px rgba(58, 145, 136, 0.3));
    transform: translate(-50%, -50%);
    animation: logo-transition-stage 5.2s ease forwards;
}

.logo-transition__image,
.logo-transition__scan {
    position: absolute;
    inset: 0;
}

.logo-transition__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    user-select: none;
    pointer-events: none;
}

.logo-transition__image--old {
    animation: old-logo-collapse 4.2s steps(1, end) forwards;
}

.logo-transition__image--old-red,
.logo-transition__image--old-cyan,
.logo-transition__image--new-slice {
    opacity: 0;
    mix-blend-mode: screen;
}

.logo-transition__image--old-red {
    filter: hue-rotate(105deg) saturate(2.6) brightness(1.2);
    animation: old-logo-red-glitch 4.2s steps(1, end) forwards;
}

.logo-transition__image--old-cyan {
    filter: hue-rotate(155deg) saturate(2.4) brightness(1.45);
    animation: old-logo-cyan-glitch 4.2s steps(1, end) forwards;
}

.logo-transition__image--new {
    opacity: 0;
    animation: new-logo-reveal 4.2s steps(1, end) forwards;
}

.logo-transition__image--new-slice {
    filter: brightness(1.35) saturate(1.35);
    animation: new-logo-slice 4.2s steps(1, end) forwards;
}

.logo-transition__scan {
    background: linear-gradient(90deg, transparent, rgba(184, 225, 221, 0.9), transparent);
    height: 2px;
    top: 50%;
    bottom: auto;
    opacity: 0;
    box-shadow: 0 0 22px var(--color-light);
    animation: logo-scan 4.2s steps(1, end) forwards;
}

.entry-gate__eyebrow,
.kicker,
.season-panel__tag {
    margin: 0;
    color: var(--color-light);
    font: 800 12px/1.2 Consolas, "Courier New", monospace;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.entry-gate h1 {
    max-width: 780px;
    margin: 16px 0 28px;
    font-weight: 700;
    font-size: clamp(32px, 8vw, 80px);
    line-height: 0.95;
    text-transform: uppercase;
}

.entry-menu {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transform: translateY(14px);
    visibility: hidden;
}

.entry-menu::before {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: min(74vw, 760px);
    aspect-ratio: 1.65 / 1;
    background: radial-gradient(ellipse at center, rgba(58, 145, 136, 0.34), rgba(6, 41, 37, 0.18) 42%, transparent 72%);
    content: "";
    filter: blur(10px);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.entry-gate.is-menu-ready .entry-menu {
    animation: entry-copy-reveal 620ms ease forwards;
    visibility: visible;
}

.primary-button,
.language-toggle {
    border: 1px solid rgba(184, 225, 221, 0.36);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(58, 145, 136, 0.34), rgba(4, 74, 66, 0.72));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.primary-button {
    min-width: min(100%, 240px);
    padding: 16px 28px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.primary-button:hover,
.primary-button:focus-visible,
.language-toggle:hover,
.language-toggle:focus-visible {
    border-color: rgba(184, 225, 221, 0.82);
    outline: none;
    background: linear-gradient(180deg, rgba(58, 145, 136, 0.52), rgba(4, 74, 66, 0.9));
    transform: translateY(-1px);
}

.language-toggle {
    position: fixed;
    z-index: 30;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    padding: 10px 14px;
    color: rgba(242, 251, 250, 0.86);
    font-size: 13px;
    font-weight: 700;
    visibility: hidden;
    opacity: 0;
}

.entry-gate.is-menu-ready ~ .language-toggle {
    visibility: visible;
    opacity: 1;
}

.reveal-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 940px) minmax(320px, 420px);
    align-content: center;
    align-items: center;
    justify-content: center;
    width: min(100%, 1540px);
    min-height: 100svh;
    margin: 0 auto;
    gap: clamp(28px, 4vw, 64px);
    direction: ltr;
    padding:
        max(74px, env(safe-area-inset-top))
        max(18px, 4vw)
        max(24px, env(safe-area-inset-bottom));
}

body.is-arabic .entry-menu,
body.is-arabic .hero__copy,
body.is-arabic .season-panel,
body.is-arabic .special-thanks,
body.is-arabic .dev-team {
    direction: rtl;
}

body.is-arabic .entry-menu,
body.is-arabic .hero__copy,
body.is-arabic .season-panel,
body.is-arabic .special-thanks__copy,
body.is-arabic .dev-team__intro,
body.is-arabic .dev-team__group-title,
body.is-arabic .dev-card {
    text-align: center;
}

body.is-arabic .hero__intro,
body.is-arabic .dev-team__intro p {
    margin-right: auto;
    margin-left: auto;
}

body.is-arabic .countdown,
body.is-arabic .countdown__labels {
    direction: ltr;
}

.hero {
    max-width: 940px;
}

.hero__brand {
    display: grid;
    grid-template-columns: minmax(190px, 330px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 4vw, 42px);
}

.hero__logo-mark {
    width: 100%;
    min-width: 0;
    filter: drop-shadow(0 0 44px rgba(58, 145, 136, 0.24));
}

.hero__copy h1 {
    max-width: 860px;
    margin: 12px 0 0;
    font-weight: 700;
    font-size: clamp(32px, 5.8vw, 70px);
    line-height: 0.98;
    text-transform: uppercase;
}

.hero__intro {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.55;
}

.countdown {
    max-width: 940px;
    margin-top: clamp(28px, 6vw, 64px);
    padding-top: clamp(18px, 3vw, 26px);
    border-top: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}

.countdown__header,
.countdown__labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.countdown__header {
    grid-template-columns: 1fr auto;
    align-items: center;
    color: var(--muted);
    font: 700 clamp(11px, 1.5vw, 13px)/1.4 Consolas, "Courier New", monospace;
    text-transform: uppercase;
}

.countdown__value {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font: 900 clamp(42px, 10vw, 132px)/0.95 Consolas, "Courier New", monospace;
    letter-spacing: 0;
    text-shadow: 0 0 34px rgba(58, 145, 136, 0.24);
}

.countdown__labels {
    max-width: 920px;
    margin-top: 10px;
    color: rgba(184, 225, 221, 0.5);
    font-size: clamp(10px, 1.6vw, 13px);
    font-weight: 700;
    text-transform: uppercase;
}

.progress-track {
    width: 100%;
    height: 8px;
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid rgba(184, 225, 221, 0.14);
    border-radius: 999px;
    background: rgba(2, 7, 6, 0.62);
}

.progress-track__fill {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-tertiary), var(--color-light));
    box-shadow: 0 0 22px rgba(58, 145, 136, 0.42);
    transition: width 280ms linear;
}

.season-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 20px 60px var(--shadow);
    backdrop-filter: blur(14px);
}

.season-panel {
    align-self: center;
    justify-self: center;
    width: min(100%, 420px);
    padding: clamp(20px, 3vw, 28px);
}

.season-panel h2 {
    margin: 12px 0 0;
    font-weight: 700;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.08;
    text-transform: uppercase;
}

.season-panel p:last-child {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.65;
}

.special-thanks {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-self: stretch;
    width: 100%;
    margin: clamp(10px, 2vw, 20px) 0 0;
    padding-top: clamp(14px, 2vw, 20px);
    border-top: 1px solid var(--line);
    gap: clamp(20px, 3vw, 38px);
}

.special-thanks__copy {
    text-align: center;
}

.special-thanks__label {
    margin: 0;
    color: rgba(184, 225, 221, 0.66);
    font: 800 12px/1.2 Consolas, "Courier New", monospace;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.special-thanks__text {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 700;
    line-height: 1.35;
}

.dev-team {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: clamp(8px, 2vw, 16px);
    padding-top: clamp(8px, 1.5vw, 16px);
}

.dev-team__intro {
    max-width: 760px;
    margin: 0 auto clamp(26px, 4vw, 44px);
    text-align: center;
}

.dev-team__intro h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 5vw, 54px);
    font-weight: 800;
    line-height: 1;
}

.dev-team__intro p {
    max-width: 560px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: clamp(14px, 1.7vw, 17px);
    line-height: 1.6;
}

.dev-team__group {
    padding-top: clamp(22px, 3vw, 32px);
    border-top: 1px solid rgba(184, 225, 221, 0.12);
}

.dev-team__group-title {
    margin: 0 0 clamp(24px, 4vw, 40px);
    color: var(--ink);
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.dev-team__group-title::before {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    border: 2px solid var(--color-tertiary);
    border-radius: 3px;
    content: "";
    transform: rotate(45deg);
}

.dev-team__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(16px, 2.6vw, 42px);
}

.dev-card {
    min-width: 0;
    text-align: center;
}

.dev-card__picture {
    width: clamp(92px, 10vw, 118px);
    height: clamp(92px, 10vw, 118px);
    padding: 13px;
    border: 2px solid rgba(184, 225, 221, 0.18);
    border-radius: 50%;
    background: rgba(2, 7, 6, 0.65);
    box-shadow: 0 0 24px rgba(58, 145, 136, 0.16);
    object-fit: contain;
}

.dev-card h3 {
    margin: 16px 0 2px;
    color: var(--ink);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.dev-card p {
    margin: 0;
    color: rgba(242, 251, 250, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.dev-card strong {
    display: block;
    margin-top: 12px;
    color: var(--color-tertiary);
    font-size: 14px;
    line-height: 1.25;
}

.dev-card__accounts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: rgba(184, 225, 221, 0.58);
    font-size: 12px;
    font-weight: 700;
}

.dev-card__accounts span {
    padding: 4px 7px;
    border: 1px solid rgba(184, 225, 221, 0.12);
    border-radius: 999px;
    background: rgba(2, 7, 6, 0.34);
}

@media (max-width: 1180px) {
    .dev-team__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

body.is-revealed .countdown__value {
    color: var(--color-light);
}

@keyframes logo-transition-stage {
    0%, 76% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        visibility: visible;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.94);
        visibility: hidden;
    }
}

@keyframes old-logo-collapse {
    0%, 17% {
        opacity: 1;
        transform: scale(1);
        clip-path: inset(0);
        filter: none;
    }
    22% {
        opacity: 0.75;
        transform: translateX(-10px) skewX(-4deg);
        clip-path: inset(18% 0 46% 0);
    }
    28% {
        opacity: 1;
        transform: translateX(8px);
        clip-path: inset(55% 0 10% 0);
    }
    34% {
        opacity: 0.55;
        transform: translateX(-16px) scaleX(1.03);
        clip-path: inset(34% 0 32% 0);
        filter: contrast(1.7) brightness(1.2);
    }
    43% {
        opacity: 0.8;
        transform: translateX(14px);
        clip-path: inset(72% 0 8% 0);
    }
    49%, 100% {
        opacity: 0;
        transform: scale(1.04);
        clip-path: inset(0);
    }
}

@keyframes old-logo-red-glitch {
    0%, 18%, 25%, 32%, 41%, 100% {
        opacity: 0;
        transform: none;
        clip-path: inset(0);
    }
    19%, 24% {
        opacity: 0.68;
        transform: translateX(18px);
        clip-path: inset(14% 0 58% 0);
    }
    33%, 40% {
        opacity: 0.45;
        transform: translateX(-24px);
        clip-path: inset(62% 0 12% 0);
    }
}

@keyframes old-logo-cyan-glitch {
    0%, 21%, 30%, 38%, 46%, 100% {
        opacity: 0;
        transform: none;
        clip-path: inset(0);
    }
    22%, 29% {
        opacity: 0.58;
        transform: translateX(-20px);
        clip-path: inset(46% 0 24% 0);
    }
    39%, 45% {
        opacity: 0.5;
        transform: translateX(22px);
        clip-path: inset(8% 0 72% 0);
    }
}

@keyframes new-logo-reveal {
    0%, 38% {
        opacity: 0;
        transform: scale(0.96);
        clip-path: inset(0 0 100% 0);
    }
    44% {
        opacity: 0.45;
        transform: translateX(14px) scale(1.02);
        clip-path: inset(62% 0 12% 0);
    }
    51% {
        opacity: 0.82;
        transform: translateX(-8px);
        clip-path: inset(22% 0 42% 0);
    }
    58% {
        opacity: 0.55;
        transform: translateX(10px);
        clip-path: inset(0 0 68% 0);
    }
    65%, 100% {
        opacity: 1;
        transform: none;
        clip-path: inset(0);
    }
}

@keyframes new-logo-slice {
    0%, 42%, 50%, 58%, 66%, 100% {
        opacity: 0;
        transform: none;
        clip-path: inset(0);
    }
    43%, 49% {
        opacity: 0.76;
        transform: translateX(-18px);
        clip-path: inset(18% 0 64% 0);
    }
    59%, 65% {
        opacity: 0.52;
        transform: translateX(20px);
        clip-path: inset(68% 0 8% 0);
    }
}

@keyframes logo-scan {
    0%, 16%, 52%, 100% {
        opacity: 0;
        transform: translateY(-45%);
    }
    18% {
        opacity: 0.85;
        transform: translateY(-8500%);
    }
    31% {
        opacity: 0.42;
        transform: translateY(6200%);
    }
    44% {
        opacity: 0.9;
        transform: translateY(-1300%);
    }
    51% {
        opacity: 0.2;
        transform: translateY(7600%);
    }
}

@keyframes entry-copy-reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .reveal-shell {
        grid-template-columns: 1fr;
        align-content: start;
        align-items: start;
    }

    .season-panel {
        max-width: 720px;
    }

    .special-thanks {
        grid-template-columns: 1fr;
    }

    .dev-team__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 680px) {
    .language-toggle {
        top: 12px;
        right: 12px;
    }

    .reveal-shell {
        padding-top: 76px;
    }

    .hero__brand {
        grid-template-columns: 1fr;
    }

    .hero__logo-mark {
        width: min(78vw, 320px);
    }

    .countdown__header {
        grid-template-columns: 1fr;
    }

    .countdown__value {
        font-size: clamp(36px, 14vw, 76px);
        overflow-wrap: anywhere;
    }

    .countdown__labels {
        font-size: 10px;
    }
}
