/* =========================================================
   DEVICE DILEMMA
   ========================================================= */

.device-dilemma[hidden] {
    display: none !important;
}

.device-dilemma {
    position: fixed;
    inset: 0;
    z-index: 1000000;

    display: grid;
    place-items: center;

    padding: 24px;

    overflow-x: hidden;
    overflow-y: auto;
}

.device-dilemma__backdrop {
    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 50, 50, 0.14),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 132, 20, 0.15),
            transparent 36%
        ),
        rgba(3, 3, 3, 0.88);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    animation:
        deviceBackdropIn 260ms ease both;
}

.device-dilemma__panel {
    position: relative;
    z-index: 1;

    width: min(100%, 970px);

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(35, 29, 29, 0.95),
            rgba(11, 11, 11, 0.94)
        );

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 34px;

    box-shadow:
        0 50px 160px rgba(0, 0, 0, 0.68),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);

    isolation: isolate;

    animation:
        devicePanelIn
        440ms
        cubic-bezier(0.2, 0.8, 0.2, 1)
        both;
}

.device-dilemma__panel::before {
    content: "";

    position: absolute;
    top: 0;
    left: 12%;
    z-index: 2;

    width: 76%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 92, 45, 0.9),
            rgba(255, 157, 49, 0.85),
            transparent
        );

    box-shadow:
        0 0 30px rgba(255, 92, 25, 0.35);
}

.device-dilemma__glow {
    position: absolute;
    z-index: -1;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    filter: blur(110px);

    opacity: 0.19;

    pointer-events: none;
}

.device-dilemma__glow--red {
    top: -230px;
    left: -170px;

    background: #ff3434;
}

.device-dilemma__glow--orange {
    right: -190px;
    bottom: -250px;

    background: #ff8a00;
}

.device-dilemma__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 21px 27px;

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

.device-dilemma__eyebrow,
.device-dilemma__code {
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.device-dilemma__eyebrow {
    color: rgba(255, 255, 255, 0.47);
}

.device-dilemma__code {
    color: rgba(255, 145, 37, 0.55);

    font-family: monospace;
}

.device-dilemma__content {
    padding:
        clamp(34px, 6vw, 68px)
        clamp(23px, 6vw, 66px)
        clamp(38px, 6vw, 60px);
}

.device-dilemma__title-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: flex-start;
    gap: 22px;
}

.device-dilemma__warning {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;

    color: #ffffff;

    font-family: "Space Grotesk", sans-serif;
    font-size: 1.7rem;
    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            #ff3e3e,
            #ff8d1d
        );

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;

    box-shadow:
        0 19px 45px rgba(255, 74, 25, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.device-dilemma h2 {
    margin: 0;

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.065em;
}

.device-dilemma__title-row p {
    max-width: 650px;
    margin: 20px 0 0;

    color: rgba(255, 255, 255, 0.52);

    font-size: 0.96rem;
    line-height: 1.7;
}

.device-dilemma h3 {
    margin: 48px 0 20px;

    color: rgba(255, 255, 255, 0.85);

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.device-dilemma__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.device-option {
    position: relative;

    display: flex;
    min-width: 0;
    min-height: 155px;
    align-items: flex-start;
    flex-direction: column;

    padding: 21px;

    color: #ffffff;
    text-align: left;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.02)
        );

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background 220ms ease,
        box-shadow 220ms ease;
}

.device-option:hover,
.device-option:focus-visible {
    outline: none;

    transform: translateY(-6px);

    background:
        linear-gradient(
            145deg,
            rgba(255, 85, 45, 0.15),
            rgba(255, 144, 30, 0.055)
        );

    border-color: rgba(255, 126, 39, 0.32);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.34),
        0 14px 40px rgba(255, 84, 25, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.device-option__icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;

    margin-bottom: 22px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            rgba(255, 61, 52, 0.32),
            rgba(255, 144, 28, 0.14)
        );

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.device-option__icon svg {
    width: 27px;
    height: 27px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.device-option__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.device-option__content strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;
    font-weight: 650;
}

.device-option__content small {
    color: rgba(255, 255, 255, 0.37);

    font-size: 0.72rem;
    line-height: 1.45;
}

.device-option__arrow {
    position: absolute;
    top: 20px;
    right: 20px;

    color: #ff942b;

    font-size: 0.95rem;

    transition: transform 180ms ease;
}

.device-option:hover .device-option__arrow {
    transform: translate(3px, -3px);
}

.device-dilemma__note {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    margin-top: 25px;
    padding-top: 22px;

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

.device-dilemma__note > span {
    width: 7px;
    height: 7px;

    margin-top: 6px;
    flex: 0 0 auto;

    background: #ff9127;

    border-radius: 50%;

    box-shadow:
        0 0 13px rgba(255, 145, 39, 0.75);
}

.device-dilemma__note p {
    max-width: 720px;
    margin: 0;

    color: rgba(255, 255, 255, 0.32);

    font-size: 0.7rem;
    line-height: 1.6;
}

body.device-dilemma-open {
    overflow: hidden;
}

.device-dilemma.is-closing {
    pointer-events: none;
}

.device-dilemma.is-closing
.device-dilemma__panel {
    animation:
        devicePanelOut 190ms ease both;
}

.device-dilemma.is-closing
.device-dilemma__backdrop {
    animation:
        deviceBackdropOut 190ms ease both;
}

/* =========================================================
   FOOTER VIEW SWITCH
   ========================================================= */

.site-footer__bottom-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 18px;
}

.site-footer__view-switch {
    padding: 0;

    color: rgba(255, 255, 255, 0.4);

    font: inherit;
    font-weight: 650;

    background: none;
    border: 0;

    cursor: pointer;

    transition: color 180ms ease;
}

.site-footer__view-switch:hover,
.site-footer__view-switch:focus-visible {
    color: #ff982d;
    outline: none;
}

/* =========================================================
   MANUAL VIEW MODES
   ========================================================= */

/*
Phone mode
*/

html.view-mobile .container {
    width: min(calc(100% - 28px), 1280px);
}

html.view-mobile .site-header__cta {
    display: none !important;
}

html.view-mobile .mobile-menu-toggle {
    display: flex !important;
}

html.view-mobile .site-navigation {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: 0 !important;

    display: flex !important;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 4px !important;

    padding: 12px !important;

    opacity: 0 !important;
    visibility: hidden !important;

    background:
        linear-gradient(
            145deg,
            rgba(28, 25, 25, 0.96),
            rgba(10, 10, 10, 0.94)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 20px !important;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.48) !important;

    transform: translateY(-10px) !important;

    pointer-events: none !important;
}

html.view-mobile body.menu-open
.site-navigation {
    opacity: 1 !important;
    visibility: visible !important;

    transform: translateY(0) !important;

    pointer-events: auto !important;
}

html.view-mobile .section-heading__row,
html.view-mobile .about-layout,
html.view-mobile .process-heading,
html.view-mobile .join-card__layout,
html.view-mobile .project-archive-hero__layout,
html.view-mobile .project-division__header,
html.view-mobile .single-project-content__layout {
    grid-template-columns: 1fr !important;
}

html.view-mobile .divisions-grid,
html.view-mobile .projects-showcase,
html.view-mobile .process-timeline,
html.view-mobile .project-archive-grid,
html.view-mobile .single-project-hero__meta {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
}

html.view-mobile .project-card--featured {
    grid-row: auto !important;
}

html.view-mobile .site-footer__top {
    grid-template-columns: 1fr !important;
}

html.view-mobile .site-footer__navigation {
    grid-template-columns: 1fr 1fr !important;
}

html.view-mobile .division-card:hover,
html.view-mobile .project-card:hover,
html.view-mobile .process-step:hover,
html.view-mobile .archive-project-card__link:hover {
    transform: none;
}

/*
Tablet mode
*/

html.view-tablet .container {
    width: min(calc(100% - 48px), 1280px);
}

html.view-tablet .site-header__cta {
    display: none !important;
}

html.view-tablet .mobile-menu-toggle {
    display: flex !important;
}

html.view-tablet .site-navigation {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: 0 !important;

    display: flex !important;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 4px !important;

    padding: 12px !important;

    opacity: 0 !important;
    visibility: hidden !important;

    background:
        linear-gradient(
            145deg,
            rgba(28, 25, 25, 0.96),
            rgba(10, 10, 10, 0.94)
        ) !important;

    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 20px !important;

    transform: translateY(-10px) !important;

    pointer-events: none !important;
}

html.view-tablet body.menu-open
.site-navigation {
    opacity: 1 !important;
    visibility: visible !important;

    transform: translateY(0) !important;

    pointer-events: auto !important;
}

html.view-tablet .divisions-grid,
html.view-tablet .projects-showcase,
html.view-tablet .about-layout,
html.view-tablet .join-card__layout,
html.view-tablet .single-project-content__layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
}

html.view-tablet .project-card--featured {
    grid-row: auto !important;
}

html.view-tablet .process-timeline,
html.view-tablet .project-archive-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;
}

/*
Desktop mode
*/

html.view-desktop .mobile-menu-toggle {
    display: none !important;
}

html.view-desktop .site-header__cta {
    display: inline-flex !important;
}

html.view-desktop .site-navigation {
    position: static !important;

    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px !important;

    padding: 0 !important;

    opacity: 1 !important;
    visibility: visible !important;

    background: none !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    transform: none !important;

    pointer-events: auto !important;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes deviceBackdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes deviceBackdropOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes devicePanelIn {
    from {
        opacity: 0;
        transform:
            translateY(28px)
            scale(0.965);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes devicePanelOut {
    from {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }

    to {
        opacity: 0;
        transform:
            translateY(18px)
            scale(0.98);
    }
}

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

@media (max-width: 720px) {

    .device-dilemma {
        align-items: flex-start;

        padding: 15px;
    }

    .device-dilemma__panel {
        margin: auto 0;

        border-radius: 27px;
    }

    .device-dilemma__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;

        padding: 18px 20px;
    }

    .device-dilemma__code {
        display: none;
    }

    .device-dilemma__title-row {
        grid-template-columns: 1fr;
    }

    .device-dilemma__warning {
        width: 52px;
        height: 52px;

        border-radius: 16px;
    }

    .device-dilemma h3 {
        margin-top: 38px;
    }

    .device-dilemma__options {
        grid-template-columns: 1fr;
    }

    .device-option {
        min-height: 112px;
        justify-content: center;

        padding-left: 87px;
    }

    .device-option__icon {
        position: absolute;
        top: 50%;
        left: 20px;

        margin: 0;

        transform: translateY(-50%);
    }

    .site-footer__bottom-actions {
        align-items: flex-start;
        justify-self: start;
        flex-direction: column;
        gap: 12px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .device-dilemma__panel,
    .device-dilemma__backdrop,
    .device-option {
        animation: none !important;
        transition: none !important;
    }

}

/* =========================================================
   MOBILE MENU FINAL FIX
   ========================================================= */

.site-header {
    z-index: 99999 !important;

    overflow: visible !important;
}

.site-header .container {
    overflow: visible !important;
}

.site-header__inner {
    position: relative !important;

    overflow: visible !important;
}

.site-header__actions {
    position: relative;
    z-index: 100002;
}

.mobile-menu-toggle {
    position: relative;
    z-index: 100003;

    cursor: pointer;

    pointer-events: auto !important;
    touch-action: manipulation;
}

/*
Telefonos és tabletes lenyíló menü
*/

html.view-mobile .site-navigation,
html.view-tablet .site-navigation {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 100001 !important;

    display: flex !important;
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 5px !important;

    width: 100% !important;
    padding: 12px !important;

    opacity: 0 !important;
    visibility: hidden !important;

    background:
        linear-gradient(
            145deg,
            rgba(31, 27, 27, 0.98),
            rgba(8, 8, 8, 0.97)
        ) !important;

    border:
        1px solid rgba(255, 255, 255, 0.14) !important;

    border-radius: 20px !important;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;

    backdrop-filter: blur(30px) saturate(140%);
    -webkit-backdrop-filter: blur(30px) saturate(140%);

    transform: translateY(-12px) scale(0.98) !important;
    transform-origin: top center;

    pointer-events: none !important;

    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

html.view-mobile body.menu-open .site-navigation,
html.view-tablet body.menu-open .site-navigation {
    opacity: 1 !important;
    visibility: visible !important;

    transform: translateY(0) scale(1) !important;

    pointer-events: auto !important;
}

html.view-mobile .site-navigation a,
html.view-tablet .site-navigation a {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 48px;

    padding: 13px 16px !important;

    color: rgba(255, 255, 255, 0.72);

    border: 1px solid transparent;
    border-radius: 13px;

    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease;
}

html.view-mobile .site-navigation a:hover,
html.view-mobile .site-navigation a:focus-visible,
html.view-tablet .site-navigation a:hover,
html.view-tablet .site-navigation a:focus-visible {
    color: #ffffff;

    background:
        linear-gradient(
            100deg,
            rgba(255, 67, 53, 0.14),
            rgba(255, 139, 25, 0.07)
        );

    border-color: rgba(255, 121, 35, 0.17);

    outline: none;
}

/*
Hamburgerből X animáció
*/

.mobile-menu-toggle span {
    transform-origin: center;

    transition:
        transform 190ms ease,
        opacity 190ms ease;
}

body.menu-open
.mobile-menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open
.mobile-menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/*
A nyitott menü legyen kattintható minden elem fölött
*/

body.menu-open .site-header {
    z-index: 999999 !important;
}