:root {
  color-scheme: light;
  --vac-ink: #21140d;
  --vac-muted: #6f6256;
  --vac-paper: #f8f3e9;
  --vac-surface: #fffdf8;
  --vac-line: #e6d8c7;
  --vac-accent: #c33b22;
  --vac-gold: #efb94b;
  --vac-cream: #fff3dc;
  --vac-success: #315b3c;
  --vac-danger: #a32418;
  --vac-shadow: 0 26px 80px rgba(69, 39, 20, 0.1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.vacancies-page {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 8% 5%, rgba(239, 185, 75, 0.14), transparent 28rem),
    var(--vac-paper);
  color: var(--vac-ink);
  line-height: 1.5;
}

body.vacancies-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(90, 59, 38, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 59, 38, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.vacancies-header {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 78px;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(77, 53, 35, 0.13);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(16px);
}

.vacancies-brand {
  display: inline-flex;
  align-items: center;
}

.vacancies-brand img,
.vacancies-footer img {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.vacancies-header-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}

.vacancies-back {
  color: var(--vac-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.vacancies-back::before {
  content: "←";
  margin-right: 8px;
  color: var(--vac-accent);
}

.vacancies-back:hover {
  color: var(--vac-accent);
}

.vacancies-languages {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--vac-line);
  border-radius: 10px;
  background: var(--vac-surface);
}

.vacancies-languages button {
  min-width: 40px;
  min-height: 35px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--vac-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.vacancies-languages button[aria-pressed="true"] {
  background: var(--vac-ink);
  color: #fff;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.vacancies-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: end;
  padding: clamp(62px, 9vw, 120px) 0 clamp(54px, 8vw, 96px);
}

.vacancies-intro-copy {
  max-width: 780px;
}

.vacancies-eyebrow {
  margin: 0 0 14px;
  color: var(--vac-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.vacancies-intro h1,
.application-heading h2,
.application-success h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.vacancies-intro h1 {
  max-width: 760px;
  font-size: clamp(43px, 7vw, 84px);
  line-height: 0.98;
}

.vacancies-lead {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--vac-muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.62;
}

.vacancies-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding: 22px;
  border: 1px solid #e1cfae;
  border-radius: 16px;
  background: rgba(255, 248, 231, 0.88);
  box-shadow: 0 14px 44px rgba(71, 43, 24, 0.07);
}

.vacancies-note-mark {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--vac-gold);
  color: var(--vac-ink);
  font-size: 18px;
  place-items: center;
}

.vacancies-note p {
  margin: 1px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.application-section {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: start;
  margin-bottom: clamp(72px, 10vw, 130px);
  padding-top: clamp(36px, 5vw, 66px);
  border-top: 1px solid rgba(77, 53, 35, 0.16);
}

.application-heading {
  position: sticky;
  top: 24px;
}

.application-heading h2 {
  font-size: clamp(31px, 4vw, 47px);
  line-height: 1.05;
}

.application-heading > p:last-child {
  margin: 20px 0 0;
  color: var(--vac-muted);
  font-size: 14px;
  line-height: 1.65;
}

.vacancies-form {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid rgba(88, 58, 37, 0.14);
  border-radius: 22px;
  background: var(--vac-surface);
  box-shadow: var(--vac-shadow);
}

.vacancies-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 0 30px;
  border: 0;
  border-bottom: 1px solid var(--vac-line);
}

.vacancies-form fieldset:last-of-type {
  padding-bottom: 10px;
  border-bottom: 0;
}

.vacancies-form legend {
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  color: var(--vac-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
  align-content: start;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > span,
.field > label > span {
  color: var(--vac-ink);
  font-size: 13px;
  font-weight: 750;
}

.field span small {
  color: var(--vac-muted);
  font-size: 11px;
  font-weight: 500;
}

.field b {
  color: var(--vac-accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9c9b6;
  border-radius: 11px;
  background: #fff;
  color: var(--vac-ink);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input,
.field select {
  height: 48px;
  padding: 0 13px;
}

.field textarea {
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9a8e83;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #bdaa94;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--vac-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(195, 59, 34, 0.13);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--vac-danger);
  background: #fff8f6;
}

.field-help {
  color: var(--vac-muted);
  font-size: 11px;
  line-height: 1.45;
}

.photo-field > label {
  display: block;
}

.photo-control {
  position: relative;
  display: flex;
  min-height: 50px;
  gap: 12px;
  align-items: center;
  padding: 7px;
  border: 1px dashed #ccb99f;
  border-radius: 12px;
  background: #fffbf4;
}

.photo-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.photo-button {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 13px;
  border-radius: 9px;
  background: var(--vac-ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.photo-control input:focus-visible + .photo-button {
  outline: 3px solid rgba(195, 59, 34, 0.24);
  outline-offset: 3px;
}

.photo-status {
  min-width: 0;
  overflow: hidden;
  color: var(--vac-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-box {
  padding: 18px;
  border: 1px solid #dfcfb9;
  border-radius: 14px;
  background: #fff8e9;
}

.checkbox-field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--vac-accent);
}

.privacy-box > p,
.privacy-details p {
  color: var(--vac-muted);
  font-size: 11px;
  line-height: 1.55;
}

.privacy-box > p {
  margin: 11px 0 0 30px;
}

.privacy-details {
  margin: 12px 0 0 30px;
  border-top: 1px solid #e2d3bd;
  padding-top: 10px;
}

.privacy-details summary {
  width: fit-content;
  color: var(--vac-accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.privacy-details div {
  display: grid;
  gap: 7px;
  padding-top: 8px;
}

.privacy-details p {
  margin: 0;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding-top: 4px;
}

.submit-application {
  display: inline-flex;
  min-height: 52px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--vac-accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(168, 46, 26, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.submit-application:hover {
  box-shadow: 0 15px 32px rgba(168, 46, 26, 0.24);
  transform: translateY(-1px);
}

.submit-application:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--vac-muted);
  font-size: 13px;
}

.form-status.is-error {
  color: var(--vac-danger);
  font-weight: 650;
}

.application-success {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid #bfd2c2;
  border-radius: 22px;
  background: #f4fbf4;
  box-shadow: var(--vac-shadow);
}

.success-mark {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--vac-success);
  color: #fff;
  font-size: 23px;
  place-items: center;
}

.application-success h2 {
  font-size: clamp(31px, 4vw, 46px);
  line-height: 1.05;
}

.application-success p:not(.vacancies-eyebrow) {
  max-width: 580px;
  margin: 17px 0;
  color: var(--vac-muted);
}

.application-success a {
  color: var(--vac-accent);
  font-size: 13px;
  font-weight: 800;
  text-underline-offset: 4px;
}

.vacancies-footer {
  display: flex;
  min-height: 112px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(77, 53, 35, 0.14);
  background: #f1ebe1;
}

.vacancies-footer p {
  margin: 0;
  color: var(--vac-muted);
  font-size: 12px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(195, 59, 34, 0.28);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .vacancies-intro,
  .application-section {
    grid-template-columns: 1fr;
  }

  .vacancies-intro {
    gap: 28px;
  }

  .vacancies-note {
    max-width: 560px;
  }

  .application-heading {
    position: static;
    max-width: 620px;
  }

  .application-success {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .vacancies-header {
    min-height: 70px;
    padding-inline: 14px;
  }

  .vacancies-brand img {
    height: 39px;
  }

  .vacancies-header-actions {
    gap: 10px;
  }

  .vacancies-back {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .vacancies-languages button {
    min-width: 37px;
  }

  main {
    width: min(100% - 28px, 1180px);
  }

  .vacancies-intro {
    padding-top: 48px;
  }

  .vacancies-intro h1 {
    font-size: clamp(40px, 13vw, 61px);
  }

  .vacancies-form {
    gap: 16px;
    margin-inline: -2px;
    padding: 20px 15px;
    border-radius: 16px;
  }

  .form-grid--two {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .photo-control {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-button {
    justify-content: center;
  }

  .photo-status {
    padding: 2px 5px;
  }

  .privacy-box > p,
  .privacy-details {
    margin-left: 0;
  }

  .submit-application {
    width: 100%;
  }

  .application-success {
    grid-template-columns: 1fr;
  }

  .vacancies-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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