/* ═══════════════════════════════════════════════════════════════
   Core Anvil — Main Stylesheet
   Dark, engineered, precision agency aesthetic
═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
    --bg:          #080810;
    --bg-alt:      #0d0d16;
    --panel:       #0f0f1a;
    --panel-hover: #14141f;
    --border:      rgba(255, 255, 255, 0.07);
    --border-med:  rgba(255, 255, 255, 0.13);
    --text:        #eef2f8;
    --text-med:    #c8d3e3;
    --muted:       #5a6a82;
    --primary:     #c1121f;
    --primary-hover: #e0131f;
    --primary-dim:   rgba(193, 18, 31, 0.13);
    --primary-glow:  rgba(193, 18, 31, 0.25);
    --success:     #22c55e;
    --success-dim: rgba(34, 197, 94, 0.12);
    --error:       #ef4444;
    --error-dim:   rgba(239, 68, 68, 0.12);

    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;

    --nav-height: 64px;
    --max-width:  1140px;

    --transition:      0.22s ease;
    --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Dot grid overlay — subtle tech texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Custom selection */
::selection {
    background: rgba(193, 18, 31, 0.28);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--primary-hover); }

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

ul, ol { list-style: none; }

/* ─── Container ──────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ─── Keyframes ──────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -20px) scale(1.05); }
    66%       { transform: translate(-15px, 15px) scale(0.97); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(193, 18, 31, 0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(193, 18, 31, 0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes border-spin {
    from { --angle: 0deg; }
    to   { --angle: 360deg; }
}

@keyframes scan {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(400px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* ─── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease-out-expo),
                transform 0.65s var(--ease-out-expo);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s var(--ease-out-expo),
                transform 0.5s var(--ease-out-expo);
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 80ms;  opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: translateY(0); }

/* ─── Navigation ─────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
    background: rgba(8, 8, 16, 0.97);
    box-shadow: 0 1px 40px rgba(0,0,0,0.5);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: opacity var(--transition);
}
.nav-logo:hover { color: var(--text); opacity: 0.85; }

.nav-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 20px rgba(193,18,31,0.4);
    transition: box-shadow var(--transition), transform var(--transition);
}
.nav-logo:hover .nav-logo-icon {
    box-shadow: 0 0 30px rgba(193,18,31,0.6);
    transform: scale(1.05);
}

.nav-logo-text { color: var(--text); }

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

.lang-switch-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.lang-switch-label {
    font-size: 0.75rem;
    color: var(--muted);
}

.lang-switch-select {
    background: var(--panel);
    color: var(--text-med);
    border: 1px solid var(--border-med);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    padding: 5px 8px;
}

.lang-switch-select:focus {
    outline: none;
    border-color: var(--primary);
}

.nav-link {
    display: inline-block;
    padding: 6px 14px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    position: relative;
}
.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-link.nav-cta {
    background: var(--primary);
    color: #fff;
    margin-left: 8px;
    box-shadow: 0 2px 16px rgba(193,18,31,0.3);
}
.nav-link.nav-cta:hover {
    background: var(--primary-hover);
    color: #fff;
    box-shadow: 0 4px 24px rgba(193,18,31,0.5);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Main ───────────────────────────────────────────────────── */
.main {
    min-height: calc(100vh - var(--nav-height));
}

/* ─── Sections ───────────────────────────────────────────────── */
.section {
    padding: 88px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-sub {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
    padding: 110px 0 90px;
    background:
        radial-gradient(ellipse 70% 60% at 70% 30%, rgba(193, 18, 31, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(193, 18, 31, 0.07) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Animated orbs */
.hero::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(193,18,31,0.12) 0%, transparent 65%);
    border-radius: 50%;
    top: -250px;
    right: -180px;
    animation: orb-float 10s ease-in-out infinite;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(193,18,31,0.07) 0%, transparent 60%);
    border-radius: 50%;
    bottom: -100px;
    left: 5%;
    animation: orb-float 15s ease-in-out infinite reverse;
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

/* Hero inner — page load animations */
.hero-inner > * {
    animation: fadeInUp 0.7s var(--ease-out-expo) both;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.25s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.35s; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-dim);
    border: 1px solid rgba(193, 18, 31, 0.28);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 26px;
    animation: badge-pulse 3s ease-in-out infinite;
}

.hero-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(2.6rem, 5.5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.055em;
    line-height: 1.0;
    margin-bottom: 26px;
}

.hero-accent {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

/* Underline decoration on accent */
.hero-accent::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
    opacity: 0.5;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Hero Visual — Terminal Window */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.8s ease 0.4s both;
}

.hero-grid-wrap {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border-med);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 20px 60px rgba(0,0,0,0.6),
        0 0 80px rgba(193,18,31,0.08);
    animation: float 6s ease-in-out infinite;
    position: relative;
}

/* Terminal header bar */
.hero-grid-wrap::before {
    content: '';
    display: block;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

/* Terminal dots */
.hero-grid-wrap::after {
    content: '';
    position: absolute;
    top: 13px;
    left: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
}

/* Scan line effect */
.hero-grid-wrap .hero-grid::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(193,18,31,0.06), transparent);
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    position: relative;
}

.hg-card {
    background: var(--panel);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background var(--transition);
    position: relative;
    overflow: hidden;
}

.hg-card:hover {
    background: var(--panel-hover);
}

/* Shimmer sweep on hover */
.hg-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.hg-card:hover::after {
    transform: translateX(100%);
}

.hg-card--red {
    background: var(--primary-dim);
}
.hg-card--red:hover {
    background: rgba(193,18,31,0.18);
}

.hg-label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.hg-card--red .hg-label {
    color: rgba(193, 18, 31, 0.75);
}

.hg-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.hg-card--red .hg-value {
    color: #ff6b72;
}

/* Status dot */
.hg-card::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.4;
}
.hg-card--red::before {
    background: var(--primary);
    opacity: 0.8;
    animation: blink 2s ease-in-out infinite;
}

/* ─── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 36px 0;
    position: relative;
}

.stats-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(193,18,31,0.04), transparent);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat {
    padding: 16px 24px;
    border-right: 1px solid var(--border);
    transition: background var(--transition);
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(255,255,255,0.02); }

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(193,18,31,0.4);
    transition: text-shadow var(--transition);
}
.stat:hover .stat-number {
    text-shadow: 0 0 50px rgba(193,18,31,0.6);
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ─── Services Grid ───────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition:
        border-color var(--transition),
        transform 0.35s var(--ease-out-expo),
        box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

/* Top edge glow on hover */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.service-card:hover {
    border-color: rgba(193,18,31,0.25);
    transform: translateY(-5px);
    box-shadow:
        0 10px 40px rgba(0,0,0,0.4),
        0 0 0 1px rgba(193,18,31,0.1),
        0 0 40px rgba(193,18,31,0.07);
}
.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-dim);
    border: 1px solid rgba(193, 18, 31, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    color: var(--primary);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 0 24px rgba(193,18,31,0.3);
    background: rgba(193,18,31,0.2);
}

.service-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text);
}

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

.card-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition), color var(--transition);
}
.service-card:hover .card-link {
    gap: 8px;
}

/* ─── CTA Section ─────────────────────────────────────────────── */
.cta-section {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(193,18,31,0.1) 0%, transparent 65%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

.cta-box {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
    padding: 72px 40px;
    background: var(--panel);
    border: 1px solid var(--border-med);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

/* Animated gradient border */
.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(193,18,31,0.4) 50%,
        transparent 70%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: shimmer 4s linear infinite;
    background-size: 200% auto;
    pointer-events: none;
}

.cta-box h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
    line-height: 1.2;
}

.cta-box p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 36px;
    line-height: 1.7;
}

.language-gate {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--nav-height) - 220px);
}

.language-gate-box {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

.language-gate-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.language-gate-sub {
    color: var(--muted);
    margin-bottom: 28px;
}

.language-gate-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
    transition:
        background var(--transition),
        color var(--transition),
        box-shadow var(--transition),
        transform 0.2s var(--ease-spring);
}

/* Shimmer overlay on hover */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn:hover::after {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 16px rgba(193,18,31,0.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    box-shadow: 0 6px 28px rgba(193,18,31,0.5);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-med);
    border: 1px solid var(--border-med);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 15px 36px;
    font-size: 1rem;
}

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

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header {
    padding: 90px 0 70px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 60% 50% at 50% -5%, rgba(193, 18, 31, 0.13) 0%, transparent 65%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(193,18,31,0.08) 0%, transparent 60%);
    border-radius: 50%;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    animation: glow-pulse 5s ease-in-out infinite;
}

.page-header-inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

.page-header-badge {
    display: inline-block;
    padding: 5px 16px;
    background: var(--primary-dim);
    border: 1px solid rgba(193, 18, 31, 0.28);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.page-header-title {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 18px;
    line-height: 1.05;
}

.page-header-sub {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ─── Services Detail ─────────────────────────────────────────── */
.service-detail {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding: 64px 0;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.service-detail:last-child { border-bottom: none; }

.service-num {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.07em;
    color: rgba(255,255,255,0.05);
    line-height: 1;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
    transition: color var(--transition-slow);
}
.service-detail:hover .service-num {
    color: rgba(193,18,31,0.2);
}

.service-detail-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.service-detail-body p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 28px;
}

.service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.service-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-med);
    font-size: 0.9rem;
    transition: color var(--transition);
}
.service-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(193,18,31,0.5);
}
.service-list li:hover {
    color: var(--text);
}

/* ─── Projects ────────────────────────────────────────────────── */
.project-card {
    padding: 56px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: padding-left var(--transition-slow);
}
.project-card:last-child { border-bottom: none; }

/* Left accent bar */
.project-card::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 56px;
    bottom: 56px;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--primary), transparent);
    border-radius: 2px;
    opacity: 0;
    transform: scaleY(0);
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out-expo);
}
.project-card:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.project-type {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-dim);
    padding: 4px 13px;
    border-radius: 100px;
    border: 1px solid rgba(193,18,31,0.2);
}

.project-year {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.project-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    margin-bottom: 16px;
    line-height: 1.15;
    transition: color var(--transition);
}
.project-card:hover .project-title {
    color: var(--text);
}

.project-desc {
    color: var(--muted);
    font-size: 0.975rem;
    line-height: 1.78;
    max-width: 760px;
    margin-bottom: 26px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.tag {
    font-size: 0.76rem;
    font-weight: 500;
    padding: 5px 13px;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-med);
    transition: border-color var(--transition), color var(--transition);
}
.tag:hover {
    border-color: var(--border-med);
    color: var(--text);
}

.project-highlights {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.highlight-label {
    font-size: 0.85rem;
    color: var(--text-med);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}
.highlight-label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--primary-dim);
    border: 1px solid rgba(193,18,31,0.3);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23c1121f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
    flex-shrink: 0;
}
.project-card:hover .highlight-label {
    color: var(--text);
}

/* ─── Contact Page ────────────────────────────────────────────── */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 64px;
    align-items: start;
}

.contact-form-wrap { width: 100%; }

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-med);
    letter-spacing: 0.01em;
}

.required {
    color: var(--primary);
    margin-left: 2px;
}
.optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.79rem;
}

.form-input {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    outline: none;
    resize: none;
}
.form-input::placeholder { color: var(--muted); }
.form-input:hover {
    border-color: var(--border-med);
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(193,18,31,0.14), 0 0 20px rgba(193,18,31,0.06);
    background: rgba(193,18,31,0.03);
}

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

.btn-submit {
    align-self: flex-start;
    padding: 13px 30px;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    animation: fadeInUp 0.4s var(--ease-out-expo) both;
}
.alert-success {
    background: var(--success-dim);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--success);
}
.alert-error {
    background: var(--error-dim);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--error);
}

/* Contact Info Aside */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-info-card:hover {
    border-color: var(--border-med);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.contact-info-card h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 12px;
}
.contact-info-card p,
.contact-info-card a {
    font-size: 0.9rem;
    color: var(--text-med);
    line-height: 1.65;
}

.contact-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: steps;
}
.contact-steps li {
    font-size: 0.88rem;
    color: var(--text-med);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    counter-increment: steps;
}
.contact-steps li::before {
    content: counter(steps);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: var(--primary-dim);
    border: 1px solid rgba(193,18,31,0.25);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── Footer ──────────────────────────────────────────────────── */
.footer {
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(193,18,31,0.5), transparent);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-tagline {
    font-size: 0.84rem;
    color: var(--muted);
    font-style: italic;
}

.footer-nav {
    display: flex;
    gap: 24px;
}
.footer-nav a {
    font-size: 0.84rem;
    color: var(--muted);
    transition: color var(--transition);
}
.footer-nav a:hover { color: var(--text); }

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .hero-visual { display: none; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .service-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .form-row { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--border); }
    .stat:nth-child(odd) { border-right: 1px solid var(--border); }
    .stat:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(8, 8, 16, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 4px;
        border-top: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
    }
    .lang-switch-form {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    .lang-switch-select {
        width: 160px;
    }
    .nav-toggle { display: flex; }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
    .hero { padding: 70px 0 50px; }
    .section { padding: 64px 0; }
    .project-highlights { flex-direction: column; gap: 10px; }
    .cta-box { padding: 48px 24px; }
}
