/* ═══════════════════════════════════════════════
   THE DARK PIGEON — CSS
   A dark, luxurious, editorial design system
   ═══════════════════════════════════════════════ */

/* ── Reset & Custom Properties ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #13131f;
    --bg-card-hover: #1a1a2e;
    --bg-elevated: #16162a;

    --text-primary: #e8e6f0;
    --text-secondary: #8a879e;
    --text-muted: #5a576e;

    --accent: #c9a84c;
    --accent-light: #e2c97a;
    --accent-dim: #9a7b30;
    --accent-glow: rgba(201, 168, 76, 0.15);
    --accent-glow-strong: rgba(201, 168, 76, 0.3);

    --purple: #7c5cbf;
    --purple-dim: rgba(124, 92, 191, 0.15);

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 160px);
    --container-width: 1200px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

/* ── Container ── */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 clamp(20px, 5vw, 48px);
    transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
    letter-spacing: 0.02em;
}

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

.nav-cta {
    padding: 10px 24px !important;
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: all 0.3s var(--ease-out) !important;
}

.nav-cta:hover {
    background: var(--accent-light) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: float 8s ease-in-out infinite;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow-strong), transparent);
    top: -200px;
    right: -100px;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--purple-dim), transparent);
    bottom: -200px;
    left: -100px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 900px;
    padding: 0 clamp(20px, 5vw, 48px);
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent);
    padding: 8px 20px;
    border: 1px solid var(--accent-dim);
    border-radius: 100px;
    margin-bottom: 32px;
    background: var(--accent-glow);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light), var(--purple));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-glow);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── Hero Stats ── */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* ── Scroll Indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── Sections ── */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: clamp(48px, 8vh, 80px);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 6vw, 80px);
    align-items: center;
}

/* ── About ── */
.about-values {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.value-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.value-icon {
    color: var(--accent);
    font-size: 0.7rem;
    margin-top: 6px;
    flex-shrink: 0;
}

.value-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.value-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Code Card ── */
.about-visual {
    display: flex;
    justify-content: center;
}

.about-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, var(--accent-glow) 25%, transparent 50%, var(--purple-dim) 75%, transparent 100%);
    animation: rotate-glow 10s linear infinite;
    opacity: 0.4;
}

@keyframes rotate-glow {
    to { transform: rotate(360deg); }
}

.about-card-header {
    position: relative;
    display: flex;
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.card-dot:first-child { background: #ff5f57; opacity: 0.7; }
.card-dot:nth-child(2) { background: #febc2e; opacity: 0.7; }
.card-dot:nth-child(3) { background: #28c840; opacity: 0.7; }

.about-card-body {
    position: relative;
    padding: 20px 24px 28px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 2;
}

.code-line {
    display: block;
    white-space: pre;
    min-height: 1.6em;
}

.indent-1 { padding-left: 2em; }
.indent-2 { padding-left: 4em; }
.indent-3 { padding-left: 6em; }

.code-kw { color: var(--purple); font-weight: 500; }
.code-cls { color: var(--accent); }
.code-fn { color: #6ec6ff; }
.code-str { color: #8bdb81; }
.code-num { color: #f5a97f; }

/* ── Services ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 28px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(201, 168, 76, 0.2);
}

/* ── Process / Timeline ── */
.process-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 39px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent-dim), var(--border), transparent);
}

.process-step {
    display: flex;
    gap: 32px;
    padding: 32px 0;
    position: relative;
}

.step-number {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent);
    background: var(--bg-primary);
    border: 1px solid var(--accent-dim);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 20px var(--accent-glow);
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    padding-top: 4px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Roles ── */
.roles-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
}

.role-chip {
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    cursor: default;
}

.role-chip:hover {
    border-color: var(--accent-dim);
    background: var(--accent-glow);
    color: var(--accent);
    transform: translateY(-2px);
}

.tech-stack {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.tech-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tech-pills span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s;
}

.tech-pills span:hover {
    color: var(--text-secondary);
    border-color: var(--border);
}

/* ── Testimonials ── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 28px;
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: -16px;
    opacity: 0.4;
}

.testimonial-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dim), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Contact ── */
.contact-grid {
    grid-template-columns: 1fr 1.1fr;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ── Form ── */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(40, 200, 64, 0.1);
    border: 1px solid rgba(40, 200, 64, 0.2);
    border-radius: 10px;
    color: #8bdb81;
    font-size: 0.9rem;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
}

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

.footer-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

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

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

/* ── Animations ── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.45s; }

/* ── Mobile Responsive ── */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .section-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        order: -1;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        width: 48px;
        height: 1px;
    }

    .process-timeline::before {
        left: 27px;
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .process-step {
        gap: 20px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }

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

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

    .contact-form-wrapper {
        padding: 24px 20px;
    }
}

/* ── Selection ── */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
