﻿/* Apameh Group — Landing Page
   css/style.css
   ========================= */
:root {
    --gold: #D6B26E;
    --deep: #060606;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sun-size: clamp(10.9rem, 18.4vw, 16.1rem);
    --portal-size: clamp(8.5rem, 14.5vw, 12.5rem);
    --portal-gap: clamp(1.25rem, 3.5vw, 3rem);
    --header-h: 4.7rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--deep);
    color: #f5f0e8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    animation: pageIn 1.2s var(--ease) forwards;
}

body.modal-open {
    overflow: hidden;
}

@keyframes pageIn {
    to {
        opacity: 1;
    }
}

/* ── Background ── */
.bg-stack {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-base,
.bg-mesh,
.bg-noise {
    position: absolute;
    inset: 0;
}

.bg-base {
    background: radial-gradient(ellipse 90% 70% at 50% 35%, rgba(214, 178, 110, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(45, 168, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 45% 38% at 88% 68%, rgba(200, 100, 120, 0.05) 0%, transparent 48%),
    radial-gradient(ellipse 100% 100% at 50% 100%, #0a0806 0%, #060606 45%, #030303 100%);
}

.bg-mesh {
    opacity: 0.14;
    background-image: linear-gradient(rgba(214, 178, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 178, 110, 0.05) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, black 15%, transparent 72%);
}

.bg-noise {
    opacity: 0.22;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.bg-curve {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(214, 178, 110, 0.07);
    animation: curveDrift 24s var(--ease) infinite alternate;
}

.bg-curve--1 {
    width: 130%;
    height: 55%;
    top: -12%;
    left: -15%;
}

.bg-curve--2 {
    width: 95%;
    height: 42%;
    top: 8%;
    right: -20%;
    animation-delay: -9s;
    opacity: 0.65;
}

.bg-curve--3 {
    width: 75%;
    height: 35%;
    bottom: 5%;
    left: 8%;
    animation-delay: -16s;
    opacity: 0.45;
}

@keyframes curveDrift {
    from {
        transform: translate(0, 0) rotate(0deg);
    }
    to {
        transform: translate(1.5%, -1%) rotate(1.5deg);
    }
}

#starCanvas, #dustCanvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.bg-parallax {
    transition: transform 0.6s var(--ease);
    will-change: transform;
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0.55rem;
    z-index: 100;
    padding: 0 0.85rem;
    animation: fadeDown 0.9s var(--ease) 0.15s both;
    overflow: visible;
}

.nav-pill {
    max-width: 74rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.15rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(214, 178, 110, 0.42);
    background: rgba(6, 6, 8, 0.58);
    backdrop-filter: blur(22px) saturate(1.25);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: visible;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.brand-mark {
    display: block;
    width: auto;
    height: clamp(4.6rem, 9.8vw, 6.73rem);
    max-width: min(22.4rem, 60vw);
    margin-block: -1.35rem;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 0 12px rgba(214, 178, 110, 0.55));
    position: relative;
    z-index: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.nav-link {
    font-family: inherit;
    font-size: clamp(0.84rem, 1.15vw, 0.98rem);
    font-weight: 500;
    color: rgba(245, 240, 232, 0.88);
    background: none;
    border: none;
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.25s, background 0.25s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link:focus-visible {
    color: var(--gold);
    background: rgba(214, 178, 110, 0.08);
    outline: none;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(214, 178, 110, 0.48);
    background: rgba(214, 178, 110, 0.09);
    color: var(--gold);
    font-size: clamp(0.84rem, 1.15vw, 0.98rem);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
    white-space: nowrap;
}

.nav-cta:hover, .nav-cta:focus-visible {
    transform: scale(1.03);
    box-shadow: 0 0 22px rgba(214, 178, 110, 0.22);
    outline: none;
}

/* ── Viewport shell ── */
.viewport {
    position: relative;
    z-index: 2;
    max-width: 96rem;
    margin: 0 auto;
    padding: 0 0.85rem 0.65rem;
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    html, body {
        height: 100%;
        overflow: hidden;
    }

    .viewport {
        height: calc(100dvh - var(--header-h) - 1rem);
        overflow: hidden;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0.15rem;
        padding-bottom: 0.5rem;
    }

    .hero-copy {
        margin-top: clamp(1rem, 2.8vh, 1.85rem);
        padding: 0.2rem 0.5rem 0.15rem;
    }

    .hero-title {
        font-size: clamp(1.05rem, 2vw, 1.65rem);
    }

    .hero-sub {
        margin-top: 0.25rem;
        font-size: clamp(0.68rem, 1.1vw, 0.82rem);
    }

    .site-footer {
        padding-top: 0.15rem;
    }
}

.hero-copy {
    text-align: center;
    margin-top: clamp(0.85rem, 2.2vh, 1.5rem);
    padding: 0.35rem 0.5rem 0.25rem;
    animation: fadeUp 1s var(--ease) 0.3s both;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(1.2rem, 2.8vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.3;
    background: linear-gradient(135deg, #f5ecd8 0%, var(--gold) 45%, #c9a055 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 28px rgba(214, 178, 110, 0.25));
}

.hero-sub {
    margin-top: 0.45rem;
    font-size: clamp(0.72rem, 1.35vw, 0.95rem);
    font-weight: 300;
    color: rgba(245, 240, 232, 0.42);
    letter-spacing: 0.015em;
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Universe stage ── */
.universe {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.35rem, 1.5vh, 0.85rem);
}

@media (min-width: 1024px) {
    .universe {
        flex: none;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .portals-carousel {
        width: 100%;
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .portals-dots {
        display: none !important;
    }

    .portals-row {
        transform: none;
    }
}

.portals-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--portal-gap);
    width: 100%;
    max-width: 74rem;
    z-index: 2;
    direction: ltr;
    padding-inline: clamp(0.25rem, 1.5vw, 0.75rem);
}

/* ── Mobile portal slider ── */
.portals-carousel {
    width: 100%;
}

.portals-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
    position: relative;
    z-index: 6;
    pointer-events: auto;
}

.portals-dot {
    width: 0.48rem;
    height: 0.48rem;
    padding: 0.28rem;
    box-sizing: content-box;
    background-clip: content-box;
    border: none;
    border-radius: 50%;
    background-color: rgba(214, 178, 110, 0.28);
    cursor: pointer;
    transition: background-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.portals-dot.is-active {
    background-color: var(--gold);
    transform: scale(1.35);
    box-shadow: 0 0 10px rgba(214, 178, 110, 0.55);
}

.portals-dot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.portals-row.is-hovering .portal-link:not(.is-active) {
    opacity: 0.65;
    filter: saturate(0.72);
}

.orbits {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.orbits path {
    fill: none;
    stroke: rgba(214, 178, 110, 0.45);
    stroke-width: 1.1;
    filter: drop-shadow(0 0 5px rgba(214, 178, 110, 0.45));
    animation: orbitPulse 3s var(--ease) infinite;
}

.orbits path.is-active {
    stroke: rgba(214, 178, 110, 0.85);
    stroke-width: 1.4;
    filter: drop-shadow(0 0 10px rgba(214, 178, 110, 0.75));
}

.orbits .node {
    fill: rgba(214, 178, 110, 0.9);
    filter: drop-shadow(0 0 8px rgba(214, 178, 110, 0.9));
    animation: nodePulse 2.2s var(--ease) infinite;
}

.orbits .particle {
    fill: #fff6e0;
    filter: drop-shadow(0 0 6px rgba(214, 178, 110, 1));
}

@keyframes orbitPulse {
    0%, 100% {
        opacity: 0.45;
    }
    50% {
        opacity: 0.95;
    }
}

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.65;
    }
    50% {
        opacity: 1;
    }
}

/* ── Central Sun ── */
.sun-wrap {
    position: relative;
    width: var(--sun-size);
    height: var(--sun-size);
    flex-shrink: 0;
    z-index: 5;
    animation: fadeUp 1.1s var(--ease) 0.45s both;
}

.sun-halo {
    position: absolute;
    inset: -38%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214, 178, 110, 0.14) 0%, transparent 68%);
    animation: haloBreath 4.5s var(--ease) infinite;
    pointer-events: none;
}

@keyframes haloBreath {
    0%, 100% {
        opacity: 0.65;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.sun-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(214, 178, 110, 0.12);
    pointer-events: none;
}

.sun-orbit--1 {
    inset: -22%;
    animation: spin 42s linear infinite;
}

.sun-orbit--2 {
    inset: -34%;
    border-style: dashed;
    border-color: rgba(214, 178, 110, 0.07);
    animation: spin 58s linear infinite reverse;
}

.sun-orbit--1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(214, 178, 110, 0.9);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.sun-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(214, 178, 110, 0.28);
    animation: spin 28s linear infinite;
}

.sun-ring--2 {
    inset: -8%;
    border-color: rgba(214, 178, 110, 0.14);
    animation-duration: 36s;
    animation-direction: reverse;
}

.sun-ring--3 {
    inset: -16%;
    border: 1px dashed rgba(214, 178, 110, 0.09);
    animation-duration: 48s;
}

.sun-core {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 32%, rgba(214, 178, 110, 0.24), rgba(6, 6, 6, 0.94) 62%);
    border: 1px solid rgba(214, 178, 110, 0.55);
    box-shadow: 0 0 60px rgba(214, 178, 110, 0.5),
    0 0 120px rgba(214, 178, 110, 0.22),
    0 0 200px rgba(214, 178, 110, 0.08),
    inset 0 0 50px rgba(214, 178, 110, 0.12);
    animation: sunBreath 4s var(--ease) infinite;
}

@keyframes sunBreath {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sun-logo {
    width: 83%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(214, 178, 110, 0.75));
}

.sun-spark {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(214, 178, 110, 0.95);
    animation: sparkDrift 4.5s var(--ease) infinite;
}

.sun-spark:nth-child(1) {
    top: 2%;
    right: 12%;
}

.sun-spark:nth-child(2) {
    bottom: 8%;
    left: 6%;
    animation-delay: 1s;
}

.sun-spark:nth-child(3) {
    top: 35%;
    left: -2%;
    animation-delay: 2s;
}

.sun-spark:nth-child(4) {
    bottom: 20%;
    right: 0;
    animation-delay: 3s;
}

@keyframes sparkDrift {
    0%, 100% {
        opacity: 0.35;
        transform: translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: translate(5px, -8px);
    }
}

/* ── Portals ── */
.portal-link {
    position: relative;
    z-index: 4;
    text-decoration: none;
    color: inherit;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    max-width: calc(var(--portal-size) + 2rem);
    transition: opacity 0.45s var(--ease), filter 0.45s var(--ease);
    animation: fadeUp 1s var(--ease) 0.6s both;
}

.portal-link--blue {
    animation-delay: 0.7s;
}

.portal-link--gold {
    animation-delay: 0.8s;
}

.portal-link--rose {
    animation-delay: 0.75s;
}

.portal-link--silver {
    animation-delay: 0.85s;
}

.portal {
    --glow: 214, 178, 110;
    --accent: #D6B26E;
    --btn-a: #c9a055;
    --btn-b: #5c4010;
    width: var(--portal-size);
    height: var(--portal-size);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45), 0 0 32px rgba(var(--glow), 0.22);
}

.portal-link:hover .portal,
.portal-link.is-active .portal,
.portal-link:focus-visible .portal {
    transform: scale(1.05);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(var(--glow), 0.55),
    0 0 50px rgba(var(--glow), 0.5),
    0 0 90px rgba(var(--glow), 0.22);
}

.portal-link:focus-visible {
    outline: none;
}

.portal--blue {
    --glow: 45, 168, 255;
    --accent: #3db4ff;
    --btn-a: #1a8ae0;
    --btn-b: #0a3568;
}

.portal--gold {
    --glow: 232, 184, 74;
    --accent: #e8b84a;
    --btn-a: #d6b26e;
    --btn-b: #5c4010;
}

.portal--rose {
    --glow: 210, 110, 130;
    --accent: #e0889a;
    --btn-a: #d47288;
    --btn-b: #6b2038;
}

.portal--silver {
    --glow: 175, 190, 205;
    --accent: #b8c8d8;
    --btn-a: #9eb0c4;
    --btn-b: #3a4f62;
}

.portal__bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 0;
}

.portal__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portal__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(var(--glow), 0.6);
    box-shadow: 0 0 28px rgba(var(--glow), 0.38),
    inset 0 0 20px rgba(var(--glow), 0.06);
    pointer-events: none;
    z-index: 1;
}

.portal__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    direction: rtl;
    width: 100%;
    padding: 0 0.25rem;
}

.portal__badge {
    font-size: clamp(0.58rem, 0.95vw, 0.68rem);
    font-weight: 600;
    color: rgba(var(--glow), 1);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(var(--glow), 0.4);
}

.portal__title {
    font-size: clamp(0.72rem, 1.15vw, 0.88rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.portal__desc {
    font-size: clamp(0.52rem, 0.88vw, 0.64rem);
    color: rgba(245, 240, 232, 0.58);
    line-height: 1.5;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    margin-top: 0;
    padding: 0.42rem 1.15rem;
    border-radius: 999px;
    font-size: clamp(0.58rem, 1vw, 0.72rem);
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(var(--glow), 0.28);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
    white-space: nowrap;
}

.portal-link:hover .portal__btn,
.portal-link:focus-visible .portal__btn {
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), 0 0 22px rgba(var(--glow), 0.48);
}

/* ── Footer ── */
.site-footer {
    flex-shrink: 0;
    padding: 0.35rem 0.75rem 0.25rem;
    animation: fadeUp 1s var(--ease) 0.9s both;
    position: relative;
    z-index: 10;
}

.copyright {
    text-align: center;
    font-size: clamp(0.5rem, 0.75vw, 0.62rem);
    font-weight: 400;
    line-height: 1.4;
    color: rgba(214, 178, 110, 0.4);
    margin-inline: auto;
    white-space: nowrap;
}

/* ── Modals ── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal__dialog {
    position: relative;
    width: min(42rem, 100%);
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 1.25rem;
    border: 1px solid rgba(214, 178, 110, 0.3);
    background: rgba(10, 10, 12, 0.94);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s var(--ease);
}

.modal.is-open .modal__dialog {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(214, 178, 110, 0.25);
    background: rgba(214, 178, 110, 0.08);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.modal__body {
    padding: 2rem 1.5rem 1.5rem;
}

.modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.65rem;
}

.modal__lead {
    font-size: 0.86rem;
    color: rgba(245, 240, 232, 0.65);
    line-height: 1.85;
    margin-bottom: 1rem;
}

.modal__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

.modal__card {
    padding: 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(214, 178, 110, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.modal__card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(245, 240, 232, 0.88);
    margin-bottom: 0.3rem;
}

.modal__card-text {
    font-size: 0.74rem;
    color: rgba(245, 240, 232, 0.52);
    line-height: 1.65;
}

.modal__phones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.modal__phone {
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(214, 178, 110, 0.15);
    background: rgba(214, 178, 110, 0.05);
    color: rgba(245, 240, 232, 0.82);
    font-size: 0.78rem;
    text-decoration: none;
}

.modal__contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.modal__contact-block {
    padding: 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(214, 178, 110, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.modal__contact-block--full {
    grid-column: 1 / -1;
}

.modal__contact-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.55rem;
}

.modal__contact-heading i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.modal__contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.modal__contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(214, 178, 110, 0.1);
    background: rgba(6, 6, 8, 0.35);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

a.modal__contact-item:hover,
a.modal__contact-item:focus-visible {
    border-color: rgba(214, 178, 110, 0.32);
    background: rgba(214, 178, 110, 0.06);
    transform: translateY(-1px);
    outline: none;
}

.modal__contact-item--mobile {
    border-color: rgba(214, 178, 110, 0.18);
}

.modal__contact-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(214, 178, 110, 0.75);
    letter-spacing: 0.01em;
}

.modal__contact-value {
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(245, 240, 232, 0.88);
}

.modal__social {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.15rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(214, 178, 110, 0.1);
}

.modal__social a {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 178, 110, 0.25);
    color: var(--gold);
    text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    html, body {
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .viewport {
        display: flex;
        flex-direction: column;
        min-height: auto;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .universe {
        display: contents;
    }

    .orbits {
        display: none;
    }

    .sun-wrap {
        order: 1;
        margin: 45px auto 0;
        width: clamp(12.1rem, 48.3vw, 17.25rem);
        height: clamp(12.1rem, 48.3vw, 17.25rem);
    }

    .hero-copy {
        order: 2;
        margin-top: 0.85rem;
        padding: 0.35rem 1rem 0.5rem;
    }

    .portals-carousel {
        order: 3;
        width: 100%;
        padding: 0.75rem 0 0.25rem;
    }

    .portals-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
        padding: 0.75rem 0.5rem;
    }

    .site-footer {
        order: 4;
        margin-top: 0.75rem;
        padding: 0.85rem 0.5rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid rgba(214, 178, 110, 0.1);
        background: linear-gradient(180deg, transparent 0%, rgba(6, 6, 8, 0.35) 100%);
    }

    :root {
        --portal-size: min(86vw, 19.25rem);
        --portal-gap: 1.5rem;
    }

    .portal-link {
        max-width: min(100%, calc(var(--portal-size) + 3rem));
        gap: 0.65rem;
    }

    .portal__meta {
        max-width: var(--portal-size);
    }

    .portal__btn {
        width: 100%;
        max-width: 15rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --portal-size: min(72vw, 20rem);
        --portal-gap: 1.25rem;
    }
}

@media (max-width: 1023px) {
    .portals-carousel.is-slider {
        overflow: hidden;
        width: 100%;
        padding: 0.5rem 0 0.15rem;
        cursor: grab;
        touch-action: pan-y pinch-zoom;
        user-select: none;
        -webkit-user-select: none;
        direction: ltr;
        container-type: inline-size;
        --portal-size: min(calc(100cqi - 1.5rem), 17.5rem);
    }

    .portals-carousel.is-slider.is-dragging {
        cursor: grabbing;
    }

    .portals-carousel.is-slider .portals-row {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
        width: auto;
        max-width: none;
        direction: ltr;
        will-change: transform;
        transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .portals-carousel.is-slider.is-dragging .portals-row {
        transition: none;
    }

    .portals-carousel.is-slider .portal-link {
        flex: 0 0 auto;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        animation: none;
        opacity: 1;
        transform: none;
        text-align: center;
    }

    .portals-carousel.is-slider .portal {
        margin-inline: auto;
    }

    .portals-carousel.is-slider .portal__meta {
        width: 100%;
        max-width: var(--portal-size);
        margin-inline: auto;
        align-items: center;
    }

    .portals-carousel.is-slider .portals-dots {
        display: flex;
        margin-bottom: 0.15rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .portals-carousel.is-slider {
        --portal-size: min(calc(100cqi - 2.5rem), 22rem);
        padding: 0.75rem 0 0.35rem;
    }

    .portals-carousel.is-slider .portals-dots {
        margin-top: 0.85rem;
    }

    .copyright {
        font-size: clamp(0.55rem, 1.2vw, 0.68rem);
        max-width: none;
        white-space: nowrap;
        color: rgba(214, 178, 110, 0.48);
    }
}

@media (max-width: 767px) {
    .nav-pill {
        padding: 0.12rem 0.7rem;
        border-radius: 1rem;
    }

    .brand-mark {
        height: clamp(3.74rem, 17.25vw, 5rem);
        max-width: min(16.1rem, 71vw);
        margin-block: -1rem;
    }

    .nav-link {
        padding: 0.26rem 0.45rem;
        font-size: 0.74rem;
    }

    .nav-cta {
        padding: 0.26rem 0.6rem;
        font-size: 0.74rem;
    }

    .hero-title {
        font-size: 1.12rem;
        line-height: 1.4;
    }

    .hero-sub {
        font-size: 0.78rem;
        padding: 0 0.25rem;
    }

    .hero-copy {
        margin-top: 45px;
        padding-top: 0;
        padding-bottom: 0.35rem;
    }

    :root {
        --portal-size: min(92.4vw, 18.15rem);
    }

    .portals-row {
        gap: 1.35rem;
        padding: 0.5rem 0.35rem;
    }

    .site-footer {
        margin-top: 0.25rem;
        padding: 1rem 0.35rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }

    .copyright {
        font-size: clamp(0.48rem, 2.1vw, 0.68rem);
        line-height: 1.4;
        color: rgba(214, 178, 110, 0.52);
        max-width: none;
        white-space: nowrap;
        padding: 0;
        letter-spacing: 0;
    }

    .sun-halo {
        inset: -22%;
    }

    .sun-orbit--1 {
        inset: -14%;
    }

    .sun-orbit--2 {
        inset: -24%;
    }

    .sun-ring--3 {
        inset: -10%;
    }

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

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

    .modal__contact-block--full {
        grid-column: auto;
    }

    .modal__body {
        padding: 1.75rem 1.15rem 1.25rem;
    }
}

@media (max-width: 430px) {
    :root {
        --portal-size: min(88vw, 17rem);
    }

    .sun-wrap {
        width: clamp(10.9rem, 50.6vw, 13.8rem);
        height: clamp(10.9rem, 50.6vw, 13.8rem);
    }
}

@media (max-width: 374px) {
    :root {
        --portal-size: min(90vw, 16rem);
    }

    .hero-title {
        font-size: 1rem;
    }

    .portal__title {
        font-size: 0.72rem;
    }

    .portal__desc {
        font-size: 0.58rem;
    }
}

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

    body {
        opacity: 1;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    :root {
        --portal-size: clamp(7.5rem, 11.5vw, 10.75rem);
        --portal-gap: clamp(0.85rem, 2vw, 2rem);
    }

    .portals-row {
        max-width: min(74rem, 100%);
    }

    .portal__title {
        font-size: clamp(0.66rem, 0.95vw, 0.8rem);
    }

    .portal__desc {
        font-size: clamp(0.5rem, 0.78vw, 0.6rem);
    }
}

@media (min-width: 1024px) and (max-height: 760px) {
    :root {
        --sun-size: clamp(8.6rem, 16.1vh, 12.1rem);
        --portal-size: clamp(7.425rem, 12.65vh, 10.45rem);
        --portal-gap: clamp(0.9rem, 2.4vw, 1.75rem);
    }

    .hero-copy {
        margin-top: 0.65rem;
        padding: 0.1rem 0;
    }

    .hero-title {
        font-size: clamp(0.95rem, 1.8vw, 1.35rem);
    }
}

@media (min-width: 1280px) {
    :root {
        --portal-size: clamp(9rem, 13vw, 12.5rem);
        --portal-gap: clamp(1.5rem, 3vw, 3.25rem);
    }
}

@media (min-width: 1440px) {
    :root {
        --sun-size: clamp(12.1rem, 17.25vw, 16.7rem);
        --portal-size: clamp(10rem, 12.5vw, 13.25rem);
        --portal-gap: 3.25rem;
    }
}

@media (min-width: 1920px) {
    :root {
        --sun-size: 16.7rem;
        --portal-size: 13.25rem;
        --portal-gap: 3.5rem;
    }
}
