/* ═══════════════════════════════════════════
   CELTIC TRINITY STUDIOS — ctsgame.com
   Dark premium gaming aesthetic
   ═══════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
    --bg-deep: #0a0b0f;
    --bg-surface: #12141a;
    --bg-card: #181b24;
    --bg-card-hover: #1e2230;

    --bronze: #b08d57;
    --bronze-light: #d4a84b;
    --bronze-glow: rgba(176, 141, 87, 0.3);
    --gold: #f0d68a;

    --text-primary: #e8e4dd;
    --text-secondary: #9a9590;
    --text-muted: #5e5a55;

    --accent-blue: #4a7ec5;
    --accent-green: #4ec58a;
    --accent-purple: #8a6ec5;

    --radius: 12px;
    --radius-lg: 20px;

    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── RESET ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--bronze-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--gold);
}

img {
    max-width: 100%;
    display: block;
}

/* ═══════════════ NAV ═══════════════ */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(176, 141, 87, 0.1);
    transition: background var(--transition);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    transition: color var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bronze);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--bronze), var(--bronze-light));
    color: var(--bg-deep) !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--bronze-glow);
    color: var(--bg-deep) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    transition: var(--transition);
}

/* ═══════════════ HERO ═══════════════ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, rgba(176, 141, 87, 0.06) 0%, transparent 60%),
        var(--bg-deep);
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 24px;
    animation: fadeInUp 1s ease-out;
}

.hero-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto 32px;
    filter: drop-shadow(0 0 40px var(--bronze-glow));
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 30px rgba(176, 141, 87, 0.2));
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(176, 141, 87, 0.4));
    }
}

#hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--text-primary), var(--bronze-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: 1px solid var(--bronze);
    border-radius: 50px;
    color: var(--bronze-light) !important;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all var(--transition);
}

.hero-cta:hover {
    background: rgba(176, 141, 87, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--bronze-glow);
}

.hero-cta .arrow {
    transition: transform var(--transition);
}

.hero-cta:hover .arrow {
    transform: translateY(3px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--bronze), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* ═══════════════ SECTIONS ═══════════════ */
section {
    padding: 100px 0;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--bronze));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 60px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════ PROJECTS ═══════════════ */
#projects {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(176, 141, 87, 0.08);
    transition: all var(--transition);
    cursor: default;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(176, 141, 87, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px var(--bronze-glow);
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}

.card-body {
    padding: 24px;
    position: relative;
    margin-top: -20px;
}

.card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.card-badge.active {
    background: rgba(78, 197, 138, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(78, 197, 138, 0.3);
}

.card-badge.upcoming {
    background: rgba(138, 110, 197, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(138, 110, 197, 0.3);
}

.card-body h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 12px 0 4px;
    color: var(--text-primary);
}

.card-creator {
    font-size: 0.85rem;
    color: var(--bronze);
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-tags span {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.card-badge.kael {
    background: rgba(74, 126, 197, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(74, 126, 197, 0.3);
}

.card-badge.paith {
    background: rgba(138, 110, 197, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(138, 110, 197, 0.3);
}

.placeholder-img {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.4;
    z-index: 1;
}

/* ═══════════════ FEATURED ═══════════════ */
#featured {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
}

.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid rgba(176, 141, 87, 0.08);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.featured-project:hover {
    border-color: rgba(176, 141, 87, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.featured-project:last-child {
    margin-bottom: 0;
}

.featured-project.reverse {
    direction: rtl;
}

.featured-project.reverse>* {
    direction: ltr;
}

.featured-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 320px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-project:hover .featured-image img {
    transform: scale(1.03);
}

.featured-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 11, 15, 0.2) 0%, transparent 60%);
}

.featured-creator {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bronze);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.featured-info h3 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin: 8px 0;
    background: linear-gradient(135deg, var(--text-primary), var(--bronze-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-tagline {
    font-size: 1.1rem;
    color: var(--bronze-light);
    font-style: italic;
    margin-bottom: 16px;
}

.featured-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ═══════════════ MODAL ═══════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(176, 141, 87, 0.15);
    border-radius: var(--radius-lg);
    max-width: 720px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: fadeInUp 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

#modal-body h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 8px;
}

#modal-body .devlog-meta {
    margin-bottom: 20px;
}

#modal-body .post-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ═══════════════ DEVLOG ═══════════════ */
#devlog {
    background: var(--bg-deep);
}

.devlog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

/* Featured (latest) post — shown expanded */
.devlog-featured-post {
    background: var(--bg-card);
    border: 1px solid rgba(176, 141, 87, 0.12);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
}

.devlog-featured-post h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.devlog-featured-post .post-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.devlog-featured-post .post-content p {
    margin-bottom: 12px;
}

.devlog-featured-post .post-content ul {
    margin: 8px 0 12px 20px;
    color: var(--text-secondary);
}

.devlog-featured-post .post-content li {
    margin-bottom: 4px;
}

/* Previous posts title */
.devlog-previous-title {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Carousel for previous posts */
.devlog-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.devlog-carousel::-webkit-scrollbar {
    height: 4px;
}

.devlog-carousel::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 2px;
}

.devlog-carousel::-webkit-scrollbar-thumb {
    background: var(--bronze);
    border-radius: 2px;
}

.devlog-post {
    background: var(--bg-card);
    border: 1px solid rgba(176, 141, 87, 0.06);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
    cursor: pointer;
}

.devlog-post:hover {
    border-color: rgba(176, 141, 87, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.devlog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.devlog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.devlog-project {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(176, 141, 87, 0.1);
    color: var(--bronze);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.devlog-post h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.devlog-post p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.devlog-post .read-more {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--bronze-light);
    font-weight: 500;
}

.devlog-post:hover .read-more {
    color: var(--gold);
}

/* ═══════════════ ABOUT ═══════════════ */
#about {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.team-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid rgba(176, 141, 87, 0.06);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    transition: all var(--transition);
}

.team-card:hover {
    border-color: rgba(176, 141, 87, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bronze), var(--bronze-light));
    color: var(--bg-deep);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px var(--bronze-glow);
}

.team-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.team-role {
    font-size: 0.85rem;
    color: var(--bronze);
    margin-bottom: 16px;
    font-weight: 500;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ═══════════════ FOOTER ═══════════════ */
#footer {
    background: var(--bg-surface);
    border-top: 1px solid rgba(176, 141, 87, 0.08);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.footer-brand p {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links h4,
.footer-social h4 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-links a,
.footer-social a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition);
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--bronze-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 20px 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ═══════════════ ANIMATIONS ═══════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .featured-project {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 24px;
    }

    .featured-project.reverse {
        direction: ltr;
    }

    .featured-image {
        height: 200px;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(10, 11, 15, 0.98);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid rgba(176, 141, 87, 0.1);
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .devlog-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 24px;
    }
}