/* Bejdic Mario — site styles */
:root {
    --paper: #f8f7f4;
    --paper-2: #f0eee8;
    --ink: #14151a;
    --ink-2: #1b1d24;
    --muted: #5f616b;
    --cobalt: #2f4bff;
    --cobalt-deep: #2037d6;
    --cobalt-soft: #6f82ff;
    --line: rgba(20, 21, 26, 0.12);
    --line-soft: rgba(20, 21, 26, 0.07);
    --card: #ffffff;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 247, 244, 0.8);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    background: rgba(248, 247, 244, 0.95);
    border-bottom-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--cobalt);
    color: #fff;
    box-shadow: 0 6px 18px rgba(47, 75, 255, 0.3);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 15px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--cobalt);
    background: var(--paper-2);
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.menu-btn.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 104px 0 0;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--cobalt);
    text-transform: uppercase;
    margin-bottom: 26px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(44px, 7.6vw, 92px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -2.6px;
}

.hero-title span {
    color: var(--cobalt);
}

.hero-lead {
    max-width: 640px;
    margin-top: 30px;
    font-size: 19px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-solid {
    background: var(--cobalt);
    color: #fff;
    box-shadow: 0 10px 26px rgba(47, 75, 255, 0.28);
}

.btn-solid:hover {
    background: var(--cobalt-deep);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(47, 75, 255, 0.36);
}

.btn-line {
    color: var(--ink);
    border: 1px solid var(--line);
    background: transparent;
}

.btn-line:hover {
    border-color: var(--cobalt);
    color: var(--cobalt);
}

.hero-stats {
    margin-top: 92px;
    padding: 34px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.5px;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Section shared ---------- */
section {
    scroll-margin-top: 90px;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--cobalt);
    margin-bottom: 18px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1.5px;
}

/* ---------- About ---------- */
.about {
    padding: 120px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.about-text p {
    color: var(--muted);
    font-size: 18px;
    margin-bottom: 20px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ---------- Work (2x2 cards) ---------- */
.work {
    padding: 110px 0;
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.work-grid {
    margin-top: 54px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.work-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 38px 34px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--cobalt-soft);
    box-shadow: 0 18px 40px rgba(20, 21, 26, 0.08);
}

.work-num {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--cobalt);
}

.work-card h3 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 14px 0 10px;
}

.work-card p {
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Principles (numbered list) ---------- */
.principles {
    padding: 120px 0;
}

.principles-list {
    margin-top: 54px;
    border-top: 1px solid var(--line);
}

.principle {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 28px;
    align-items: start;
    padding: 36px 8px;
    border-bottom: 1px solid var(--line);
    transition: padding-left 0.3s ease;
}

.principle:hover {
    padding-left: 20px;
}

.p-index {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    color: var(--cobalt);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}

.principle h3 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

.principle p {
    max-width: 640px;
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Contact (filled ink block) ---------- */
.contact {
    padding: 40px 0 120px;
}

.contact-box {
    position: relative;
    overflow: hidden;
    text-align: center;
    background: var(--ink);
    color: var(--paper);
    border-radius: 28px;
    padding: 96px 32px;
}

.contact-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(640px circle at 50% -10%, rgba(47, 75, 255, 0.4), transparent 60%);
    pointer-events: none;
}

.contact-box > * {
    position: relative;
    z-index: 1;
}

.contact-box .eyebrow {
    text-align: center;
}

.eyebrow.light {
    color: var(--cobalt-soft);
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 700;
    letter-spacing: -1.6px;
    margin-bottom: 18px;
}

.contact-lead {
    max-width: 500px;
    margin: 0 auto 36px;
    color: rgba(248, 247, 244, 0.72);
    font-size: 18px;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(20px, 3.4vw, 32px);
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--cobalt);
    padding-bottom: 4px;
    transition: color 0.2s, border-color 0.2s;
    word-break: break-word;
}

.contact-email:hover {
    color: var(--cobalt-soft);
    border-bottom-color: var(--cobalt-soft);
}

.contact-company {
    margin-top: 30px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(248, 247, 244, 0.6);
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 34px;
    background: var(--paper-2);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--cobalt);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Legal pages ---------- */
.legal-header {
    padding: 90px 0 44px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.legal-header h1 {
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -1px;
}

.legal-header .updated {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.legal-content {
    max-width: 740px;
    margin: 0 auto;
    padding: 56px 28px 110px;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin: 46px 0 14px;
    color: var(--ink);
}

.legal-content p {
    color: var(--muted);
    margin-bottom: 16px;
}

.legal-content a {
    color: var(--cobalt);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.legal-content a:hover {
    color: var(--cobalt-deep);
}

/* ---------- Reveal animation hooks (game.js) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 24px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

@media (max-width: 640px) {
    .nav-links {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(248, 247, 244, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
        padding: 12px 20px 20px;
        display: none;
    }

    .nav-links.mobile-active {
        display: flex;
    }

    .menu-btn {
        display: flex;
    }

    .hero {
        padding-top: 64px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .principle {
        grid-template-columns: 48px 1fr;
        gap: 18px;
    }
}
