/* ============================================
   RSA Digital — Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary: #0F172A;
    --secondary: #64748B;
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --success: #10B981;
    --error: #EF4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--primary);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo__name {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 2px;
}

.logo__tagline {
    font-size: 11px;
    color: var(--secondary);
    letter-spacing: 0.5px;
}

.nav__list {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav__link {
    color: var(--primary);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.header__phone {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.header__phone:hover {
    color: var(--accent);
}

.header__cta {
    display: inline-flex;
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition);
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn--primary {
    background: var(--accent);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: var(--white);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn--outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn--large {
    padding: 16px 32px;
    font-size: 16px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
}

.hero__inner {
    max-width: 800px;
}

.hero__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--primary);
}

.hero__subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary);
}

.hero__feature::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 80px 0;
}

.section--gray {
    background: var(--bg-light);
}

.section__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

/* ============================================
   For Whom Section
   ============================================ */
.for-whom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.for-whom__card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition);
}

.for-whom__card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.for-whom__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.for-whom__text {
    color: var(--secondary);
    margin-bottom: 16px;
}

.for-whom__price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
}

/* ============================================
   Services Grid
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.services-grid__card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.services-grid__card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.services-grid__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.services-grid__text {
    color: var(--secondary);
    margin-bottom: 16px;
    flex-grow: 1;
}

.services-grid__price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

/* ============================================
   Process Steps
   ============================================ */
.process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    counter-reset: step;
}

.process__step {
    text-align: center;
    padding: 32px 24px;
    position: relative;
}

.process__step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 20px;
}

.process__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.process__text {
    color: var(--secondary);
    font-size: 14px;
}

/* ============================================
   Why Us
   ============================================ */
.why-us {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.why-us__item {
    padding: 24px;
}

.why-us__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.why-us__title::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

.why-us__text {
    color: var(--secondary);
    font-size: 14px;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.testimonial__author {
    font-weight: 600;
    margin-bottom: 4px;
}

.testimonial__company {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.testimonial__text {
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 12px;
}

.testimonial__rating {
    color: #FBBF24;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid var(--border);
}

.faq__question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
}

.faq__question::after {
    content: '+';
    font-size: 24px;
    color: var(--accent);
    transition: transform var(--transition);
}

.faq__item.active .faq__question::after {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--secondary);
}

.faq__item.active .faq__answer {
    max-height: 500px;
    padding-bottom: 20px;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta__text {
    color: #94A3B8;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta__contacts {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.cta__contact {
    color: var(--white);
    font-size: 18px;
}

.cta__contact:hover {
    color: var(--accent);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font-main);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .error-text {
    color: var(--error);
    font-size: 13px;
    margin-top: 4px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 8px;
}

.footer__links a {
    color: #94A3B8;
    font-size: 14px;
}

.footer__links a:hover {
    color: var(--white);
}

.footer__contacts {
    list-style: none;
}

.footer__contacts li {
    margin-bottom: 8px;
    color: #94A3B8;
    font-size: 14px;
}

.footer__contacts a {
    color: #94A3B8;
}

.footer__contacts a:hover {
    color: var(--white);
}

.footer__copy {
    color: #64748B;
    font-size: 13px;
    margin-top: 12px;
}

.footer__bottom {
    border-top: 1px solid #1E293B;
    padding-top: 20px;
}

.footer__legal {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__legal a {
    color: #64748B;
    font-size: 13px;
}

.footer__legal a:hover {
    color: var(--white);
}

/* Logo in footer */
.logo--footer .logo__name {
    color: var(--white);
}

.logo--footer .logo__tagline {
    color: #94A3B8;
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    padding: 16px 0;
    z-index: 9999;
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner__text {
    font-size: 14px;
    color: #CBD5E1;
}

.cookie-banner__text a {
    color: var(--accent);
    text-decoration: underline;
}

/* ============================================
   Error Page
   ============================================ */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-page h1 {
    font-size: 120px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--secondary);
    margin-bottom: 32px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        padding: 80px 24px 24px;
        box-shadow: var(--shadow-lg);
        transition: right var(--transition);
        z-index: 1001;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 16px;
    }

    .burger {
        display: flex;
        z-index: 1002;
    }

    .header__cta {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .hero__buttons .btn {
        width: 100%;
    }

    .section {
        padding: 60px 0;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cta__contacts {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero__features {
        flex-direction: column;
        gap: 12px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}
