/* ============================================
   HOSSEIN POUR 66 — Premium Brand Gateway
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-elevated: #1a1a1a;
    --text-primary: #F3F0E9;
    --text-secondary: #A7A39A;
    --text-muted: #5a5a5a;
    --accent: #B7A27A;
    --accent-subtle: rgba(183, 162, 122, 0.15);
    --panel-bg: rgba(17, 17, 17, 0.65);
    --panel-bg-active: rgba(17, 17, 17, 0.85);
    --border-subtle: rgba(243, 240, 233, 0.06);
    --border-accent: rgba(183, 162, 122, 0.4);
    --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Vazirmatn', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

button {
    background: none;
    border: none;
    cursor: none;
    font-family: inherit;
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.preloader__brand {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 300;
    letter-spacing: 0.4em;
    color: var(--text-secondary);
    opacity: 0;
}

/* --- Custom Cursor --- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    pointer-events: none;
    mix-blend-mode: difference;
    opacity: 0;
}

.cursor__dot {
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    top: -3px;
    left: -3px;
    transition: transform 0.15s var(--transition-fast),
                opacity 0.3s ease;
}

.cursor__ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(243, 240, 233, 0.4);
    border-radius: 50%;
    position: absolute;
    top: -18px;
    left: -18px;
    transition: width 0.4s var(--transition-smooth),
                height 0.4s var(--transition-smooth),
                top 0.4s var(--transition-smooth),
                left 0.4s var(--transition-smooth),
                border-color 0.4s ease,
                background 0.4s ease;
}

.cursor__label {
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    direction: ltr;
}

/* Cursor on panel hover */
.cursor.is-active .cursor__ring {
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    border-color: var(--accent);
    background: rgba(183, 162, 122, 0.1);
}

.cursor.is-active .cursor__label {
    opacity: 1;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor { display: none !important; }
    html, body, a, button { cursor: auto !important; }
}

/* --- Background Layer --- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.bg-layer__default {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(30, 28, 25, 1) 0%, rgba(10, 10, 10, 1) 100%);
    opacity: 1;
}

.bg-layer__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s var(--transition-smooth);
    will-change: opacity;
}

.bg-layer__image.is-visible {
    opacity: 1;
}

#bgImage0 {
    background-image: url('../images/photo-1600596542815-ffad4c1539a9.jfif');
}

#bgImage1 {
    background-image: url('../images/photo-1618221195710-dd6b41faaea6.jfif');
}

#bgImage2 {
    background-image: url('../images/photo-1512403754473-27835f7b9984.jfif');
}

.bg-layer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    transition: background 0.8s ease;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 60px);
    opacity: 0;
}

.header__brand {
    font-size: clamp(10px, 1.1vw, 13px);
    font-weight: 400;
    letter-spacing: 0.35em;
    color: var(--text-secondary);
    direction: ltr;
}

.header__menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.header__menu:hover {
    opacity: 1;
}

.header__menu span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--text-secondary);
    transition: transform 0.3s var(--transition-smooth),
                width 0.3s var(--transition-smooth);
}

.header__menu:hover span:first-child {
    width: 16px;
}

.header__menu:hover span:last-child {
    width: 20px;
}

/* --- Main --- */
.main {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(24px, 4vw, 60px);
}

/* --- Brand Center --- */
.brand-center {
    text-align: center;
    margin-bottom: clamp(28px, 4vh, 56px);
    opacity: 0;
}

.brand-center__label {
    font-size: clamp(9px, 0.8vw, 11px);
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--text-muted);
    margin-bottom: 12px;
    direction: ltr;
}

.brand-center__title {
    font-size: clamp(28px, 4.5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.brand-center__subtitle {
    font-size: clamp(12px, 1.2vw, 16px);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
}

/* --- Panels --- */
.panels {
    display: flex;
    gap: clamp(10px, 1.5vw, 20px);
    width: 100%;
    max-width: 1200px;
    height: clamp(200px, 36vh, 340px);
    opacity: 0;
}

.panel {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: flex 0.8s var(--transition-smooth);
    will-change: flex;
}

.panel__inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(16px, 2vw, 28px);
    background: var(--panel-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background 0.6s ease,
                border-color 0.6s ease;
    overflow: hidden;
}

/* Panel active state */
.panel.is-active .panel__inner {
    background: var(--panel-bg-active);
    border-color: var(--border-accent);
}

/* Number */
.panel__number {
    position: absolute;
    top: clamp(12px, 1.5vw, 20px);
    right: clamp(16px, 2vw, 28px);
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.5s ease;
    direction: ltr;
}

.panel.is-active .panel__number {
    color: var(--accent);
}

/* Content */
.panel__content {
    position: relative;
    z-index: 2;
}

.panel__title {
    font-size: clamp(14px, 1.5vw, 20px);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.5s ease;
}

.panel__category {
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 0;
    transition: color 0.5s ease;
}

.panel.is-active .panel__category {
    color: var(--text-primary);
}

/* CTA */
.panel__cta {
    display: inline-block;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-top: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s var(--transition-smooth),
                transform 0.5s var(--transition-smooth);
}

.panel.is-active .panel__cta {
    opacity: 1;
    transform: translateY(0);
}

/* Accent Line */
.panel__line {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s var(--transition-smooth);
}

.panel.is-active .panel__line {
    transform: scaleX(1);
}

/* Panel scale on hover */
.panel:hover {
    flex: 1.5;
}

/* Non-active panels when one is active */
.panels:hover .panel:not(.is-active) {
    flex: 0.75;
}

/* --- Footer --- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(16px, 2vw, 32px) clamp(24px, 4vw, 60px);
    opacity: 0;
}

.footer span {
    font-size: clamp(9px, 0.7vw, 11px);
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    direction: ltr;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .panels {
        height: clamp(180px, 34vh, 300px);
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .main {
        padding: 0 20px;
    }

    .brand-center {
        margin-bottom: clamp(16px, 2.5vh, 32px);
    }

    .panels {
        flex-direction: column;
        height: auto;
        gap: 8px;
        max-width: 400px;
        margin: 0 auto;
    }

    .panel {
        flex: unset !important;
        height: clamp(80px, 11vh, 110px);
    }

    .panels:hover .panel:not(.is-active) {
        flex: unset !important;
    }

    .panel:hover {
        flex: unset !important;
    }

    .panel__number {
        top: 50%;
        right: auto;
        left: clamp(12px, 3vw, 20px);
        transform: translateY(-50%);
    }

    .panel__inner {
        justify-content: center;
        padding: 12px clamp(16px, 4vw, 24px);
        padding-right: clamp(60px, 14vw, 100px);
    }

    .panel__title {
        font-size: clamp(13px, 3.5vw, 16px);
        margin-bottom: 2px;
    }

    .panel__category {
        font-size: clamp(10px, 2.5vw, 12px);
    }

    .panel__cta {
        margin-top: 8px;
    }

    /* On mobile, active panel gets slight visual emphasis but all stay visible */
    .panel.is-active .panel__inner {
        background: rgba(17, 17, 17, 0.9);
        border-color: var(--border-accent);
    }
}

/* Mobile Portrait */
@media (max-width: 430px) {
    .header {
        padding: 16px 16px;
    }

    .footer {
        padding: 12px 16px;
    }

    .brand-center__title {
        font-size: clamp(24px, 8vw, 32px);
    }
}

/* Very small screens */
@media (max-height: 600px) {
    .brand-center {
        margin-bottom: 12px;
    }

    .brand-center__label {
        display: none;
    }

    .panels {
        height: clamp(120px, 30vh, 200px);
    }
}

/* Ultra-wide */
@media (min-width: 1920px) {
    .panels {
        max-width: 1400px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

/* Selection */
::selection {
    background: var(--accent-subtle);
    color: var(--text-primary);
}
