/* Fatra – koncept poptávky z detailu profilu. Barvy a rozvržení odpovídají webu fatra.cz.
   Písma jsou otevřená: Open Sans pro text a Barlow Semi Condensed místo DIN v nadpisech. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/open-sans-400-700-latin-ext.woff2") format("woff2");
  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: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("assets/fonts/open-sans-400-700-latin.woff2") format("woff2");
  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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-600-latin-ext.woff2") format("woff2");
  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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-600-latin.woff2") format("woff2");
  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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-700-latin-ext.woff2") format("woff2");
  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: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-700-latin.woff2") format("woff2");
  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;
}

:root {
  --blue-50: #f6f8f9;      /* Fatra --color-fatra-blue-50 */
  --blue-100: #e9f0f5;
  --blue-200: #d5e6f0;
  --blue-400: #6eaee1;
  --blue-700: #005a9c;     /* modrá Fatry */
  --blue-800: #004175;
  --blue-hover: #0d4b7c;
  --ink: #1b1e23;
  --ink-soft: #3b424b;
  --muted: #58616c;
  --line: #d7dde3;
  --field: #aab4bf;
  --paper: #fff;
  --danger: #b3261e;
  --radius: 4px;
  --wrap: 1376px;
  --head: "Barlow Semi Condensed", "DIN 2014", "DIN Next", "Arial Narrow", Arial, sans-serif;
  --body: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
fieldset {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

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

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: var(--blue-700);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-hover);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ pruh konceptu, hlavička, drobečky */

.concept-bar {
  background: var(--blue-800);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 7px 16px;
}

.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  justify-self: start;
}

.brand img {
  width: 48px;
  height: 48px;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 8px;
  color: var(--ink);
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--blue-700);
}

.site-nav svg {
  width: 14px;
  height: 14px;
}

main:focus {
  outline: none;
}

.crumbs {
  padding-block: 6px 0;
  font-size: 14px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--muted);
}

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

.crumbs a:hover {
  color: var(--blue-700);
}

.crumbs [aria-current] {
  font-weight: 600;
}

/* ------------------------------------------------------------ tlačítka */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.btn-main {
  background: var(--blue-700);
  color: #fff;
}

.btn-main:hover {
  background: var(--blue-hover);
}

.btn-ghost {
  background: var(--paper);
  border-color: var(--field);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--blue-hover);
}

/* ------------------------------------------------------------ detail profilu */

.product {
  padding-block: 28px 72px;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  column-gap: clamp(32px, 7vw, 112px);
  align-items: start;
}

.drawing {
  position: sticky;
  top: 24px;
  margin-bottom: 32px;
}

/* světle modrá plocha za výkresem, na webu Fatry sahá k levému okraji okna */
.drawing::before {
  content: "";
  position: absolute;
  top: 40px;
  right: 0;
  bottom: -32px;
  left: -50vw;
  background: var(--blue-100);
}

.drawing img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--paper);
}

.info {
  max-width: 540px;
  padding-top: clamp(0px, 4vw, 56px);
}

.info h1 {
  color: var(--blue-700);
  font-family: var(--head);
  font-size: clamp(32px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.info h1:focus,
.enquiry h2:focus,
.sent h2:focus {
  outline: none;
}

.description {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

.attributes {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-block: 18px;
  border-block: 1px solid var(--line);
  font-size: 15px;
}

.attributes > div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
}

.attributes dt {
  color: var(--muted);
}

.attributes dd {
  font-weight: 600;
}

/* výzva k poptávce: jediná nová věc na stránce */

.cta {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding-block: 24px 26px;
  border-bottom: 1px solid var(--line);
}

.tag {
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cta-note {
  color: var(--muted);
  font-size: 15px;
}

/* poptávka */

.enquiry,
.sent {
  margin-top: 24px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius);
  background: var(--blue-50);
}

.enquiry h2,
.sent h2 {
  font-family: var(--head);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.enquiry h3 {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--blue-200);
  font-family: var(--head);
  font-size: 20px;
  font-weight: 600;
}

.lead {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}

.known {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--blue-100);
}

.known dl {
  display: grid;
  gap: 4px;
}

.known dl > div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
}

.known dt {
  color: var(--ink-soft);
}

.known dd {
  font-weight: 700;
}

.known-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--blue-200);
  color: var(--blue-800);
  font-size: 14px;
  font-weight: 600;
}

.known-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.field {
  margin-top: 20px;
}

.field > label,
.field > legend {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.optional {
  margin-left: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

::placeholder {
  color: #7d8792;
  opacity: 1;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="tel"]:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(110, 174, 225, 0.5);
}

.has-error input[type="text"],
.has-error input[type="email"],
.has-error input[type="tel"] {
  border-color: var(--danger);
}

.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.form-error {
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid #f1cdc9;
  border-radius: var(--radius);
  background: #fcefee;
  color: #7d1a14;
  font-weight: 600;
}

.hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  align-items: start;
}

/* e-mail bývá dlouhý, dostane celý řádek */
.grid-2 > [data-field-box="email"],
.grid-2 > [data-field-box="telefon"] {
  grid-column: 1 / -1;
}

/* číslo s jednotkou */

.measure {
  display: flex;
  gap: 8px;
}

.measure input[type="text"] {
  flex: 1 1 0;
  min-width: 0;
}

.units {
  display: flex;
  flex: none;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.unit {
  position: relative;
  display: block;
  cursor: pointer;
}

.unit + .unit {
  border-left: 1px solid var(--field);
}

.unit input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.unit span {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 100%;
  padding-inline: 10px;
  font-weight: 600;
}

.unit input:checked + span {
  background: var(--blue-700);
  color: #fff;
}

.unit input:focus-visible + span {
  outline: 3px solid var(--blue-400);
  outline-offset: -3px;
}

.total {
  margin-top: 14px;
  color: var(--ink);
  font-size: 15px;
}

.total:empty {
  display: none;
}

.total span {
  color: var(--muted);
}

/* úpravy */

.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option {
  position: relative;
  display: block;
  cursor: pointer;
}

.option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-box {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.option:hover .option-box {
  border-color: var(--ink-soft);
}

.option input:checked + .option-box {
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: #fff;
}

.option input:focus-visible + .option-box {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* náhled e-mailu */

.sent-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--blue-700);
  color: #fff;
}

.sent-mark svg {
  width: 26px;
  height: 26px;
}

.mail {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.mail-head {
  padding: 14px 18px;
  background: var(--blue-800);
  color: #fff;
  font-size: 15px;
}

.mail-head > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding-block: 2px;
}

.mail-head dt {
  color: #c3d8ea;
}

.mail-head dd,
.rows dd {
  overflow-wrap: anywhere;
}

.mail-subject {
  font-weight: 700;
}

.rows > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.rows > div:first-child {
  border-top: 0;
}

.rows dt {
  color: var(--muted);
}

.rows dd {
  font-weight: 600;
}

.source {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* kontakt na specialistu */

.adviser {
  padding-top: 24px;
}

.adviser h2 {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 600;
}

.adviser-row {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  font-size: 15px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-800);
  font-family: var(--head);
  font-size: 28px;
  font-weight: 600;
}

.adviser-name {
  font-family: var(--head);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.adviser-role {
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 16px;
}

.adviser-row p + p {
  margin-top: 4px;
}

.phone {
  font-weight: 700;
}

/* podobné produkty */

.similar {
  padding-block: 20px 88px;
}

.similar h2 {
  color: var(--blue-700);
  font-family: var(--head);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

.similar-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 206px));
  gap: 24px 8px;
  margin-top: 28px;
}

.card {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.card-image {
  display: block;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s ease;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card:hover .card-image {
  border-color: var(--blue-700);
}

.card-name {
  display: block;
  margin-top: 16px;
  font-family: var(--head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.card:hover .card-name {
  color: var(--blue-700);
}

.card-material {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------ patička */

.site-footer {
  background: var(--blue-50);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  padding-block: 28px;
  font-size: 15px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}

.no-js-note {
  margin-block: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.js .no-js-note {
  display: none;
}

/* ------------------------------------------------------------ užší obrazovky */

@media (max-width: 900px) {
  .header-row {
    grid-template-columns: auto 1fr;
  }

  .site-nav {
    justify-self: end;
    gap: 22px;
  }

  .wrap {
    width: min(var(--wrap), 100% - 40px);
  }

  .product {
    padding-block: 20px 48px;
  }

  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .drawing {
    position: relative;
    top: auto;
    margin-bottom: 56px;
  }

  .drawing::before {
    top: 28px;
    bottom: -24px;
  }

  .info {
    max-width: none;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .header-row {
    padding-block: 12px;
  }

  .similar {
    padding-block: 8px 56px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
}

@media (max-width: 520px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .attributes > div,
  .known dl > div {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .rows > div,
  .mail-head > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .adviser-row {
    gap: 16px;
  }

  .avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
