/* ============================================
   GOUTELARD.COM — Design System
   Inspired by kalashnikovgroup.ru aesthetic
   ============================================ */

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

:root {
    --black: #000000;
    --black2: #111111;
    --black3: #262626;
    --gray800: #292929;
    --gray333: #333333;
    --gray200: #f2f2f2;
    --white: #ffffff;
    --white50t: hsla(0, 0%, 100%, 0.5);
    --white05t: hsla(0, 0%, 100%, 0.05);
    --white10t: hsla(0, 0%, 100%, 0.1);
    --white15t: hsla(0, 0%, 100%, 0.15);
    --red: #c41e2a;
    --red800: #861e23;
    --red-bright: #e8242e;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-height: 64px;
    --container-width: 1200px;
    --container-padding: 40px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.5;
    color: var(--white);
    background-color: var(--black2);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header--scrolled {
    background-color: rgba(17, 17, 17, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--white10t);
}

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

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--red);
    color: var(--white);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--white50t);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--red);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu button */
.header__menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.header__menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}

.header__menu-btn.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.header__menu-btn.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 17, 17, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.mobile-menu__link {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--white50t);
    transition: color 0.3s ease, transform 0.3s var(--ease-out);
}

.mobile-menu__link:hover {
    color: var(--white);
    transform: translateX(8px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

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

.btn--primary:hover {
    background: var(--red-bright);
    border-color: var(--red-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(196, 30, 42, 0.3);
}

.btn--outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white15t);
}

.btn--outline:hover {
    border-color: var(--white50t);
    background: var(--white05t);
    transform: translateY(-2px);
}

.btn--large {
    padding: 18px 48px;
    font-size: 15px;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--header-height) var(--container-padding) 0;
}

.hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 100%);
}

.hero__content {
    position: relative;
    max-width: 900px;
    text-align: center;
    z-index: 1;
}

.hero__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero__label-line {
    display: block;
    width: 32px;
    height: 1px;
    background: var(--red);
}

.hero__label-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white50t);
}

.hero__title {
    font-size: clamp(42px, 7vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero__title-line {
    display: block;
}

.hero__title-line--accent {
    color: var(--red);
}

.hero__subtitle {
    font-size: clamp(16px, 2vw, 19px);
    font-weight: 400;
    line-height: 1.6;
    color: var(--white50t);
    max-width: 560px;
    margin: 0 auto 44px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 1.2s forwards;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--red), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

.hero__scroll-text {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white50t);
}

/* --- Sections Common --- */
.section {
    padding: 120px 0;
    position: relative;
}

.section__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section__header {
    margin-bottom: 64px;
}

.section__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white50t);
    margin-bottom: 16px;
}

.section__label-mark {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--red);
}

.section__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* --- Businesses Section --- */
.businesses {
    background: var(--black);
}

.businesses__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.business-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    min-height: 420px;
    background: var(--black2);
    border: 1px solid var(--white05t);
    transition: background-color 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
}

.business-card:hover {
    background: var(--black3);
    border-color: var(--white15t);
}

.business-card__line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width 0.6s var(--ease-out);
}

.business-card:hover .business-card__line {
    width: 100%;
}

/* --- Card Preview --- */
.business-card__preview {
    position: relative;
    margin: 16px 0 20px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--black);
    border: 1px solid var(--white10t);
    flex: 1;
}

.business-card__preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--gray800);
    border-bottom: 1px solid var(--white05t);
}

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white10t);
}

.preview-url {
    margin-left: 8px;
    font-size: 11px;
    color: var(--white50t);
    letter-spacing: 0.02em;
}

.business-card__preview-frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 160px;
    overflow: hidden;
    pointer-events: none;
}

.business-card__preview-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 800px;
    border: none;
    transform: scale(0.35);
    transform-origin: top left;
    pointer-events: none;
}

.business-card:hover .business-card__preview {
    border-color: var(--white15t);
}

/* Services preview (no iframe) */
.business-card__preview--services {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.services-preview {
    width: 100%;
    padding: 24px;
}

.services-preview__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.services-preview__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 1px solid var(--white05t);
    border-radius: 4px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.business-card:hover .services-preview__item {
    border-color: var(--white10t);
    background: var(--white05t);
}

.services-preview__item svg {
    width: 28px;
    height: 28px;
    color: var(--white50t);
    transition: color 0.3s ease;
}

.business-card:hover .services-preview__item svg {
    color: var(--red);
}

.services-preview__item span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white50t);
}

/* --- Screenshot image preview --- */
.business-card__preview-frame--img {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 200px;
    overflow: hidden;
    background: #f5efe6;
}

.preview-screenshot {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: 30% 40%;
    display: block;
    transition: transform 0.6s var(--ease-out);
}

.business-card:hover .preview-screenshot {
    transform: scale(1.05);
}

/* Iframe fallback */
.preview-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--black3), var(--black));
}

.preview-fallback__icon {
    color: var(--white50t);
}

.preview-fallback__text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white50t);
}

.business-card--wide {
    grid-column: 1 / -1;
}

.business-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.business-card__number {
    font-size: 13px;
    font-weight: 600;
    color: var(--white50t);
    letter-spacing: 0.05em;
}

.business-card__arrow {
    font-size: 22px;
    color: var(--white50t);
    transition: color 0.3s ease, transform 0.3s var(--ease-out);
}

.business-card:hover .business-card__arrow {
    color: var(--red);
    transform: translate(4px, -4px);
}

.business-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
}

.business-card__name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.business-card__stats {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--red);
    text-transform: uppercase;
}

.business-card__desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--white50t);
    max-width: 400px;
}

.business-card__tag {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    padding: 0;
    display: none;
}

.business-card:hover .business-card__tag {
    display: block;
}

/* --- Capabilities Section --- */
.capabilities {
    background: var(--black2);
}

.capabilities__list {
    display: flex;
    flex-direction: column;
}

.capability {
    display: grid;
    grid-template-columns: 60px 1fr 48px;
    gap: 32px;
    align-items: center;
    padding: 36px 0;
    border-bottom: 1px solid var(--white10t);
    cursor: default;
    transition: all 0.3s ease;
}

.capability:first-child {
    border-top: 1px solid var(--white10t);
}

.capability:hover {
    padding-left: 16px;
}

.capability__index {
    font-size: 13px;
    font-weight: 600;
    color: var(--white50t);
    letter-spacing: 0.05em;
}

.capability__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capability__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.capability:hover .capability__title {
    color: var(--red);
}

.capability__desc {
    font-size: 15px;
    color: var(--white50t);
    line-height: 1.5;
    max-width: 500px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--ease-out), opacity 0.4s ease;
}

.capability:hover .capability__desc {
    max-height: 80px;
    opacity: 1;
}

.capability__icon {
    width: 28px;
    height: 28px;
    color: var(--white50t);
    transition: color 0.3s ease;
}

.capability:hover .capability__icon {
    color: var(--red);
}

.capability__icon svg {
    width: 100%;
    height: 100%;
}

.capability--highlight .capability__title {
    color: var(--red);
}

/* Mobile tap-to-open for capabilities */
.capability--active {
    padding-left: 16px;
}

.capability--active .capability__title {
    color: var(--red);
}

.capability--active .capability__desc {
    max-height: 80px;
    opacity: 1;
}

.capability--active .capability__icon {
    color: var(--red);
}

/* --- Contact Section --- */
.contact {
    background: var(--black);
    text-align: center;
    padding: 160px 0;
}

.contact__content {
    max-width: 600px;
    margin: 0 auto;
}

.contact .section__label {
    justify-content: center;
}

.contact__title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.contact__text {
    font-size: 17px;
    line-height: 1.7;
    color: var(--white50t);
    margin-bottom: 32px;
}

.contact__email {
    display: inline-block;
    font-size: 18px;
    font-weight: 500;
    color: var(--white);
    border-bottom: 1px solid var(--white15t);
    padding-bottom: 4px;
    margin-bottom: 44px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.contact__email:hover {
    color: var(--red);
    border-color: var(--red);
}

.contact__actions {
    display: flex;
    justify-content: center;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--white10t);
    padding: 24px 0;
}

.footer__inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer__logo {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.footer__copy {
    font-size: 13px;
    color: var(--white50t);
}

.footer__domain {
    font-size: 13px;
    color: var(--white50t);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.4;
        transform: scaleY(0.6);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
    :root {
        --container-padding: 20px;
        --header-height: 56px;
    }

    .header__nav {
        display: none;
    }

    .header__menu-btn {
        display: flex;
    }

    /* Mobile menu — full screen, left-aligned like Kalashnikov */
    .mobile-menu {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 40px var(--container-padding);
    }

    .mobile-menu__nav {
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .mobile-menu__link {
        font-size: 28px;
        font-weight: 700;
        display: block;
        width: 100%;
        padding: 20px 0;
        border-bottom: 1px solid var(--white05t);
    }

    /* Hero mobile */
    .hero {
        padding-top: var(--header-height);
        padding-bottom: 60px;
        min-height: 100svh;
    }

    .hero__content {
        text-align: left;
        max-width: 100%;
    }

    .hero__label {
        justify-content: flex-start;
    }

    .hero__title {
        font-size: 38px;
        text-align: left;
    }

    .hero__subtitle {
        text-align: left;
        margin-left: 0;
        font-size: 16px;
    }

    .hero__actions {
        justify-content: flex-start;
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .hero__scroll-indicator {
        display: none;
    }

    /* Sections mobile */
    .section {
        padding: 64px 0;
    }

    .section__header {
        margin-bottom: 40px;
    }

    /* Businesses mobile */
    .businesses__grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .business-card--wide {
        grid-column: auto;
    }

    .business-card {
        min-height: auto;
        padding: 24px;
    }

    .business-card__preview-frame {
        min-height: 120px;
    }

    .business-card__preview-frame iframe {
        transform: scale(0.28);
    }

    .services-preview__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .services-preview__item {
        padding: 14px 8px;
    }

    .services-preview__item svg {
        width: 22px;
        height: 22px;
    }

    .services-preview__item span {
        font-size: 9px;
    }

    .business-card__name {
        font-size: 22px;
    }

    .business-card__desc {
        font-size: 14px;
    }

    /* Capabilities mobile */
    .capability {
        grid-template-columns: 40px 1fr 32px;
        gap: 16px;
        padding: 24px 0;
    }

    .capability__title {
        font-size: 18px;
    }

    .capability__desc {
        font-size: 14px;
    }

    .capability__icon {
        width: 22px;
        height: 22px;
    }

    /* Contact mobile */
    .contact {
        padding: 80px 0;
        text-align: left;
    }

    .contact .section__label {
        justify-content: flex-start;
    }

    .contact__title {
        font-size: 36px;
    }

    .contact__text {
        font-size: 15px;
    }

    .contact__email {
        font-size: 16px;
    }

    .contact__actions {
        justify-content: flex-start;
    }

    .btn--large {
        padding: 16px 32px;
        font-size: 13px;
    }

    /* Footer mobile */
    .footer__inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer__left {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 380px) {
    .hero__title {
        font-size: 32px;
    }

    .section__title {
        font-size: 28px;
    }

    .contact__title {
        font-size: 30px;
    }

    .capability {
        grid-template-columns: 1fr 28px;
    }

    .capability__index {
        display: none;
    }

    .services-preview__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
