/* Shared, accessible components based on the Figma UI kit. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.18;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

ul {
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  font-weight: 400;
}

h1, h2 {
  font-family: var(--font-heading);
  text-transform: uppercase;
}

h2 {
  font-size: var(--text-heading);
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

img, picture {
  display: block;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .6;
}

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

[hidden] {
  display: none !important;
}

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

.skip {
  position: fixed;
  z-index: 100;
  inset: 12px auto auto 12px;
  padding: 12px 16px;
  transform: translateY(-200%);
  background: var(--color-accent);
  color: var(--color-background);
  font-size: 16px;
}

.skip:focus {
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 12px 20px;
  border: var(--border-width) solid var(--color-accent);
  border-radius: 0;
  background: var(--color-accent);
  color: var(--color-background);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

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

.icon-button,
.arrows button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: var(--color-accent);
  color: var(--color-background);
  transition: background-color var(--transition);
}

.icon-button img,
.arrows img {
  width: 24px;
  height: 24px;
}

.link-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  transition: color var(--transition);
}

@media (hover: hover) {
  .btn:hover,
  .icon-button:hover,
  .arrows button:hover {
    border-color: var(--color-accent-hover);
    background-color: var(--color-accent-hover);
    color: var(--color-background);
  }

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

.btn:active,
.icon-button:active,
.arrows button:active {
  background-color: var(--color-accent-secondary);
  color: var(--color-background);
}

.brand {
  display: block;
  flex-shrink: 0;
  width: clamp(210px, 20.9375vw, 402px);
}

.brand img {
  width: 100%;
  height: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--color-surface);
  font-size: var(--text-label);
  line-height: 1.2;
}

.tag img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.contact-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: var(--color-background);
  color: var(--color-text);
}

.contact-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

.contact-media {
  height: 180px;
  overflow: hidden;
}

.contact-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-form-view,
.contact-success {
  position: relative;
  min-width: 0;
  padding: 24px 20px 20px;
}

.contact-dialog .close {
  position: absolute;
  z-index: 2;
  top: 204px;
  right: 20px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
}

.contact-dialog h2 {
  padding-right: 30px;
  font-size: 24px;
  line-height: 1.2;
}

.contact-dialog p {
  font-size: 18px;
  line-height: 1.4;
}

.contact-dialog h2 + p {
  margin-top: 20px;
}

.lead-form {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
  font-size: 16px;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 18px 11px;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--color-surface-light);
  color: #110c29;
  font-size: 16px;
}

.field input::placeholder {
  color: #110c29;
}

.field input[aria-invalid="true"] {
  border-color: var(--color-error);
}

.form-status:empty {
  display: none;
}

.field-error,
.contact-dialog .form-status {
  color: var(--color-error);
  font-size: 14px;
  line-height: 1.4;
}

.field-error {
  display: block;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
}

.field-error:empty {
  display: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-muted);
}

.consent input {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-accent);
}

.consent a,
.form-phone a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.captcha {
  min-height: 100px;
}

.contact-dialog .form-phone {
  color: var(--color-muted);
  font-size: 14px;
  text-align: center;
}

.contact-success {
  padding: 40px;
}

.contact-dialog .form-phone {
  display: none;
}

@media (min-width: 1024px) {
  .contact-dialog {
    width: min(1088px, calc(100% - 80px));
    max-height: calc(100dvh - 80px);
    overflow: hidden;
  }

  .contact-dialog[open] {
    display: grid;
    grid-template-columns: 48.16% minmax(0, 1fr);
  }

  .contact-media {
    min-height: 570px;
    height: 100%;
  }

  .contact-form-view,
  .contact-success {
    max-height: calc(100dvh - 80px);
    padding: 40px;
    overflow-y: auto;
  }

  .contact-dialog .close {
    top: 40px;
    right: 40px;
  }

  .contact-dialog h2 {
    font-size: 40px;
  }

  .lead-form {
    gap: 32px;
    margin-top: 40px;
  }

  .field input {
    font-size: 20px;
  }
}

.contact-success .btn {
  margin-top: 28px;
}

.noscript-note {
  margin: 32px var(--space-page);
}

@media (max-width: 900px) {
  .brand {
    width: 241.2px;
    max-width: calc(100% - 64px);
  }

}

/* Scroll reveal: set by script.js only for blocks below the fold. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 900ms cubic-bezier(.22,.61,.36,1) var(--reveal-delay, 0ms),
    transform 1100ms cubic-bezier(.22,.61,.36,1) var(--reveal-delay, 0ms);
}

.map-pending {
  opacity: 0;
}

.map-window,
.map-mobile {
  transition: opacity 500ms ease-out;
}

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

  /* Gentler variant: blocks fade in without sliding up. */
  .reveal {
    transform: none;
  }
}
