/* Energoremont – Sliven. Steel night and the logo's cyan, with the orange of the firm's gantry crane;
   light steel "sheets" for the long lists. Geologica (display and text) + PT Mono (figures, specs). */

@font-face {
    font-family: "Geologica";
    src: url("/fonts/geologica.woff2") format("woff2");
    font-weight: 300 900;
    font-display: swap;
}

@font-face {
    font-family: "PT Mono";
    src: url("/fonts/pt-mono.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

:root {
    --night: #0c1820;
    --night-2: #11222d;
    --night-3: #193242;
    --line-dark: #2b4a5c;
    --cyan: #00aef0;
    --cyan-soft: #7fd6f7;
    --cyan-ink: #075f87;
    --orange: #f5781a;
    --orange-ink: #a5470a;
    --sheet: #eef2f4;
    --paper: #ffffff;
    --ink: #0f1f29;
    --muted: #465964;
    --muted-dark: #a9bcc7;
    --text-dark: #e8f0f4;
    --radius: 18px;
    --radius-s: 10px;
    --wrap: 1180px;
    --sans: "Geologica", system-ui, sans-serif;
    --mono: "PT Mono", ui-monospace, monospace;
    --lb-bg: rgba(6, 14, 19, 0.94);
    --lb-accent: #00aef0;
    --lb-accent-soft: rgba(0, 174, 240, 0.25);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 8.5rem;
}

body {
    margin: 0;
    background: var(--night);
    color: var(--text-dark);
    font: 400 1.0625rem/1.6 var(--sans);
    overflow-wrap: break-word;
}

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

a {
    color: var(--cyan-soft);
    text-underline-offset: 0.18em;
}

a:hover {
    color: #ffffff;
}

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

h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.2rem);
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.2rem);
}

.h-big {
    font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.4rem);
    letter-spacing: -0.03em;
}

h3,
.h3 {
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
}

.mono {
    font-family: var(--mono);
    letter-spacing: 0;
}

.wrap {
    width: min(100% - 32px, var(--wrap));
    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;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    background: var(--orange);
    color: var(--ink);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-s);
    font-weight: 700;
}

.skip:focus {
    top: 1rem;
}

/* ---- header: white, for the logo's own white glow ---- */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-bottom: 1px solid #d6e0e6;
    backdrop-filter: saturate(1.4) blur(10px);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding-block: 0.5rem;
}

.brand {
    flex: 0 1 auto;
    margin-right: auto;
    min-width: 0;
}

.brand img {
    width: clamp(170px, 30vw, 260px);
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--orange);
    color: var(--ink);
    font: 700 0.98rem/1 var(--mono);
    text-decoration: none;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.call:hover {
    background: #ff9442;
    color: var(--ink);
    transform: translateY(-1px);
}

.lang {
    display: flex;
    gap: 0.15rem;
    font: 700 0.85rem/1 var(--sans);
}

.lang a,
.lang span {
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
}

.lang a {
    color: var(--cyan-ink);
    text-decoration: none;
}

.lang a:hover {
    background: var(--sheet);
    color: var(--ink);
}

.lang span {
    background: var(--ink);
    color: #ffffff;
}

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #c3d0d8;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
    position: absolute;
    left: 11px;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}

.menu-bars {
    top: 21px;
}

.menu-bars::before {
    content: "";
    left: 0;
    top: -6px;
}

.menu-bars::after {
    content: "";
    left: 0;
    top: 6px;
}

.menu-btn[aria-expanded="true"] .menu-bars {
    background: transparent;
}

.menu-btn[aria-expanded="true"] .menu-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

.nav {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.2rem;
    padding-bottom: 0.15rem;
}

.nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}

.nav a:hover {
    background: var(--sheet);
    color: var(--ink);
}

.nav a[aria-current] {
    background: var(--night);
    color: #ffffff;
}

@media (min-width: 900px) {
    .brand img {
        width: 260px;
    }

    .nav {
        border-top: 1px solid #e3e9ed;
        padding-top: 0.45rem;
        gap: 0.2rem 0.35rem;
    }

    .nav a {
        white-space: nowrap;
    }
}

@media (max-width: 899px) {
    .js-menu .menu-btn {
        display: inline-block;
    }

    .js-menu .nav {
        display: none;
        flex-direction: column;
        padding: 0.4rem 0 0.8rem;
    }

    .js-menu .nav.open {
        display: flex;
    }

    .js-menu .nav a {
        font-size: 1.05rem;
        padding: 0.7rem 0.9rem;
    }
}

@media (max-width: 520px) {
    .brand img {
        width: 150px;
    }

    .call {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    .lang a,
    .lang span {
        padding: 0.45rem 0.4rem;
    }
}

@media (max-width: 400px) {
    .brand {
        flex-basis: 100%;
    }
}

/* ---- buttons, tags ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    font: 700 1rem/1.2 var(--sans);
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-hot {
    background: var(--orange);
    color: var(--ink);
}

.btn-hot:hover {
    background: #ff9442;
    color: var(--ink);
}

.btn-line {
    border-color: currentColor;
    color: inherit;
    background: transparent;
}

.btn-line:hover {
    color: var(--orange);
}

.tag {
    display: inline-block;
    font: 700 0.72rem/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: var(--orange);
    color: var(--ink);
    vertical-align: middle;
}

.more {
    font-weight: 700;
    text-decoration: none;
}

/* ---- hero with the building ---- */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60rem 30rem at 85% 30%, rgba(0, 174, 240, 0.22), transparent 60%),
        radial-gradient(40rem 24rem at 0% 100%, rgba(245, 120, 26, 0.14), transparent 60%),
        linear-gradient(160deg, #10222d, var(--night) 60%);
    padding-block: clamp(1.75rem, 4vw, 3.5rem);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(127, 214, 247, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(127, 214, 247, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr 1.15fr;
        gap: clamp(2rem, 4vw, 3.5rem);
    }
}

.hero h1 {
    font-size: clamp(1.9rem, 1.2rem + 2.3vw, 3.2rem);
    max-width: 16ch;
    margin-bottom: 0;
}

.hero .actions {
    margin-top: clamp(1.2rem, 2.5vw, 2rem);
}

.eyebrow {
    font: 700 0.85rem/1.3 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
}

.lead {
    font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
    color: var(--muted-dark);
    max-width: 42rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.hero-photo {
    margin: 0;
}

.hero-photo a {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(127, 214, 247, 0.25);
}

.hero-photo img {
    display: block;
    width: 100%;
    max-width: 986px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 45% 50%;
}

.areas-note {
    max-width: 46rem;
    margin: 2rem 0 0;
    border-left: 3px solid var(--orange);
    padding-left: 1rem;
}

/* ---- photo strip ---- */

.strip {
    background: var(--night);
    padding-block: 0 clamp(2rem, 5vw, 3.5rem);
}

.strip-row {
    list-style: none;
    margin: 0;
    padding: 0 16px 0.6rem;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 460px);
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line-dark) transparent;
}

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

.strip-row a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.strip-row img {
    width: 100%;
    aspect-ratio: 986 / 380;
    object-fit: cover;
    transition: transform 0.5s;
}

.strip-row a:hover img {
    transform: scale(1.04);
}

/* ---- bands ---- */

.band {
    padding-block: clamp(2.8rem, 7vw, 5.5rem);
}

.sheet {
    background: var(--sheet);
    color: var(--ink);
}

.sheet a {
    color: var(--cyan-ink);
}

.sheet a:hover {
    color: var(--ink);
}

.sheet .lead,
.sheet .intro {
    color: var(--muted);
}

.intro {
    max-width: 46rem;
    color: var(--muted-dark);
    margin-bottom: 2rem;
}

.head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 2rem;
}

.page-hero {
    background:
        radial-gradient(50rem 20rem at 100% 0%, rgba(0, 174, 240, 0.2), transparent 60%),
        linear-gradient(160deg, #10222d, var(--night));
    padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
    border-bottom: 4px solid var(--orange);
}

.page-hero h1 {
    font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem);
    max-width: 22ch;
}

/* ---- areas of work ---- */

.areas {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.areas li {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem 1.4rem;
    display: grid;
    gap: 0.6rem;
    align-content: start;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 1px 0 #d4dde3;
    transition: transform 0.25s, box-shadow 0.25s;
}

.areas li:nth-child(-n+4) {
    border-top: 4px solid var(--cyan);
}

.areas li:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 31, 41, 0.12);
}

.num {
    color: var(--orange-ink);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ---- machines bento ---- */

.bento,
.machine-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

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

    .bento-wide {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.bento a,
.machine-cards a {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--night-2);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text-dark);
    text-decoration: none;
    transition: border-color 0.25s, transform 0.25s;
}

.bento a:hover,
.machine-cards a:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    color: var(--text-dark);
}

.bento img,
.machine-cards img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.bento-wide img {
    flex: 1;
    min-height: 0;
}

.bento-text,
.mc-text {
    display: grid;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem 1.3rem;
    justify-items: start;
}

.bento-text strong,
.mc-text strong {
    font-size: 1.1rem;
    line-height: 1.25;
}

.bento-text > span:last-child,
.mc-text > span:last-child {
    color: var(--muted-dark);
    font-size: 0.95rem;
}

.machine-cards a {
    background: var(--paper);
    border-color: #d4dde3;
    color: var(--ink);
}

.machine-cards a:hover {
    color: var(--ink);
    border-color: var(--cyan-ink);
}

.machine-cards .mc-text > span:last-child {
    color: var(--muted);
}

/* ---- facilities: figures and bars ---- */

.base {
    display: grid;
    gap: 2.5rem;
}

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

.figure {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 0 0.5rem;
    margin: 0 0 1.2rem;
}

.fig-n {
    font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem);
    line-height: 1;
    color: var(--ink);
}

.fig-u {
    font-weight: 700;
    color: var(--orange-ink);
}

.fig-l {
    grid-column: 1 / -1;
    color: var(--muted);
    font-weight: 600;
}

.bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.bars li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.3rem 1rem;
    font-weight: 600;
}

.bar-v {
    color: var(--cyan-ink);
    white-space: nowrap;
}

.bar {
    grid-column: 1 / -1;
    height: 14px;
    border-radius: 999px;
    background: #d8e1e7;
    position: relative;
    overflow: hidden;
}

.bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cyan-ink), var(--cyan));
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .bar::after {
            animation: fill linear both;
            animation-timeline: view();
            animation-range: entry 10% cover 40%;
        }

        @keyframes fill {
            from {
                width: 0;
            }

            to {
                width: var(--w);
            }
        }

        .areas li,
        .bento-item,
        .partners > li {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }

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

            to {
                opacity: 1;
                transform: none;
            }
        }
    }
}

.bar-note {
    margin-top: 1.4rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---- chips ---- */

.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chips li {
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    background: var(--night-2);
    font-weight: 600;
    font-size: 0.95rem;
}

.sheet .chips li {
    background: var(--paper);
    border-color: #d4dde3;
}

.chips-links li {
    padding: 0;
}

.chips-links a {
    display: block;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    color: var(--text-dark);
    text-decoration: none;
}

.chips-links a:hover {
    background: var(--night-3);
    color: #ffffff;
}

/* ---- EU notices ---- */

.eu-grid {
    display: grid;
    gap: 16px;
}

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

.eu-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: 0 1px 0 #d4dde3;
}

.eu-plate {
    display: block;
    background: #ffffff;
    border: 1px solid #e1e7eb;
    border-radius: var(--radius-s);
    padding: 0.8rem;
    margin-bottom: 1.2rem;
}

.eu-facts {
    margin: 0;
    display: grid;
    gap: 0.7rem;
}

.eu-facts div {
    display: grid;
    gap: 0.1rem;
}

.eu-facts dt {
    font: 700 0.78rem/1.3 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.eu-facts dd {
    margin: 0;
    font-weight: 600;
}

/* ---- call band ---- */

.cta {
    background:
        radial-gradient(40rem 20rem at 0% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
        var(--orange);
    color: var(--ink);
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.cta h2 {
    max-width: 24ch;
}

.cta-grid {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

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

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0;
}

.cta .btn-hot {
    background: var(--ink);
    color: #ffffff;
    font-family: var(--mono);
}

.cta .btn-hot:hover {
    background: #000000;
    color: #ffffff;
}

.cta .btn-line {
    color: var(--ink);
}

.cta .btn-line:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.35);
}

/* ---- machine pages ---- */

.crumbs {
    font-size: 0.92rem;
    color: var(--muted-dark);
    margin-bottom: 1.2rem;
}

.crumbs a {
    color: var(--cyan-soft);
}

.crumbs [aria-current] {
    color: var(--text-dark);
}

.machine-hero .tag {
    margin-bottom: 0.8rem;
}

.mh-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}

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

.mh-photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
}

.mh-photos li:first-child {
    grid-column: 1 / -1;
}

.mh-photos figure {
    margin: 0;
}

.mh-photos a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line-dark);
}

.spec-h {
    margin-top: 2rem;
    color: var(--cyan-ink);
}

.specs {
    margin: 0;
    display: grid;
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 0 #d4dde3;
}

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

.specs div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    overflow-wrap: anywhere;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #e3e9ed;
}

.specs dt {
    color: var(--muted);
    font-size: 0.95rem;
}

.specs dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink);
}

/* ---- other equipment ---- */

.other,
.duo {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .other,
    .duo {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.ticks {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2 220px;
    column-gap: 2rem;
}

.ticks li {
    break-inside: avoid;
    padding: 0.45rem 0 0.45rem 1.4rem;
    position: relative;
    border-bottom: 1px solid var(--line-dark);
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--orange);
}

.photo {
    margin: 0;
}

.photo a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.photo figcaption {
    font-size: 0.92rem;
    color: var(--muted-dark);
    margin-top: 0.5rem;
}

/* ---- partners ---- */

.partners {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.partners > li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    box-shadow: 0 1px 0 #d4dde3;
}

.partners > li.is-site {
    border-left: 5px solid var(--orange);
}

.partners h2 {
    margin-bottom: 0.5rem;
}

.partners ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.partners .num {
    padding-top: 0.2rem;
}

/* ---- documents ---- */

.docs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.docs a {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--night-2);
    border: 1px solid var(--line-dark);
    color: var(--text-dark);
    text-decoration: none;
    height: 100%;
    transition: border-color 0.25s;
}

.docs a:hover {
    border-color: var(--cyan);
    color: var(--text-dark);
}

.docs img {
    background: #ffffff;
    border-radius: 6px;
}

.doc-text {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.doc-text > span:last-child {
    color: var(--muted-dark);
    font-size: 0.94rem;
}

.ftype {
    font: 700 0.72rem/1 var(--mono);
    letter-spacing: 0.06em;
    padding: 0.3rem 0.45rem;
    border-radius: 5px;
    background: var(--cyan);
    color: var(--ink);
}

/* ---- certificates ---- */

.systems {
    margin: 0 0 1.5rem;
    padding-left: 1.3rem;
    max-width: 52rem;
}

.systems li {
    margin-bottom: 0.7rem;
}

.closing {
    font-weight: 700;
    max-width: 52rem;
}

.certs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.certs figure {
    margin: 0;
    display: grid;
    gap: 0.7rem;
}

.cert-plate {
    display: grid;
    place-items: center;
    background: #ffffff;
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid #d4dde3;
    min-height: 330px;
    transition: transform 0.25s, box-shadow 0.25s;
}

.cert-plate:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.certs figcaption {
    font-size: 0.93rem;
    color: var(--muted-dark);
}

.sheet .certs figcaption {
    color: var(--muted);
}

/* ---- gallery ---- */

.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 3 260px;
    column-gap: 12px;
}

.gallery li {
    break-inside: avoid;
    margin-bottom: 12px;
}

.gallery a {
    display: block;
    border-radius: 14px;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    transition: transform 0.4s;
}

.gallery a:hover img {
    transform: scale(1.04);
}

/* ---- about ---- */

.adv {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.adv li {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-s);
    background: var(--night-2);
    border: 1px solid var(--line-dark);
}

.adv .num {
    color: var(--orange);
}

/* ---- contact ---- */

.card {
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius);
    padding: clamp(1.3rem, 3vw, 2rem);
    box-shadow: 0 1px 0 #d4dde3;
}

.big-phone {
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 3px solid var(--orange);
}

.contact-list {
    margin: 1.5rem 0 0;
    display: grid;
    gap: 0.9rem;
}

.contact-list div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 1rem;
}

.contact-list dd {
    overflow-wrap: anywhere;
}

@media (max-width: 420px) {
    .contact-list div {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }
}

.duo > *,
.other > *,
.base > *,
.hero-grid > *,
.mh-grid > * {
    min-width: 0;
}

.contact-list dt {
    font-weight: 700;
    color: var(--muted);
}

.contact-list dd {
    margin: 0;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    font: inherit;
    padding: 0.75rem 0.9rem;
    border: 1px solid #9fb0ba;
    border-radius: var(--radius-s);
    background: #ffffff;
    color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--cyan-ink);
}

.contact-form ul {
    color: #a3150b;
    margin: 0.3rem 0 0;
    padding-left: 1.1rem;
}

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

.contact-sent {
    background: #e2f5ec;
    border: 1px solid #8ccfae;
    color: #0f3d27;
    border-radius: var(--radius-s);
    padding: 1rem;
    margin-bottom: 1rem;
}

.contact-sent strong {
    display: block;
}

/* ---- footer ---- */

.foot {
    background: #08121a;
    color: var(--muted-dark);
    padding-top: 3.5rem;
    font-size: 0.97rem;
}

.foot-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.foot h2 {
    font-size: 0.85rem;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--orange);
    margin-bottom: 0.9rem;
}

.foot a {
    color: var(--text-dark);
}

.foot a:hover {
    color: var(--cyan);
}

.foot address {
    font-style: normal;
}

.foot-logo {
    display: inline-block;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.5rem 0.8rem;
    margin-bottom: 1rem;
}

.foot-logo img {
    width: 220px;
}

.foot-refs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.foot-refs a {
    text-decoration: none;
}

.foot-refs a:hover {
    text-decoration: underline;
}

.foot-refs .ftype {
    margin-left: 0.3rem;
}

.foot-bottom {
    border-top: 1px solid #1d3442;
    margin-top: 2.5rem;
    padding-block: 1.3rem 1.6rem;
    font-size: 0.9rem;
}

.foot-bottom p {
    margin: 0;
}

/* ---- 404 ---- */

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 16px;
    text-align: center;
}

.not-found > div {
    max-width: 36rem;
}

.not-found .nf-logo {
    display: inline-block;
    background: #ffffff;
    border-radius: 14px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 2rem;
}

.not-found .nf-logo img {
    width: 260px;
}

.not-found [lang="en"] {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-dark);
}

@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;
    }
}
