:root {
    --bg: #0b1220;
    --surface: #111a2d;
    --surface-2: #18233a;
    --text: #e7edf7;
    --muted: #9fb0cc;
    --accent: #1f736c;
    --accent-strong: #36d1c4;
    --warm: #ef8b5f;
    --border: rgba(147, 177, 216, 0.22);
    --shadow: 0 20px 40px rgba(3, 10, 24, 0.3);
}

:root[data-theme="light"] {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --text: #162033;
    --muted: #5f718f;
    --accent: #19756e;
    --accent-strong: #0f9a8d;
    --warm: #b8643b;
    --border: rgba(17, 26, 45, 0.12);
    --shadow: 0 20px 40px rgba(17, 26, 45, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: transparent;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -2;
    background:
        radial-gradient(circle at top right, rgba(54, 209, 196, 0.16), transparent 24rem),
        radial-gradient(circle at top left, rgba(239, 139, 95, 0.12), transparent 18rem),
        var(--bg);
}

body::after {
    z-index: -1;
    background:
        linear-gradient(rgba(11, 18, 32, 0.84), rgba(11, 18, 32, 0.9)),
        url("../img/bg.png");
    background-position: center top, center top;
    background-size: auto, 100% auto;
    background-repeat: no-repeat, no-repeat;
}

:root[data-theme="light"] body::before {
    background:
        radial-gradient(circle at top right, rgba(15, 154, 141, 0.12), transparent 24rem),
        radial-gradient(circle at top left, rgba(184, 100, 59, 0.1), transparent 18rem),
        var(--bg);
}

:root[data-theme="light"] body::after {
    background:
        linear-gradient(rgba(245, 247, 251, 0.8), rgba(245, 247, 251, 0.86)),
        url("../img/bg.png");
    background-position: center top, center top;
    background-size: auto, 100% auto;
    background-repeat: no-repeat, no-repeat;
}

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

.shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    border-bottom: 1px solid var(--border);
}

.site-header__inner,
.site-footer__inner,
.hero__grid,
.cta-banner,
.contact-grid,
.content-grid,
.comparison-grid {
    display: grid;
    gap: 1.5rem;
}

.site-header__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 1rem 0;
}

.brand,
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-logo {
    display: block;
    width: auto;
    height: 64px;
}

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 700;
}

.brand__copy small,
.eyebrow,
.card__meta {
    color: var(--muted);
}

.site-nav,
.site-actions,
.hero__actions,
.tabs__list {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--surface);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.button--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.site-actions {
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.site-actions__item,
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.language-switcher {
    margin: 0;
}

.language-switcher__form {
    margin: 0;
}

.language-button,
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    min-height: 2.8rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.language-button:hover,
.language-button:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--surface);
}

.language-button:hover,
.language-button:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--accent-strong) 36%, var(--border));
    transform: translateY(-1px);
}

.language-flag {
    display: block;
    width: 1.5rem;
    height: 1rem;
    border-radius: 0.18rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.theme-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.is-current-lang {
    border-color: rgba(54, 209, 196, 0.4);
    background: rgba(54, 209, 196, 0.12);
}

.hero,
.page-hero,
.section {
    padding: 2rem 0;
}

.hero__grid,
.contact-grid,
.content-grid,
.comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-card,
.card,
.content-block,
.tabs__panel,
.flash {
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.section--muted {
    background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.section--accent {
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 16%, transparent));
}

.section-heading {
    margin-bottom: 1.5rem;
}

.lead {
    max-width: 52rem;
    font-size: 1.1rem;
    color: var(--muted);
}

.product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-meta-row .status-pill {
    margin-left: auto;
    text-align: right;
}

.plain-list {
    margin: 0;
    padding-left: 1.2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

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

.card-grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--portfolio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid--portfolio-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid--references {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-media-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.card-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.card-media-button:focus-visible .card-media,
.card-media-button:hover .card-media {
    border-color: color-mix(in srgb, var(--accent-strong) 48%, var(--border));
    transform: translateY(-1px);
}

.card--reference {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.card__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reference-signature {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.media-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.media-modal[hidden] {
    display: none;
}

.media-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 18, 0.82);
    backdrop-filter: blur(8px);
}

.media-modal__dialog {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.75rem;
    justify-items: center;
    width: 100%;
    pointer-events: none;
}

.media-modal__close {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(11, 18, 32, 0.8);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
}

.media-modal__image {
    display: block;
    width: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 6rem);
    height: auto;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.38);
    pointer-events: auto;
}

.card--feature,
.content-block--highlight {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.product-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-card__heading h2 {
    margin: 0;
}

.product-card__heading .status-pill {
    margin-left: auto;
    text-align: right;
    flex-shrink: 0;
}

.product-feature-list {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.product-feature-list li {
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.product-feature-list li:first-child {
    padding-top: 0;
    border-top: 0;
}

.product-feature-list strong,
.product-feature-list span {
    display: block;
}

.product-feature-list strong {
    margin-bottom: 0.2rem;
}

.product-feature-list span {
    color: var(--muted);
}

.process-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.stack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.note-box {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.form-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.form-note a,
.note-box a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.form-note a:hover,
.form-note a:focus-visible,
.note-box a:hover,
.note-box a:focus-visible {
    color: var(--accent-strong);
}

.status-pill {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(54, 209, 196, 0.12);
    color: var(--accent-strong);
    border: 1px solid rgba(54, 209, 196, 0.24);
}

.subtle-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.82rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent-strong) 22%, var(--border));
    background: color-mix(in srgb, var(--surface-2) 74%, transparent);
    color: var(--muted);
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.subtle-pill-link:hover,
.subtle-pill-link:focus-visible {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent-strong) 40%, var(--border));
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    transform: translateY(-1px);
}

.subtle-pill-link--nav {
    max-width: fit-content;
}

.rich-copy {
    display: grid;
    gap: 0.85rem;
}

.rich-copy p {
    margin: 0;
}

.rich-copy .subtle-pill-link {
    margin-right: 0.45rem;
    margin-bottom: 0.35rem;
}

.tabs__button {
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.tabs__button.is-active,
.tabs__button:hover,
.tabs__button:focus-visible {
    background: var(--surface);
}

.tabs__panel {
    display: none;
    margin-top: 1rem;
}

.tabs__panel.is-active {
    display: block;
}

.cta-banner {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1.8rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(31, 115, 108, 0.24), rgba(54, 209, 196, 0.1));
    border: 1px solid var(--border);
}

.contact-form,
.form-row {
    display: grid;
    gap: 0.6rem;
}

.contact-form {
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.form-error {
    color: #ffb4a0;
    font-size: 0.92rem;
}

.flash-stack {
    margin-top: 1rem;
}

.flash--success {
    border-color: rgba(54, 209, 196, 0.32);
}

.site-footer {
    padding: 2rem 0 4rem;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.site-footer__inner {
    grid-template-columns: 1.2fr 1fr 1.2fr;
    align-items: start;
}

.site-footer__nav {
    display: grid;
    gap: 0.6rem;
}

.site-footer__nav a,
.site-footer__contact a {
    color: var(--text);
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible,
.site-footer__contact a:hover,
.site-footer__contact a:focus-visible,
.cookie-banner__text a:hover,
.cookie-banner__text a:focus-visible {
    color: var(--accent-strong);
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 1rem;
    z-index: 40;
}

.cookie-banner__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.cookie-banner__text {
    margin: 0;
    color: var(--muted);
}

.cookie-banner__text a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.cookie-banner__button {
    white-space: nowrap;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

@media (max-width: 900px) {
    .site-header__inner,
    .hero__grid,
    .contact-grid,
    .content-grid,
    .comparison-grid,
    .cta-banner,
    .site-footer__inner,
    .cookie-banner__inner,
    .card-grid,
    .card-grid--wide {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        gap: 1rem;
    }

    .site-actions {
        justify-content: flex-start;
    }

    .cookie-banner {
        bottom: 0.75rem;
    }

    .stack-actions {
        justify-content: flex-start;
    }

    .product-meta-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
