:root {
  color-scheme: light;
  --bg: #f2f6fb;
  --card: #ffffff;
  --text: #1d2b3a;
  --muted: #576b7e;
  --accent: #145da0;
  --accent-hover: #0f4f89;
  --border: #d8e3ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}

.hero {
  position: relative;
  min-height: 100svh;
  max-height: 100svh;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.08);
  animation: heroMotion 28s ease-in-out infinite alternate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(5, 18, 33, 0.55));
  color: #fff;
}

.hero__overlay h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero__overlay p {
  margin: 0.35rem 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 42ch;
}

.hero__cta {
  width: fit-content;
  margin-top: 1rem;
}

.container {
  width: min(900px, calc(100% - 2rem));
  margin: 1.4rem auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
}

.contact-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: 100%;
  max-width: none;
}

.contact-dialog[open] {
  position: fixed;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  z-index: 1200;
}

.contact-dialog .card {
  width: min(700px, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
}

.contact-dialog::backdrop {
  background: rgba(5, 18, 33, 0.45);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-header h2 {
  margin: 0;
}

.dialog-close {
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  line-height: 1;
}

.captcha {
  overflow-x: auto;
}

.muted {
  color: var(--muted);
  margin-top: 0.2rem;
}

.field {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

label {
  font-weight: 600;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

textarea {
  resize: vertical;
}

button {
  margin-top: 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: var(--accent-hover);
}

.status {
  min-height: 1.4rem;
  color: var(--muted);
  margin: 0.6rem 0 0;
}

.footer {
  margin-bottom: 1.6rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .hero__overlay {
    justify-content: flex-end;
    padding: 1.25rem;
  }

  .hero__overlay h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .hero__overlay p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero__cta {
    width: 100%;
  }

  .contact-dialog {
    padding: 0;
  }

  .contact-dialog .card {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .card {
    border-radius: 12px;
    padding: 1rem;
  }

  .dialog-close {
    padding: 0.35rem 0.6rem;
  }
}

@media (orientation: portrait) {
  .hero {
    min-height: 72svh;
    max-height: 72svh;
  }

  .hero__image {
    object-position: 58% center;
    animation: none;
    transform: scale(1.18);
  }

  .hero__overlay {
    justify-content: flex-end;
  }
}

@media (max-width: 420px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  .container {
    width: calc(100% - 1rem);
  }
}

@keyframes heroMotion {
  0% {
    transform: scale(1.08) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.12) translate3d(-1.2%, -0.8%, 0);
  }

  100% {
    transform: scale(1.1) translate3d(1.2%, 0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__image {
    animation: none;
    transform: scale(1.05);
  }
}
