/* ═══════════════════════════════════════════════
   SMG SPA CONCEPT — style.css
   View Transitions API + Proprietary Router
═══════════════════════════════════════════════ */

:root {
    --bg: #f8f8f6;
    --ink: #0a0a0a;
    --ink-2: #555;
    --accent: #0052ff;
    --accent-2: #7c3aed;
    --border: rgba(0,0,0,0.08);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── CUSTOM CURSOR ─────────────────────────── */
.cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(0,0,0,0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--ease), width 0.4s var(--ease), height 0.4s var(--ease), background 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    mix-blend-mode: difference;
}
.cursor.hovering {
    width: 70px;
    height: 70px;
    background: white;
    border-color: transparent;
}
.cursor-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--ink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.05s linear;
    mix-blend-mode: difference;
}

/* ── NAV ───────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    align-items: center;
}
.nav-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248,248,246,0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 12px 24px;
    position: relative;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
    font-family: 'Outfit', sans-serif;
}
.logo-mark { font-weight: 700; font-size: 1rem; letter-spacing: -0.04em; }
.logo-sep { color: #ccc; }
.logo-sub { font-weight: 300; font-size: 0.9rem; color: var(--ink-2); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    position: relative;
    z-index: 1;
}
.nav-links a {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-radius: 100px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}
.nav-links a.active { color: #111111; font-weight: 600; }

.nav-pill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 100px;
    transition: left 0.5s var(--ease), width 0.5s var(--ease), opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

/* ── PAGE TRANSITION OVERLAY ───────────────── */
.transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    pointer-events: none;
    overflow: hidden;
}
.transition-wipe {
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: 0 40px 40px 0;
}

/* ── VIEW TRANSITION API (native) ──────────── */
@keyframes vt-fade-in {
    from { opacity: 0; transform: translateY(20px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes vt-fade-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-20px) scale(0.99); }
}
::view-transition-old(root) {
    animation: vt-fade-out 0.35s var(--ease-in) forwards;
}
::view-transition-new(root) {
    animation: vt-fade-in 0.5s var(--ease) forwards;
}

/* ── APP ROOT ──────────────────────────────── */
#app-root {
    padding-top: 100px;
    min-height: 100vh;
}

/* ── LOADING INDICATOR ─────────────────────── */
.page-loader {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
    border-radius: 0 2px 2px 0;
}
.page-loader.loading { transform: scaleX(0.7); transition: transform 2s var(--ease); }
.page-loader.done { transform: scaleX(1); transition: transform 0.2s var(--ease); }

/* ── REVEAL ANIMATIONS ─────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════
   PAGE STYLES
═══════════════════════════════════════════════ */

/* ── HOME ──────────────────────────────────── */
.home-hero {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 80px 0;
    max-width: 1400px;
    margin: 0 auto;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 32px;
}
.hero-kicker::before {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--accent);
}
.home-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(4rem, 10vw, 10rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.92;
    margin-bottom: 48px;
    color: var(--ink);
}
.home-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-desc {
    font-size: 1.15rem;
    color: var(--ink-2);
    max-width: 520px;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 56px;
}
.home-cta {
    display: flex;
    gap: 16px;
    align-items: center;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--ink);
    color: white;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}
.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,82,255,0.3);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border: 1.5px solid var(--border);
    color: var(--ink);
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s var(--ease);
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-2px); }

.home-marquee {
    margin-top: 100px;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}
.marquee-track {
    display: flex;
    gap: 80px;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.15);
}
.marquee-track span { color: rgba(0,0,0,0.15); }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── WORK ──────────────────────────────────── */
.page-hero {
    padding: 80px 80px 60px;
    max-width: 1400px;
    margin: 0 auto;
}
.page-kicker {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-kicker::before {
    content: '';
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--accent);
}
.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
}
.page-desc {
    font-size: 1.1rem;
    color: var(--ink-2);
    max-width: 560px;
    line-height: 1.65;
    font-weight: 300;
}

.work-grid {
    padding: 0 80px 120px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.work-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}
.work-card:hover { transform: translateY(-8px); box-shadow: 0 40px 80px rgba(0,0,0,0.08); }
.work-card.featured { grid-column: 1 / -1; }
.work-card-visual {
    width: 100%;
    aspect-ratio: 16/7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    transition: transform 0.8s var(--ease);
}
.work-card:not(.featured) .work-card-visual { aspect-ratio: 4/3; }
.work-card:hover .work-card-visual { transform: scale(1.03); }

.vis-1 { background: linear-gradient(135deg, #0010a0, #0052ff); color: rgba(255,255,255,0.15); }
.vis-2 { background: linear-gradient(135deg, #0d0d0d, #2a2a2a); color: rgba(255,255,255,0.12); }
.vis-3 { background: linear-gradient(135deg, #7c3aed, #c026d3); color: rgba(255,255,255,0.15); }
.vis-4 { background: linear-gradient(135deg, #064e3b, #059669); color: rgba(255,255,255,0.12); }

.work-card-info { padding: 32px 36px; }
.work-card-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.work-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}
.work-card-desc { font-size: 0.9rem; color: var(--ink-2); line-height: 1.6; font-weight: 300; }

/* ── ABOUT ─────────────────────────────────── */
.about-split {
    padding: 0 80px 120px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-visual {
    border-radius: 24px;
    aspect-ratio: 1;
    background: linear-gradient(145deg, #0a0a0a 0%, #1a1a2e 50%, #0052ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 120px;
}
.about-visual-text {
    font-family: 'Outfit', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.08);
    letter-spacing: -0.05em;
}
.about-content { padding-top: 20px; }
.about-lead {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.3;
    margin-bottom: 40px;
}
.about-body {
    font-size: 1rem;
    color: var(--ink-2);
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 24px;
}
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--border);
}
.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--ink-2); font-weight: 400; }

/* ── CONTACT ───────────────────────────────── */
.contact-wrap {
    padding: 0 80px 120px;
    max-width: 1400px;
    margin: 0 auto;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}
.contact-info { padding-top: 10px; }
.contact-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
}
.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.contact-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.form-input, .form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: none;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0,82,255,0.08);
}
.form-textarea { min-height: 160px; resize: vertical; }
.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--ink);
    color: white;
    border: none;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: none;
    transition: background 0.3s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
    align-self: flex-start;
}
.form-submit:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,82,255,0.25);
}
.form-submit svg { transition: transform 0.3s var(--ease); }
.form-submit:hover svg { transform: translateX(4px); }

/* ── 404 ────────────────────────────────────── */
.error-wrap {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 24px;
    padding: 80px;
}
.error-code {
    font-family: 'Outfit', sans-serif;
    font-size: 10rem;
    font-weight: 700;
    letter-spacing: -0.08em;
    line-height: 1;
    color: var(--border);
}
.error-title { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 600; }
.error-desc { color: var(--ink-2); font-weight: 300; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
    nav { padding: 16px 20px; }
    .home-hero { padding: 60px 24px 0; }
    .page-hero, .work-grid, .about-split, .contact-wrap { padding-left: 24px; padding-right: 24px; }
    .work-grid, .about-split, .contact-grid { grid-template-columns: 1fr; }
    .work-card.featured { grid-column: 1; }
    .about-visual { position: relative; top: 0; }
    .nav-links { display: none; }
}
