:root {
    color-scheme: light;
    --bg: #f4eee4;
    --bg-deep: #ebe1d3;
    --bg-end: #f8f3ec;
    --paper: rgba(255, 250, 242, 0.74);
    --paper-strong: rgba(255, 250, 242, 0.9);
    --paper-soft: rgba(255, 250, 242, 0.56);
    --ink: #171512;
    --on-ink: #faf7f1;
    --ink-hover: #23201d;
    --muted: #615850;
    --line: rgba(23, 21, 18, 0.12);
    --line-strong: rgba(23, 21, 18, 0.24);
    --accent: #25483d;
    --accent-soft: rgba(37, 72, 61, 0.12);
    --dot: rgba(37, 72, 61, 0.56);
    --grid-line: rgba(255, 255, 255, 0.15);
    --glow-a: rgba(166, 128, 84, 0.14);
    --glow-b: rgba(37, 72, 61, 0.12);
    --halo: rgba(255, 255, 255, 0.8);
    --shadow: 0 26px 80px rgba(54, 39, 23, 0.12);
    --header-veil: linear-gradient(180deg, rgba(244, 238, 228, 0.92), rgba(244, 238, 228, 0.72));
    --shell-bg: linear-gradient(180deg, rgba(255, 251, 244, 0.92), rgba(255, 247, 238, 0.74));
    --portrait-filter: contrast(1.02) saturate(0.82) sepia(0.18) brightness(1.03);
    --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sans: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #191511;
        --bg-deep: #14110d;
        --bg-end: #1c1813;
        --paper: rgba(36, 30, 24, 0.74);
        --paper-strong: rgba(40, 34, 27, 0.92);
        --paper-soft: rgba(42, 36, 29, 0.5);
        --ink: #ece5d8;
        --on-ink: #1a1613;
        --ink-hover: #f6f0e4;
        --muted: #a89b89;
        --line: rgba(236, 229, 216, 0.14);
        --line-strong: rgba(236, 229, 216, 0.32);
        --accent: #8fbcaa;
        --accent-soft: rgba(143, 188, 170, 0.14);
        --dot: rgba(143, 188, 170, 0.66);
        --grid-line: rgba(255, 255, 255, 0.045);
        --glow-a: rgba(166, 128, 84, 0.1);
        --glow-b: rgba(88, 140, 120, 0.1);
        --halo: rgba(255, 255, 255, 0.06);
        --shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
        --header-veil: linear-gradient(180deg, rgba(25, 21, 17, 0.93), rgba(25, 21, 17, 0.74));
        --shell-bg: linear-gradient(180deg, rgba(44, 37, 30, 0.92), rgba(35, 30, 24, 0.74));
        --portrait-filter: contrast(1.02) saturate(0.78) sepia(0.16) brightness(0.94);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #191511;
    --bg-deep: #14110d;
    --bg-end: #1c1813;
    --paper: rgba(36, 30, 24, 0.74);
    --paper-strong: rgba(40, 34, 27, 0.92);
    --paper-soft: rgba(42, 36, 29, 0.5);
    --ink: #ece5d8;
    --on-ink: #1a1613;
    --ink-hover: #f6f0e4;
    --muted: #a89b89;
    --line: rgba(236, 229, 216, 0.14);
    --line-strong: rgba(236, 229, 216, 0.32);
    --accent: #8fbcaa;
    --accent-soft: rgba(143, 188, 170, 0.14);
    --dot: rgba(143, 188, 170, 0.66);
    --grid-line: rgba(255, 255, 255, 0.045);
    --glow-a: rgba(166, 128, 84, 0.1);
    --glow-b: rgba(88, 140, 120, 0.1);
    --halo: rgba(255, 255, 255, 0.06);
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
    --header-veil: linear-gradient(180deg, rgba(25, 21, 17, 0.93), rgba(25, 21, 17, 0.74));
    --shell-bg: linear-gradient(180deg, rgba(44, 37, 30, 0.92), rgba(35, 30, 24, 0.74));
    --portrait-filter: contrast(1.02) saturate(0.78) sepia(0.16) brightness(0.94);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: clip;
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, var(--glow-a), transparent 34%),
        radial-gradient(circle at 86% 14%, var(--glow-b), transparent 24%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 44%, var(--bg-end) 100%);
    transition: color 240ms ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 84%);
    opacity: 0.42;
    pointer-events: none;
}

::selection {
    color: var(--bg);
    background: var(--accent);
}

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

p {
    margin: 0;
}

.page {
    position: relative;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0 -0.75rem auto;
    height: calc(100% + 0.6rem);
    background: var(--header-veil);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    z-index: -1;
}

.brand {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0;
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    padding: 0.55rem 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    position: relative;
    padding-bottom: 0.2rem;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    transform: scaleX(1);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.18rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    min-height: 2.1rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: background-color 180ms ease, color 180ms ease;
}

.lang-link:hover,
.lang-link:focus-visible {
    background: var(--accent-soft);
    color: var(--ink);
}

.lang-link.is-active {
    background: var(--ink);
    color: var(--on-ink);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--muted);
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    color: var(--ink);
    border-color: var(--line-strong);
}

.theme-toggle svg {
    width: 1.05rem;
    height: 1.05rem;
}

.icon-sun {
    display: none;
}

:root[data-theme="dark"] .icon-moon {
    display: none;
}

:root[data-theme="dark"] .icon-sun {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-moon {
        display: none;
    }

    :root:not([data-theme="light"]) .icon-sun {
        display: block;
    }
}

.hero {
    min-height: calc(100svh - 4.2rem);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.85fr);
    gap: clamp(2rem, 4vw, 4.6rem);
    align-items: center;
    padding: clamp(2.8rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.25rem);
}

.hero-copy {
    max-width: 45rem;
}

.hero-kicker {
    margin-bottom: 1.1rem;
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-title {
    margin: 0;
    max-width: 15ch;
    font-family: var(--serif);
    font-weight: 420;
    font-size: clamp(2.7rem, 5.6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-optical-sizing: auto;
}

.hero-title em {
    font-style: italic;
    font-weight: 480;
    color: var(--accent);
    margin-inline: 0.03em 0.14em;
}

.hero-summary {
    max-width: 37rem;
    margin-top: 1.45rem;
    font-size: clamp(1.05rem, 1.7vw, 1.18rem);
    line-height: 1.72;
    color: var(--muted);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.7rem;
    color: var(--muted);
    font-size: 0.96rem;
}

.hero-facts span {
    position: relative;
    padding-left: 1rem;
}

.hero-facts span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58rem;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
    background: var(--dot);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.95rem 1.35rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--paper-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-weight: 500;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    border-color: var(--line-strong);
}

.button-primary {
    color: var(--on-ink);
    background: var(--ink);
    border-color: var(--ink);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: var(--ink-hover);
}

.hero-side {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0.2rem 0 0 2rem;
    border-left: 1px solid var(--line);
}

.hero-side::before {
    content: "";
    position: absolute;
    right: -1rem;
    top: 0;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 36%, var(--halo), transparent 34%),
        radial-gradient(circle at 62% 62%, var(--accent-soft), transparent 67%);
    filter: blur(4px);
    z-index: -1;
}

.identity-seal {
    position: relative;
    align-self: center;
    width: min(18rem, 72vw);
    aspect-ratio: 1 / 1.08;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.identity-seal::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--glow-a), transparent 42%, rgba(12, 10, 8, 0.22) 100%),
        linear-gradient(135deg, transparent 36%, rgba(255, 255, 255, 0.08));
    z-index: 2;
    pointer-events: none;
}

.identity-seal img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 54% center;
    filter: var(--portrait-filter);
    z-index: 1;
}

.identity-seal span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 0;
    font-family: var(--serif);
    font-size: clamp(4rem, 10vw, 6.2rem);
    letter-spacing: -0.08em;
}

.identity-card {
    padding: 1.2rem 1.25rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.identity-title {
    margin: 0 0 0.45rem;
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 420;
    letter-spacing: -0.02em;
}

.identity-copy {
    line-height: 1.68;
    color: var(--muted);
}

.identity-rows {
    display: grid;
    gap: 0.95rem;
    margin-top: 1.2rem;
}

.identity-row {
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.identity-label {
    margin-bottom: 0.38rem;
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.identity-value {
    line-height: 1.6;
}

.section {
    padding: clamp(3.3rem, 7vw, 5.5rem) 0;
    border-top: 1px solid var(--line);
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(170px, 0.48fr) minmax(0, 1.52fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.section-label {
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.section-intro {
    max-width: 46rem;
}

.section-intro h2 {
    margin: 0 0 0.9rem;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 420;
    line-height: 1.08;
    letter-spacing: -0.025em;
    font-optical-sizing: auto;
}

.section-intro p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--muted);
}

.services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2.2rem;
    margin-top: 2.6rem;
}

.service {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.service h3 {
    margin: 0 0 0.55rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 460;
    letter-spacing: -0.02em;
}

.service p {
    color: var(--muted);
    line-height: 1.72;
}

.fit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.6rem;
    margin-top: 2.6rem;
}

.fit-item {
    padding: 1.2rem 0 0;
    border-top: 1px solid var(--line);
}

.fit-item strong {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.fit-item p {
    line-height: 1.72;
    color: var(--muted);
}

.timeline {
    margin-top: 2.5rem;
}

.entry {
    display: grid;
    grid-template-columns: minmax(150px, 0.44fr) minmax(0, 1.56fr);
    gap: 1.2rem 2rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--line);
}

.entry-period {
    padding-top: 0.16rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.entry h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.entry p {
    margin-top: 0.4rem;
    line-height: 1.72;
    color: var(--muted);
}

.cases {
    margin-top: 2.6rem;
}

.case {
    display: grid;
    grid-template-columns: minmax(150px, 0.44fr) minmax(0, 1.56fr);
    gap: 1.2rem 2rem;
    padding: 1.6rem 0;
    border-top: 1px solid var(--line);
}

.case-kind {
    padding-top: 0.3rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.case-tech {
    margin-top: 0.7rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--muted);
}

.case h3 {
    margin: 0 0 0.55rem;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 460;
    letter-spacing: -0.02em;
}

.case p {
    color: var(--muted);
    line-height: 1.72;
}

.case-role {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
}

.contact-shell {
    margin-top: 2.5rem;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--shell-bg);
    box-shadow: var(--shadow);
}

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

.contact-item {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.contact-item strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-item a,
.contact-item p {
    font-size: 1.05rem;
    line-height: 1.72;
}

.contact-item a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.contact-note {
    margin-top: 1.3rem;
    color: var(--muted);
    line-height: 1.72;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0 2.4rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.footer-note {
    width: 100%;
    font-size: 0.78rem;
    opacity: 0.75;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-copy > * {
    opacity: 0;
    animation: rise-in 700ms ease forwards;
}

.hero-kicker {
    animation-delay: 80ms;
}

.hero-title {
    animation-delay: 150ms;
}

.hero-summary {
    animation-delay: 260ms;
}

.hero-facts {
    animation-delay: 340ms;
}

.hero-actions {
    animation-delay: 420ms;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    [data-reveal],
    .hero-copy > * {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }

    .site-nav a::after,
    .button,
    .lang-link,
    .theme-toggle {
        transition: none;
    }
}

@media (max-width: 980px) {
    .hero,
    .section-grid,
    .entry,
    .case,
    .contact-grid,
    .fit-grid {
        grid-template-columns: 1fr;
    }

    .case {
        gap: 0.6rem 2rem;
    }

    .hero {
        min-height: auto;
        padding-top: 2.8rem;
    }

    .hero-side {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 1.8rem;
    }

    .identity-seal {
        width: min(21rem, 100%);
    }

    .footer {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .page {
        width: min(100% - 1.2rem, 1180px);
    }

    .site-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.2rem 1rem;
    }

    .header-tools {
        width: 100%;
        justify-content: space-between;
        gap: 0.6rem 1rem;
        padding-bottom: 0.55rem;
    }

    .site-nav {
        gap: 1rem;
        padding: 0.35rem 0;
    }

    .theme-toggle {
        position: absolute;
        top: 1.55rem;
        right: 0;
        width: 2.4rem;
        height: 2.4rem;
    }

    .hero-title {
        font-size: clamp(2.4rem, 11vw, 3.6rem);
    }

    .button {
        width: 100%;
    }

    .contact-shell {
        border-radius: 22px;
    }
}

@media (max-width: 420px) {
    .site-nav {
        gap: 0.8rem;
        font-size: 0.88rem;
    }
}
