/**
 * orbit-forgez.online - Stylesheet
 * Адаптивный одностраничный Landing Page
 * Mobile First подход, семантическая разметка
 */

/* ============================================
   Variables & Theme (Randomized: Earthy Tech)
   ============================================ */
:root {
    /* Цветовая палитра: Deep Forest & Sand (светлая тема) */
    /* Для изменения цветовой схемы замените значения ниже */
    --bg-main: #f4f1de;
    /* Light Sand */
    --bg-contrast: #e9edc9;
    /* Sage Green Light */
    --bg-dark: #264653;
    /* Dark Charcoal/Green */

    --primary: #2a9d8f;
    /* Persian Green */
    --primary-hover: #21867a;
    --secondary: #e76f51;
    /* Burnt Sienna / Orange */

    --text-main: #264653;
    --text-light: #f4f1de;
    --text-muted: #606f7b;

    --white: #ffffff;
    --error: #e63946;
    --success: #2a9d8f;

    /* Typography: Space Grotesk */
    /* CHANGE_FONT_HERE: Замените 'Space Grotesk' на другой Google Font в index.html */
    --font-main: 'Space Grotesk', sans-serif;

    /* UI */
    --radius-sm: 8px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 40px -10px rgba(38, 70, 83, 0.15);
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.8em;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -1px;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn--primary {
    background: var(--primary);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn--secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn--secondary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn--outline {
    border-color: var(--text-main);
    color: var(--text-main);
    background: transparent;
}

.btn--outline:hover {
    background: var(--text-main);
    color: var(--white);
}

.btn--sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn--xs {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

.btn--full {
    width: 100%;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(244, 241, 222, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo__img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.logo:hover .logo__img {
    transform: rotate(15deg) scale(1.05);
}

.logo__accent {
    color: var(--secondary);
}

.nav__list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    font-weight: 500;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.btn-nav {
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.btn-nav:hover {
    background: var(--secondary);
    color: var(--white);
}

.nav__link.btn-nav::after {
    display: none;
}

.burger,
.nav__close {
    display: none;
}

/* Mobile Menu */
@media (max-width: 1024px) {
    .burger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        z-index: 1002;
    }

    /* Приховуємо бургер-меню коли модалка відкрита */
    body.modal-open #burger-btn.burger {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Приховуємо бургер коли меню відкрите (aria-expanded="true") */
    .burger[aria-expanded="true"] {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: rotate(90deg);
        transition: var(--transition);
    }

    .burger span {
        width: 30px;
        height: 3px;
        background: var(--text-main);
        transition: var(--transition);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-main);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1005;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
        font-size: 1.5rem;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
        background: none;
        border: none;
    }
}

/* ============================================
   Hero Section (Centered Card Layout)
   ============================================ */
.hero {
    position: relative;
    padding: 160px 0 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/hero-bg.jpg') no-repeat center/cover;
    background-attachment: fixed;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 70vh;
        padding: 120px 0 80px;
    }
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 70, 83, 0.6);
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-status {
    display: inline-block;
    background: var(--bg-contrast);
    color: var(--text-main);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ============================================
   Services Section (Bento Grid Layout)
   ============================================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.bento-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.bento-item-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.bento-wide-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
}

.bento-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.item-lg {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    overflow: hidden;
}

.item-lg img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    border-top-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.item-lg .bento-content {
    position: relative;
    z-index: 2;
    max-width: 50%;
}

.item-wide {
    grid-column: span 3;
    background: var(--bg-dark);
    color: var(--text-light);
}

.item-wide h3,
.item-wide p {
    color: var(--text-light);
}

.bento-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    background: var(--secondary);
    color: var(--white);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

.link-arrow {
    color: var(--secondary);
    font-weight: 700;
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .item-lg,
    .item-wide {
        grid-column: auto;
        grid-row: auto;
    }

    .item-lg img {
        position: relative;
        width: 100%;
        height: 250px;
        margin-top: 1.5rem;
        border-radius: var(--radius-sm);
    }

    .item-lg .bento-content {
        max-width: 100%;
    }

    .bento-item-img {
        height: 180px;
    }

    .bento-wide-img {
        height: 200px;
    }
}

/* ============================================
   Features Section
   ============================================ */
.bg-contrast {
    background-color: var(--bg-contrast);
}

.features__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--bg-main);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.feature-icon {
    font-size: 2.5rem;
    background: var(--bg-contrast);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

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

.review-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stars {
    color: #f4a261;
    letter-spacing: 2px;
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-weight: 700;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--text-main);
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar.alt {
    border-color: var(--text-main);
}

/* ============================================
   Contacts & Form Section
   ============================================ */
.bg-dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

.bg-dark h2,
.bg-dark p {
    color: var(--text-light);
}

.highlight-text {
    color: var(--secondary);
    font-weight: 500;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.form-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    color: var(--text-main);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.input-field {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #f9f9f9;
}

.input-field:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

.hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.status-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

.contact-text {
    max-width: 500px;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.captcha-input {
    width: 80px;
    text-align: center;
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    display: block;
    height: 16px;
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.link-text {
    background: none;
    border: none;
    padding: 0;
    color: var(--secondary);
    text-decoration: underline;
    cursor: pointer;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

.hidden {
    display: none;
}

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

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Footer (4 колонки)
   ============================================ */
.footer {
    background: #1d353f;
    color: #aab4be;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer__brand h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1rem;
}

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

.footer button {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    text-align: left;
}

.footer button:hover,
.footer a:hover {
    color: var(--secondary);
}

@media (max-width: 600px) {
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   Modals & Cookie Popup
   ============================================ */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 300px;
    z-index: 2000;
    border-top: 4px solid var(--secondary);
}

.cookie-btns {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay[aria-hidden="false"] .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-body {
    line-height: 1.6;
}

.modal-body h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.modal-body p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.modal-body strong {
    color: var(--text-main);
    font-weight: 600;
}


.modal-title {
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    font-size: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 1;
    padding: 0;
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

/* Адаптивність модалки */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 95vh;
        padding: 1.5rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: scale(1) translateY(100%);
        margin: 0;
    }

    .modal-overlay[aria-hidden="false"] .modal {
        transform: scale(1) translateY(0);
    }

    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .modal-body h4 {
        font-size: 1rem;
    }

    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
    }

    .modal-close svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 1.25rem;
        max-height: 98vh;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-body {
        font-size: 0.9rem;
    }

    .modal-body ul {
        margin-left: 1.25rem;
    }
}