/* ============================================
   NOCTURNE EDITORIAL — Design System
   Vikas Maurya Portfolio
   Luxury editorial aesthetic, zero clichés
   ============================================ */

/* === Tokens === */
:root {
    --bg: #0d1117;
    --bg-elevated: #151b23;
    --bg-card: #1c2129;
    --bg-card-hover: #222830;
    --surface-subtle: #2a303a;

    --gold: #d4a853;
    --gold-light: #e8c47a;
    --gold-dim: #b8923f;

    --text: #e6e1d8;
    --text-secondary: #9da3ad;
    --text-muted: #6b7280;
    --text-dark: #1a1a1a;

    --border: rgba(212, 168, 83, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.06);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, sans-serif;

    --container: 1140px;
    --gutter: clamp(1.25rem, 4vw, 3rem);

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) var(--bg);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

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

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

::selection {
    background: rgba(212, 168, 83, 0.25);
    color: var(--gold-light);
}

img { max-width: 100%; height: auto; display: block; }

/* === Grain Texture === */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* === Ambient Background Glow === */
.ambient-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 15% 20%, rgba(212, 168, 83, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 85% 75%, rgba(100, 140, 200, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(212, 168, 83, 0.025) 0%, transparent 60%);
}

/* === Container === */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* === Typography === */
.heading-2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}

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

.heading-3 {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.body-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 580px;
}

.body-text + .body-text {
    margin-top: 1.25rem;
}

.body-text strong {
    color: var(--gold);
    font-weight: 500;
}

.label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem var(--gutter);
    transition: all 0.5s var(--ease);
}

.header--scrolled {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.85rem var(--gutter);
    border-bottom: 1px solid var(--border-subtle);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header__logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    transition: border-color 0.3s var(--ease);
}

.header__brand:hover .header__logo {
    border-color: var(--gold);
}

.header__name {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.header__link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    position: relative;
    transition: color 0.3s var(--ease);
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.4s var(--ease-out);
}

.header__link:hover { color: var(--text); }
.header__link:hover::after { width: 100%; }

.header__link--accent {
    color: var(--text-dark);
    background: var(--gold);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s var(--ease);
}

.header__link--accent:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.header__link--accent::after { display: none; }

.header__socials {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border-subtle);
    margin-left: -0.5rem;
}

.header__social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
}

.header__social:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.header__menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 101;
}

.header__menu-btn span {
    display: block;
    width: 26px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s var(--ease);
    transform-origin: center;
}
.header__menu-btn.active span:first-child { transform: rotate(45deg) translate(3px, 5px); }
.header__menu-btn.active span:last-child { transform: rotate(-45deg) translate(3px, -5px); }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: none;
    transition: all 0.35s var(--ease);
}

.btn--solid {
    background: var(--gold);
    color: var(--text-dark);
}

.btn--solid:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 83, 0.2);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.btn--outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem var(--gutter) 4rem;
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
}

.hero__line-accent {
    display: inline-block;
    width: 48px;
    height: 1.5px;
    background: var(--gold);
}

.hero__heading {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
    max-width: 800px;
    margin-bottom: 2rem;
}

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

.hero__sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__metrics {
    display: flex;
    gap: 3.5rem;
    margin-top: auto;
    padding-top: 4rem;
    border-top: 1px solid var(--border-subtle);
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric__number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    display: inline;
}

.metric__plus {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gold);
    margin-left: 2px;
}

.metric__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* === Marquee === */
.marquee {
    padding: 1.25rem 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.marquee__inner {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee__dot {
    color: var(--gold);
    opacity: 0.5;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* === Section === */
.section {
    padding: clamp(5rem, 10vw, 8rem) 0;
    position: relative;
    z-index: 1;
}

/* === Split Layout === */
.split {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}

.split__left {
    position: sticky;
    top: 6rem;
}

/* === Proof Blocks === */
.proof-block {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    margin-bottom: clamp(4rem, 8vw, 6rem);
}

.proof-block--reverse {
    grid-template-columns: 1.4fr 1fr;
}

.proof-block--reverse .proof-block__text {
    order: 2;
}

.proof-block--reverse .proof-block__media {
    order: 1;
}

.proof-block__tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--gold);
    margin-bottom: 1.25rem;
}

.proof-block__text .heading-3 {
    margin-bottom: 1rem;
}

.proof-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.02em;
    transition: all 0.3s var(--ease);
}

.proof-link:hover {
    color: var(--gold-light);
    transform: translateX(4px);
}

/* === Proof Frame Base === */
.proof-block__frame {
    background: var(--bg-card);
    padding: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.6s var(--ease-out);
    position: relative;
}

.proof-block__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.06), transparent 60%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.proof-block__frame:hover::before {
    opacity: 1;
}

.proof-block__frame img {
    width: 100%;
    transition: all 0.6s var(--ease-out);
}

/* === Tilted Proof Images === */
.proof-block__frame--tilt {
    transform: perspective(800px) rotateY(-3deg) rotateX(1deg);
    box-shadow: 
        12px 16px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(212, 168, 83, 0.08);
}

.proof-block__frame--tilt:hover {
    transform: perspective(800px) rotateY(-1deg) rotateX(0.5deg) scale(1.03);
    box-shadow: 
        16px 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(212, 168, 83, 0.15);
}

.proof-block__frame--tilt-reverse {
    transform: perspective(800px) rotateY(3deg) rotateX(1deg);
    box-shadow: 
        -12px 16px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(212, 168, 83, 0.08);
}

.proof-block__frame--tilt-reverse:hover {
    transform: perspective(800px) rotateY(1deg) rotateX(0.5deg) scale(1.03);
    box-shadow: 
        -16px 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(212, 168, 83, 0.15);
}

.proof-block__frame--tilt img,
.proof-block__frame--tilt-reverse img {
    opacity: 0.92;
}

.proof-block__frame--tilt:hover img,
.proof-block__frame--tilt-reverse:hover img {
    opacity: 1;
}

/* === Stats Row === */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}

.stat-card:hover {
    border-color: rgba(212, 168, 83, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.stat-card__number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    display: inline;
}

.stat-card__plus {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--gold);
}

.stat-card__icon {
    display: block;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-card__label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.stat-card__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === Approach Steps === */
.approach-step {
    display: flex;
    gap: 1.5rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s var(--ease);
}

.approach-step:first-child {
    border-top: 1px solid var(--border-subtle);
}

.approach-step:hover {
    padding-left: 1rem;
}

.approach-step__num {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold);
    opacity: 0.4;
    font-weight: 500;
    flex-shrink: 0;
    width: 2.5rem;
    line-height: 1.3;
}

.approach-step__title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.approach-step .body-text {
    font-size: 0.9rem;
    max-width: none;
}

/* === Contact === */
.contact {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
}

.contact__inner {
    text-align: center;
}

.contact__inner .heading-2 {
    margin-bottom: 1.25rem;
}

.contact__desc {
    max-width: 500px;
    margin: 0 auto 3rem;
    text-align: center;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: left;
    transition: all 0.35s var(--ease);
}

.contact-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.contact-card__icon {
    color: var(--gold);
    display: flex;
    margin-bottom: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s var(--ease);
}

.contact-card:hover .contact-card__icon {
    opacity: 1;
}

.contact-card__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-card__value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.contact-card:hover .contact-card__value {
    color: var(--gold);
}

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

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

.footer__copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer__links {
    display: flex;
    gap: 2rem;
}

.footer__links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.3s var(--ease);
}

.footer__links a:hover {
    color: var(--gold);
}

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

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

/* === Responsive === */
@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .split__left {
        position: static;
    }

    .proof-block,
    .proof-block--reverse {
        grid-template-columns: 1fr;
    }

    .proof-block--reverse .proof-block__text { order: 1; }
    .proof-block--reverse .proof-block__media { order: 2; }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .contact__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero__metrics {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .proof-block__frame--tilt,
    .proof-block__frame--tilt-reverse {
        transform: none;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 640px) {
    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        background: rgba(13, 17, 23, 0.97);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-subtle);
        transition: right 0.4s var(--ease-out);
    }

    .header__nav.active { right: 0; }
    .header__menu-btn { display: flex; }

    .hero__heading {
        font-size: 2.4rem;
    }

    .hero__metrics {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .footer__inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero__cta {
        flex-direction: column;
    }

    .btn { width: 100%; }
}
