/* ==========================================================================
   Vision Gym Příbram – main stylesheet

   1. Design tokens      5. Header & navigation    9. Gallery & lightbox
   2. Fonts              6. Hero                   10. Booking (accordion)
   3. Base               7. About                  11. Contact
   4. Shared components  8. Pricing                12. Footer
                                                   13. Legal page

   Breakpoints (custom properties cannot be used in media queries):
     mobile  : max-width 767px
     tablet  : 768px – 980px
     desktop : min-width 981px
   ========================================================================== */

/* 1. Design tokens
   ========================================================================== */

:root {
  --color-bg: #000;
  --color-text: #fff;
  --color-accent: #d27d2d;
  --color-accent-glow: #e09900;
  --color-muted: #999;
  --color-field: #595959;
  --color-backdrop: rgb(11 11 11 / 0.8);

  --font-display: "Rajdhani", Helvetica, Arial, Lucida, sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;

  /* Fixed leading shared by all running text, regardless of font size. */
  --leading: 23.8px;

  --container: min(80%, 1080px);
  --gutter: 5.5%;
  --radius: 4px;
  --shadow-glow: 0 12px 18px -6px;
  --shadow-halo: 0 2px 18px 0;
  --transition: 300ms ease;
}

/* 2. Fonts (self-hosted, latin + latin-ext subsets)
   ========================================================================== */

@font-face {
  font-family: "Rajdhani";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/rajdhani-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rajdhani";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/rajdhani-400-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: "Rajdhani";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/rajdhani-500-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rajdhani";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/rajdhani-500-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: "Rajdhani";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/rajdhani-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rajdhani";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/rajdhani-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: "Rajdhani";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/rajdhani-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rajdhani";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/rajdhani-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: "Open Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-400-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: "Open Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/open-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/open-sans-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;
}

/* 3. Base
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 500 14px / var(--leading) var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

button {
  font: inherit;
}

strong {
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* 4. Shared components
   ========================================================================== */

.container {
  width: var(--container);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 8px 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  display: block;
  flex-shrink: 0;
  fill: currentColor;
}

/* Headings ---------------------------------------------------------------- */

.heading {
  padding-bottom: 10px;
  color: var(--color-accent);
  font: 700 26px / 1 var(--font-display);
}

.heading--light {
  color: var(--color-text);
}

.heading--center {
  text-align: center;
}

@media (min-width: 768px) {
  .heading--lg {
    font-size: 30px;
  }
}

.label {
  color: var(--color-accent);
  font-size: 23px;
  font-weight: 700;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  --btn-size: 20px;

  position: relative;
  display: inline-block;
  padding: 0.3em 1em;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: transparent;
  color: var(--color-accent);
  font: 500 var(--btn-size) / 1.7 var(--font-display);
  cursor: pointer;
  transition:
    color var(--transition),
    box-shadow var(--transition),
    padding var(--transition);
}

/* Chevron revealed on hover. */
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75em;
  width: 0.45em;
  height: 0.45em;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  opacity: 0;
  transform: translateY(-50%) rotate(45deg);
  transition: opacity var(--transition);
}

.btn:hover,
.btn:focus-visible {
  padding: 0.3em 2em 0.3em 0.7em;
}

.btn:hover::after,
.btn:focus-visible::after {
  opacity: 1;
}

.btn--lg {
  --btn-size: 24px;
}

.btn--bold {
  font-weight: 600;
}

.btn--glow {
  box-shadow: var(--shadow-glow) var(--color-accent);
}

.btn--glow:hover,
.btn--glow:focus-visible {
  color: var(--color-text);
  box-shadow: var(--shadow-glow) var(--color-text);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Panel: bordered box with a halo ------------------------------------------ */

.panel {
  --panel-color: var(--color-accent);

  border: 2px solid var(--panel-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-halo) var(--panel-color);
  text-align: center;
}

.panel--light {
  --panel-color: var(--color-text);
}

/* Prose: long-form text set in the body font ------------------------------- */

.prose {
  font-family: var(--font-body);
}

.prose p {
  padding-bottom: 1em;
}

.prose ul {
  padding: 0 0 1em 1em;
  line-height: 26px;
}

.prose > :last-child {
  padding-bottom: 0;
}

/* 5. Header & navigation
   ========================================================================== */

.site-header__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 132px;
  padding-top: 26px;
}

.site-header__logo img {
  width: min(82px, 6.05vw);
}

.nav__list {
  display: flex;
  gap: 22px;
  margin-top: 24px;
  list-style: none;
}

.nav__link {
  display: block;
  color: var(--color-text);
  font-size: 23px;
  line-height: 1;
  transition: opacity var(--transition);
}

.nav__link:hover {
  opacity: 0.7;
}

.nav__link--active {
  color: var(--color-accent);
}

.nav__toggle {
  display: none;
  margin-top: 8px;
  padding: 2px;
  border: 0;
  background: none;
  color: var(--color-accent);
  cursor: pointer;
}

@media (max-width: 980px) {
  .site-header__logo img {
    width: 82px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__list {
    position: absolute;
    top: 100%;
    right: 0;
    /* Stretch from the viewport edge to the container's right edge. */
    left: -12.5%;
    z-index: 10;
    display: none;
    margin: 0;
    padding: 17px;
    border-top: 3px solid var(--color-accent);
    background: var(--color-bg);
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
  }

  .nav__toggle[aria-expanded="true"] + .nav__list {
    display: block;
  }

  .nav__link {
    padding: 12px 15px;
    font-size: 23px;
    line-height: 30px;
  }

  .nav__link--active {
    color: var(--color-text);
  }
}

@media (max-width: 767px) {
  .site-header__inner {
    min-height: 89px;
  }

  .site-header__logo img {
    width: 63px;
  }

  .nav__item--home {
    display: none;
  }
}

/* 6. Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
}

.hero__title {
  font: 700 23px / var(--leading) var(--font-display);
}

@media (max-width: 767px) {
  .hero {
    /* The header's black band continues above the photo. */
    padding: 53px 0 26px;
    text-align: center;
  }

  .hero__photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }

  /* The wordmark overlaps the lower part of the photo. */
  .hero__logo {
    width: 100%;
    margin-top: -35.2vw;
  }

  .hero__title {
    width: var(--container);
    margin: -5px auto 25px;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 592px;
    padding-top: 43px;
  }

  .hero__photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero__content {
    position: relative;
    left: 62px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: var(--container);
    margin-inline: auto;
  }

  .hero__logo {
    position: relative;
    left: 13px;
    width: 100%;
  }

  .hero__title {
    margin: 8px 0 46px;
    padding-bottom: 10px;
    font-size: 30px;
    line-height: 1;
  }

  .hero__cta {
    --btn-size: 24px;

    margin-right: 3px;
  }
}

@media (min-width: 981px) {
  .hero__logo {
    width: 58.6%;
  }
}

/* 7. About
   ========================================================================== */

.about {
  padding: 10px 0 52px;
}

.notice {
  display: flex;
  gap: 15px;
  max-width: 550px;
  margin: 7px auto 0;
  padding-bottom: 10px;
  font-size: 25px;
  line-height: 1;
}

/* The icon is taller than the text line; keep it from stretching the row. */
.notice .icon {
  margin-bottom: -3px;
}

.feature-list {
  margin-top: 10px;
  padding-left: 25px;
  color: var(--color-accent);
  font-size: 25px;
  line-height: 26px;
}

.about__how {
  margin-top: 34px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px var(--gutter);
  margin-top: 54px;
  list-style: none;
  text-align: center;
}

.step {
  font-size: 16px;
}

.step__icon {
  margin: 0 auto 30px;
  color: var(--color-accent);
}

.step__title {
  padding-bottom: 10px;
  color: var(--color-accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.about__note {
  margin-top: 31px;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
}

.hours {
  margin-top: 32px;
  padding: 22px 0 10px;
  font: 700 22px / 1 var(--font-display);
  /* Keeps the text legible where it overlaps the photo background on phones. */
  text-shadow:
    0.08em 0.08em 0 var(--color-bg),
    0 0 8px var(--color-bg),
    0 0 16px var(--color-bg);
}

.hours > * + * {
  margin-top: 22px;
}

.hours__title {
  font: inherit;
}

.hours__note {
  color: var(--color-accent);
}

@media (max-width: 980px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .about {
    padding-bottom: 48px;
    background: url("../img/bg-about-mobile.webp") center / cover;
  }

  .notice {
    margin: 0 0 0 -9px;
  }

  .feature-list {
    margin-top: 0;
  }

  .about__how {
    margin-top: 17px;
    line-height: var(--leading);
    padding-bottom: 0;
  }

  .steps {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .step {
    font-size: 18px;
  }

  .about__note {
    margin-top: 18px;
    font-size: 18px;
  }

  .hours {
    margin-top: 35px;
    padding-bottom: 15px;
  }

  .hours__title {
    text-transform: uppercase;
  }
}

/* 8. Pricing
   ========================================================================== */

.pricing {
  padding: 35px 0 27px;
}

.pricing__panel {
  /* The asymmetric padding nudges the centred text 5px to the right. */
  padding: 10px 0 10px 10px;
  font-size: 22px;
  font-weight: 400;
}

.pricing__list {
  list-style: none;
}

.pricing__list li + li {
  margin-top: 1em;
}

@media (max-width: 767px) {
  .pricing {
    padding-bottom: 30px;
  }

  .pricing__panel {
    font-size: 19px;
  }
}

/* 9. Gallery & lightbox
   ========================================================================== */

.showcase {
  padding: 29px 0 44px;
}

.gallery {
  position: relative;
  margin-top: 30px;
}

.gallery__track {
  list-style: none;
}

.gallery__item {
  overflow: hidden;
  border-radius: var(--radius);
}

.gallery__link {
  position: relative;
  display: block;
  height: 100%;
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--color-accent);
  color: var(--color-bg);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery__overlay .icon {
  transform: translateY(20px);
  transition: transform 400ms ease;
}

.gallery__arrow {
  position: absolute;
  top: 50%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery__arrow--prev {
  left: 8px;
}

.gallery__arrow--next {
  right: 8px;
}

.gallery__arrow--prev .icon,
.lightbox__arrow--prev .icon {
  transform: rotate(180deg);
}

.gallery__dots {
  position: absolute;
  right: 0;
  bottom: 20px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.gallery__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.3);
  cursor: pointer;
}

.gallery__dot[aria-current="true"] {
  background: #333;
}

.showcase__text {
  margin-top: 10px;
  font-size: 20px;
}

.showcase__text p + p {
  margin-top: 1em;
}

/* Mobile: swipeable one-photo slider. */
@media (max-width: 767px) {
  .showcase {
    padding: 32px 0 27px;
  }

  .gallery {
    border-radius: var(--radius);
    box-shadow: var(--shadow-glow) var(--color-accent);
  }

  .gallery__track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gallery__track::-webkit-scrollbar {
    display: none;
  }

  .gallery__item {
    flex: 0 0 100%;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
  }

  .gallery__overlay {
    display: none;
  }

  .showcase__text {
    margin-top: 30px;
    font-size: 16px;
  }
}

/* Tablet and up: grid of the first four photos; the lightbox shows all. */
@media (min-width: 768px) {
  .gallery__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gutter);
  }

  .gallery__item {
    aspect-ratio: 400 / 516;
  }

  .gallery__item:nth-child(n + 5),
  .gallery__arrow,
  .gallery__dots {
    display: none;
  }

  .gallery::after {
    content: "• • •";
    display: block;
    margin-top: 65px;
    color: #bbb;
    font: 22px / 24px var(--font-body);
    letter-spacing: 10px;
    opacity: 0.8;
    text-align: center;
    transition:
      color var(--transition),
      opacity var(--transition);
  }

  .gallery:hover::after {
    color: #666;
    opacity: 1;
  }
}

@media (hover: hover) {
  .gallery__link:hover .gallery__overlay,
  .gallery__link:focus-visible .gallery__overlay {
    opacity: 1;
  }

  .gallery__link:hover .icon,
  .gallery__link:focus-visible .icon {
    transform: none;
  }
}

/* Lightbox ----------------------------------------------------------------- */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-backdrop);
  color: #f3f3f3;
  font: 400 12px / 18px var(--font-body);
}

.lightbox::backdrop {
  background: none;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox__image {
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 40px);
  object-fit: contain;
}

.lightbox__caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.lightbox__counter {
  color: #ccc;
  white-space: nowrap;
}

.lightbox__close,
.lightbox__arrow {
  position: fixed;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--transition);
}

.lightbox__close:hover,
.lightbox__arrow:hover {
  opacity: 1;
}

.lightbox__close {
  top: 4px;
  right: 4px;
}

.lightbox__arrow {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__arrow--prev {
  left: 8px;
}

.lightbox__arrow--next {
  right: 8px;
}

/* 10. Booking (accordion)
   ========================================================================== */

.booking {
  padding: 27px 0 20px;
  background: url("../img/bg-booking.webp") center / cover;
}

.accordion {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

.accordion__item {
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-glow) var(--color-accent-glow);
}

.accordion__title {
  position: relative;
  display: block;
  padding: 20px 70px 20px 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.accordion__title::-webkit-details-marker {
  display: none;
}

.accordion__icon {
  position: absolute;
  top: 50%;
  right: 20px;
  margin-top: -8px;
  color: var(--color-accent);
  transition: transform var(--transition);
}

.accordion__item[open] .accordion__icon {
  transform: rotate(180deg);
}

.accordion__body {
  padding: 0 20px 20px;
}

.accordion__body ul {
  padding-bottom: 23px;
}

/* Animate opening where the browser can interpolate to `auto`. */
@supports (interpolate-size: allow-keywords) {
  .accordion__item {
    interpolate-size: allow-keywords;
  }

  .accordion__item::details-content {
    block-size: 0;
    overflow: clip;
    transition:
      block-size 400ms ease,
      content-visibility 400ms allow-discrete;
  }

  .accordion__item[open]::details-content {
    block-size: auto;
  }
}

.booking__cta {
  margin-top: 47px;
  text-align: center;
}

@media (max-width: 767px) {
  .booking {
    padding-top: 30px;
  }

  .booking__cta {
    margin-top: 22px;
  }
}

/* 11. Contact
   ========================================================================== */

.contact {
  padding: 22px 0 50px;
  background: url("../img/bg-contact.webp") center / cover;
}

.contact__email {
  margin-top: 7px;
  font-size: 23px;
  font-weight: 700;
}

.contact__email a {
  color: inherit;
}

.contact-form {
  /* 3% of the container width, as a viewport-based length. */
  --form-gap: min(2.47vw, 33px);

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-gap);
  margin-top: 11px;
}

.contact-form__full {
  grid-column: 1 / -1;
}

.contact-form__input {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: var(--color-field);
  color: var(--color-text);
  font: 400 14px / normal var(--font-display);
  appearance: none;
}

.contact-form__input::placeholder {
  color: inherit;
  opacity: 0.85;
}

.contact-form__input:focus {
  background: var(--color-accent);
  color: var(--color-bg);
}

textarea.contact-form__input {
  min-height: 150px;
  resize: vertical;
}

/* Honeypot: must stay in the DOM but out of sight and out of tab order. */
.contact-form__trap {
  display: none;
}

.contact-form__legend {
  margin-bottom: 7px;
  font-weight: 600;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.checkbox__box {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: var(--color-field);
}

.checkbox__box::after {
  content: "";
  width: 5px;
  height: 10px;
  margin-top: -2px;
  border: solid var(--color-text);
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg);
}

.checkbox__input:checked + .checkbox__box::after {
  opacity: 1;
}

.checkbox__input:focus-visible + .checkbox__box {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.contact-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: calc(var(--form-gap) / -2);
}

.contact-form__status {
  font-size: 16px;
  font-weight: 600;
}

.contact-form__status[data-state="error"] {
  color: var(--color-accent);
}

.contact-form__submit {
  margin-left: auto;
}

.contact__where {
  margin-top: 32px;
}

.contact__address {
  margin-top: 12px;
  font-size: 23px;
}

.map {
  height: 440px;
  margin-top: 30px;
}

.map__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1);
}

.social {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 8px;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: var(--color-accent);
  color: var(--color-text);
  transition: opacity var(--transition);
}

.social__link:hover {
  opacity: 0.8;
}

@media (max-width: 980px) {
  .map {
    height: 350px;
  }
}

@media (max-width: 767px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .map {
    height: 200px;
  }
}

/* 12. Footer
   ========================================================================== */

.site-footer {
  padding: 81px 0;
  color: var(--color-muted);
  text-align: center;
}

.site-footer__link {
  font-weight: 400;
}

.site-footer__logo {
  width: 10%;
  /* Tucks the logo up into the padding below the last paragraph. */
  margin: -5px auto 0;
}

/* 13. Legal page
   ========================================================================== */

.legal {
  padding: 81px 0;
}

.legal h2 {
  margin-top: 38px;
  padding-bottom: 10px;
  color: var(--color-accent);
  font: 500 22px / 1 var(--font-display);
}

.legal h1 + h2 {
  margin-top: 0;
}

.legal > :last-child {
  margin-top: 38px;
}
