
@font-face {
    font-family: "Calypso";
    src: url("../fonts/Calypso-NStKFn-.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Unifix SP";
    src: url("../fonts/UnifixSP2-eFsxy2L.otf") format("opentype");
    font-display: swap;
}

.div-wrapper,
#app {
    width: 100%;
}

.hero {
    position: relative;
    height: 100vh; /* Fallback for older browsers */
    height: 100dvh; /* Modern mobile browsers */
    height: var(--app-height, 100dvh); /* JS computed height */
    max-height: var(--app-height, 100dvh); /* Force no overflow */
    overflow: hidden; /* Ensure content stays within viewport */
    display: flex;
    flex-direction: column;
    /*padding: clamp(32px, 5vw, 72px) clamp(28px, 8vw, 96px) clamp(140px, 14vw, 200px);*/
    color: var(--brand-200);
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
}

#app.has-intro .hero__header,
#app.has-intro .hero__clock {
    opacity: 0;
    transform: translate3d(0, -52px, 0);
    pointer-events: none;
    transition-property: opacity, transform;
    transition-duration: 0.95s;
    transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

#app.has-intro .hero__header {
    transition-delay: 0.05s;
}

#app.has-intro .hero__clock {
    transition-delay: 0.18s;
}

#app.has-intro .hero__canvas {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.05s ease 0.32s;
}

#app.has-intro.is-intro-complete .hero__header,
#app.has-intro.is-intro-complete .hero__clock {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

#app.has-intro.is-intro-complete .hero__canvas {
    opacity: 1;
    pointer-events: auto;
}

.hero__header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 64px);
    font-family: "Unifix SP", Helvetica, Arial, sans-serif;
    letter-spacing: 0.12em;
    margin: 0 auto clamp(15px, 3vh, 30px);
    width: 100%;
    padding-top: clamp(15px, 3vh, 30px);
    padding-left: clamp(15px, 3vw, 30px);
    padding-right: clamp(15px, 3vw, 30px);
}

.hero__orb-block {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    --slot-x: 0;
    --slot-y: -0.5;
    transform: translate(-50%, -50%) translate(calc(var(--slot-x) * var(--orb-size)), calc(var(--slot-y) * var(--orb-size)));
    z-index: 10;
}
.hero__clock
{
    justify-content: space-between;
    align-content: space-around;
    flex-direction: column;
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    font-family: "Unifix SP", Helvetica, Arial, sans-serif;
    letter-spacing: 0.12em;
    margin: 0 auto;
    width: 100%;
}
.hero__brand {
    display: inline-flex;
    align-items: center;
    font-size: clamp(16px, 1.8vw, 20px);
    font-family: "Calypso", "Unifix SP", sans-serif;
}

.hero__brand-name {
    letter-spacing: 0.24em;
    text-transform: lowercase;
    font-family: "Unifix SP", Helvetica, Arial, sans-serif;
}

.hero__logo-mark {
    width: clamp(30px, 3.2vw, 44px);
    height: auto;
    filter: drop-shadow(0 0 12px rgba(192, 233, 255, 0.35));
}

.hero__meta {
    display: inline-flex;
    align-items: center;
    gap: clamp(18px, 3.6vw, 30px);
    font-size: clamp(18px, 3.6vw, 28px);
    text-transform: uppercase;
}

.hero__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(2px, 0.5vh, 4px);
    text-transform: uppercase;
    line-height: 1;
    flex-wrap: wrap;
    justify-content: center;
    height: clamp(44px, 8vmin, 68px);
    min-width: 5ch;
}

.hero__date-day {
    font-size: clamp(44px, 5.5vw, 64px);
    line-height: 0.9;
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.hero__date-month{
    font-size: clamp(12px, 1.2vw, 24px);
    letter-spacing: 0.36em;
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
    min-width: 4ch;
    text-align: center;
}

.hero__date-year {
    font-size: clamp(12px, 1.2vw, 20px);
    letter-spacing: 0.36em;
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
}

.hero__meta-divider {
    width: clamp(38px, 4.4vw, 68px);
    height: auto;
    -webkit-transform: scale(2);
    transform: scale(2);
}

.hero__time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.28em;
    font-size: clamp(20px, 3vmin, 36px);
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
    min-width: clamp(140px, 18vw, 230px);
    font-feature-settings: "tnum";
    text-align: center;
}

.hero__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(28px, 2.8vw, 42px);
    height: clamp(28px, 2.8vw, 42px);
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.hero__menu img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.45));
}

.hero__canvas {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    margin: clamp(10px, 5vh, 80px) auto 0;
    touch-action: pan-y;
    /* vmin для адаптивности к обоим измерениям экрана */
    --orb-size: 35vmin;
    --wheel-size: 90vmin;
    --wheel-radius: calc(var(--wheel-size) * 0.44);
    --constellation-size: calc(var(--orb-size) * 0.62);
    align-content: space-between;
}



.hero__orb {
    position: relative;
    z-index: 3;
    width: var(--orb-size);
    height: var(--orb-size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 32px 76px rgba(6, 16, 34, 0.45);
    isolation: isolate;
    overflow: visible;
}


.hero__orb.is-dragging {
    cursor: grabbing;
}

.hero__orb-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    border-radius: 50%;
    z-index: 1;
    filter: drop-shadow(0 0 18px rgba(72, 126, 255, 0.18));
}

.hero__orb-shell {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: screen;
}

/*.hero__orb-shell::before {
    content: "";
    position: absolute;
    inset: -1.5%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0) 28%,
        rgba(255, 255, 255, 0.12) 52%,
        rgba(255, 255, 255, 0) 76%,
        rgba(255, 255, 255, 0.18)
    );
    filter: blur(6px) saturate(120%);
    opacity: 0.75;
}*/

/*.hero__orb-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0) 46%);
    filter: blur(1.6px);
    opacity: 0.75;
}*/

.hero__orb-inner {
    position: absolute;
    inset: 13%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hero__orb-inner.is-animating {
    animation: orbFlash 1s ease-out;
}

.hero__orb-inner img {
    width: 118%;
    max-width: none;
    height: auto;
    transform: scale(1.08);
    filter: saturate(1.2);
    transition: opacity 0.3s ease;
}

.hero__orb:not(.hero__orb--fallback) .hero__orb-inner img {
    opacity: 0;
    visibility: hidden;
}

.hero__orb--fallback .hero__orb-canvas,
.hero__orb--fallback .hero__orb-shell {
    display: none;
}

.hero__orb--fallback .hero__orb-inner img {
    opacity: 1;
    visibility: visible;
}

.hero__orb--fallback.hero__orb--text-active .hero__orb-inner img {
    opacity: 0;
    visibility: hidden;
}

.hero__orb--text-active .hero__orb-inner {
    opacity: 0;
}

.hero__orb--text-active .hero__orb-inner img {
    opacity: 0;
    visibility: hidden;
}

.hero__orb-caption {
    position: absolute;
    top: 17%;
    width: 100%;
    text-align: center;
    z-index: 4;
    font-family: "Calypso", "Unifix SP", Helvetica, Arial, sans-serif;
    font-size: clamp(18px, 4vmin, 28px); /* Changed rem to px/vmin */
    letter-spacing: 0.16em;
    pointer-events: none;
    text-shadow: 0 4px 16px rgba(10, 16, 28, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero__orb--text-active .hero__orb-caption {
    opacity: 0;
    transform: translateY(-6px); /* Changed rem to px */
    visibility: hidden;
}

.hero__orb-controls {
    width: min(100%, 450px); /* Changed rem to px */
    display: grid;
    gap: clamp(16px, 2.6vh, 28px); /* Changed rem to px/vh */
    padding: clamp(16px, 2.8vh, 28px); /* Changed rem to px/vh */
    border-radius: 20px;
    background: rgba(9, 14, 26, 0.55);
    border: 1px solid rgba(118, 163, 255, 0.18);
    backdrop-filter: blur(14px);
    color: #eaf2ff;
    font-size: 15px; /* Changed rem to px */
    box-shadow: 0 32px 60px rgba(6, 10, 24, 0.32);

    position: absolute;
    left: 0;
    top: 0;
    z-index: 1000;
}

.hero__orb-controls-group {
    display: grid;
    gap: clamp(12px, 2vh, 20px); /* Changed rem to px/vh */
}

.hero__orb-controls-field {
    display: grid;
    gap: 6px; /* Changed rem to px */
}

.hero__orb-controls-field > span {
    font-size: 13px; /* Changed rem to px */
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(220, 228, 255, 0.72);
}

.hero__orb-controls textarea {
    width: 100%;
    min-height: 100px; /* Changed rem to px */
    resize: vertical;
    padding: 10px 12px; /* Changed rem to px */
    border-radius: 12px;
    border: 1px solid rgba(126, 162, 255, 0.2);
    background: rgba(4, 8, 18, 0.6);
    color: #fff;
    font: inherit;
    line-height: 1.4;
}

.hero__orb-controls textarea::placeholder {
    color: rgba(220, 228, 255, 0.4);
}

.hero__orb-controls select {
    width: 100%;
    padding: clamp(4px, 0.8vh, 6px) clamp(8px, 1.2vw, 10px);
    border-radius: 10px;
    border: 1px solid rgba(126, 162, 255, 0.2);
    background: rgba(4, 8, 18, 0.55);
    color: #fff;
    font: inherit;
}

.hero__orb-controls input[type="range"] {
    width: 100%;
    accent-color: #7ca9ff;
}

.hero__orb-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 1.5vmin, 12px) clamp(14px, 2vmin, 16px);
    align-items: center;
}

.hero__orb-controls-field--compact {
    min-width: clamp(120px, 18vmin, 160px);
    flex: 1 1 auto;
}

.hero__orb-controls-checkbox {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vmin, 8px);
    font-size: clamp(12px, 1.8vmin, 14px);
    cursor: pointer;
}

.hero__orb-controls-checkbox input {
    width: clamp(14px, 2.2vmin, 18px);
    height: clamp(14px, 2.2vmin, 18px);
    accent-color: #7ca9ff;
}

.hero__orb-controls-button {
    padding: clamp(7px, 1.2vh, 9px) clamp(11px, 1.8vw, 14px);
    border-radius: 999px;
    border: 1px solid rgba(130, 170, 255, 0.4);
    background: linear-gradient(135deg, rgba(128, 178, 255, 0.45), rgba(68, 108, 194, 0.3));
    color: #fff;
    font-size: clamp(12px, 1.8vmin, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__orb-controls-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(90, 140, 255, 0.35);
}

.hero__orb-controls-grid {
    display: grid;
    gap: clamp(12px, 2vmin, 16px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero__orb-controls-field--dual .hero__orb-controls-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.2vmin, 10px);
}

.hero__orb-controls input[type="range"]::-webkit-slider-thumb {
    cursor: pointer;
}

.hero__orb-controls input[type="range"]::-moz-range-thumb {
    cursor: pointer;
}

.hero__orb-controls [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .hero__orb-controls-grid {
        grid-template-columns: 1fr;
    }
}

.hero__constellation {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 1rem);
    --slot-base-x: 0;
    --slot-base-y: 0;
    --slot-x: var(--slot-base-x);
    --slot-y: var(--slot-base-y);
    transform: translate(-50%, -50%)
        translate(calc(var(--slot-x) * var(--orb-size)), calc(var(--slot-y) * var(--orb-size)));
    text-transform: capitalize;
    letter-spacing: 0.16em;
    font-size: clamp(0.75rem, 1.4vw, 1.15rem);
    pointer-events: none;
    z-index: 1;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.hero__constellation img {
    width: min(var(--constellation-size), 22vw);
    height: auto;
    /*filter: drop-shadow(0 0 20px rgba(122, 196, 255, 0.45));
    background-size: cover;*/
    background-image: url("../images/background_icon_zodiac-Jn_uqqE.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.hero__constellation span {
    text-shadow: 0 0 16px rgba(0, 0, 0, 0.75);
    font-size: 24px;
    position: absolute;
    top: -25px;
}

.hero__constellation[data-slot="farPrev"] {
    --slot-base-x: -2.55;
    --slot-base-y: 1.66;
}

.hero__constellation[data-slot="prev2"] {
    --slot-base-x: -1.85;
    --slot-base-y: 0.28;
}

.hero__constellation[data-slot="prev1"] {
    --slot-base-x: -0.9;
    --slot-base-y: -0.18;
}

.hero__constellation[data-slot="active"] {
    --slot-base-x: 0;
    --slot-base-y: -0.42;
}

.hero__constellation[data-slot="next1"] {
    --slot-base-x: 0.9;
    --slot-base-y: -0.18;
}

.hero__constellation[data-slot="next2"] {
    --slot-base-x: 1.85;
    --slot-base-y: 0.28;
}

.hero__constellation[data-slot="prev2"],
.hero__constellation[data-slot="prev1"],
.hero__constellation[data-slot="next1"],
.hero__constellation[data-slot="next2"] {
    pointer-events: auto;
    cursor: pointer;
}

.hero__constellation[data-slot="farNext"] {
    --slot-base-x: 2.55;
    --slot-base-y: 1.66;
}

.hero__wheel {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 55%);
    width: min(var(--wheel-size), 90vw);
    pointer-events: auto;
    --wheel-rotation: 0deg;
    -webkit-tap-highlight-color: transparent;
}

.hero__wheel-shadow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 0 42px rgba(18, 28, 54, 0.85));
    z-index: 0;
}

.hero__wheel-surface {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 0 36px rgba(18, 28, 54, 0.85));
    z-index: 1;
    transform-origin: 50% 50%;
    transform: rotate(var(--wheel-rotation));
    transition: transform 0.8s cubic-bezier(0.26, 0.72, 0.37, 1);
    -webkit-tap-highlight-color: transparent;
}

.hero__wheel-surface > * {
    position: absolute;
    inset: 0;
}

.hero__wheel-sector {
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
    opacity: 0.45;
    color: var(--brand-200);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    outline: none;
}

.hero__wheel-sector path {
    fill: var(--brand-200);
    transition: none; /* Убираем transition чтобы не было плавной подсветки */
}

.hero__wheel-sector-overlay {
    fill: transparent;
    pointer-events: fill;
    stroke: none;
}

.hero__wheel-sector.is-active {
    opacity: 0.85;
    filter: drop-shadow(0 0 34px rgba(192, 233, 255, 0.35));
}

/* Сброс всех интерактивных состояний на touch-устройствах */
@media (hover: none), (pointer: coarse) {
    .hero__wheel-sector:hover,
    .hero__wheel-sector:focus,
    .hero__wheel-sector:active,
    .hero__wheel-sector:focus-visible {
        opacity: 0.45;
        filter: none;
        outline: none;
        background: transparent;
    }

    .hero__wheel-sector.is-active,
    .hero__wheel-sector.is-active:hover,
    .hero__wheel-sector.is-active:active {
        opacity: 0.85;
        filter: drop-shadow(0 0 34px rgba(192, 233, 255, 0.35));
    }
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .hero__wheel-sector:is(:hover, :focus-visible) {
        opacity: 0.75;
        filter: drop-shadow(0 0 42px rgba(192, 233, 255, 0.4));
    }
}

.hero__wheel-sector:focus {
    outline: none;
}

.hero__wheel-sector:focus-visible {
    outline: none;
}

.hero__wheel-surface svg {
    display: block;
    width: 100%;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

.hero__wheel-surface svg * {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.hero__wheel-overlay {
    pointer-events: none;
    z-index: 2;
}

.hero__wheel-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.hero__wheel-nav li {
    position: absolute;
    inset: 0;
}

.hero__wheel-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(40px, 4vw, 56px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(192, 233, 255, 0.35);
    background: rgba(6, 20, 38, 0.55);
    display: grid;
    place-items: center;
    pointer-events: auto;
    cursor: pointer;
    transform: rotate(calc(var(--angle) + var(--wheel-rotation))) translateY(calc(-1 * var(--wheel-radius))) rotate(calc(-1 * (var(--angle) + var(--wheel-rotation))));
    transition: transform 0.4s ease, box-shadow 0.3s ease, border 0.3s ease, background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.hero__wheel-button img {
    width: 65%;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(192, 233, 255, 0.6));
}

.hero__wheel-button.is-active {
    border-color: rgba(192, 233, 255, 0.85);
    box-shadow: 0 0 20px rgba(96, 157, 221, 0.65);
    background: rgba(31, 77, 124, 0.8);
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .hero__wheel-button:is(:hover, :focus-visible) {
        border-color: rgba(192, 233, 255, 0.75);
        box-shadow: 0 0 20px rgba(116, 183, 255, 0.55);
    }
}

@keyframes orbFlash {
    0% { transform: scale(0.96); filter: drop-shadow(0 0 12px rgba(131, 194, 255, 0.3)); }
    45% { transform: scale(1.03); filter: drop-shadow(0 0 60px rgba(192, 233, 255, 0.6)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 28px rgba(131, 194, 255, 0.4)); }
}

/* ==========================================================================
   RESPONSIVE STYLES - Based on design templates from assets/images/mob_design
   
   Breakpoints based on actual design files:
   - 1920×1080: Base desktop (defined in .hero__canvas)
   - 1680×1050: Large desktop
   - 1536×864: Medium desktop  
   - 1440×900: Small desktop
   - 1366×768: Compact desktop
   - 1280×720: Minimum desktop
   - 1024×768: Tablet landscape
   - 768×1024, 768×1366: Tablet portrait (VERTICAL LAYOUT)
   - 640×960: Large phone
   - 480×800: Medium phone
   - 320×480: Small phone
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESKTOP 1680×1050
   -------------------------------------------------------------------------- */
@media (max-width: 1680px) {
    .hero__header {
        padding: clamp(15px, 2.5vh, 25px);
        margin-bottom: clamp(15px, 2.5vh, 25px);
    }

    .hero__canvas {
        --orb-size: 35vmin;
        --wheel-size: 90vmin;
        --constellation-size: 21vmin;
        margin-top: clamp(10px, 4vh, 60px);
    }

    .hero__constellation span {
        font-size: clamp(18px, 2vmin, 22px);
    }


    .div-wrapper .logo .group {
        width: clamp(70px, 8vmin, 85px);
        height: clamp(72px, 8.3vmin, 88px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(36px, 4vmin, 42px);
    }
}

/* --------------------------------------------------------------------------
   DESKTOP 1536×864
   -------------------------------------------------------------------------- */
@media (max-width: 1536px) {
    .hero__header {
        padding: clamp(15px, 2.2vh, 22px);
        margin-bottom: clamp(12px, 2vh, 20px);
        gap: clamp(16px, 3vw, 40px);
    }

    .hero__date {
        height: clamp(25px, 8vmin, 50px);
    }

    .hero__canvas {
        --orb-size: 38vmin;
        --wheel-size: 90vmin;
        --constellation-size: 23vmin;
        margin-top: clamp(10px, 3vh, 40px);
    }

    .hero__meta {
        gap: clamp(14px, 2.5vw, 24px);
    }

    .hero__date-day {
        font-size: clamp(38px, 5vmin, 54px);
    }

    .hero__time {
        font-size: clamp(18px, 2.4vmin, 28px);
        min-width: clamp(140px, 15vw, 180px);
    }

    .hero__constellation span {
        font-size: clamp(16px, 1.8vmin, 20px);
        top: -22px;
    }

    .hero__wheel-button {
        width: clamp(36px, 3.5vmin, 52px);
    }

    .div-wrapper .logo .group {
        width: clamp(60px, 7vmin, 75px);
        height: clamp(62px, 7.2vmin, 77px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(32px, 3.6vmin, 38px);
    }
}

/* --------------------------------------------------------------------------
   DESKTOP 1440×900
   -------------------------------------------------------------------------- */
@media (max-width: 1440px) {
    .hero__header {
        padding: clamp(12px, 2vh, 20px);
        margin-bottom: clamp(10px, 1.8vh, 18px);
        gap: clamp(14px, 2.5vw, 32px);
    }

    .hero__canvas {
        --orb-size: 37vmin;
        --wheel-size: 90vmin;
        --constellation-size: 23vmin;
        margin-top: clamp(8px, 2.5vh, 35px);
    }

    .hero__brand {
        font-size: clamp(14px, 1.6vw, 18px);
    }

    .hero__date-day {
        font-size: clamp(34px, 4.5vmin, 48px);
    }

    .hero__time {
        font-size: clamp(16px, 2.2vmin, 24px);
        min-width: clamp(120px, 14vw, 160px);
    }

    .hero__constellation span {
        font-size: clamp(14px, 1.6vmin, 18px);
        top: -20px;
    }

    .hero__wheel-button {
        width: clamp(32px, 3vmin, 45px);
    }

    .div-wrapper .logo .group {
        width: clamp(55px, 6.5vmin, 68px);
        height: clamp(57px, 6.7vmin, 70px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(28px, 3.2vmin, 34px);
    }
}

/* --------------------------------------------------------------------------
   DESKTOP 1366×768
   -------------------------------------------------------------------------- */
@media (max-width: 1366px) {
    .hero__header {
        padding: clamp(10px, 1.8vh, 18px);
        margin-bottom: clamp(8px, 1.5vh, 15px);
        gap: clamp(12px, 2vw, 28px);
    }
    .hero__orb-caption {
        font-size: clamp(18px, 4vmin, 21px);
    }
    .hero__date {
        height: clamp(25px, 8vmin, 40px);
    }

    .hero__canvas {
        --orb-size: 40vmin;
        --wheel-size: 90vmin;
        --wheel-radius: calc(var(--wheel-size) * 0.44);
        --constellation-size: 25vmin;
        margin-top: clamp(6px, 2vh, 28px);
    }

    .hero__brand {
        font-size: clamp(13px, 1.4vw, 16px);
    }

    .hero__logo-mark {
        width: clamp(26px, 2.8vw, 36px);
    }

    .hero__date-day {
        font-size: clamp(30px, 4vmin, 42px);
    }

    .hero__date-month,
    .hero__date-year {
        font-size: clamp(10px, 1.1vw, 16px);
    }

    .hero__time {
        font-size: clamp(10px, 3vmin, 25px);
        min-width: clamp(110px, 12vw, 145px);
    }

    .hero__constellation span {
        font-size: clamp(12px, 1.5vmin, 16px);
        top: -18px;
    }

    .hero__constellation[data-slot="farPrev"] { --slot-base-x: -2.45; --slot-base-y: 1.55; }
    .hero__constellation[data-slot="prev2"] { --slot-base-x: -1.75; --slot-base-y: 0.25; }
    .hero__constellation[data-slot="prev1"] { --slot-base-x: -0.88; --slot-base-y: -0.18; }
    .hero__constellation[data-slot="next1"] { --slot-base-x: 0.88; --slot-base-y: -0.18; }
    .hero__constellation[data-slot="next2"] { --slot-base-x: 1.75; --slot-base-y: 0.25; }
    .hero__constellation[data-slot="farNext"] { --slot-base-x: 2.45; --slot-base-y: 1.55; }

    .hero__wheel-button {
        width: clamp(28px, 2.8vmin, 42px);
    }

    .hero__menu {
        width: clamp(26px, 2.6vmin, 36px);
        height: clamp(26px, 2.6vmin, 36px);
    }

    .div-wrapper .logo .group {
        width: clamp(50px, 5.5vmin, 60px);
        height: clamp(52px, 5.7vmin, 62px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(24px, 2.8vmin, 30px);
    }
}

/* --------------------------------------------------------------------------
   DESKTOP 1280×720 (Minimum Desktop)
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .hero__header {
        padding: clamp(10px, 1.6vh, 16px) clamp(12px, 2vw, 20px);
        margin-bottom: clamp(6px, 1vh, 10px);
    }

    .hero__canvas {
        --orb-size: 40vmin;
        --wheel-size: 100vmin;
        --constellation-size: 25vmin;
        margin-top: clamp(6px, 1.5vh, 10px);
    }

    .hero__brand {
        font-size: clamp(12px, 1.3vmin, 14px);
    }

    .hero__logo-mark {
        width: clamp(22px, 2.5vmin, 28px);
    }
    .hero__date {
        height: clamp(35px, 5vmin, 68px);
    }

    .hero__date-day {
        font-size: clamp(28px, 3.5vmin, 34px);
    }

    .hero__date-month,
    .hero__date-year {
        font-size: clamp(10px, 1.1vmin, 12px);
    }

    .hero__time {
        font-size: clamp(16px, 2vmin, 20px);
        min-width: clamp(100px, 12vw, 140px);
    }

    .hero__meta-divider {
        width: clamp(28px, 3.5vmin, 36px);
    }

    .hero__constellation span {
        font-size: clamp(11px, 1.3vmin, 14px);
        top: -16px;
    }

    .hero__constellation[data-slot="farPrev"] { --slot-base-x: -2.3; --slot-base-y: 1.4; }
    .hero__constellation[data-slot="prev2"] { --slot-base-x: -1.6; --slot-base-y: 0.18; }
    .hero__constellation[data-slot="prev1"] { --slot-base-x: -0.8; --slot-base-y: -0.15; }
    .hero__constellation[data-slot="next1"] { --slot-base-x: 0.8; --slot-base-y: -0.15; }
    .hero__constellation[data-slot="next2"] { --slot-base-x: 1.6; --slot-base-y: 0.18; }
    .hero__constellation[data-slot="farNext"] { --slot-base-x: 2.3; --slot-base-y: 1.4; }

    .hero__wheel-button {
        width: clamp(26px, 2.8vmin, 35px);
    }

    .hero__menu {
        width: clamp(22px, 2.5vmin, 28px);
        height: clamp(22px, 2.5vmin, 28px);
    }

    .div-wrapper .logo .group {
        width: clamp(45px, 5vmin, 55px);
        height: clamp(47px, 5.2vmin, 57px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(22px, 2.6vmin, 28px);
    }
}

/* --------------------------------------------------------------------------
   TABLET LANDSCAPE 1024×768
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero__header {
        padding: clamp(15px, 2.5vh, 25px) clamp(18px, 3vw, 30px) 0;
        margin-bottom: 0;
    }

    .hero__brand {
        font-size: clamp(12px, 1.5vmin, 15px);
    }

    .hero__logo-mark {
        width: clamp(24px, 3vmin, 30px);
    }

    .hero__clock {
        margin-top: clamp(15px, 2.5vh, 25px);
    }

    .hero__meta {
        gap: clamp(16px, 2.5vmin, 24px);
    }

    .hero__date {
        gap: clamp(1px, 0.3vh, 2px);
    }

    .hero__date-day {
        font-size: clamp(36px, 5vmin, 45px);
    }

    .hero__date-month,
    .hero__date-year {
        font-size: clamp(14px, 2vmin, 20px);
        letter-spacing: 0.25em;
    }

    .hero__time {
        font-size: clamp(24px, 3.5vmin, 32px);
        min-width: clamp(130px, 16vw, 180px);
        letter-spacing: 0.2em;
    }

    .hero__meta-divider {
        width: clamp(32px, 4.5vmin, 45px);
    }

    .hero__canvas {
        margin-top: clamp(15px, 2.5vh, 25px);
        --orb-size: 40vmin;
        --wheel-size: 100vmin;
        --constellation-size: 30vmin;
    }

    .hero__orb-caption {
        font-size: clamp(14px, 2vmin, 18px);
        top: 18%;
    }

    .hero__constellation span {
        font-size: clamp(12px, 1.5vmin, 16px);
        top: -20px;
    }


    /* prev2/next2 (Aquarius/Gemini) - at screen edges, partially clipped */
    .hero__constellation[data-slot="prev2"] {
        --slot-base-x: -1.7;
        --slot-base-y: 0.5;
    }

    .hero__constellation[data-slot="prev2"] span {
        font-size: clamp(10px, 1.2vmin, 12px);
        top: -14px;
    }

    .hero__constellation[data-slot="next2"] {
        --slot-base-x: 1.7;
        --slot-base-y: 0.5;
    }

    .hero__constellation[data-slot="next2"] span {
        font-size: clamp(10px, 1.2vmin, 12px);
        top: -14px;
    }

    /* prev1/next1 (Pisces/Taurus) - close to orb, same level */
    .hero__constellation[data-slot="prev1"] {
        --slot-base-x: -1.02;
        --slot-base-y: -0.05;
    }

    .hero__constellation[data-slot="next1"] {
        --slot-base-x: 1.02;
        --slot-base-y: -0.05;
    }

    .hero__wheel-button {
        width: clamp(40px, 4.5vmin, 52px);
    }

    .hero__menu {
        width: clamp(22px, 2.5vmin, 28px);
        height: clamp(22px, 2.5vmin, 28px);
    }

    .div-wrapper .logo .group {
        width: clamp(45px, 5vmin, 55px);
        height: clamp(47px, 5.2vmin, 57px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(22px, 2.6vmin, 28px);
    }
    .hero__canvas {
        margin-top: clamp(20px, 3.5vh, 35px);
    }

    .hero__constellation[data-slot="farNext"] {
        --slot-base-x: 3.3;
        --slot-base-y: 2.4;
    }

    .hero__constellation[data-slot="farPrev"] {
        --slot-base-x: -3.3;
        --slot-base-y: 2.4;
    }
}

/* --------------------------------------------------------------------------
   TABLET PORTRAIT 768×1024 / 768×1366
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero__header {
        padding: clamp(12px, 2vh, 18px) clamp(14px, 2.5vw, 22px);
        margin-bottom: 0;
    }

    .hero__brand {
        font-size: clamp(12px, 1.8vmin, 15px);
    }

    .hero__logo-mark {
        width: clamp(24px, 3.5vmin, 30px);
    }
    .hero__orb-block {
        top: 65%;
    }

    .hero__canvas {
        margin-top: clamp(10px, 2vh, 70px);
        --orb-size: 65vmin;
        --wheel-size: 90vmin;
        --constellation-size: 200%;
    }
    .hero__wheel {
        width: min(var(--wheel-size), 150vw);
        transform: translate(-50%, 55%);
    }
    .hero__orb-caption {
        font-size: clamp(14px, 2.2vmin, 18px);
    }

    .hero__constellation span {
        font-size: clamp(11px, 1.6vmin, 14px);
        top: -14px;
    }

    /* Hide far constellations */
    .hero__constellation[data-slot="farPrev"]{
        --slot-base-x: -3.25;
        --slot-base-y: 4.05;
    }
    .hero__constellation[data-slot="farNext"] {
        --slot-base-x: 3.25;
        --slot-base-y: 4.05;
    }

    .hero__constellation[data-slot="prev1"] {
        --slot-base-x: -1.25;
        --slot-base-y: -0.05;
    }

    .hero__constellation[data-slot="next1"] {
        --slot-base-x: 1.25;
        --slot-base-y: -0.05;
    }

    .hero__constellation[data-slot="prev2"] {
        --slot-base-x: -2.25;
        --slot-base-y: 0.95;
    }

    .hero__constellation[data-slot="next2"] {
        --slot-base-x: 2.25;
        --slot-base-y: 0.95;
    }

    .hero__wheel-button {
        width: clamp(32px, 4vmin, 40px);
    }

    .hero__menu {
        width: clamp(22px, 3vmin, 28px);
        height: clamp(22px, 3vmin, 28px);
    }

    .div-wrapper .logo .group {
        width: clamp(48px, 6vmin, 58px);
        height: clamp(50px, 6.2vmin, 60px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(24px, 3.2vmin, 30px);
    }
}

/* --------------------------------------------------------------------------
   TABLET PORTRAIT 768×1366 (tall tablet)
   Applied only with .viewport-768x1366 class from JS
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   PHONE 640×960
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .hero__header {
        padding: clamp(10px, 2vh, 14px) clamp(12px, 2.5vw, 18px);
        padding-top: max(clamp(10px, 2vh, 14px), env(safe-area-inset-top));
    }

    .hero__brand {
        font-size: clamp(11px, 2vmin, 13px);
    }

    .hero__logo-mark {
        width: clamp(22px, 4vmin, 26px);
    }


    .hero__canvas {
        margin-top: clamp(8px, 1.5vh, 12px);
        --orb-size: 70vmin;
        --wheel-size: 100vmin;
        --constellation-size: 100vmin;
    }

    .hero__orb-caption {
        font-size: clamp(13px, 2.5vmin, 16px);
    }

    .hero__constellation span {
        font-size: clamp(10px, 1.8vmin, 12px);
        top: -12px;
    }

    .hero__constellation[data-slot="prev1"] {
        --slot-base-x: -1.4;
        --slot-base-y: 0.1;
    }

    .hero__constellation[data-slot="next1"] {
        --slot-base-x: 1.4;
        --slot-base-y: 0.1;
    }


    .hero__wheel-button {
        width: clamp(28px, 5vmin, 34px);
    }

    .hero__menu {
        width: clamp(20px, 3.5vmin, 24px);
        height: clamp(20px, 3.5vmin, 24px);
    }

    .div-wrapper .logo .group {
        width: clamp(44px, 7vmin, 52px);
        height: clamp(46px, 7.3vmin, 54px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(22px, 4vmin, 26px);
    }
}

/* --------------------------------------------------------------------------
   PHONE 480×800
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .hero__header {
        padding: clamp(16px, 3vh, 32px) clamp(10px, 2.5vw, 14px) clamp(10px, 1.5vh, 16px);
        padding-top: max(clamp(16px, 3vh, 32px), env(safe-area-inset-top));
    }

    .hero__brand {
        font-size: clamp(12px, 2.5vmin, 15px);
    }

    .hero__logo-mark {
        width: clamp(18px, 4vmin, 22px);
    }

    .hero__clock {
        padding: 0 clamp(8px, 2vw, 12px);
    }

    .hero__meta {
        gap: clamp(10px, 2.5vmin, 16px);
    }
    .hero__orb-block {
        top: 73%;
    }

    .hero__date-day {
        font-size: clamp(28px, 6vmin, 34px);
    }

    .hero__time,
    .hero__date {
        min-width: auto;
        width: 50%;
    }

    .hero__date-month,
    .hero__date-year {
        font-size: clamp(12px, 2.5vmin, 15px);
    }

    .hero__meta-divider {
        width: clamp(20px, 5vmin, 26px);
    }

    .hero__time {
        font-size: clamp(20px, 4.5vmin, 25px);
    }

    .hero__canvas {
        margin-top: clamp(6px, 1.5vh, 10px);
        --orb-size: 80vmin;
        --wheel-size: 105vmin;
        --constellation-size: 100vmin;
    }

    .hero__orb-caption {
        font-size: clamp(12px, 2.5vmin, 14px);
    }

    .hero__constellation span {
        font-size: clamp(8px, 2vmin, 10px);
        top: -10px;
    }

    /* Constellations mostly off-screen */
    .hero__constellation[data-slot="prev1"] {
        --slot-base-x: -2;
        --slot-base-y: 0.15;
    }

    .hero__constellation[data-slot="next1"] {
        --slot-base-x: 2;
        --slot-base-y: 0.15;
    }
    .hero__orb-block  {
        --slot-y: -0.7;
    }

    .hero__wheel-button {
        width: clamp(24px, 5vmin, 30px);
    }

    .hero__menu {
        width: clamp(18px, 4vmin, 22px);
        height: clamp(18px, 4vmin, 22px);
    }

    .div-wrapper .logo .group {
        width: clamp(38px, 8vmin, 45px);
        height: clamp(40px, 8.3vmin, 47px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(18px, 4vmin, 22px);
    }
}

/* --------------------------------------------------------------------------
   PHONE 320×480 (Minimum Screen Size)
   -------------------------------------------------------------------------- */
@media (max-width: 320px) {
    .hero__header {
        padding: clamp(16px, 4vh, 32px) clamp(8px, 2vw, 12px) clamp(8px, 2vh, 16px);
        padding-top: max(clamp(16px, 4vh, 32px), env(safe-area-inset-top));
    }

    .hero__brand {
        font-size: clamp(13px, 4vmin, 17px);
    }

    .hero__logo-mark {
        width: clamp(14px, 4.5vmin, 18px);
    }

    .hero__clock {
        padding: 0 clamp(6px, 2vw, 10px);
        margin-top: 0;
    }

    .hero__meta {
        gap: clamp(4px, 2vmin, 8px);
    }
    .hero__date {
        height: clamp(24px, 7vmin, 32px);
    }
    .hero__time {
        height: clamp(12px, 4vmin, 16px);
    }

    .hero__orb-block {
        top: 55%;
    }

    .hero__date-day {
        font-size: clamp(22px, 7vmin, 28px);
    }

    .hero__date-month,
    .hero__date-year {
        font-size: clamp(11px, 3.5vmin, 14px);
    }

    .hero__meta-divider {
        width: clamp(16px, 5.5vmin, 22px);
    }

    .hero__time {
        font-size: clamp(16px, 5vmin, 20px);
    }

    .hero__canvas {
        margin-top: clamp(4px, 6.5vh, 30px);
        --orb-size: 75vmin;
        --wheel-size: 110vmin;
        --constellation-size: 100vmin;
    }
    .hero__orb-block {
        --slot-y: -0.4
    }
    .hero__orb-caption {
        font-size: clamp(10px, 3vmin, 12px);
    }


    .hero__wheel-button {
        width: clamp(18px, 5.5vmin, 24px);
    }
    .hero__menu {
        width: clamp(16px, 5vmin, 20px);
        height: clamp(16px, 5vmin, 20px);
    }

    .div-wrapper .logo .group {
        width: clamp(30px, 9.5vmin, 38px);
        height: clamp(31px, 9.8vmin, 39px);
    }

    .div-wrapper .logo .text-wrapper {
        font-size: clamp(14px, 4.5vmin, 18px);
    }
}

/* ==========================================================================
   INTRO LOGO STYLES
   ========================================================================== */

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12.33px;
    position: relative;
}

.div-wrapper .logo .group {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 0.97;
}

.div-wrapper .logo .text-wrapper {
    position: relative;
    width: fit-content;
    font-family: "Unifix SP", Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--brand-200);
    font-size: 50px;
    text-align: center;
    letter-spacing: 0;
    line-height: normal;
    white-space: nowrap;
    margin: 0;
}


/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.div-wrapper .logo:focus-within {
    outline: 2px solid var(--brand-500);
    outline-offset: 4px;
}

/* Responsive adjustments */
@media (max-width: 1440px) {
    .div-wrapper {
        width: 100vw;
    }
}
html, body {
    background: #000;
    /* Height and overflow handled in globals.css */
}
.wrap {
    position: fixed; inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}
svg { display: block; width: 100%; height: 100%; }
/* Базовые keyframes: контроллер лишь задаёт переменные */
.star {
    fill: #fff;
    opacity: 0.85;
    /* Убран drop-shadow для производительности - используем больший радиус для имитации свечения */
    animation:
            twinkle var(--tw, 4s) ease-in-out infinite,
            drift var(--dr, 20s) ease-in-out infinite;
    animation-delay: var(--td, 0s), var(--dd, 0s);
    /* will-change убран - браузер оптимизирует сам */
    transform-origin: center;
}
@keyframes twinkle { 0%,100%{opacity:0.15} 50%{opacity:1} }
@keyframes drift { 0%,100%{transform:translate(0,0)} 50%{transform:translate(var(--dx,10px),var(--dy,-8px))} }
@media (prefers-reduced-motion: reduce) { .star { animation: none; } }

.sky-wrap{
    position:fixed; /* на весь вьюпорт */
    inset:0;
    overflow:hidden;
    background:#000;
    /* GPU-ускорение на контейнере вместо каждой звезды */
    transform: translateZ(0);
    contain: strict;
}
.sky-wrap svg,           /* если в include прямо <svg> */
.sky-wrap .wrap > svg {    /* если звёзды внутри .wrap */
    position:absolute;
    inset:0;         /* растянуть на весь контейнер */
    width:100%;
    height:100%;
    display:block;
}

/* GPU-ускорение для группы звёзд */
#twinkles {
    transform: translateZ(0);
}

#nebula-fog .fog {
    filter: url(#soften);
    opacity: 0.75;
    animation: fogOpacity 24s ease-in-out infinite,
    fogDrift   48s ease-in-out infinite;
}
@keyframes fogDrift {
    0%,100% { transform: translate(0,0) scale(1); }
    50%     { transform: translate(6px,6px) scale(1.01); }
}
@keyframes fogOpacity {
    0%,100% { opacity: .5; }
    50%     { opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
    #nebula-fog .fog { animation: none; }
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
    /* Замедляем анимацию тумана на мобильных */
    #nebula-fog .fog {
        animation: fogOpacity 30s ease-in-out infinite,
        fogDrift   60s ease-in-out infinite;
    }

    /* Упрощаем анимацию звёзд - только мигание без движения */
    .star {
        animation: twinkle var(--tw, 5s) ease-in-out infinite;
    }
}

/* Дополнительная оптимизация для очень маленьких/слабых экранов */
@media (max-width: 480px) {
    /* Полностью отключаем анимацию тумана */
    #nebula-fog .fog {
        animation: none;
        opacity: 0.6;
    }

    /* Замедляем мигание звёзд */
    .star {
        animation: twinkle var(--tw, 6s) ease-in-out infinite;
    }
}

.intro{
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    place-items: center;
    pointer-events: none;
    background: transparent;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

.intro .logo{
    transition: opacity var(--logo-fade) ease calc(var(--intro-duration, 0s) / 2);
}
.intro.is-outro .logo{ opacity: 0; }


/* при запуске анимации: облака исчезают и разъезжаются */
.intro.is-outro image {
    opacity: 0;
}
.intro.is-outro image,
.intro.is-outro rect
{
    transition:
            transform var(--intro-duration) ease-in-out calc(var(--intro-duration, 0s) / 4),
            opacity   var(--intro-duration) cubic-bezier(0.4, 0, 1, 1);
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) !important;
}

@media (prefers-reduced-motion: reduce){
    .cloud, .intro .logo { transition: none !important; }
}
