/* JRG Nexus – styly webu.
   Vychází z návrhu v5 (navy + zlatá, ostré rohy, průmyslová fotografie).
   Oproti návrhu: písmo Inter, minimální velikost textu 14 px, vyšší kontrast a mobilní úpravy. */

@layer reset, base, layout, components, utilities;

/* --- Písmo (self-hosted, bez externích CDN) ------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-wght-normal.de93fdc85e3d.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-ext-wght-normal.251d36f2b5a6.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* --- Tokeny ---------------------------------------------------------------------------------- */
:root {
  /* Barvy značky */
  --ink: #102b49;
  --deep: #091d32;
  --navy-1: #0c243b;
  --navy-2: #122f4a;
  --gold: #cda452;
  --gold-hover: #ddba7b;
  --gold-text: #7d5d27; /* zlatá pro text na světlém pozadí (kontrast 5.9:1) */
  --gold-light: #e2c182; /* zlatá pro text na tmavém pozadí */
  --paper: #f1f3f5;
  --line: #d9dfe2;
  --muted: #4b5c6c; /* 6.6:1 na bílé */
  --on-dark: #ffffff;
  --muted-on-dark: #c9d6e1; /* 10:1 na navy */
  --line-on-dark: #2f4a62;
  --input-border: #8495a6;
  --focus: #147ad0;
  --danger: #b42318;
  --danger-bg: oklch(96% 0.025 25);
  --success: #1d6b45;

  /* Typografie – základ 17 px, nic menšího než 14 px */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.875rem; /* 14 px – poznámky, popisky */
  --fs-label: 0.9375rem; /* 15 px – navigace, labely */
  --fs-base: 1.0625rem; /* 17 px – text */
  --fs-md: 1.1875rem; /* 19 px */
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.875rem, 1.3rem + 2.1vw, 2.875rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --fs-hero: clamp(2.5rem, 1.45rem + 4.4vw, 4.75rem);
  --eyebrow-size: 0.8125rem;

  /* Rozvržení */
  --max: 80rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 4.5rem;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--deep) 12%, transparent);

  interpolate-size: allow-keywords;
}

@media (min-width: 75rem) {
  :root {
    --header-h: 5.5rem;
  }
}

/* --- Reset ----------------------------------------------------------------------------------- */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body,
  h1,
  h2,
  h3,
  p,
  figure,
  blockquote,
  dl,
  dd,
  ul,
  ol {
    margin: 0;
  }
  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }
  img,
  picture,
  svg,
  iframe {
    display: block;
    max-width: 100%;
  }
  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
  }
  button {
    cursor: pointer;
  }
  a,
  button,
  select,
  summary {
    touch-action: manipulation;
  }
}

/* --- Základ ---------------------------------------------------------------------------------- */
@layer base {
  html {
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }
  body {
    min-height: 100dvh;
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
  }
  h1,
  h2,
  h3,
  .h3 {
    font-weight: 550;
    text-wrap: balance;
  }
  h1 {
    font-size: var(--fs-h1);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
  }
  h2 {
    font-size: var(--fs-h2);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 1.1rem;
  }
  h3,
  .h3 {
    font-size: var(--fs-h3);
    line-height: 1.3;
    letter-spacing: -0.012em;
    margin-bottom: 0.75rem;
  }
  p {
    text-wrap: pretty;
  }
  p + p {
    margin-top: 1rem;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  :focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
  main:focus {
    outline: none;
  }
  address {
    font-style: normal;
  }
  ::selection {
    background: color-mix(in srgb, var(--gold) 45%, transparent);
  }
}

/* --- Rozvržení ------------------------------------------------------------------------------- */
@layer layout {
  .wrap {
    width: min(var(--max), 100% - 2 * var(--gutter));
    margin-inline: auto;
  }
  .section {
    padding-block: var(--section-y);
  }
  .section--paper {
    background: #f0f3f5;
  }
  .section--dark {
    background: linear-gradient(120deg, var(--navy-1), #071828);
    color: var(--on-dark);
    --focus: #8cc8ff;
  }
  .section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 0.5rem 3rem;
    margin-bottom: clamp(1.75rem, 3vw, 2.75rem);

    & h2 {
      margin-bottom: 0;
    }
    & > p {
      max-width: 27rem;
      font-size: var(--fs-md);
    }
  }
}

/* --- Komponenty ------------------------------------------------------------------------------ */
@layer components {
  .sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  .icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
  }

  .skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.85rem 1.1rem;
    background: #fff;
    color: var(--ink);
    font-weight: 650;
    box-shadow: var(--shadow);
    translate: 0 -200%;

    &:focus-visible {
      translate: 0 0;
    }
  }

  .eyebrow {
    font-size: var(--eyebrow-size);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-text);
    margin-bottom: 1rem;
  }
  .lead {
    font-size: var(--fs-lead);
    line-height: 1.7;
    max-width: 44rem;
  }
  .muted {
    color: var(--muted);
  }
  .note {
    font-size: var(--fs-label);
    line-height: 1.6;
    color: var(--muted);
    margin-top: 1rem;
  }
  .num {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gold-text);
    font-variant-numeric: tabular-nums;
  }

  /* Tlačítka a odkazy */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 3.25rem;
    padding: 0.85rem 1.35rem;
    border: 1px solid transparent;
    background: var(--gold);
    color: var(--deep);
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;

    &:hover {
      background: var(--gold-hover);
    }
    & .icon {
      transition: translate 0.2s;
    }
    &:hover .icon {
      translate: 2px -2px;
    }
    &[disabled] {
      opacity: 0.75;
      cursor: progress;
    }
  }
  .btn--ghost {
    background: transparent;
    border-color: #a8b3bc;
    color: var(--ink);

    &:hover {
      background: var(--paper);
    }
  }
  .btn--compact {
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    gap: 0.9rem;
    font-size: var(--fs-label);
  }
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
  }
  .link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--gold);
    font-size: 1rem;
    font-weight: 650;
    transition: color 0.2s;

    &:hover {
      color: var(--gold-text);
    }
  }

  /* Hlavička */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, #fff 96%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    box-shadow: 0 2px 12px color-mix(in srgb, #06192b 6%, transparent);
  }
  .site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
  }
  .brand img {
    width: 82px;
    height: auto;
  }
  .site-header__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
  }
  .lang-toggle,
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    background: #fff;
    font-size: var(--fs-label);
    font-weight: 650;
  }
  .lang-toggle:hover,
  .menu-toggle:hover {
    border-color: var(--input-border);
  }
  .header-cta {
    display: none;
  }

  /* Navigace – na mobilu panel (popover), na desktopu řádek */
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-h));
    overflow: auto;
    margin: 0;
    padding: 0.5rem var(--gutter) 1.75rem;
    border: 0;
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1.25rem 2rem color-mix(in srgb, var(--deep) 18%, transparent);

    &:popover-open {
      display: flex;
      flex-direction: column;
    }
    & a:not(.btn) {
      display: block;
      padding: 0.95rem 0;
      border-bottom: 1px solid var(--line);
      font-size: 1.125rem;
      font-weight: 600;
    }
    & a[aria-current="page"] {
      color: var(--gold-text);
    }
  }
  .site-nav__cta {
    margin-top: 1.5rem;
  }
  @media (prefers-reduced-motion: no-preference) {
    .site-nav,
    .lang-menu {
      transition: opacity 0.18s, translate 0.18s, overlay 0.18s allow-discrete, display 0.18s allow-discrete;
      opacity: 0;
      translate: 0 -0.5rem;

      &:popover-open {
        opacity: 1;
        translate: 0 0;

        @starting-style {
          opacity: 0;
          translate: 0 -0.5rem;
        }
      }
    }
  }

  .lang-menu {
    position: fixed;
    inset: auto;
    top: calc(var(--header-h) - 0.25rem);
    right: max(var(--gutter), (100vw - var(--max)) / 2);
    min-width: 13rem;
    margin: 0;
    padding: 0.5rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);

    & ul {
      display: grid;
    }
    & a {
      display: block;
      padding: 0.7rem 0.9rem;
      border-left: 3px solid transparent;
      font-size: 1rem;
    }
    & a:hover {
      background: var(--paper);
    }
    & a[aria-current] {
      border-left-color: var(--gold);
      font-weight: 700;
    }
  }
  .lang-menu__title {
    padding: 0.35rem 0.9rem 0.5rem;
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  @media (min-width: 40rem) {
    .header-cta {
      display: inline-flex;
    }
    .site-nav__cta {
      display: none;
    }
  }
  @media (min-width: 75rem) {
    .brand img {
      width: 104px;
    }
    .menu-toggle {
      display: none;
    }
    .site-nav {
      position: static;
      display: flex;
      align-items: center;
      width: auto;
      max-height: none;
      overflow: visible;
      margin-left: auto;
      padding: 0;
      border: 0;
      background: none;
      box-shadow: none;
      opacity: 1;
      translate: none;

      & a:not(.btn) {
        padding: 0.5rem 0;
        border: 0;
        font-size: var(--fs-label);
        font-weight: 600;
        transition: color 0.2s;
      }
      & a:not(.btn):hover {
        color: var(--gold-text);
      }
    }
    .site-nav__list {
      display: flex;
      gap: clamp(1.25rem, 2vw, 2rem);
    }
    .site-header__controls {
      margin-left: 1rem;
    }
  }

  /* Hero */
  .hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #0b1e30;
    color: var(--on-dark);
    --focus: #8cc8ff;

    &::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background: linear-gradient(
        90deg,
        rgb(5 19 34 / 0.96) 0%,
        rgb(6 24 42 / 0.9) 32%,
        rgb(9 30 49 / 0.66) 56%,
        rgb(8 25 41 / 0.16) 100%
      );
    }
    & .eyebrow {
      color: var(--gold-light);
      letter-spacing: 0.16em;
    }
    & h1 {
      font-size: var(--fs-hero);
      line-height: 1.04;
      letter-spacing: -0.038em;
      margin-bottom: 1.6rem;
    }
    & h1 span {
      display: block;
      color: var(--gold-light);
    }
    & .lead {
      color: #dfe8f0;
      max-width: 40rem;
    }
    & .btn--ghost {
      color: #fff;
      border-color: #8b9aa6;
      background: rgb(8 28 44 / 0.25);

      &:hover {
        background: #25415a;
      }
    }
  }
  .hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;

    & picture,
    & img {
      width: 100%;
      height: 100%;
    }
    & img {
      object-fit: cover;
      object-position: 64% 48%;
      filter: saturate(0.67);
    }
    & figcaption {
      position: absolute;
      right: var(--gutter);
      bottom: 1.25rem;
      padding: 0.3rem 0.65rem;
      background: rgb(9 29 50 / 0.72);
      color: #fff;
      font-size: var(--fs-sm);
      display: none;
    }
  }
  .hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    min-height: clamp(30rem, 72vh, 42rem);
    padding-block: clamp(3rem, 8vw, 6.5rem) clamp(1.5rem, 3vw, 2.25rem);
  }
  .hero__copy {
    max-width: 47rem;
  }
  .promise {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    max-width: 50rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgb(255 255 255 / 0.22);
    font-size: var(--fs-label);
    font-weight: 600;

    & li {
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }
    & .icon {
      color: var(--gold-light);
    }
  }
  @media (max-width: 47.99rem) {
    .hero::after {
      background: linear-gradient(90deg, rgb(5 19 34 / 0.94), rgb(6 24 42 / 0.8));
    }
    .hero__media img {
      object-position: 65% center;
    }
  }
  @media (min-width: 64rem) {
    .hero__media figcaption {
      display: block;
    }
    .promise {
      padding-right: 16rem; /* nepřekrývat popisek fotografie */
    }
  }

  /* Služby */
  .services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: clamp(2rem, 3vw, 2.25rem);
  }
  .service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: start;

    & .num {
      margin-bottom: 0.75rem;
    }
    & h3 {
      font-size: clamp(1.5rem, 1.35rem + 0.5vw, 1.75rem);
    }
    & p {
      color: var(--muted);
      max-width: 26rem;
      margin-bottom: 1.25rem;
    }
    & .link {
      margin-top: auto;
    }
    &:hover img {
      scale: 1.035;
    }
    &:hover .link {
      color: var(--gold-text);
    }
    &:has(.stretched:focus-visible) {
      outline: 3px solid var(--focus);
      outline-offset: 6px;
    }
  }
  .service-card__media {
    width: 100%;
    aspect-ratio: 3 / 2;
    margin-bottom: 1.5rem;
    overflow: hidden;
    background: #dde4e9;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: scale 0.4s ease;
    }
    &.is-muted img {
      filter: saturate(0.7);
    }
  }
  .stretched {
    &::after {
      content: "";
      position: absolute;
      inset: 0;
    }
    &:focus-visible {
      outline: none;
    }
  }

  /* Výrobní možnosti */
  .section--dark {
    & .muted {
      color: var(--muted-on-dark);
    }
    & .eyebrow {
      color: var(--gold-light);
    }
  }
  .tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    column-gap: clamp(1.5rem, 3vw, 2.25rem);

    & > li {
      border-top: 1px solid var(--line-on-dark);
    }
  }
  .tech {
    display: grid;
    grid-template-columns: 2.25rem 1fr 1.25rem;
    gap: 0.75rem;
    height: 100%;
    padding-block: 1.6rem;
    transition: color 0.2s;

    & .num {
      margin-top: 0.3rem;
      color: var(--gold-light);
    }
    & h3 {
      font-size: 1.25rem;
      margin-bottom: 0.4rem;
    }
    &:hover {
      color: #ecd2a1;
    }
  }
  .tech__text {
    display: block;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--muted-on-dark);
  }
  .tech__arrow {
    margin-top: 0.25rem;
    transition: translate 0.2s;

    .tech:hover & {
      translate: 3px -3px;
    }
  }
  .more {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem 3rem;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-on-dark);

    & h3 {
      margin-bottom: 0.4rem;
    }
    & p {
      max-width: 44rem;
      color: var(--muted-on-dark);
    }
  }

  /* Galerie a lightbox */
  .gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);

    @media (min-width: 64rem) {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  .gallery__item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dde3e7;
    background: #dbe0e6;
    cursor: zoom-in;

    & picture,
    & img {
      width: 100%;
      height: 100%;
    }
    & img {
      object-fit: cover;
      transition: filter 0.2s, scale 0.4s;
    }
    &:hover img {
      filter: brightness(1.08);
      scale: 1.03;
    }
  }
  .gallery__zoom {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
  }
  .lightbox {
    width: min(68rem, 94vw);
    max-height: 94dvh;
    padding: 1rem;
    border: 0;
    background: var(--paper);
    color: var(--ink);

    &::backdrop {
      background: rgb(0 12 24 / 0.82);
    }
  }
  .lightbox__bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: var(--fs-label);
  }
  .lightbox__close {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    border: 0;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
  }
  .lightbox__image {
    max-height: 78dvh;
    margin-inline: auto;
    object-fit: contain;
  }

  /* Postup */
  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
  }
  .step {
    & h3 {
      font-size: 1.3125rem;
    }
    & p {
      color: var(--muted);
    }
  }
  .step__num {
    display: block;
    margin-bottom: 1.4rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #c3cdd6;
    font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
    font-weight: 450;
    line-height: 1;
    color: var(--gold-text);
    font-variant-numeric: tabular-nums;
  }

  /* O nás + FAQ */
  .about {
    display: grid;
    gap: clamp(3rem, 7vw, 6rem);

    @media (min-width: 56rem) {
      grid-template-columns: 1fr 1fr;
    }
  }
  .industries {
    margin-top: 1.75rem;
    border-top: 1px solid var(--line);

    & li {
      padding: 1rem 0;
      border-bottom: 1px solid var(--line);
      font-size: 1.125rem;
    }
  }
  .about__text {
    & h2 {
      font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.25rem);
    }
    & .btn {
      margin-top: 2rem;
    }
  }
  .faq {
    max-width: 52rem;
    margin-inline: auto;
    padding-top: clamp(3.5rem, 7vw, 5rem);

    & details {
      border-bottom: 1px solid var(--line);
    }
    & summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 2rem;
      padding: 1.25rem 0;
      font-size: var(--fs-md);
      font-weight: 550;
      list-style: none;
      cursor: pointer;

      &::-webkit-details-marker {
        display: none;
      }
      &::after {
        content: "+";
        font-size: 1.6rem;
        font-weight: 400;
        line-height: 1;
        color: var(--gold-text);
      }
    }
    & details[open] summary::after {
      content: "−";
    }
    & details p {
      max-width: 46rem;
      padding-bottom: 1.4rem;
      color: var(--muted);
    }
    & details::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 0.25s, content-visibility 0.25s allow-discrete;
    }
    & details[open]::details-content {
      block-size: auto;
    }
  }

  /* Závěrečná výzva */
  .end-cta {
    padding-block: clamp(3rem, 6vw, 4.25rem);
    background: linear-gradient(115deg, var(--ink), #06192b);
    color: var(--on-dark);
    --focus: #8cc8ff;

    & h2 {
      font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
      margin-bottom: 0.5rem;
    }
    & p {
      color: var(--muted-on-dark);
      font-size: var(--fs-md);
    }
  }
  .end-cta__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.75rem 3rem;
  }

  /* Patička */
  .site-footer {
    padding-top: clamp(3rem, 5vw, 4rem);
    background: var(--paper);
    font-size: 1rem;

    & a:hover {
      color: var(--gold-text);
    }
  }
  .site-footer__grid {
    display: grid;
    gap: 2.5rem;

    @media (min-width: 48rem) {
      grid-template-columns: 1.3fr 1fr 1.3fr;
    }
  }
  .site-footer__brand img {
    width: 104px;
    height: auto;
  }
  .site-footer__tagline {
    margin-top: 1rem;
    font-weight: 600;
  }
  .site-footer__title {
    margin-bottom: 1rem;
    font-size: var(--eyebrow-size);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-text);
  }
  .site-footer__col {
    & li + li {
      margin-top: 0.5rem;
    }
    & address {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-bottom: 0.75rem;
    }
    & .link {
      margin-top: 0.75rem;
    }
  }
  .site-footer__ids {
    font-size: var(--fs-label);
    color: var(--muted);
  }
  .site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-top: 2.75rem;
    padding-block: 1.25rem 2rem;
    border-top: 1px solid var(--line);
    font-size: var(--fs-label);
    color: var(--muted);

    & p {
      margin: 0;
    }
    & a {
      text-decoration: underline;
      text-underline-offset: 3px;
    }
  }

  /* Drobečková navigace */
  .breadcrumbs {
    padding-block: 1.1rem;
    font-size: var(--fs-label);

    & ol {
      display: flex;
      flex-wrap: wrap;
      gap: 0.25rem 0.5rem;
    }
    & li + li::before {
      content: "/";
      margin-right: 0.5rem;
      color: #95a3b0;
    }
    & a {
      color: var(--muted);
      text-decoration: underline;
      text-decoration-color: var(--line);
      text-underline-offset: 3px;
    }
    & a:hover {
      color: var(--ink);
    }
    & [aria-current] {
      font-weight: 600;
    }
  }

  /* Úvod podstránky */
  .page-hero {
    padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
    background: linear-gradient(120deg, var(--navy-1), var(--navy-2));
    color: var(--on-dark);
    --focus: #8cc8ff;

    & h1 {
      max-width: 60rem;
    }
    & .eyebrow {
      color: var(--gold-light);
    }
    & .lead {
      color: #d3dee8;
      margin-bottom: 2rem;
    }
    & .btn--ghost {
      color: #fff;
      border-color: #8b9aa6;

      &:hover {
        background: #25415a;
      }
    }
  }
  .page-hero--center {
    display: grid;
    align-items: center;
    min-height: 60dvh;
  }

  /* Detail služby / technologie */
  .detail {
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);

    @media (min-width: 56rem) {
      grid-template-columns: 1.5fr 1fr;
    }
  }
  .feature-list {
    margin-block: 1.75rem;

    & li {
      display: flex;
      gap: 1rem;
      padding-block: 1.2rem;
      border-top: 1px solid var(--line);
      font-size: var(--fs-md);
      line-height: 1.5;
    }
    & .icon {
      margin-top: 0.2rem;
      color: var(--gold-text);
    }
  }
  .panel {
    align-self: start;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-top: 3px solid var(--gold);
    background: var(--paper);

    & p:not(.eyebrow) {
      color: var(--muted);
      margin-bottom: 1.5rem;
    }
    @media (min-width: 56rem) {
      position: sticky;
      top: calc(var(--header-h) + 1.5rem);
    }
  }
  .related-title {
    margin-top: clamp(3rem, 6vw, 4rem);
  }
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;

    & a {
      display: inline-flex;
      align-items: center;
      gap: 0.55rem;
      min-height: 2.75rem;
      padding: 0.55rem 1rem;
      border: 1px solid var(--line);
      font-size: var(--fs-label);
      font-weight: 500;
      transition: background-color 0.2s, border-color 0.2s;
    }
    & a:hover {
      background: var(--paper);
      border-color: var(--gold);
    }
    & .icon {
      width: 1rem;
      height: 1rem;
      color: var(--gold-text);
    }
  }
  .back-link {
    margin-top: 2.5rem;
  }

  /* Poptávka */
  .quote {
    display: grid;
    gap: clamp(2rem, 5vw, 5rem);
    padding-block: clamp(1rem, 3vw, 2.5rem) clamp(3.5rem, 7vw, 5.5rem);

    @media (min-width: 60rem) {
      grid-template-columns: 0.85fr 1.3fr;
    }
  }
  .needs {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);

    & li {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      padding-block: 0.35rem;
    }
    & .icon {
      color: var(--gold-text);
    }
  }
  .quote__direct {
    display: grid;
    gap: 0.4rem;
    margin-top: 2rem;

    & p {
      color: var(--muted);
    }
    & a {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      font-weight: 600;
      width: fit-content;
    }
    & .icon {
      color: var(--gold-text);
    }
  }

  /* Formulář */
  .form-box {
    align-self: start;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border-top: 3px solid var(--gold);
    background: var(--paper);
  }
  .form-grid {
    display: grid;
    gap: 1.35rem 1.25rem;

    @media (min-width: 36rem) {
      grid-template-columns: 1fr 1fr;
    }
  }
  .field {
    min-width: 0;

    & > label {
      display: block;
      margin-bottom: 0.45rem;
      font-size: var(--fs-label);
      font-weight: 650;
    }
    & input:not([type="checkbox"]),
    & select,
    & textarea {
      display: block;
      width: 100%;
      min-height: 3rem;
      padding: 0.75rem 0.9rem;
      border: 1px solid var(--input-border);
      border-radius: 0;
      background: #fff;
      color: var(--ink);
      font-size: 1rem; /* ≥ 16 px – iOS při fokusu nezoomuje */
      line-height: 1.4;
    }
    & input:focus-visible,
    & select:focus-visible,
    & textarea:focus-visible {
      outline-offset: 1px;
      border-color: var(--focus);
    }
    & textarea {
      min-height: 9.5rem;
      resize: vertical;
    }
    & select {
      appearance: none;
      padding-right: 2.75rem;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23102b49' stroke-width='2'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 0.85rem center;
      background-size: 1.1rem;
    }
    & input[type="file"] {
      padding: 0.5rem;
      cursor: pointer;
    }
    & input[type="file"]::file-selector-button {
      margin-right: 1rem;
      padding: 0.6rem 1rem;
      border: 0;
      background: var(--ink);
      color: #fff;
      font-weight: 600;
      cursor: pointer;
    }
    &.has-error :is(input, select, textarea) {
      border: 2px solid var(--danger);
    }
  }
  .field--wide {
    grid-column: 1 / -1;
  }
  .field--check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    align-items: start;

    & input {
      width: 1.375rem;
      height: 1.375rem;
      margin: 0.15rem 0 0;
      accent-color: var(--ink);
    }
    & > label {
      margin: 0;
      font-size: 1rem;
      font-weight: 400;
    }
    & a {
      text-decoration: underline;
      text-underline-offset: 3px;
    }
    & .field__error {
      grid-column: 2;
    }
  }
  .field__help {
    margin-top: 0.45rem;
    font-size: var(--fs-label);
    color: var(--muted);
  }
  .field__error {
    margin-top: 0.45rem;
    font-size: var(--fs-label);
    font-weight: 550;
    color: var(--danger);
  }
  .req {
    color: var(--danger);
  }
  .hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .turnstile {
    min-height: 65px;
    margin-top: 1.5rem;
  }
  .form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.75rem;

    & .note {
      margin: 0;
    }
  }
  .btn__busy {
    display: none;
  }
  .htmx-request {
    & .btn__label {
      display: none;
    }
    & .btn__busy {
      display: inline;
    }
  }
  .alert {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--danger);
    background: var(--danger-bg);
    color: #7a1a12;
    font-weight: 500;

    &:focus {
      outline: none;
    }
  }
  .form-success {
    padding-block: 1rem;

    &:focus {
      outline: none;
    }
    & h2 {
      font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
    }
    & p {
      color: var(--muted);
      margin-bottom: 1.5rem;
    }
  }
  .form-success__icon {
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.25rem;
    padding: 0.7rem;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
  }

  /* Kontakt a mapa */
  .contact {
    display: grid;
    gap: clamp(2.5rem, 5vw, 5rem);

    @media (min-width: 56rem) {
      grid-template-columns: 1fr 1.25fr;
    }
    & h2 {
      font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
    }
  }
  .contact-list {
    margin-block: 1.5rem 2rem;

    & > div {
      padding-block: 1.1rem;
      border-top: 1px solid var(--line);
    }
    & dt {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      margin-bottom: 0.35rem;
      font-size: var(--eyebrow-size);
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--gold-text);
    }
    & dd {
      font-size: 1.125rem;
    }
    & dd a {
      font-weight: 600;
    }
    & dd a:hover {
      color: var(--gold-text);
    }
  }
  .map {
    display: grid;
    gap: 1rem;
    align-content: start;

    & iframe {
      width: 100%;
      aspect-ratio: 4 / 3;
      border: 0;
    }
    & .link {
      justify-self: start;
    }
  }
  .map__placeholder {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1rem;
    aspect-ratio: 4 / 3;
    padding: 2rem;
    text-align: center;
    color: var(--on-dark);
    background:
      repeating-linear-gradient(0deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 48px),
      repeating-linear-gradient(90deg, rgb(255 255 255 / 0.05) 0 1px, transparent 1px 48px),
      linear-gradient(135deg, var(--navy-1), var(--navy-2));
    --focus: #8cc8ff;

    & .note {
      max-width: 26rem;
      margin: 0;
      color: var(--muted-on-dark);
    }
  }
  .map__pin {
    width: 3rem;
    height: 3rem;
    color: var(--gold-light);
  }
  .map__address {
    font-size: var(--fs-md);
    font-weight: 600;
  }

  /* Textová stránka */
  .prose {
    max-width: 48rem;
    padding-block: clamp(1rem, 3vw, 2.5rem) clamp(3.5rem, 7vw, 5.5rem);

    & .lead {
      color: var(--muted);
    }
    & h2 {
      margin-top: 2.5rem;
      margin-bottom: 0.75rem;
      font-size: 1.5rem;
    }
    & a {
      text-decoration: underline;
      text-underline-offset: 3px;
    }
  }
}

/* --- Pohyb ----------------------------------------------------------------------------------- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  @view-transition {
    navigation: none;
  }
}

/* --- Pomocné třídy --------------------------------------------------------------------------- */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
