/* Notary Sergey Yankov, Burgas – "a notarial act on vellum".
   Paper and midnight ink, with the stamp blue taken from the original's own menu blue (#396DFA, deepened
   for contrast). EB Garamond for display, Nunito Sans for text. Every colour is a custom property:
   :root is the vellum (light) theme, [data-theme="dark"] the night desk; dark sections (.ink) set their
   own text colours in both themes. */

@font-face {
    font-family: "EB Garamond";
    src: url("/fonts/eb-garamond.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "EB Garamond";
    src: url("/fonts/eb-garamond-italic.woff2") format("woff2");
    font-weight: 400 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("/fonts/nunito-sans.woff2") format("woff2");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --page: #f3eee2;
    --sheet: #fbf8f0;
    --sheet-2: #e9e2d0;
    --paper: #f8f3e7;
    --paper-ink: #101833;
    --paper-muted: #4b4f63;
    --text: #101833;
    --muted: #4a4f66;
    --accent: #2a44c4;
    --accent-strong: #1d309a;
    --accent-soft: rgba(42, 68, 196, 0.1);
    --brass: #b49a63;
    --line: rgba(16, 24, 51, 0.16);
    --focus: #2a44c4;
    --btn-bg: #2a44c4;
    --btn-text: #ffffff;
    --btn-hover: #1d309a;
    --head-bg: rgba(243, 238, 226, 0.86);
    --field: #ffffff;
    --placeholder: #5c6075;
    --error: #a3201d;
    --shadow: 0 1px 2px rgba(16, 24, 51, 0.08), 0 18px 40px -18px rgba(16, 24, 51, 0.35);
    --midnight: #101833;
    --midnight-2: #1a2766;
    --call-bg: #2a44c4;
    --foot-bg: #0b1128;
    --radius: 18px;
    --display: "EB Garamond", "Garamond", "Georgia", serif;
    --sans: "Nunito Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --lb-bg: rgba(8, 12, 30, 0.94);
    --lb-text: #f3eee2;
    --lb-accent: #a9b8ff;
    --lb-accent-soft: rgba(169, 184, 255, 0.18);
    color-scheme: light;
}

:root[data-theme="dark"] {
    --page: #0b1128;
    --sheet: #121a3a;
    --sheet-2: #0f1631;
    --text: #ece6d6;
    --muted: #b9b6c6;
    --accent: #a9b8ff;
    --accent-strong: #c9d2ff;
    --accent-soft: rgba(169, 184, 255, 0.12);
    --brass: #c9b07a;
    --line: rgba(236, 230, 214, 0.16);
    --focus: #a9b8ff;
    --btn-bg: #a9b8ff;
    --btn-text: #0b1128;
    --btn-hover: #c9d2ff;
    --head-bg: rgba(11, 17, 40, 0.86);
    --field: #0b1128;
    --placeholder: #a3a1b4;
    --error: #ff9c8f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 22px 44px -18px rgba(0, 0, 0, 0.7);
    --midnight: #070b1d;
    --midnight-2: #16225a;
    --call-bg: #1a2766;
    --foot-bg: #060918;
    color-scheme: dark;
}

/* dark sections: the same in both themes */
.ink,
.hero,
.band-ink {
    --text: #ece6d6;
    --muted: #c3bfcf;
    --accent: #a9b8ff;
    --accent-strong: #c9d2ff;
    --accent-soft: rgba(169, 184, 255, 0.14);
    --line: rgba(236, 230, 214, 0.2);
    --focus: #c9d2ff;
    --btn-bg: #f3eee2;
    --btn-text: #101833;
    --btn-hover: #ffffff;
    color: var(--text);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-strong);
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2,
h3 {
    margin: 0 0 0.5em;
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p,
ul,
ol,
dl {
    margin: 0 0 1em;
}

.wrap {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 0 0 10px 10px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 700;
}

.skip:focus {
    top: 0;
    color: var(--btn-text);
}

/* ---- header */

.top {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--head-bg);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding-block: 12px;
}

.brand {
    flex: none;
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    column-gap: 8px;
    color: var(--text);
    text-decoration: none;
    line-height: 1.1;
}

.brand:hover {
    color: var(--text);
}

.brand-word {
    grid-column: 1 / -1;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.brand-name {
    white-space: nowrap;
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-reg {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.top-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.call:hover {
    background: var(--btn-hover);
    color: var(--btn-text);
}

.lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.lang a,
.lang span {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    text-decoration: none;
}

.lang a {
    color: var(--muted);
}

.lang a:hover {
    color: var(--accent);
}

.lang span {
    background: var(--text);
    color: var(--page);
}

.theme {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.theme[hidden] {
    display: none;
}

.theme svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.theme-moon {
    fill: currentColor;
    stroke: none;
}

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

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

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
}

.nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

@media (max-width: 420px) {
    .top-tools {
        gap: 6px;
    }

    .call {
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    .lang a,
    .lang span {
        min-width: 32px;
        padding: 0 4px;
    }
}

@media (min-width: 1380px) {
    .top {
        position: sticky;
        top: 0;
    }

    /* One row needs about 1180 px for brand, nav and tools in every language: the header gets more room
       than the page's 1180 px column, and no part of it may wrap on its own. */
    .top-row {
        width: min(1320px, 100% - 48px);
        flex-wrap: nowrap;
    }

    .nav {
        order: 2;
        flex: none;
        flex-wrap: nowrap;
        width: auto;
        margin-inline: auto;
    }

    .nav a {
        white-space: nowrap;
    }

    .top-tools {
        order: 3;
        flex: none;
        flex-wrap: nowrap;
        margin-left: 0;
    }
}

/* ---- buttons, labels */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 24px;
    border: 2px solid var(--btn-bg);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

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

.btn-line {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-line:hover {
    border-color: var(--text);
    background: transparent;
    color: var(--text);
}

.kicker,
.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.h2 {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
}

.h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.lead {
    max-width: 62ch;
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.55;
}

.lead-narrow {
    max-width: 52ch;
}

.more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    text-decoration: none;
}

.more::after {
    content: "→";
    transition: transform 0.2s ease;
}

.more:hover::after {
    transform: translateX(4px);
}

.note {
    padding: 14px 18px;
    border-left: 3px solid var(--brass);
    background: var(--accent-soft);
    border-radius: 0 12px 12px 0;
}

/* ---- sections */

.band {
    padding-block: clamp(56px, 9vw, 112px);
}

.band-tight {
    padding-block: clamp(40px, 6vw, 72px);
}

.band-sheet {
    background:
        repeating-linear-gradient(to bottom, transparent 0 35px, var(--line) 35px 36px) 0 0 / 100% 36px,
        var(--sheet-2);
    background-blend-mode: normal;
}

.band-sheet > .wrap {
    position: relative;
}

.band-ink {
    background:
        radial-gradient(70% 90% at 100% 0%, rgba(42, 68, 196, 0.45), transparent 60%),
        var(--midnight);
}

/* ---- home: hero with the act sheet */

.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 110px);
    background:
        radial-gradient(60% 70% at 85% 30%, rgba(57, 109, 250, 0.42), transparent 65%),
        linear-gradient(160deg, var(--midnight-2), var(--midnight) 60%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(236, 230, 214, 0.05) 47px 48px);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 40px;
    align-items: center;
}

.hero h1 {
    margin-bottom: 22px;
    line-height: 0.95;
}

.h1-a {
    display: block;
    color: var(--accent);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-style: italic;
    font-weight: 400;
}

.h1-b {
    display: block;
    font-size: clamp(3.1rem, 10vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.025em;
}

.hero .lead {
    color: var(--muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 16px;
}

.hero-phone {
    color: var(--muted);
    font-weight: 700;
}

.hero-phone a {
    color: var(--text);
    white-space: nowrap;
}

.hero-art {
    justify-self: center;
    width: min(100%, 460px);
}

.act {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    transform: rotate(-2.5deg);
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
}

.act-paper {
    fill: var(--paper);
}

.act-frame {
    fill: none;
    stroke: var(--brass);
    stroke-width: 1.5;
}

.act-head {
    fill: var(--paper-ink);
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 4px;
}

.act-city {
    fill: var(--paper-muted);
    font-family: var(--display);
    font-size: 22px;
    font-style: italic;
}

.act-rule {
    stroke: var(--brass);
    stroke-width: 2;
}

.act-lines line {
    stroke: #39405e;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0.55;
}

.act-sign {
    fill: var(--paper-ink);
    font-family: var(--display);
    font-size: 24px;
    font-style: italic;
}

.act-dots {
    stroke: var(--paper-muted);
    stroke-width: 2;
    stroke-dasharray: 2 6;
}

.stamp-ink {
    color: #2a44c4;
    opacity: 0.88;
}

.stamp-o,
.stamp-o2,
.stamp-i {
    fill: none;
    stroke: currentColor;
}

.stamp-o {
    stroke-width: 5;
}

.stamp-o2 {
    stroke-width: 1.5;
}

.stamp-i {
    stroke-width: 2;
}

.stamp-ring {
    fill: currentColor;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.stamp-reg {
    fill: currentColor;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
}

.stamp-no {
    fill: currentColor;
    font-family: var(--display);
    font-size: 40px;
    font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
    .act-lines line {
        stroke-dasharray: 400;
        stroke-dashoffset: 400;
        animation: write 0.55s cubic-bezier(0.5, 0, 0.3, 1) forwards;
        animation-delay: calc(0.4s + var(--i) * 0.17s);
    }

    .stamp-ink {
        transform-box: fill-box;
        transform-origin: center;
        opacity: 0;
        animation: press 0.6s cubic-bezier(0.3, 0, 0.2, 1) 1.75s forwards;
    }

    .act {
        animation: settle 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero-copy > * {
        animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero-copy > :nth-child(2) {
        animation-delay: 0.08s;
    }

    .hero-copy > :nth-child(3) {
        animation-delay: 0.16s;
    }

    .hero-copy > :nth-child(n + 4) {
        animation-delay: 0.24s;
    }
}

@keyframes write {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes press {
    0% {
        opacity: 0;
        transform: scale(1.7);
    }

    55% {
        opacity: 0.95;
        transform: scale(0.95);
    }

    100% {
        opacity: 0.88;
        transform: scale(1);
    }
}

@keyframes settle {
    from {
        opacity: 0;
        transform: translateY(40px) rotate(4deg);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 56px;
    }
}

/* ---- home: figures */

.facts {
    border-bottom: 1px solid var(--line);
}

.facts-row {
    display: grid;
    gap: 0;
}

.fact {
    padding: 26px 4px;
    border-bottom: 1px solid var(--line);
}

.fact:last-child {
    border-bottom: 0;
}

.fact p {
    margin: 0;
    color: var(--muted);
}

.fact .fact-big {
    margin-bottom: 4px;
    color: var(--text);
    font-family: var(--display);
    font-size: clamp(2.2rem, 4.4vw, 3.2rem);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .facts-row {
        grid-template-columns: 1fr 1fr;
    }

    .fact {
        padding: 34px 24px;
        border-bottom: 0;
        border-left: 1px solid var(--line);
    }

    .fact:nth-child(odd) {
        border-left: 0;
        padding-left: 0;
    }
}

@media (min-width: 1000px) {
    .facts-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .fact:nth-child(odd) {
        border-left: 1px solid var(--line);
        padding-left: 24px;
    }

    .fact:first-child {
        border-left: 0;
        padding-left: 0;
    }
}

/* ---- home: the mission */

.mission {
    padding-block: clamp(56px, 9vw, 120px);
    background: var(--sheet);
}

.mission figure {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
    padding-top: clamp(64px, 9vw, 104px);
}

.mission figure::before {
    content: "„";
    position: absolute;
    top: -0.62em;
    left: -0.04em;
    color: var(--accent);
    font-family: var(--display);
    font-size: clamp(7rem, 16vw, 12rem);
    line-height: 1;
    opacity: 0.35;
}

:lang(en) .mission figure::before {
    content: "“";
    top: -0.1em;
}

.mission blockquote {
    margin: 0;
}

.mission blockquote p {
    position: relative;
    margin: 0 0 24px;
    font-family: var(--display);
    font-size: clamp(1.55rem, 3.4vw, 2.6rem);
    font-style: italic;
    line-height: 1.25;
    text-wrap: pretty;
}

.mission figcaption {
    color: var(--muted);
    font-weight: 700;
}

.mission figcaption::before {
    content: "";
    display: inline-block;
    width: 48px;
    height: 2px;
    margin-right: 12px;
    vertical-align: middle;
    background: var(--brass);
}

/* ---- home: the two groups */

.split {
    display: grid;
    gap: 20px;
    margin: 32px 0 28px;
}

.panel {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.panel:nth-child(2) {
    background: var(--midnight);
    --text: #ece6d6;
    --muted: #c3bfcf;
    --accent: #a9b8ff;
    --line: rgba(236, 230, 214, 0.2);
    --focus: #c9d2ff;
    color: var(--text);
}

.panel-no {
    position: absolute;
    top: -0.2em;
    right: 0.1em;
    margin: 0;
    color: var(--accent);
    font-family: var(--display);
    font-size: 9rem;
    line-height: 1;
    opacity: 0.18;
}

.panel h3 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.panel-sub {
    color: var(--muted);
}

.ticks {
    padding: 0;
    list-style: none;
}

.ticks li {
    position: relative;
    padding: 8px 0 8px 30px;
    border-top: 1px solid var(--line);
}

.ticks li::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 2px;
    width: 12px;
    height: 7px;
    border-bottom: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
    transform: rotate(-45deg);
}

@media (min-width: 860px) {
    .split {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- home: before you come (numbered trail) */

.trail {
    display: grid;
    gap: 18px;
    margin: 36px 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: trail;
}

.trail li {
    position: relative;
    padding: 28px 26px 22px;
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
    counter-increment: trail;
}

.trail li::before {
    content: counter(trail, decimal-leading-zero);
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-family: var(--display);
    font-size: 3rem;
    line-height: 1;
}

.trail h3 {
    font-size: 1.6rem;
}

.trail p {
    margin: 0;
    color: var(--muted);
}

@media (min-width: 860px) {
    .trail {
        grid-template-columns: repeat(3, 1fr);
    }

    .trail li:nth-child(2) {
        transform: translateY(28px);
    }

    .trail li:nth-child(3) {
        transform: translateY(56px);
    }

    .trail + p {
        margin-top: 84px;
    }
}

/* ---- home: forms as a sideways strip */

.strip-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px 32px;
}

.strip-head p {
    max-width: 52ch;
    color: var(--muted);
}

.strip {
    display: grid;
    grid-auto-columns: minmax(230px, 270px);
    grid-auto-flow: column;
    gap: 16px;
    margin: 28px 0 0;
    padding: 6px 4px 22px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--accent) transparent;
}

.strip li {
    scroll-snap-align: start;
}

.doc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 240px;
    padding: 22px 22px 20px;
    background: var(--paper);
    color: var(--paper-ink);
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
    border-radius: 6px;
    transition: transform 0.25s ease;
}

.doc-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(225deg, transparent 50%, #d6cbb0 50%);
}

.doc-card:hover {
    color: var(--paper-ink);
    transform: translateY(-6px) rotate(-1deg);
}

.doc-card:focus-visible {
    outline-color: #c9d2ff;
}

.doc-card .doc-no {
    color: #2a44c4;
    font-family: var(--display);
    font-size: 2.4rem;
    line-height: 1;
}

.doc-card .doc-title {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ---- photos and the timeline */

.photo {
    margin: 0;
}

.photo a {
    display: inline-block;
    padding: 10px 10px 12px;
    background: #fbf8f0;
    border-radius: 4px;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
    transition: transform 0.3s ease;
}

.photo a:hover {
    transform: rotate(0deg) scale(1.02);
}

.photo img {
    display: block;
    border-radius: 2px;
}

.photo figcaption {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9rem;
}

.about-teaser {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 860px) {
    .about-teaser {
        grid-template-columns: auto 1fr;
        gap: 72px;
    }
}

.timeline {
    position: relative;
    margin: 28px 0;
    padding: 0 0 0 28px;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 6px;
    width: 2px;
    background: linear-gradient(var(--brass), var(--accent));
}

.timeline li {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 10px 0 14px;
}

.timeline li::before {
    content: "";
    position: absolute;
    top: 18px;
    left: -28px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: var(--page);
}

.tl-year {
    color: var(--accent);
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .timeline li {
        grid-template-columns: 170px 1fr;
        gap: 16px;
        align-items: baseline;
    }
}

/* ---- the closing call band */

.call-band {
    padding-block: clamp(48px, 7vw, 88px);
    background:
        radial-gradient(60% 120% at 100% 100%, rgba(16, 24, 51, 0.45), transparent 60%),
        var(--call-bg);
    --text: #ffffff;
    --muted: #e3e7ff;
    --accent: #ffffff;
    --accent-strong: #ffffff;
    --line: rgba(255, 255, 255, 0.3);
    --focus: #ffffff;
    color: var(--text);
}

.call-grid {
    display: grid;
    gap: 32px;
    align-items: center;
}

.call-band .h2 {
    margin-bottom: 14px;
}

.call-addr,
.call-hours {
    color: var(--muted);
}

.call-phones {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.call-big {
    display: grid;
    color: var(--text);
    font-family: var(--display);
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.call-big span {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.call-big:hover {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

@media (min-width: 860px) {
    .call-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

/* ---- inner pages */

.page-hero {
    padding-block: clamp(44px, 7vw, 92px) clamp(36px, 5vw, 64px);
    background:
        radial-gradient(55% 90% at 90% 0%, rgba(57, 109, 250, 0.4), transparent 62%),
        linear-gradient(165deg, var(--midnight-2), var(--midnight) 70%);
    --text: #ece6d6;
    --muted: #c3bfcf;
    --accent: #a9b8ff;
    --accent-strong: #c9d2ff;
    --line: rgba(236, 230, 214, 0.2);
    --focus: #c9d2ff;
    color: var(--text);
}

.page-hero h1 {
    max-width: 18ch;
    font-size: clamp(2.5rem, 7vw, 5.2rem);
    letter-spacing: -0.02em;
}

.page-hero .lead {
    color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
    .page-hero .wrap > * {
        animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .page-hero .wrap > :nth-child(2) {
        animation-delay: 0.08s;
    }

    .page-hero .wrap > :nth-child(n + 3) {
        animation-delay: 0.16s;
    }
}

.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.toc a {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.toc a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.prose {
    max-width: 760px;
    font-size: 1.12rem;
}

.prose p:first-child::first-letter {
    float: left;
    margin: 0.05em 0.1em 0 0;
    color: var(--accent);
    font-family: var(--display);
    font-size: 3.6em;
    line-height: 0.8;
}

/* about */

.about-grid {
    display: grid;
    gap: 44px;
}

.about-grid .h3 {
    margin-top: 8px;
}

.timeline-full {
    margin-top: 12px;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 360px 1fr;
        gap: 72px;
        align-items: start;
    }

    .photo-tall {
        position: sticky;
        top: 120px;
    }
}

/* services */

.service-group {
    display: grid;
    gap: 28px;
}

.sg-head p {
    color: var(--muted);
}

.sg-head .h2 {
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    hyphens: auto;
}

.sg-no {
    margin: 0 0 -10px;
    color: var(--accent);
    font-family: var(--display);
    font-size: clamp(5rem, 12vw, 9rem);
    line-height: 0.9;
}

.numbered {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: n;
}

.numbered li {
    position: relative;
    padding: 18px 20px 18px 66px;
    border-radius: 14px;
    background: var(--sheet);
    box-shadow: var(--shadow);
    counter-increment: n;
}

.numbered li::before {
    content: counter(n, decimal-leading-zero);
    position: absolute;
    top: 14px;
    left: 18px;
    color: var(--accent);
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 600;
}

@media (min-width: 960px) {
    .service-group {
        grid-template-columns: 340px 1fr;
        gap: 56px;
        align-items: start;
    }

    .sg-head {
        position: sticky;
        top: 120px;
    }
}

/* guide */

.checks-grid {
    display: grid;
    gap: 24px;
}

.checklist {
    padding: clamp(22px, 4vw, 36px);
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.checks {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.checks li {
    border-top: 1px solid var(--line);
}

.checks label {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 11px 0;
    cursor: pointer;
}

.checks input {
    flex: none;
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    margin: 1px 0 0;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background: var(--field);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.checks input:checked {
    background:
        linear-gradient(45deg, transparent 44%, var(--btn-text) 44% 56%, transparent 56%) 4px 8px / 7px 7px no-repeat,
        linear-gradient(-45deg, transparent 44%, var(--btn-text) 44% 56%, transparent 56%) 8px 4px / 11px 11px no-repeat,
        var(--btn-bg);
}

.checks input:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.checks input:checked + span {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: var(--accent);
}

@media (min-width: 960px) {
    .checks-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.attention {
    display: grid;
    gap: 20px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: a;
}

.attention li {
    position: relative;
    padding: 24px 24px 24px 84px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    counter-increment: a;
    font-size: 1.08rem;
}

.attention li::before {
    content: counter(a);
    position: absolute;
    top: 14px;
    left: 26px;
    color: var(--accent);
    font-family: var(--display);
    font-size: 3rem;
    line-height: 1;
}

@media (min-width: 900px) {
    .attention {
        grid-template-columns: 1fr 1fr;
    }
}

.two-col {
    display: grid;
    gap: 40px;
}

@media (min-width: 960px) {
    .two-col {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}

.cases {
    margin: 0;
}

.cases > div {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.cases dt {
    color: var(--accent);
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
}

.cases dd {
    margin: 4px 0 0;
}

.tax {
    display: grid;
    gap: 12px 48px;
    align-items: center;
}

.tax-big {
    margin: 0;
    color: var(--accent);
    font-family: var(--display);
    font-size: clamp(5rem, 16vw, 11rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.tax p:last-child {
    max-width: 62ch;
}

@media (min-width: 860px) {
    .tax {
        grid-template-columns: auto 1fr;
    }
}

.bento {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.bento-cell {
    padding: 26px;
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.bento-cell h3 {
    font-size: 1.5rem;
}

.bento-cell p {
    margin: 0;
    color: var(--muted);
}

@media (min-width: 760px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-cell:nth-child(5) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1060px) {
    .bento {
        grid-template-columns: repeat(3, 1fr);
    }

    .bento-cell:nth-child(1) {
        grid-row: span 2;
        background: var(--midnight);
        --text: #ece6d6;
        --muted: #c3bfcf;
        color: var(--text);
    }

    .bento-cell:nth-child(1) h3 {
        font-size: 2rem;
    }

    .bento-cell:nth-child(4) {
        grid-column: span 2;
    }
}

/* forms */

.doc-list {
    display: grid;
    gap: 12px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.doc-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--sheet);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.doc-row:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateX(4px);
}

.doc-row .doc-no {
    color: var(--accent);
    font-family: var(--display);
    font-size: 2rem;
    line-height: 1;
}

.doc-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.doc-row .doc-title {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.25;
}

.doc-orig {
    color: var(--muted);
    font-size: 0.92rem;
}

.doc-dl {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    color: var(--accent);
    font-weight: 800;
}

@media (min-width: 760px) {
    .doc-row {
        grid-template-columns: 64px 1fr auto;
    }

    .doc-dl {
        grid-column: auto;
        padding: 10px 18px;
        border: 2px solid var(--accent);
        border-radius: 999px;
    }
}

/* contact */

.duo {
    display: grid;
    gap: 24px;
    align-items: start;
}

@media (min-width: 960px) {
    .duo {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    padding: clamp(22px, 4vw, 38px);
    border-radius: var(--radius);
    background: var(--sheet);
    box-shadow: var(--shadow);
}

.card-ink {
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(57, 109, 250, 0.35), transparent 65%),
        var(--midnight);
    --text: #ece6d6;
    --muted: #c3bfcf;
    --accent: #a9b8ff;
    --accent-strong: #c9d2ff;
    --line: rgba(236, 230, 214, 0.2);
    --focus: #c9d2ff;
    color: var(--text);
}

.card-reg {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.big-phone {
    display: grid;
    margin-bottom: 16px;
    color: var(--text);
    font-family: var(--display);
    font-size: clamp(1.9rem, 6vw, 2.8rem);
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
}

.big-phone span {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.big-phone:hover {
    color: var(--accent);
}

.contact-list {
    margin: 24px 0 0;
}

.contact-list > div {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.contact-form > div {
    margin-bottom: 16px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    color: var(--text);
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form ::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    border-color: var(--accent);
    outline: 3px solid var(--focus);
    outline-offset: 0;
}

.contact-form ul {
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
    color: var(--error);
    font-weight: 700;
}

.form-hint {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-sent {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--accent-soft);
}

.contact-sent strong {
    display: block;
}

.links-grid {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.links-grid a {
    display: grid;
    gap: 2px;
    height: 100%;
    padding: 14px 44px 14px 18px;
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--sheet);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.links-grid a::after {
    content: "↗";
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--accent);
}

.links-grid a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.links-grid small {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

@media (min-width: 700px) {
    .links-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1060px) {
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- footer */

.foot {
    padding-top: clamp(48px, 7vw, 80px);
    background: var(--foot-bg);
    --text: #e4dfd0;
    --muted: #b9b5c6;
    --accent: #a9b8ff;
    --accent-strong: #c9d2ff;
    --line: rgba(228, 223, 208, 0.18);
    --focus: #c9d2ff;
    color: var(--text);
    font-size: 0.98rem;
}

.foot-grid {
    display: grid;
    gap: 32px;
}

.foot h2 {
    margin-bottom: 10px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.foot address {
    margin-bottom: 20px;
    font-style: normal;
}

.foot-brand {
    margin-bottom: 10px;
    font-family: var(--display);
    font-size: 1.9rem;
    line-height: 1.1;
}

.foot-brand span {
    display: block;
    color: var(--accent);
    font-size: 1.1rem;
    font-style: italic;
}

.foot-small {
    color: var(--muted);
}

.foot-phone {
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}

.foot-nav {
    padding: 0;
    list-style: none;
}

.foot-nav li {
    padding: 3px 0;
}

.foot-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
    margin-top: 36px;
    padding-block: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.88rem;
}

.foot-bottom p {
    margin: 0;
}

@media (min-width: 760px) {
    .foot-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1060px) {
    .foot-grid {
        grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
    }
}

/* ---- 404 */

.not-found {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 40px 16px;
    background:
        radial-gradient(60% 60% at 80% 20%, rgba(57, 109, 250, 0.4), transparent 65%),
        var(--midnight);
    --text: #ece6d6;
    --muted: #c3bfcf;
    --accent: #a9b8ff;
    --focus: #c9d2ff;
    --btn-bg: #f3eee2;
    --btn-text: #101833;
    --btn-hover: #ffffff;
    color: var(--text);
}

.not-found > div {
    max-width: 640px;
}

.not-found h1 {
    font-size: clamp(2.2rem, 7vw, 3.8rem);
}

.not-found h2 {
    margin-top: 40px;
    font-size: 1.8rem;
}

.not-found .brand {
    margin-bottom: 36px;
    color: var(--text);
}

.not-found .brand-reg {
    color: var(--muted);
}

.not-found a[href^="tel:"] {
    white-space: nowrap;
}

/* ---- reveal on scroll (finished state without support) */

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 28%;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* ---- lightbox: /js/lightbox.js opens a linked image enlarged over the page, in a <dialog> ----
   Paste this block into the site's css/site.css. The overlay is dark in every theme and brings its own
   colours and box sizing, so it does not depend on the rest of the stylesheet. To recolour it to the
   site, set these on .lightbox (or on :root): --lb-bg, --lb-text, --lb-accent (focus ring),
   --lb-accent-soft (hover). */

[data-lightbox] {
    cursor: zoom-in;
}

.lightbox,
.lightbox * {
    box-sizing: border-box;
}

html:has(.lightbox[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 68px 12px 14px;
    border: 0;
    background: var(--lb-bg, rgba(12, 14, 16, 0.95));
    color: var(--lb-text, #f2f2f2);
    color-scheme: dark;
    overscroll-behavior: contain;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
}

.lightbox::backdrop {
    background: none;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lightbox-stage img {
    display: block;
    max-width: none;
    border-radius: 4px;
    background: #fff;
}

.lightbox-caption {
    display: grid;
    place-items: center;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0 56px;
    color: var(--lb-text, #f2f2f2);
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: center;
}

.lightbox-button {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lightbox-button:hover {
    border-color: #ffffff;
    background-color: var(--lb-accent-soft, rgba(255, 255, 255, 0.16));
}

.lightbox-button:focus-visible {
    outline: 3px solid var(--lb-accent, #ffffff);
    outline-offset: 3px;
    border-radius: 50%;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lightbox-prev,
.lightbox-next {
    bottom: 14px;
}

.lightbox-prev {
    left: 12px;
    rotate: 180deg;
}

.lightbox-next {
    right: 12px;
}

@media (min-width: 760px) {
    .lightbox {
        padding: 24px 84px 18px;
    }

    .lightbox-caption {
        padding: 0;
    }

    .lightbox-prev,
    .lightbox-next {
        top: calc(50% - 22px);
        bottom: auto;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next,
    .lightbox-close {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.2s ease;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }
}
