/* Matrix Theme CSS - Enhanced Version */

/* Base Styles & Variables */
:root {
    --matrix-green: #00ff41;
    --matrix-green-dark: #005f17;
    --matrix-green-light: #39ff14;
    --matrix-green-muted: #0a3b0b;
    --matrix-black: #0d0208;
    --matrix-bg: #080808;
    --matrix-terminal: #000000;
    --red-pill: #e60000;
    --blue-pill: #0077ff;
    --text-white: #f1f1f1;
    --text-gray: #a0a0a0;
    --header-height: 70px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--matrix-green) var(--matrix-black);
}

body {
    background-color: var(--matrix-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

::-webkit-scrollbar-track {
    background: var(--matrix-black);
}

::-webkit-scrollbar-thumb {
    background: var(--matrix-green-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-green);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

h1 {
    font-size: 2.5rem;
    text-shadow: 0 0 5px var(--matrix-green), 0 0 10px var(--matrix-green);
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    text-shadow: 0 0 2px var(--matrix-green-dark);
}

a {
    color: var(--matrix-green);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--matrix-green-light);
    text-shadow: 0 0 5px var(--matrix-green), 0 0 10px var(--matrix-green);
}

ul {
    list-style-type: none;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--matrix-green);
    margin-top: 0.5rem;
    box-shadow: 0 0 10px var(--matrix-green);
}

/* Matrix Background Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* Matrix Text Effect */
.matrix-text {
    position: relative;
    color: var(--matrix-green);
    text-shadow: 0 0 5px var(--matrix-green), 0 0 10px var(--matrix-green);
    display: inline-block;
    font-weight: bold;
}

.matrix-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--matrix-green);
    overflow: hidden;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--matrix-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.terminal {
    width: 80%;
    max-width: 600px;
    background: var(--matrix-terminal);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.terminal-header {
    background: var(--matrix-green-dark);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: var(--text-white);
    font-weight: bold;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control.close {
    background-color: #ff5f56;
}

.control.minimize {
    background-color: #ffbd2e;
}

.control.maximize {
    background-color: #27c93f;
}

.terminal-body {
    padding: 1rem;
    color: var(--matrix-green);
}

.typing-text {
    opacity: 0;
    margin-bottom: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}

.typing-text.typing {
    animation: fadeIn 0.5s forwards;
}

.terminal-loader {
    margin-top: 20px;
    height: 5px;
    background: var(--matrix-green-muted);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--matrix-green);
    box-shadow: 0 0 10px var(--matrix-green);
}

.terminal-loader.active .loader-bar {
    animation: loading 1.5s ease-in-out forwards;
}

/* White Rabbit: appears after the loader, click it for the pill choice */
.white-rabbit {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.3s ease;
}

.white-rabbit.active {
    opacity: 0.7;
    pointer-events: auto;
}

.white-rabbit.active svg {
    animation: hop 8s infinite ease-in-out;
}

.white-rabbit.active:hover {
    opacity: 1;
    transform: scale(1.1);
}

.white-rabbit.clicked {
    opacity: 0;
    transform: scale(0.2) translateY(-60px);
    pointer-events: none;
}

/* Pill choice overlay (shown by script after the rabbit is clicked) */
.pill-animation-container {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    background: rgba(0, 0, 0, 0.88);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.pill-animation-container.active {
    opacity: 1;
}

.pill-animation-container.fade-out {
    opacity: 0;
}

.matrix-pill {
    width: 160px;
    height: 64px;
    border-radius: 32px;
    cursor: pointer;
    transform: rotate(-20deg) scale(0.6);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.3s ease;
}

.pill-animation-container.active .matrix-pill {
    opacity: 1;
    transform: rotate(-20deg) scale(1);
}

.matrix-pill.red {
    background: linear-gradient(180deg, #ff4d4d, var(--red-pill) 55%, #800000);
    box-shadow: 0 0 25px rgba(230, 0, 0, 0.6);
}

.matrix-pill.blue {
    background: linear-gradient(180deg, #4da3ff, var(--blue-pill) 55%, #003d80);
    box-shadow: 0 0 25px rgba(0, 119, 255, 0.6);
}

.pill-animation-container.active .matrix-pill:hover {
    transform: rotate(-20deg) scale(1.12);
}

.matrix-pill.fade-out {
    opacity: 0;
    transform: rotate(-20deg) scale(0.4);
}

.matrix-pill.selected {
    transform: rotate(0deg) scale(1.3);
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.2);
}

.main-header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.3);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--matrix-green);
    position: relative;
    display: flex;
    align-items: center;
    text-shadow: 0 0 5px var(--matrix-green);
}

.logo-pill {
    width: 8px;
    height: 8px;
    background: var(--matrix-green);
    display: inline-block;
    margin-left: 5px;
    box-shadow: 0 0 5px var(--matrix-green), 0 0 10px var(--matrix-green);
    animation: pulse 2s infinite;
}

.logo-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

.logo-glitch::before,
.logo-glitch::after {
    content: 'Neo';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.logo-glitch::before {
    color: #ff00ff;
    z-index: -1;
    animation: glitch 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, 0);
}

.logo-glitch::after {
    color: #00ffff;
    z-index: -2;
    animation: glitch 2s infinite reverse;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(2px, 0);
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: var(--text-white);
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    transition: all var(--transition-speed) ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--matrix-green);
    transition: width var(--transition-speed) ease;
}

nav ul li a:hover {
    color: var(--matrix-green);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--matrix-green);
}

nav ul li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background: var(--matrix-green);
    transition: all 0.3s ease;
}
/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

.pill-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.pill {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    transition: all var(--transition-speed) ease;
}

.pill.red {
    background: var(--red-pill);
    box-shadow: 0 0 10px rgba(230, 0, 0, 0.5);
}

.pill.blue {
    background: var(--blue-pill);
    box-shadow: 0 0 10px rgba(0, 119, 255, 0.5);
}

.pill-glow {
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.pill:hover .pill-glow {
    left: 150%;
    transition: all 0.5s ease;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: var(--text-white);
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    background: transparent;
    letter-spacing: 1px;
}

.pill:hover {
    transform: translateY(-3px);
}

.pill.red:hover {
    box-shadow: 0 0 15px rgba(230, 0, 0, 0.8);
}

.pill.blue:hover {
    box-shadow: 0 0 15px rgba(0, 119, 255, 0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--matrix-green);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--matrix-green);
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: wheel 1.5s infinite;
}

.arrows {
    margin-top: 10px;
}

.arrow-down {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--matrix-green);
    border-bottom: 2px solid var(--matrix-green);
    transform: rotate(45deg);
    margin: 0 auto;
    animation: arrow 1.5s infinite;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--matrix-green-dark);
    border-radius: 5px;
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--matrix-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.1);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--matrix-green-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--matrix-green);
    position: relative;
    overflow: hidden;
}

.service-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    animation: pulse 2s infinite;
}

.service-features {
    margin: 1.5rem 0;
    text-align: left;
    padding-left: 1.5rem;
}

.service-features li {
    margin-bottom: 0.5rem;
    position: relative;
}

.service-features li::before {
    content: '>';
    position: absolute;
    left: -1rem;
    color: var(--matrix-green);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text .quote {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--matrix-green);
    border-left: 3px solid var(--matrix-green);
    padding-left: 1rem;
}

.matrix-terminal {
    width: 100%;
    background: var(--matrix-terminal);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

#typingTerminal .line {
    margin-bottom: 0.5rem;
    opacity: 0;
}

#typingTerminal .cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--matrix-green);
    animation: blink 1s infinite;
}

/* Testimonials Section */
.testimonials {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    position: relative;
}

.testimonial-viewport {
    overflow: hidden;
    width: 100%;
}

.testimonial-slider {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease;
}

.testimonial-slide {
    flex: 0 0 100%;
    padding: 0 0.5rem;
}

.testimonial-content {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--matrix-green-dark);
    border-radius: 5px;
    padding: 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-content p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: var(--matrix-green-muted);
    opacity: 0.3;
    font-family: sans-serif;
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--matrix-green-muted);
}

.client-name {
    font-weight: bold;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--matrix-green-dark);
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed) ease;
}

.slider-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--matrix-green);
    border-bottom: 2px solid var(--matrix-green);
}

.slider-btn.prev::before {
    transform: translate(-40%, -50%) rotate(135deg);
}

.slider-btn.next::before {
    transform: translate(-60%, -50%) rotate(-45deg);
}

.slider-btn:hover {
    background: var(--matrix-green-muted);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--matrix-green-muted);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.slider-dot.active {
    background: var(--matrix-green);
    box-shadow: 0 0 5px var(--matrix-green);
}
/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--matrix-green-dark);
    border-radius: 5px;
    padding: 2rem;
    transition: all var(--transition-speed) ease;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.1);
}

.member-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
}

.matrix-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--matrix-green-muted);
    font-size: 3rem;
    color: var(--matrix-green);
    font-weight: bold;
}

.member-social {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 5px 0;
    transform: translateY(100%);
    transition: transform var(--transition-speed) ease;
}

.member-image:hover .member-social {
    transform: translateY(0);
}

.social-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--matrix-green-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all var(--transition-speed) ease;
}

.social-icon:hover {
    background: var(--matrix-green);
    color: var(--matrix-black);
}

.member-bio {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--matrix-green-dark);
    border-radius: 5px;
    overflow: hidden;
}

.form-header {
    text-align: center;
    padding: 1rem;
}

.pill-choice {
    display: inline-flex;
    background: var(--matrix-black);
    padding: 5px;
    border-radius: 30px;
}

.pill-choice .pill {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.pill-choice .pill.active {
    opacity: 1;
}

form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--matrix-green);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--matrix-green-dark);
    color: var(--text-white);
    border-radius: 3px;
    transition: all var(--transition-speed) ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--matrix-green);
    box-shadow: 0 0 5px var(--matrix-green);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button[type="submit"] {
    width: 100%;
    background: var(--matrix-green-dark);
    color: var(--text-white);
    border: none;
    padding: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    transition: all var(--transition-speed) ease;
}

button[type="submit"]:hover {
    background: var(--matrix-green);
    color: var(--matrix-black);
}

.hidden-form {
    display: none;
}

.form-success {
    text-align: center;
    padding: 3rem 2rem;
    display: none;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--matrix-green);
    color: var(--matrix-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.matrix-code-success {
    margin-top: 1.5rem;
    height: 100px;
    overflow: hidden;
    position: relative;
}

.matrix-code-success::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--matrix-green);
    text-align: center;
    letter-spacing: 2px;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--matrix-green-dark);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo p {
    margin-top: 1rem;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--matrix-green-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    background: var(--matrix-green);
    color: var(--matrix-black);
    transform: translateY(-3px);
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--text-gray);
    transition: all var(--transition-speed) ease;
}

.footer-links ul li a:hover {
    color: var(--matrix-green);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-icon {
    color: var(--matrix-green);
}

.newsletter {
    margin-top: 1.5rem;
}

.newsletter h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

#newsletterForm {
    display: flex;
    gap: 0.5rem;
    padding: 0;
}

#newsletterForm input {
    flex: 1;
    padding: 0.5rem;
}

#newsletterForm button {
    width: auto;
    padding: 0.5rem 1rem;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--matrix-green-muted);
    color: var(--text-gray);
    font-size: 0.85rem;
}

.copyright p {
    margin-bottom: 0;
}

/* ==========================================================================
   Intro, state classes and toast (added by script)
   ========================================================================== */

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Hidden-until-revealed states only apply when JS is running (see <head>) */
.js .main-header {
    transform: translateY(-100%);
}

.js .main-header.active {
    transform: translateY(0);
}

.js section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js section.active {
    opacity: 1;
    transform: none;
}

.js .service-card:not(.revealed),
.js .team-member:not(.revealed) {
    opacity: 0;
    transform: translateY(30px);
}

.matrix-message {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 30px);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: max-content;
    max-width: calc(100% - 2rem);
}

.matrix-message.active {
    opacity: 1;
    transform: translate(-50%, 0);
}

.message-content {
    background: var(--matrix-terminal);
    border: 1px solid var(--matrix-green);
    border-radius: 5px;
    padding: 1rem 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.message-content p {
    margin: 0;
    color: var(--matrix-green);
}

/* Logo glitch burst (toggled by script) */
.logo.glitch .logo-glitch {
    opacity: 1;
}

/* Per-character glow wave on headings (delay set inline by script) */
.matrix-text span {
    display: inline-block;
    white-space: pre;
    animation: charGlow 4s ease-in-out infinite;
}

.matrix-text::before {
    animation: glitch-skew 4s infinite linear;
}

/* Terminal lines typed in one by one */
#typingTerminal .line.typing-line {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 0.7s steps(40, end) forwards;
}

.client-avatar .matrix-avatar {
    font-size: 1.4rem;
}

.scroll-indicator {
    animation-fill-mode: both;
}

.active-form {
    animation: fadeIn 0.4s ease;
}

.matrix-code-success {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--matrix-green);
    height: auto;
    max-height: 100px;
}

.matrix-code-success span {
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

:focus-visible {
    outline: 2px solid var(--matrix-green);
    outline-offset: 3px;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 0.7; transform: translate(-50%, 0); }
}

@keyframes loading {
    from { width: 0%; }
    to   { width: 100%; }
}

@keyframes typing {
    from { width: 0; }
    to   { width: 100%; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50%      { opacity: 1;   transform: scale(1.1); }
}

@keyframes hop {
    0%, 20%, 100% { transform: translateY(0); }
    8%            { transform: translateY(-16px); }
    14%           { transform: translateY(0); }
    17%           { transform: translateY(-6px); }
}

@keyframes wheel {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

@keyframes arrow {
    0%   { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
    50%  { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0, 0); }
    92%           { transform: translate(-3px, 1px); }
    94%           { transform: translate(3px, -1px); }
    96%           { transform: translate(-2px, 0); }
    98%           { transform: translate(2px, 1px); }
}

@keyframes glitch-skew {
    0%, 92%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
    94%           { opacity: 0.8; transform: translate(-3px, 0); clip-path: inset(10% 0 60% 0); }
    96%           { opacity: 0.8; transform: translate(3px, 0);  clip-path: inset(60% 0 10% 0); }
    98%           { opacity: 0.8; transform: translate(-1px, 0); clip-path: inset(35% 0 35% 0); }
}

@keyframes charGlow {
    0%, 70%, 100% {
        color: var(--matrix-green);
        text-shadow: 0 0 5px var(--matrix-green), 0 0 10px var(--matrix-green);
    }
    80% {
        color: #ffffff;
        text-shadow: 0 0 10px var(--matrix-green), 0 0 22px var(--matrix-green);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .about-content {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    section {
        padding: 3.5rem 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.97);
        transition: max-height 0.4s ease;
    }

    .nav-container.mobile-active nav {
        max-height: 320px;
        border-bottom: 1px solid var(--matrix-green-dark);
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem 0;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

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

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding: calc(var(--header-height) + 2rem) 0 6rem;
    }

    .scroll-indicator {
        display: none;
    }

    .pill-container {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .pill-animation-container {
        gap: 2rem;
    }

    .matrix-pill {
        width: 110px;
        height: 48px;
    }

    #newsletterForm {
        flex-direction: column;
    }

    .message-content {
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .terminal,
    .contact-form {
        width: 100%;
    }

    form {
        padding: 1.25rem;
    }

    .typing-text {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .matrix-bg {
        display: none;
    }
}

/* ==========================================================================
   Skip intro, returning visitors, rabbit and pill controls
   ========================================================================== */

.skip-intro {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    color: var(--matrix-green);
    border: 1px solid var(--matrix-green-dark);
    border-radius: 3px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all var(--transition-speed) ease;
}

.skip-intro:hover {
    background: var(--matrix-green-muted);
    box-shadow: 0 0 8px var(--matrix-green);
}

/* Set from <head> before first paint so returning visitors never see the loader */
.intro-seen .loading-screen {
    display: none;
}

.matrix-pill {
    border: none;
    padding: 0;
}

.white-rabbit:focus-visible {
    border-radius: 50%;
}

/* ==========================================================================
   Step 4: real content, contact block, forms
   ========================================================================== */

.team-grid.single {
    max-width: 420px;
    margin: 0 auto;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    border: 2px solid var(--matrix-green-dark);
    border-radius: 50%;
}

.member-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-direct {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}

.contact-direct ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
}

.contact-label {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-right: 0.35rem;
}

.contact-label::after {
    content: ':';
}

.footer-contact p {
    flex-wrap: wrap;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    color: #ff6b6b;
    border: 1px solid #7a1f1f;
    background: rgba(122, 31, 31, 0.2);
    border-radius: 3px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    text-shadow: none;
}

.form-error[hidden] {
    display: none;
}
