/* ========================================
   THE QUASAR GROUP — Style System
   Ultra-premium dark luxe aesthetic
   ======================================== */

/* --- Custom Properties --- */
:root {
    --bg-primary: #050505;
    --bg-card: #0a0a0a;
    --bg-card-hover: #0f0f0f;
    --border-subtle: #1a1a1a;
    --border-card: #141414;

    --gold: #C9A96E;
    --gold-light: #d4b87a;
    --gold-dark: #a8893e;
    --gold-glow: rgba(201, 169, 110, 0.15);

    --text-primary: #f0ede6;
    --text-secondary: #8a8680;
    --text-muted: #5a5650;

    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--gold);
    color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* --- Loader --- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--border-subtle);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

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

.loader-text {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.4em;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- Canvas --- */
#constellation {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 clamp(24px, 5vw, 80px);
    transition: background 0.5s, backdrop-filter 0.5s, border-color 0.5s;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom-color: var(--border-subtle);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo-symbol {
    font-size: 20px;
    color: var(--gold);
    line-height: 1;
}

.nav-logo-text {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.35em;
    font-weight: 500;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--gold);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-link {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 300;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    letter-spacing: 0.05em;
}

.mobile-menu-link:hover {
    color: var(--gold);
}

/* --- Hero --- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-overline {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.5em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1;
}

.hero-title-the {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-title-main {
    font-family: var(--font-serif);
    font-size: clamp(64px, 12vw, 140px);
    font-weight: 300;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold) 50%, var(--text-primary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-title-group {
    font-family: var(--font-sans);
    font-size: clamp(12px, 2vw, 18px);
    font-weight: 400;
    letter-spacing: 0.8em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 16px;
}

.hero-rule {
    display: flex;
    justify-content: center;
    margin: 48px 0;
}

.hero-rule span {
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* --- Section Shared --- */
.section-label {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 32px;
    font-weight: 400;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 64px;
}

/* --- Philosophy --- */
.philosophy {
    position: relative;
    z-index: 1;
    padding: 160px 0;
    text-align: center;
}

.philosophy-heading {
    font-family: var(--font-serif);
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-primary);
    max-width: 860px;
    margin: 0 auto;
}

.philosophy-heading em {
    font-style: italic;
    color: var(--gold);
}

.philosophy-divider {
    display: flex;
    justify-content: center;
    margin: 56px 0;
}

.philosophy-divider span {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--gold);
}

.philosophy-body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* --- Divisions --- */
.divisions {
    position: relative;
    z-index: 1;
    padding: 120px 0 160px;
}

.divisions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.division-card {
    background: var(--bg-primary);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    transition: background 0.5s var(--ease-out-expo);
}

.division-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-out-expo);
}

.division-card:hover {
    background: var(--bg-card-hover);
}

.division-card:hover::before {
    transform: scaleX(1);
}

.division-number {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 400;
}

.division-accent {
    width: 24px;
    height: 1px;
    background: var(--gold);
    margin-bottom: 24px;
    transition: width 0.5s var(--ease-out-expo);
}

.division-card:hover .division-accent {
    width: 48px;
}

.division-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.division-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 28px;
}

.division-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.division-tags span {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 0;
    transition: border-color 0.3s, color 0.3s;
}

.division-card:hover .division-tags span {
    border-color: var(--gold-dark);
    color: var(--gold);
}

/* --- Reach / Numbers --- */
.reach {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.reach-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.reach-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
}

.reach-number,
.reach-static {
    font-family: var(--font-serif);
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 300;
    color: var(--gold);
    line-height: 1;
}

.reach-label {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 400;
}

.reach-divider {
    width: 1px;
    height: 80px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

/* --- Closing --- */
.closing {
    position: relative;
    z-index: 1;
    padding: 200px 0;
    text-align: center;
}

.closing-content {
    max-width: 700px;
    margin: 0 auto;
}

.closing-heading {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.closing-divider {
    display: flex;
    justify-content: center;
    margin: 48px 0;
}

.closing-divider span {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--gold);
}

.closing-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 48px;
}

.closing-cta {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    padding: 18px 48px;
    border: 1px solid var(--gold);
    transition: background 0.4s var(--ease-out-expo),
                color 0.4s var(--ease-out-expo),
                box-shadow 0.4s;
}

.closing-cta:hover {
    background: var(--gold);
    color: var(--bg-primary);
    box-shadow: 0 0 40px var(--gold-glow);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-symbol {
    color: var(--gold);
    font-size: 14px;
}

.footer-name {
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 400;
}

.footer-legal {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-location {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--ease-out-expo),
                transform 0.9s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .divisions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

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

    .division-card {
        padding: 40px 32px;
    }

    .reach-grid {
        flex-direction: column;
        gap: 0;
    }

    .reach-divider {
        width: 40px;
        height: 1px;
    }

    .reach-item {
        padding: 32px 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .philosophy {
        padding: 100px 0;
    }

    .closing {
        padding: 120px 0;
    }

    .hero-title-main {
        font-size: clamp(48px, 15vw, 80px);
    }
}

@media (max-width: 480px) {
    .division-card {
        padding: 32px 24px;
    }

    .hero-overline {
        font-size: 10px;
        margin-bottom: 24px;
    }
}
