/* ===========================
   Codebat Common Styles
   Shared across all pages
   =========================== */

/* Font Declarations */
@font-face {
    font-family: 'Mokoto';
    src: url('../assets/font/mokoto/Mokoto.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'Geist';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
}
@font-face {
    font-family: 'Geist Mono';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-mono/GeistMono-Regular.woff2') format('woff2');
    font-weight: 400;
}

/* CSS Variables */
:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --gray-50: #f9f9f9;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --signal: #ff4d00;
    --signal-light: rgba(255, 77, 0, 0.08);
}

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

::selection {
    background: var(--signal);
    color: var(--white);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Geist', 'DM Sans', -apple-system, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    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; }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 14px 0;
    box-shadow: 0 1px 0 var(--gray-200);
}

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

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

.logo img {
    height: 44px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo span {
    font-family: 'Mokoto', sans-serif;
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--black);
}

.nav-links a.active {
    color: var(--signal);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-dark {
    background: var(--black);
    color: var(--white) !important;
}

.btn-dark:hover {
    background: var(--gray-800);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.nav-links .btn-dark {
    color: var(--white) !important;
}

.btn-outline {
    background: transparent;
    color: var(--black);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--black);
}

.btn-signal {
    background: var(--signal);
    color: var(--white);
}

.btn-signal:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Section */
section {
    padding: clamp(80px, 12vw, 140px) 0;
}

.section-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 24px;
}

.section-title em {
    font-family: 'Instrument Serif', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.25em;
    letter-spacing: -0.03em;
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
    padding: 48px 0;
    border-top: 1px solid var(--gray-800);
}

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

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    font-size: 14px;
    color: var(--gray-500);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--signal);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 77, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 77, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        z-index: 1000;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 28px;
        font-weight: 500;
        color: var(--black);
    }

    .nav-links a:hover {
        color: var(--signal);
    }

    .nav-links .btn-dark {
        color: var(--white) !important;
        margin-top: 16px;
    }

    footer .container {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}
