:root {
    --bg: #f4efe7;
    --surface: rgba(255, 251, 246, 0.84);
    --surface-strong: #fffaf4;
    --ink: #231916;
    --muted: #6f635d;
    --line: rgba(35, 25, 22, 0.12);
    --accent: #8d5c4f;
    --accent-soft: #b88772;
    --forest: #5a6850;
    --dark: #1d1715;
    --sand: #e8ddd1;
    --shadow: 0 24px 70px rgba(41, 28, 22, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(141, 92, 79, 0.12), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(90, 104, 80, 0.12), transparent 24%),
        linear-gradient(180deg, #fbf6ef 0%, var(--bg) 100%);
    overflow-x: hidden;
}

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

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

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: rgba(251, 246, 239, 0.94);
    backdrop-filter: blur(14px);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-ring {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    border: 1px solid rgba(35, 25, 22, 0.12);
}

.loader-ring::before,
.loader-ring::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: inherit;
    border: 1px solid transparent;
}

.loader-ring::before {
    border-top-color: var(--accent);
    animation: spin 1.2s linear infinite;
}

.loader-ring::after {
    inset: 19px;
    border-bottom-color: var(--forest);
    animation: spinReverse 1.5s linear infinite;
}

.page-transition {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    transform: translateY(100%);
    background: linear-gradient(180deg, #1d1715 0%, #4d342b 100%);
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
    transform: translateY(0);
}

.site-header {
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.scrolled {
    background: rgba(251, 246, 239, 0.9);
    backdrop-filter: blur(16px);
    border-bottom-color: rgba(35, 25, 22, 0.08);
    box-shadow: 0 18px 50px rgba(23, 17, 15, 0.08);
}

.nav-link,
.mobile-nav-link {
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(35, 25, 22, 0.72);
    transition: color 0.25s ease;
}

.nav-link::after,
.mobile-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--ink);
}

.nav-link:hover::after,
.nav-link.active::after,
.mobile-nav-link:hover::after,
.mobile-nav-link.active::after {
    transform: scaleX(1);
}

.mobile-menu-panel {
    border: 1px solid var(--line);
    background: rgba(255, 250, 244, 0.96);
    box-shadow: var(--shadow);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(35, 25, 22, 0.56);
}

.section-kicker::before {
    content: "";
    width: 2.8rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.panel,
.soft-card,
.service-card,
.article-card,
.metric-card,
.faq-item,
.contact-card,
.note-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 252, 247, 0.82));
    box-shadow: var(--shadow);
}

.dark-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, #251c19 0%, #151110 100%);
    box-shadow: 0 30px 80px rgba(17, 12, 10, 0.35);
}

.editorial-frame {
    position: relative;
    overflow: hidden;
}

.editorial-frame::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 1.6rem;
    pointer-events: none;
}

.floating-badge {
    backdrop-filter: blur(12px);
}

.stat-number {
    font-size: clamp(2rem, 3vw, 3.35rem);
    line-height: 1;
}

.stack-card {
    position: relative;
}

.stack-card::after {
    content: "";
    position: absolute;
    inset: auto -12% -18% auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(184, 135, 114, 0.28), transparent 68%);
    pointer-events: none;
}

.atelier-strip {
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.atelier-track {
    display: flex;
    width: max-content;
    gap: 1.5rem;
    min-width: 100%;
    animation: marquee 24s linear infinite;
}

.atelier-track span {
    white-space: nowrap;
}

.faq-item {
    overflow: hidden;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.faq-answer > div {
    overflow: hidden;
}

.faq-item.open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-icon {
    transition: transform 0.25s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--accent-soft);
}

.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid rgba(35, 25, 22, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus,
.form-textarea:focus {
    border-color: rgba(141, 92, 79, 0.45);
    box-shadow: 0 0 0 4px rgba(141, 92, 79, 0.09);
}

.map-frame iframe {
    width: 100%;
    min-height: 100%;
    border: 0;
    filter: grayscale(0.1) contrast(1.02);
}

.cookie-banner {
    transform: translateY(120%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.content-prose p {
    margin-top: 1rem;
    color: rgba(35, 25, 22, 0.78);
    line-height: 1.95;
}

.content-prose h2,
.content-prose h3 {
    margin-top: 2rem;
    color: var(--ink);
}

.content-prose ul {
    margin-top: 1rem;
    padding-left: 1.2rem;
    color: rgba(35, 25, 22, 0.78);
}

.content-prose li + li {
    margin-top: 0.75rem;
}

.btn-main,
.btn-outline,
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    border-radius: 999px;
    padding: 0.95rem 1.45rem;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-main {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    box-shadow: 0 16px 36px rgba(141, 92, 79, 0.22);
}

.btn-outline {
    color: var(--ink);
    border: 1px solid rgba(35, 25, 22, 0.14);
    background: rgba(255, 255, 255, 0.56);
}

.btn-dark {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.btn-main:hover,
.btn-outline:hover,
.btn-dark:hover,
.service-card:hover,
.article-card:hover,
.note-card:hover,
.metric-card:hover,
.contact-card:hover {
    transform: translateY(-3px);
}

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

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

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 1023px) {
    .atelier-track {
        animation-duration: 18s;
    }
}

@media (max-width: 767px) {
    .section-kicker {
        letter-spacing: 0.18em;
    }

    .editorial-frame::before {
        inset: 0.75rem;
    }
}
