/* ===================================
   BSware.pl - Futuristic Website Styles
   =================================== */

/* CSS Variables */
:root {
    --primary-black: #000000;
    --secondary-black: #0a0a0a;
    --tertiary-black: #111111;
    --accent-dark: #1a1a1a;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);
    --gradient-accent: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    --glow: 0 0 20px rgba(255, 255, 255, 0.3);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Canvas Background */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--white-10);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    position: relative;
}

.logo-text {
    color: var(--white);
}

.logo-accent {
    color: var(--white-70);
    font-weight: 300;
}

.logo-dot {
    color: var(--white-50);
    font-weight: 400;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-accent);
    transition: var(--transition-normal);
}

.logo:hover::after {
    width: 100%;
}

.nav-menu {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white-70);
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--white);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--white);
    transition: var(--transition-normal);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--primary-black) 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 100px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-badge i {
    color: var(--white);
    font-size: 0.9rem;
}

.hero-badge span {
    font-size: 0.85rem;
    color: var(--white-70);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.title-line {
    display: block;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.5s; }

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--white-70);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--white);
    color: var(--primary-black);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: var(--transition-slow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white-30);
}

.btn-secondary:hover {
    background: var(--white-10);
    border-color: var(--white-50);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-number::after {
    content: '+';
    font-size: 1.5rem;
    margin-left: 2px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--white-50);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInUp 1s ease forwards, bounce 2s ease-in-out infinite;
    animation-delay: 1.2s, 2s;
    opacity: 0;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--white-30);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--white-50);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===================================
   Section Styles
   =================================== */
section {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--white-70);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--white-50);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Services Section
   =================================== */
.services {
    background: linear-gradient(180deg, var(--primary-black) 0%, var(--secondary-black) 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 8px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    background: var(--white-10);
    border-color: var(--white-20);
    transform: translateY(-5px);
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-10);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.service-card:hover .service-icon {
    background: var(--white);
}

.service-card:hover .service-icon i {
    color: var(--primary-black);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--white-70);
    line-height: 1.7;
}

.service-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: var(--transition-slow);
}

.service-card:hover .service-line {
    width: 100%;
}

/* ===================================
   Technologies Section
   =================================== */
.technologies {
    background: var(--secondary-black);
    padding: 6rem 0;
    overflow: hidden;
}

.tech-carousel {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.tech-track {
    display: flex;
    gap: 3rem;
    animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 8px;
    min-width: 140px;
    transition: var(--transition-normal);
}

.tech-item:hover {
    background: var(--white-10);
    transform: translateY(-5px);
}

.tech-item i {
    font-size: 2.5rem;
    color: var(--white);
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--white-70);
    font-weight: 500;
}

/* ===================================
   O mnie Section
   =================================== */
.about {
    background: linear-gradient(180deg, var(--secondary-black) 0%, var(--primary-black) 100%);
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.about-lead {
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 400;
    color: var(--white-90);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.05rem;
    color: var(--white-70);
    line-height: 1.8;
}

/* ===================================
   Portfolio Section (legacy, kept for possible future use)
   =================================== */
.portfolio {
    background: linear-gradient(180deg, var(--secondary-black) 0%, var(--primary-black) 100%);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--white-70);
    background: transparent;
    border: 1px solid var(--white-10);
    border-radius: 4px;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--white);
    color: var(--primary-black);
    border-color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-image {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    background: var(--tertiary-black);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--tertiary-black) 0%, var(--accent-dark) 100%);
}

.portfolio-placeholder i {
    font-size: 4rem;
    color: var(--white-20);
    transition: var(--transition-normal);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.portfolio-image:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-image:hover .portfolio-placeholder i {
    color: var(--white-50);
    transform: scale(1.1);
}

.portfolio-info h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--white-70);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tags span {
    padding: 0.25rem 0.75rem;
    background: var(--white-10);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--white-70);
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--primary-black);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-wrapper-simple {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
}

.contact-wrapper-simple .contact-info {
    text-align: center;
}

.contact-wrapper-simple .contact-info .section-title,
.contact-wrapper-simple .contact-description {
    text-align: center;
}

.contact-wrapper-simple .contact-details {
    align-items: center;
}

.contact-wrapper-simple .contact-item {
    justify-content: center;
}

.contact-wrapper-simple .social-links {
    justify-content: center;
}

.contact-info .section-tag {
    margin-bottom: 1rem;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-description {
    color: var(--white-70);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-10);
    border-radius: 8px;
}

.contact-icon i {
    font-size: 1.2rem;
    color: var(--white);
}

.contact-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--white-50);
    margin-bottom: 0.25rem;
}

.contact-item a,
.contact-item p {
    color: var(--white);
    font-size: 1rem;
}

.contact-item a:hover {
    color: var(--white-70);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.social-link i {
    font-size: 1.1rem;
    color: var(--white-70);
}

.social-link:hover {
    background: var(--white);
    border-color: var(--white);
}

.social-link:hover i {
    color: var(--primary-black);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 8px;
    padding: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--white-20);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-normal);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--white-50);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-normal);
}

.required-star {
    color: #f87171;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -1rem;
    font-size: 0.8rem;
    color: var(--white);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: var(--transition-normal);
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

/* Checkbox zgody RODO */
.form-group-checkbox,
.form-consent-wrap {
    position: relative;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 0;
    z-index: 1;
    cursor: pointer;
}

.form-group-checkbox .form-line {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--white-70);
    position: relative;
}

/* Niewidoczny checkbox na cały obszar labela – dzięki temu klik działa */
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1px solid var(--white-30);
    border-radius: 4px;
    background: var(--white-05);
    transition: var(--transition-normal);
    position: relative;
    pointer-events: none;
}

.checkbox-label input:checked + .checkmark {
    background: var(--white);
    border-color: var(--white);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--primary-black);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label .checkmark {
    position: relative;
}

.checkbox-text {
    line-height: 1.5;
}

/* Odstęp między zgoda a przyciskiem Wyślij */
.form-consent-wrap + .btn,
#consentWrap + .btn {
    margin-top: 0.5rem;
}

/* Modal weryfikacji matematycznej */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    position: relative;
    background: var(--secondary-black);
    border: 1px solid var(--white-10);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.modal-math-info {
    font-size: 0.95rem;
    color: var(--white-70);
    margin-bottom: 1.25rem;
}

.modal-math {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--white-90);
    margin-bottom: 1.25rem;
}

.modal-math-input-wrap {
    margin-bottom: 1rem;
}

.modal-math-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.modal-math-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    background: var(--white-05);
    border: 1px solid var(--white-20);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
}

.modal-math-input:focus {
    outline: none;
    border-color: var(--white-50);
}

.modal-math-error {
    font-size: 0.9rem;
    color: #ef4444;
    min-height: 1.4em;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--white-50);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.modal-close:hover {
    color: var(--white);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--secondary-black);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--white-10);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--white-50);
    max-width: 300px;
    line-height: 1.7;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links a {
    display: block;
    color: var(--white-50);
    font-size: 0.95rem;
    padding: 0.4rem 0;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(5px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--white-10);
}

.footer-bottom p {
    color: var(--white-50);
    font-size: 0.9rem;
}

.footer-decoration {
    display: flex;
    gap: 0.5rem;
}

.footer-decoration span {
    width: 8px;
    height: 8px;
    background: var(--white-20);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.footer-decoration span:nth-child(2) {
    animation-delay: 0.3s;
}

.footer-decoration span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary-black);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-link {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p {
        max-width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .portfolio-filter {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    section {
        padding: 5rem 0;
    }
}

/* ===================================
   Scroll Reveal Animation Classes
   =================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-black);
}

::-webkit-scrollbar-thumb {
    background: var(--white-30);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--white-50);
}

/* Selection */
::selection {
    background: var(--white);
    color: var(--primary-black);
}

