:root {
    --bs-primary-rgb: 7, 136, 255;
    --bs-primary: #0788FF;
    --hefes-bg: #ffffff;
    --hefes-surface: #f6f9fc;
    --hefes-border: #e6ecf2;
    --hefes-text: #0f172a;
    --hefes-muted: #5b6b7d;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    background-color: var(--hefes-bg);
    color: var(--hefes-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--bs-primary);
    text-decoration: none;
}

a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--hefes-border);
}

.navbar-brand {
    font-weight: 700;
    color: var(--hefes-text) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand img {
    height: 28px;
    width: auto;
}

.nav-link {
    color: var(--hefes-muted) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.hero {
    padding: 120px 0 80px;
    background:
        radial-gradient(circle at 20% 0%, rgba(7, 136, 255, 0.08), transparent 60%),
        radial-gradient(circle at 80% 30%, rgba(7, 136, 255, 0.06), transparent 50%),
        var(--hefes-bg);
    text-align: center;
}

.hero img.brand-mark {
    max-width: 320px;
    width: 80%;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.hero h1 .accent {
    color: var(--bs-primary);
}

.hero p.lead {
    font-size: 1.15rem;
    color: var(--hefes-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}

section {
    padding: 80px 0;
}

section h2 {
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 16px;
}

section .section-lead {
    color: var(--hefes-muted);
    max-width: 640px;
    margin: 0 auto 48px;
}

.bg-surface {
    background-color: var(--hefes-surface);
}

.service-card {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 16px;
    padding: 32px;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(7, 136, 255, 0.08);
    border-color: rgba(7, 136, 255, 0.4);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(7, 136, 255, 0.1);
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card ul li {
    padding: 6px 0;
    color: var(--hefes-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.service-card ul li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-primary);
    margin-top: 9px;
}

.partner-marquee {
    overflow: hidden;
    width: 100%;
    margin-top: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.partner-track {
    display: flex;
    align-items: center;
    gap: 80px;
    width: max-content;
    animation: partner-scroll 30s linear infinite;
}

.partner-marquee:hover .partner-track {
    animation-play-state: paused;
}

.partner-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    filter: grayscale(0);
    opacity: 0.85;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.partner-item:hover {
    opacity: 1;
    transform: scale(1.08);
    text-decoration: none;
}

.partner-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.partner-item-text span {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--hefes-text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

@keyframes partner-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - 40px)); }
}

@media (prefers-reduced-motion: reduce) {
    .partner-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
    }
}

.mcp-card {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.mcp-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hefes-muted);
    margin-bottom: 8px;
}

.mcp-endpoint {
    display: inline-block;
    background: rgba(7, 136, 255, 0.08);
    color: var(--bs-primary);
    border: 1px solid rgba(7, 136, 255, 0.25);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    word-break: break-all;
    margin-bottom: 16px;
}

.mcp-help {
    color: var(--hefes-muted);
    margin-bottom: 0;
}

.mcp-divider {
    border-top: 1px solid var(--hefes-border);
    margin: 24px 0 24px;
    opacity: 1;
}

.mcp-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: left;
    margin: 0 auto 8px;
    max-width: 640px;
}

.mcp-tool {
    background: var(--hefes-surface);
    border: 1px solid var(--hefes-border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mcp-tool code {
    color: var(--bs-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.mcp-tool span {
    color: var(--hefes-muted);
    font-size: 0.9rem;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.contact-card .btn {
    margin: 6px;
}

.contact-divider {
    border-top: 1px solid var(--hefes-border);
    margin: 32px 0 24px;
    opacity: 1;
}

.btn-telegram {
    background-color: #0088cc;
    border-color: #0088cc;
    color: #fff;
    font-weight: 500;
}

.btn-telegram:hover {
    background-color: #0077b5;
    border-color: #0077b5;
    color: #fff;
}

footer {
    background: var(--hefes-surface);
    border-top: 1px solid var(--hefes-border);
    color: var(--hefes-muted);
    padding: 32px 0;
    text-align: center;
}

footer a {
    color: var(--hefes-muted);
    margin: 0 12px;
}

footer a:hover {
    color: var(--bs-primary);
    text-decoration: none;
}

/* Legacy page support (privacy, terms, green-pledge) */
.legacy-content {
    padding: 120px 0 80px;
}

.legacy-content h1,
.legacy-content h2,
.legacy-content h3 {
    color: var(--hefes-text);
}

.legacy-content .card {
    background: #fff !important;
    color: var(--hefes-text) !important;
    border: 1px solid var(--hefes-border) !important;
    border-radius: 12px;
}

/* ========== Cloud configurator ========== */
.hero-compact {
    padding: 6rem 0 2rem;
    text-align: center;
}

.hero-compact h1 {
    font-size: 2.4rem;
}

.config-card,
.summary-card {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.config-h {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hefes-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--hefes-border);
}

.config-row {
    margin-bottom: 1.25rem;
}

.config-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    color: var(--hefes-text);
    margin-bottom: 0.4rem;
}

.config-out {
    font-variant-numeric: tabular-nums;
    color: var(--bs-primary);
    font-weight: 700;
}

.config-meta {
    color: var(--hefes-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.config-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.chip {
    background: var(--hefes-surface);
    border: 1px solid var(--hefes-border);
    color: var(--hefes-text);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.region-pill {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.85rem 0.5rem;
    background: var(--hefes-surface);
    border: 1.5px solid var(--hefes-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.region-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.region-pill span {
    font-weight: 600;
    color: var(--hefes-text);
}

.region-pill small {
    color: var(--hefes-muted);
    font-size: 0.75rem;
}

.region-pill:has(input:checked) {
    border-color: var(--bs-primary);
    background: rgba(7, 136, 255, 0.08);
}

.region-pill:has(input:checked) span {
    color: var(--bs-primary);
}

.config-specs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-specs li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0;
    color: var(--hefes-muted);
    font-size: 0.92rem;
    border-bottom: 1px dashed var(--hefes-border);
}

.config-specs li:last-child {
    border-bottom: none;
}

.config-specs i {
    color: var(--bs-primary);
    width: 18px;
    text-align: center;
    margin-top: 3px;
}

.config-specs strong {
    color: var(--hefes-text);
}

.summary-card {
    top: 90px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    color: var(--hefes-text);
    font-size: 0.95rem;
}

.summary-faded {
    color: var(--hefes-muted);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hefes-text);
    margin: 0.5rem 0 0.25rem;
}

.summary-total span:last-child {
    color: var(--bs-primary);
    font-variant-numeric: tabular-nums;
}

.summary-meta {
    color: var(--hefes-muted);
    font-size: 0.8rem;
    margin: 0;
}

.config-faq {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.config-faq h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.config-faq details {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
}

.config-faq details[open] {
    border-color: var(--bs-primary);
}

.config-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--hefes-text);
    list-style: none;
    position: relative;
    padding-right: 1.5rem;
}

.config-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.config-faq details[open] summary::after {
    content: '−';
}

.config-faq summary::-webkit-details-marker {
    display: none;
}

.config-faq details p {
    color: var(--hefes-muted);
    margin: 0.6rem 0 0;
    font-size: 0.92rem;
}

.success-mark {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 0.5rem;
}

.success-card {
    background: #fff;
    border: 1px solid var(--hefes-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    max-width: 720px;
    margin: 0 auto;
}

.success-steps {
    padding-left: 1.2rem;
    color: var(--hefes-muted);
    line-height: 1.7;
}

.success-steps strong {
    color: var(--hefes-text);
}

@media (max-width: 991.98px) {
    .summary-card {
        position: static !important;
        margin-top: 1rem;
    }

    .region-grid {
        grid-template-columns: 1fr;
    }
}

.term-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.term-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 0.6rem 0.85rem;
    background: var(--hefes-surface);
    border: 1.5px solid var(--hefes-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.term-pill span {
    font-weight: 700;
    color: var(--hefes-text);
    font-size: 0.95rem;
}

.term-pill small {
    color: var(--hefes-muted);
    font-size: 0.72rem;
    line-height: 1.2;
}

.term-pill:hover {
    border-color: var(--bs-primary);
}

.term-pill.active {
    border-color: var(--bs-primary);
    background: rgba(7, 136, 255, 0.08);
}

.term-pill.active span {
    color: var(--bs-primary);
}
