@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Cormorant+Garamond:ital,wght@1,700&display=swap");

:root {
  --ink: #2f2a29;
  --muted: #7d7470;
  --line: #e5dfdb;
  --paper: #ffffff;
  --surface: #f3efec;
  --soft: #faf8f6;
  --brand: #9a563f;
  --brand-dark: #713929;
  --brand-soft: #f4e8e2;
  --silver: #dedbd7;
  --charcoal: #2a2424;
  --charcoal-deep: #211c1d;
  --danger: #c93434;
  --success-bg: #f4e8e2;
  --success-text: #5b2f23;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

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

.container {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(33, 28, 29, 0.94), rgba(82, 45, 36, 0.78)),
    url("assets/hiring-hero.png") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.navbar {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  direction: ltr;
  text-decoration: none;
}

.brand-copy {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.brand-logo {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.brand-name {
  display: block;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-style: italic;
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(33, 28, 29, 0.34);
}

.brand-sub {
  display: block;
  padding-left: 3px;
  color: #f1ece8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-pill {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.hero-grid {
  position: relative;
  z-index: 1;
  min-height: 330px;
  padding-top: 42px;
  padding-bottom: 118px;
}

.hero-copy {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: #f1ece8;
  font-size: 54px;
  line-height: 1.1;
}

.hero p {
  max-width: 640px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  min-width: 132px;
  padding: 10px 17px;
  border-radius: 3px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.primary-action {
  color: #fff;
  background: var(--brand);
}

.secondary-action {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}

.process-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 110px 1fr 110px 1fr;
  align-items: start;
  max-width: 760px;
  margin: -62px auto 0;
  padding: 24px 34px 22px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 28, 29, 0.18);
}

.process-step {
  display: grid;
  justify-items: center;
  text-align: center;
}

.process-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 11px;
  border: 5px solid #ead6cd;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-dark);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(113, 57, 41, 0.28);
}

.process-step strong {
  color: var(--ink);
  font-size: 13px;
}

.process-step small {
  max-width: 155px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.process-line {
  height: 4px;
  margin-top: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-dark));
}

.page-shell {
  padding: 36px 0 48px;
}

.form-layout {
  max-width: 920px;
  margin: 0 auto;
}

.application-form {
  display: grid;
  gap: 16px;
}

.form-section {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(33, 28, 29, 0.06);
}

.form-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent 52%);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-number {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(154, 86, 63, 0.24);
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

.field[hidden] {
  display: none !important;
}

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

.field > span,
.toggle-line span {
  color: var(--ink);
  font-weight: 700;
}

.field b {
  color: var(--brand-dark);
  font-size: 14px;
}

small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d9d1cc;
  border-radius: 3px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

select {
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(154, 86, 63, 0.18);
}

input:disabled,
textarea:disabled {
  color: #918681;
  background: #eee9e5;
  cursor: not-allowed;
}

.choice-row,
.choice-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-stack {
  display: grid;
}

.choice-row label,
.choice-stack label,
.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice-row label:has(input:checked),
.choice-stack label:has(input:checked),
.toggle-line:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.choice-row label:hover,
.choice-stack label:hover,
.toggle-line:hover {
  transform: translateY(-1px);
  border-color: #b87963;
}

.choice-row.compact label {
  min-width: 84px;
  justify-content: center;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-height: auto;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
}

.toggle-line {
  width: fit-content;
  margin-bottom: 18px;
}

.subsection-title {
  margin: 26px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 800;
}

.invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(201, 52, 52, 0.1) !important;
}

.invalid-group {
  padding: 8px;
  border: 1px solid var(--danger);
  border-radius: 3px;
  background: #fff7f7;
}

.alert {
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 3px;
  font-weight: 700;
}

.success {
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid #d5b2a4;
}

.summary-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fbf5f1;
}

.summary-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.summary-grid div {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #e7ece8;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.form-message {
  min-height: 24px;
  margin-top: 14px;
  color: var(--danger);
  font-weight: 700;
}

.submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

button[type="submit"] {
  min-width: 190px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(154, 86, 63, 0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  background: var(--brand-dark);
  box-shadow: 0 16px 30px rgba(113, 57, 41, 0.3);
}

button[type="submit"]:disabled {
  transform: none;
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

footer {
  padding: 20px 0;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  text-align: center;
}

.footer-credit {
  margin-top: 5px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(33, 28, 29, 0.72);
  backdrop-filter: blur(5px);
}

.modal-overlay[hidden] {
  display: none;
}

.success-modal {
  position: relative;
  width: min(100%, 460px);
  padding: 34px 30px 28px;
  border: 1px solid rgba(229, 223, 219, 0.92);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbf5f1);
  box-shadow: 0 26px 70px rgba(33, 28, 29, 0.34);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  border: 1px solid #d5b2a4;
  border-radius: 50%;
  background: var(--brand-soft);
}

.modal-mark span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 28px;
  font-weight: 900;
}

.modal-eyebrow {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.success-modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
}

.success-modal p:not(.modal-eyebrow) {
  margin: 12px auto 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 15px;
}

.modal-warning {
  padding: 10px 12px;
  border: 1px solid #d5b2a4;
  border-radius: 4px;
  color: var(--brand-dark) !important;
  background: var(--brand-soft);
  font-size: 13px !important;
  font-weight: 800;
}

.modal-action {
  min-width: 126px;
  min-height: 44px;
  margin-top: 24px;
  padding: 10px 22px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(154, 86, 63, 0.22);
}

.modal-download {
  display: block;
  width: min(100%, 240px);
  min-height: 44px;
  margin: 24px auto 0;
  padding: 10px 18px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  color: var(--brand-dark);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.modal-download:hover {
  color: #fff;
  background: var(--brand);
}

.modal-download + .modal-action {
  margin-top: 10px;
}

.modal-action:hover {
  background: var(--brand-dark);
}

@media (max-width: 840px) {
  .process-card {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 520px;
    margin-top: -52px;
  }

  .process-line {
    display: none;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .nav-inner {
    justify-content: center;
    min-height: 82px;
  }

  .brand {
    gap: 11px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .brand-name {
    font-size: 34px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .nav-pill {
    display: none;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 26px;
    padding-bottom: 92px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    max-width: 34ch;
    font-size: 13px;
  }

  .process-card {
    padding: 20px 18px;
  }

  .page-shell {
    padding-top: 26px;
  }

  .form-section {
    padding: 18px;
  }

  .section-heading {
    gap: 11px;
  }

  .section-heading h2 {
    font-size: 20px;
  }

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

  .choice-row label,
  .choice-stack label {
    width: 100%;
  }

  .toggle-line {
    width: 100%;
  }

  .submit-row {
    justify-content: stretch;
  }

  button[type="submit"] {
    width: 100%;
  }
}
