:root {
    --color-tech: #1a62b7;
    --color-pharma: #f1593e;
    --bg-base: #101216; 
    --cube-edge-color: rgba(255, 255, 255, 0.1);
    --cube-edge-glow: rgba(255, 255, 255, 0.025);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--bg-base);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    perspective: 1500px;
}

body {
    min-width: 320px;
}

/* Camada de transição para suavizar a saída para sites claros */
#transition-overlay {
    position: fixed;
    inset: 0;
    background: #f8fafc;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}

/* Atmosfera Cromática Energética */
.ambient-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 10% 50%, rgba(26, 98, 183, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 90% 50%, rgba(241, 89, 62, 0.12) 0%, transparent 50%);
    filter: blur(80px);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.04;
}

#particle-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* HEADER / LOGOTIPO */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.lang-switch {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.lang-link {
    min-width: 36px;
    padding: 6px 8px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease, background 0.25s ease;
}

.lang-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lang-link.is-active {
    background: rgba(255, 255, 255, 0.9);
    color: #101216;
}

.footer-row {
    position: fixed;
    right: 40px;
    bottom: 28px;
    left: 40px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.4;
    text-transform: uppercase;
    pointer-events: none;
}

.logo-container {
    display: flex;
    align-items: center;
    pointer-events: auto;
    cursor: pointer;
    /*background: rgba(255, 255, 255, 0.95);*/
    padding: 8px 15px;
    border-radius: 15px;
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.3);*/
    transition: transform 0.3s ease;
}

.logo-container:active { transform: scale(0.95); }

.logo-img {
    height: auto;
    width: 290px;
    display: block;
}

.logo-fallback {
    display: none;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a1a1a;
}

.scene {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    transform-style: preserve-3d;
}

.scene::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.scene:has(.unit-tech:hover)::before {
    opacity: 1;
    background: radial-gradient(circle at 14% 50%, rgba(26, 98, 183, 0.16) 0%, rgba(26, 98, 183, 0.08) 28%, transparent 62%);
}

.scene:has(.unit-pharma:hover)::before {
    opacity: 1;
    background: radial-gradient(circle at 86% 50%, rgba(241, 89, 62, 0.16) 0%, rgba(241, 89, 62, 0.08) 28%, transparent 62%);
}

.content-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    transform-style: preserve-3d;
}

/* CUBO PREMIUM */
.cube-wrapper {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    transform-style: preserve-3d;
    perspective: 1200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.5s ease;
}

.scroll-cue {
    display: none;
}

.cube {
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    transform-origin: 100px 100px;
    animation: rotateCube 40s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cube-edge-color);
    outline: 1px solid color-mix(in srgb, var(--cube-edge-color) 24%, transparent);
    outline-offset: -1px;
    overflow: hidden;
    transform-origin: 50% 50%;
    backface-visibility: hidden;
}

.face::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 1px solid color-mix(in srgb, var(--cube-edge-color) 48%, transparent);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--cube-edge-color) 10%, transparent),
        0 0 5px var(--cube-edge-glow);
    pointer-events: none;
}

.face::before {
    content: '';
    position: absolute;
    inset: 48px;
    z-index: 1;
    background: url('../images/cubo.png') center / contain no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.f-left::before,
.f-right::before,
.f-top::before,
.f-bottom::before {
    display: none;
}

.f-front::before {
    inset: 50px;
    opacity: 0.18;
}

.f-back::before {
    inset: 62px;
    opacity: 0.11;
    transform: rotate(180deg);
}

.face > * {
    position: relative;
    z-index: 3;
}

.tech-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.cube-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cube-line {
    width: 3rem;
    height: 1px;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
}

.cube-label {
    font-size: 6px;
    letter-spacing: 0.8em;
    text-transform: uppercase;
    opacity: 0.4;
}

.cube-icon-soft {
    opacity: 0.3;
}

.cube-face-word {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: 15px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1;
    text-transform: uppercase;
    opacity: 0.58;
    pointer-events: none;
}

.cube-face-word-it {
    color: var(--color-tech);
}

.cube-face-word-pharma {
    color: var(--color-pharma);
    font-size: 0.78rem;
}

.cube-face-term {
    position: absolute;
    z-index: 3;
    font-family: 'Bodoni Moda', serif;
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    color: #fff;
    opacity: 0.3;
    pointer-events: none;
}

.cube-face-term-precision {
    transform: rotate(180deg);
}

.cube-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    padding: 1rem;
    opacity: 0.1;
}

.cube-line-full {
    width: 100%;
    height: 1px;
    background: #fff;
}

.cube-line-half {
    width: 50%;
    height: 1px;
    background: #fff;
}

.cube-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border: 1px solid rgba(241, 89, 62, 0.28);
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(241, 89, 62, 0.08), inset 0 0 18px rgba(241, 89, 62, 0.05);
    opacity: 0.68;
}

.cube-ring-it {
    border-color: rgba(26, 98, 183, 0.28);
    box-shadow: 0 0 24px rgba(26, 98, 183, 0.08), inset 0 0 18px rgba(26, 98, 183, 0.05);
}

.cube-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    opacity: 0.1;
}

.cube-top-cell {
    width: 1rem;
    height: 1rem;
    border: 1px solid #fff;
}

.cube-top-cell.is-filled {
    background: #fff;
}

.cube-bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    opacity: 0.16;
    transform: rotate(45deg);
}

.cube-bottom-grid span {
    width: 1.15rem;
    height: 1.15rem;
    border: 1px solid #fff;
}

.cube-bottom-grid span:nth-child(2),
.cube-bottom-grid span:nth-child(3) {
    background: #fff;
}

.cube-bottom-label {
    font-size: 8px;
    letter-spacing: 1em;
    text-transform: uppercase;
    opacity: 0.2;
    transform: rotate(180deg);
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    top: -10%;
    animation: scanMove 3s infinite linear;
}

@keyframes scanMove {
    0% { top: -10%; }
    100% { top: 110%; }
}

.f-front  { transform: translateZ(100px); }
.f-back   { transform: rotateY(180deg) translateZ(100px); }
.f-left   { transform: rotateY(-90deg) translateZ(100px); }
.f-right  { transform: rotateY(90deg) translateZ(100px); }
.f-top    { transform: rotateX(90deg) translateZ(100px); }
.f-bottom { transform: rotateX(-90deg) translateZ(100px); }

.core {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    filter: blur(20px);
    opacity: 0.4;
    animation: pulseCore 4s infinite ease-in-out;
}

@keyframes rotateCube {
    0% { transform: rotateX(0) rotateY(0); }
    100% { transform: rotateX(360deg) rotateY(720deg); }
}

@keyframes pulseCore {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

@keyframes scrollCueFloat {
    0%, 100% { transform: translateY(0); opacity: 0.42; }
    50% { transform: translateY(6px); opacity: 0.9; }
}

@keyframes areaScrollFocus {
    0% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-4px);
    }

    100% {
        transform: translateY(0);
    }
}

/* LAYOUT DUAL */
.dual-layout {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    z-index: 10;
}

.unit-section {
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(80px, 5vw, 110px) clamp(56px, 6vw, 96px);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
}

.label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
}

.serif-title {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2rem, 6.2vw, 4.8rem);
    font-style: italic;
    line-height: 0.9;
    margin-bottom: 2rem;
    transition: all 0.6s ease;
}

.unit-tech .serif-title { color: var(--color-tech); }
.unit-pharma .serif-title { color: var(--color-pharma); text-align: right; }
.unit-pharma { align-items: flex-end; }

.description {
    position: relative;
    z-index: 2;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    max-width: 400px;
}

.unit-pharma .description { text-align: right; }

/* INFO QUE APARECE AO PASSAR O RATO */
.info-container {
    position: relative;
    z-index: 2;
    min-height: 120px; /* Reserva espaço para evitar saltos no layout */
    margin-top: 1.5rem;
    width: 100%;
    max-width: 400px;
    text-align: justify;
}

.unit-pharma .info-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hover-info {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 350px;
    pointer-events: none;
}

.unit-section:hover .hover-info {
    opacity: 1;
    transform: translateY(0);
}

/* BOTOES SEM BORDER */
.action-link {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    background: transparent;
    transition: all 0.4s;
    cursor: pointer;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    position: relative;
    width: fit-content;
}

.action-link:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 8px;
}

.action-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 1px;
    background: currentColor;
    transition: width 0.4s ease;
}

.unit-pharma .action-link::after {
    right: 0;
    left: auto;
}

.unit-section:hover .action-link::after { width: 100%; }
.unit-tech:hover .action-link { color: var(--color-tech); transform: translateX(10px); }
.unit-pharma:hover .action-link { color: var(--color-pharma); transform: translateX(-10px); }

/* RESPONSIVIDADE */
@media (min-width: 768px) {
    .unit-section:hover .serif-title { transform: scale(1.05); filter: brightness(1.2); }
    .cube-wrapper { transform: translate(-50%, -50%) scale(1); }
    
    /* Cubo mantém visibilidade total ao focar numa secção */
    .dual-layout:has(.unit-tech:hover) ~ .cube-wrapper { opacity: 1; }
    .dual-layout:has(.unit-pharma:hover) ~ .cube-wrapper { opacity: 1; }
}

@media (min-width: 768px) and (max-width: 1280px) {
    .cube-wrapper {
        transform: translate(-50%, -50%) scale(0.74);
    }

    .description,
    .info-container {
        max-width: clamp(280px, calc(50vw - 230px), 340px);
    }

    .hover-info {
        max-width: 100%;
    }

    .unit-tech {
        padding-right: clamp(120px, 17vw, 220px);
    }

    .unit-pharma {
        padding-left: clamp(120px, 17vw, 220px);
    }
}

@media (min-width: 1600px) {
    .content-container {
        max-width: 1360px;
    }

    .unit-section {
        padding-right: 72px;
        padding-left: 72px;
    }
}

@media (max-width: 767px) {
    body,
    html {
        width: 100%;
        overflow-y: auto;
        overflow-x: clip;
        perspective: none;
    }

    body {
        background:
            radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.055), transparent 28rem),
            radial-gradient(circle at 18% 35%, rgba(26, 98, 183, 0.16), transparent 22rem),
            radial-gradient(circle at 82% 70%, rgba(241, 89, 62, 0.13), transparent 22rem),
            var(--bg-base);
    }

    .ambient-glow {
        opacity: 0.9;
        filter: blur(58px);
    }

    header {
        position: relative;
        top: auto;
        min-height: 72px;
        padding: 14px clamp(18px, 5vw, 42px);
        justify-content: flex-start;
        background: transparent;
        backdrop-filter: none;
        border-bottom: 0;
        pointer-events: auto;
    }

    .logo-container {
        padding: 6px 0;
    }

    .logo-img {
        width: clamp(132px, 22vw, 170px);
    }

    .lang-switch {
        top: 50%;
        right: clamp(18px, 5vw, 42px);
        transform: translateY(-50%);
    }

    .scene {
        display: block;
        min-height: auto;
        padding: 0;
        transform-style: flat;
    }

    .scene::before {
        display: none;
    }

    .content-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
        width: 100%;
        min-height: auto;
        max-width: 620px;
        padding: 24px clamp(18px, 5vw, 42px) 18px;
        transform-style: flat;
    }

    .dual-layout {
        display: contents;
        min-height: auto;
    }

    .unit-section {
        width: auto;
        min-width: 0;
        min-height: auto;
        padding: clamp(32px, 7vw, 46px) clamp(10px, 4vw, 24px);
        align-items: center !important;
        text-align: center !important;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        overflow: visible;
    }

    .unit-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: min(160px, 42vw);
        height: 1px;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.12);
        opacity: 0.72;
        transition: width 0.45s ease, opacity 0.45s ease;
    }

    .unit-section > * {
        position: relative;
        z-index: 2;
        max-width: 100%;
        min-width: 0;
    }

    .unit-tech {
        order: 1;
        background: transparent;
    }

    .unit-tech::before {
        background: linear-gradient(90deg, transparent, rgba(26, 98, 183, 0.55), transparent);
    }

    .unit-tech.is-scroll-active {
        box-shadow: none;
        animation: areaScrollFocus 0.7s ease both;
    }

    .unit-pharma {
        order: 3;
        margin-top: 28px;
        align-items: center;
        background: transparent;
    }

    .unit-pharma::before {
        background: linear-gradient(90deg, transparent, rgba(241, 89, 62, 0.5), transparent);
    }

    .unit-pharma::after {
        display: none;
    }

    .unit-pharma.is-scroll-active {
        box-shadow: none;
        animation: areaScrollFocus 0.7s ease both;
    }

    .unit-section.is-scroll-active .serif-title {
        transform: translateY(-2px);
    }

    .unit-section.is-scroll-active::before {
        width: min(210px, 56vw);
        opacity: 1;
    }

    .label {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0.85rem;
        font-size: 0.54rem;
        letter-spacing: 0.28em;
        overflow-wrap: anywhere;
    }

    .serif-title {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
        font-size: clamp(2.35rem, 8.5vw, 3.45rem);
        line-height: 0.94;
        text-align: center !important;
        overflow-wrap: anywhere;
    }

    .unit-pharma .serif-title {
        text-align: center;
    }

    .description {
        width: 100%;
        max-width: 30rem;
        margin-right: auto;
        margin-left: auto;
        font-size: clamp(0.88rem, 2vw, 0.96rem);
        line-height: 1.52;
        color: rgba(255, 255, 255, 0.58);
        text-align: center !important;
        overflow-wrap: break-word;
    }

    .unit-pharma .description {
        text-align: center;
    }

    .info-container {
        width: 100%;
        min-height: auto;
        max-width: 30rem;
        margin: 1rem auto 0;
        text-align: center;
    }

    .unit-pharma .info-container {
        align-items: center;
    }

    .hover-info {
        display: none;
        width: 100%;
        max-width: 29rem;
        margin: 0 auto 0.85rem;
        color: rgba(255, 255, 255, 0.48);
        font-size: 0.76rem;
        line-height: 1.5;
        opacity: 1;
        transform: none;
        text-align: center;
        overflow-wrap: break-word;
    }

    .action-link {
        min-height: 44px;
        width: fit-content;
        max-width: 100%;
        margin: 1.15rem auto 0;
        padding: 10px 0 12px 28px;
        justify-content: center;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        font-size: 0.64rem;
        letter-spacing: 0.2em;
        text-align: center;
        text-decoration: none;
        transition: color 0.35s ease, transform 0.35s ease, letter-spacing 0.35s ease;
        backdrop-filter: none;
    }

    .action-link:hover,
    .action-link:focus,
    .action-link:active {
        text-decoration: none;
    }

    .action-link::after {
        display: block;
        right: auto;
        bottom: 50%;
        left: 0;
        width: 16px;
        height: 1px;
        transform: none;
        opacity: 0.82;
        transition: width 0.35s ease, opacity 0.35s ease, background 0.35s ease;
    }

    .unit-tech .action-link::after,
    .unit-pharma .action-link::after,
    .unit-section:hover .action-link::after,
    .unit-section.is-scroll-active .action-link::after {
        right: auto;
        left: 0;
        width: 16px;
    }

    .action-link::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 19px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0.7;
        transform: translateY(-50%);
        transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .unit-tech:hover .action-link,
    .unit-pharma:hover .action-link {
        transform: none;
    }

    .unit-tech .action-link {
        color: rgba(235, 244, 255, 0.9);
    }

    .unit-pharma .action-link {
        color: rgba(255, 239, 235, 0.9);
    }

    .unit-section.is-scroll-active .action-link {
        transform: translateY(-2px);
        letter-spacing: 0.22em;
    }

    .unit-section.is-scroll-active .action-link::after {
        width: 24px;
        opacity: 1;
    }

    .unit-section.is-scroll-active .action-link::before {
        opacity: 1;
        transform: translateY(-50%) scale(1.25);
    }

    .cube-wrapper {
        --mobile-cube-size: 158px;
        --mobile-cube-half: calc(var(--mobile-cube-size) / 2);
        position: relative;
        top: auto;
        left: auto;
        order: 2;
        z-index: 4;
        justify-self: center;
        width: var(--mobile-cube-size);
        height: var(--mobile-cube-size);
        margin: 14px 0 24px;
        opacity: 0.7;
        transform: none;
        transform-origin: center;
        filter: none;
        perspective: 980px;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }

    .cube-wrapper::before {
        display: none;
    }

    .cube-wrapper .core {
        width: 34px;
        height: 34px;
        left: calc(var(--mobile-cube-half) - 17px);
        top: calc(var(--mobile-cube-half) - 17px);
        opacity: 0.36;
        filter: blur(14px);
    }

    .cube-wrapper .cube {
        width: var(--mobile-cube-size);
        height: var(--mobile-cube-size);
        transform-origin: var(--mobile-cube-half) var(--mobile-cube-half);
        animation-duration: 52s;
        will-change: transform;
        transform: translate3d(0, 0, 0);
        -webkit-transform-style: preserve-3d;
    }

    .cube-wrapper .face {
        width: var(--mobile-cube-size);
        height: var(--mobile-cube-size);
        background: rgba(255, 255, 255, 0.028);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        will-change: transform;
    }

    .cube-wrapper .f-front  { transform: translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-back   { transform: rotateY(180deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-left   { transform: rotateY(-90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-right  { transform: rotateY(90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-top    { transform: rotateX(90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-bottom { transform: rotateX(-90deg) translateZ(var(--mobile-cube-half)); }

    .cube-wrapper .f-front::before {
        inset: calc(var(--mobile-cube-size) * 0.25);
    }

    .cube-wrapper .f-back::before {
        inset: calc(var(--mobile-cube-size) * 0.3);
    }

    .cube-wrapper .cube-ring {
        width: 4rem;
        height: 4rem;
    }

    .cube-wrapper .cube-ring svg {
        width: 38px;
        height: 38px;
    }

    .cube-wrapper .cube-face-word {
        right: 12px;
        bottom: 12px;
        font-size: 0.78rem;
    }

    .cube-wrapper .cube-face-word-pharma {
        font-size: 0.6rem;
    }

    .cube-wrapper .cube-face-term {
        font-size: 1.02rem;
    }

    .footer-row {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        z-index: 100;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 26px 24px 24px;
        gap: 8px 20px;
        color: rgba(255, 255, 255, 0.34);
        text-align: center;
        pointer-events: none;
    }
}

@media (max-width: 767px) {
    header {
        min-height: 64px;
        padding: 12px 16px;
    }

    .logo-img {
        width: 124px;
    }

    .lang-switch {
        right: 14px;
        padding: 3px;
    }

    .lang-link {
        min-width: 31px;
        padding: 5px 6px;
        font-size: 0.5rem;
        letter-spacing: 0.16em;
    }

    .content-container {
        gap: 24px;
        padding: 18px 22px 14px;
    }

    .unit-section {
        padding: 28px 0 26px;
    }

    .unit-pharma {
        margin-top: 34px;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .label {
        font-size: 0.52rem;
        letter-spacing: 0.22em;
    }

    .serif-title {
        margin-bottom: 0.85rem;
        font-size: clamp(2.15rem, 12vw, 2.85rem);
    }

    .description {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .hover-info {
        display: none;
    }

    .action-link {
        width: fit-content;
        padding: 10px 0 12px 26px;
        font-size: 0.63rem;
        letter-spacing: 0.18em;
    }

    .cube-wrapper {
        --mobile-cube-size: 150px;
        --mobile-cube-half: calc(var(--mobile-cube-size) / 2);
        display: block;
        width: var(--mobile-cube-size);
        height: var(--mobile-cube-size);
        margin: 18px 0 28px;
        opacity: 0.74;
        transform: none;
    }

    .cube-wrapper .core {
        width: 32px;
        height: 32px;
        left: calc(var(--mobile-cube-half) - 16px);
        top: calc(var(--mobile-cube-half) - 16px);
    }

    .cube-wrapper .cube,
    .cube-wrapper .face {
        width: var(--mobile-cube-size);
        height: var(--mobile-cube-size);
    }

    .cube-wrapper .cube {
        transform-origin: var(--mobile-cube-half) var(--mobile-cube-half);
    }

    .cube-wrapper .f-front  { transform: translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-back   { transform: rotateY(180deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-left   { transform: rotateY(-90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-right  { transform: rotateY(90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-top    { transform: rotateX(90deg) translateZ(var(--mobile-cube-half)); }
    .cube-wrapper .f-bottom { transform: rotateX(-90deg) translateZ(var(--mobile-cube-half)); }

    .cube-wrapper .f-front::before {
        inset: calc(var(--mobile-cube-size) * 0.25);
    }

    .cube-wrapper .f-back::before {
        inset: calc(var(--mobile-cube-size) * 0.3);
    }

    .cube-wrapper .cube-ring {
        width: 3.5rem;
        height: 3.5rem;
    }

    .cube-wrapper .cube-ring svg {
        width: 33px;
        height: 33px;
    }

    .footer-row {
        flex-direction: column;
        padding: 22px 18px 20px;
        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }
}

@media (max-width: 767px) {
    :root {
        --cube-edge-color: rgba(241, 89, 62, 0.26);
        --cube-edge-glow: rgba(241, 89, 62, 0.12);
    }

    header {
        min-height: 110px;
        padding-top: 36px;
        padding-bottom: 12px;
        justify-content: center;
    }

    .logo-container {
        margin: 0 auto;
    }

    .logo-img {
        width: clamp(184px, 54vw, 230px);
    }

    .lang-switch {
        top: 10px;
        transform: none;
    }

    .content-container {
        gap: 8px;
        padding-top: 32px;
    }

    .cube-wrapper {
        --mobile-cube-size: 132px;
        --mobile-cube-half: calc(var(--mobile-cube-size) / 2);
        order: 1;
        margin: 18px auto 52px;
        opacity: 0.92;
        filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
    }

    .cube-wrapper .core {
        width: 34px;
        height: 34px;
        left: calc(var(--mobile-cube-half) - 17px);
        top: calc(var(--mobile-cube-half) - 17px);
        background: var(--color-pharma);
        box-shadow: 0 0 64px rgba(241, 89, 62, 0.92);
        opacity: 0.54;
    }

    .cube-wrapper::before {
        content: '';
        position: absolute;
        inset: -22px;
        display: block;
        border-radius: 50%;
        background:
            radial-gradient(circle, rgba(241, 89, 62, 0.18), transparent 62%),
            radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 48%);
        filter: blur(10px);
        pointer-events: none;
    }

    .cube-wrapper .face {
        background: rgba(255, 255, 255, 0.052);
        border-color: rgba(241, 89, 62, 0.28);
        outline-color: rgba(241, 89, 62, 0.12);
        box-shadow:
            inset 0 0 32px rgba(255, 255, 255, 0.045),
            inset 0 0 14px rgba(241, 89, 62, 0.04);
    }

    .cube-wrapper .face::after {
        border-color: rgba(241, 89, 62, 0.24);
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.035),
            0 0 5px rgba(241, 89, 62, 0.12);
    }

    .scroll-cue {
        position: fixed;
        right: 16px;
        bottom: 18px;
        z-index: 90;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin: 0;
        border: 1px solid rgba(241, 89, 62, 0.26);
        border-radius: 999px;
        background: rgba(16, 18, 22, 0.58);
        color: rgba(241, 89, 62, 0.88);
        backdrop-filter: blur(10px);
        animation: scrollCueFloat 1.8s ease-in-out infinite;
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }

    .scroll-cue.is-hidden {
        opacity: 0;
        transform: translateY(8px);
        animation: none;
    }

    .unit-pharma {
        order: 2;
        margin-top: 0;
        padding-top: 18px;
        padding-bottom: 16px;
    }

    .unit-tech {
        order: 3;
        margin-top: 0;
        padding-top: 16px;
        padding-bottom: 20px;
    }

    .unit-section .description {
        margin-bottom: 0;
    }

    .unit-section .info-container {
        margin-top: 0.45rem;
    }

    .unit-section .action-link {
        margin-top: 0.45rem;
    }
}

@media (max-width: 380px) {

    .lang-switch {
        right: 10px;
    }

    .lang-link {
        min-width: 28px;
        padding-right: 5px;
        padding-left: 5px;
    }

    .unit-section {
        padding-right: 15px;
        padding-left: 15px;
    }

    .serif-title {
        font-size: 2.05rem;
    }

    .description {
        font-size: 0.84rem;
    }

    .hover-info {
        display: none;
    }
}
