/* ============================================================
   LATROS — Job application landing page
   All client-specific branding lives in the variables below.
   To reskin for a new client: swap these values + the copy in
   index.html, and you're done.
   ============================================================ */
:root {
  /* Brand */
  --color-bg: #F7F6F3;            /* ivory */
  --color-accent: #7D5A58;        /* dusty mauve-brown */
  --color-accent-dark: #674947;   /* hover/active shade */
  --color-accent-soft: rgba(125, 90, 88, 0.08);
  --color-accent-ring: rgba(125, 90, 88, 0.22);
  --color-ink: #2E2A29;           /* main text */
  --color-muted: #8B817D;         /* secondary text */
  --color-card: #FFFFFF;
  --color-border: #E5DFDA;
  --color-error: #B4534D;
  --color-success: #5E7D58;

  /* Typography */
  --font-heading: 'Mulish', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Fira Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Shape & rhythm */
  --radius-card: 20px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 40px rgba(64, 48, 47, 0.08);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, legend.group-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.25;
}

a { color: var(--color-accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header / logo ---------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: 28px 20px 0;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* optically re-center the tracked text */
  color: var(--color-accent);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 24px 40px;
  background-color: var(--color-bg);
}

.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  margin: 0 0 14px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--color-muted);
  font-size: 1.05rem;
}

/* ---------- Form shell ---------- */
.form-shell {
  padding: 0 20px 72px;
}

.card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px clamp(22px, 5vw, 48px) 44px;
}

/* ---------- Progress ---------- */
.progress { margin-bottom: 30px; }

.progress-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 16.66%;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  transition: width 0.35s ease;
}

.progress-label {
  margin: 10px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

/* ---------- Steps ---------- */
.step { display: none; }

.step.active {
  display: block;
  animation: step-in 0.35s ease both;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.step h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
  outline: none; /* receives focus programmatically */
}

.step-hint {
  margin: 0 0 26px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 22px; }

.field > label,
.group-label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--color-ink);
}

legend.group-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-ink);
  padding: 0;
}

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

.optional {
  font-weight: 400;
  font-size: 0.85em;
  color: var(--color-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  color: var(--color-ink);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

input::placeholder,
textarea::placeholder { color: var(--color-muted); opacity: 0.9; }

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-ring);
}

/* ---------- Date of birth: three dropdowns ---------- */
/* The month column is widest so the longest name (Σεπτεμβρίου) doesn't
   collide with the dropdown arrow on narrow screens. */
.date-selects {
  display: grid;
  grid-template-columns: 0.78fr 1.55fr 0.95fr;
  gap: 8px;
}

.date-selects select {
  padding: 13px 6px 13px 12px;
  cursor: pointer;
}

/* ---------- Repeatable text inputs (languages) ---------- */
.repeater {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repeat-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.repeat-row input { flex: 1; }

.btn-remove {
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: #fff;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-remove:hover { border-color: var(--color-error); color: var(--color-error); }

.btn-add {
  font: inherit;
  font-size: 0.9rem;
  margin-top: 12px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px dashed var(--color-border);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-add:hover { border-color: var(--color-accent); background: var(--color-accent-soft); }

.btn-add:focus-visible,
.btn-remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--color-accent-ring);
}

/* Fill-in-the-blank textareas (step 3) */
.blank-field textarea { min-height: 76px; }

/* ---------- Choice pills (checkboxes & radios) ---------- */
fieldset.field {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.choices.stacked { flex-direction: column; align-items: flex-start; }

.choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice:hover { border-color: var(--color-accent); }

.choice:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.choice:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--color-accent-ring);
}

.choice input {
  accent-color: var(--color-accent);
  width: 17px;
  height: 17px;
  margin: 0;
  flex: none;
}

.other-input,
.reveal-input { margin-top: 12px; }

.other-input.hidden,
.reveal-input.hidden { display: none; }

textarea.reveal-input { min-height: 80px; }

/* ---------- File upload ---------- */
.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-input);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.file-drop:hover,
.file-drop:has(input:focus-visible) { border-color: var(--color-accent); }

.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.file-drop .file-icon { font-size: 1.4rem; }

.file-drop .file-label { font-size: 0.95rem; color: var(--color-muted); }

.file-drop .file-name { color: var(--color-ink); font-weight: 500; }

.field-note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Errors ---------- */
.field.has-error input,
.field.has-error textarea,
.field.has-error select,
fieldset.has-error .choice,
fieldset.has-error .repeat-input,
fieldset.has-error select,
.field.has-error .file-drop {
  border-color: var(--color-error);
}

.field-error {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--color-error);
}

.form-error {
  margin: 18px 0 0;
  padding: 13px 16px;
  border-radius: var(--radius-input);
  background: rgba(180, 83, 77, 0.09);
  color: var(--color-error);
  font-size: 0.95rem;
}

/* ---------- Consent (step 6) ---------- */
.consent-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  background: var(--color-accent-soft);
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  cursor: pointer;
}

.consent-box input {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: none;
}

/* ---------- Turnstile ---------- */
.turnstile-field {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  min-height: 65px;
}

.turnstile-field[hidden] { display: none; }

/* ---------- Navigation buttons ---------- */
.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  font: inherit;
  font-weight: 500;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--color-accent-ring);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  margin-left: auto;
}

.btn-primary:hover { background: var(--color-accent-dark); }

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-muted);
}

.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---------- Success panel ---------- */
.success { text-align: center; padding: 24px 0 8px; }

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 1.8rem;
}

.success h2 { margin: 0 0 10px; }

.success p { color: var(--color-muted); max-width: 420px; margin: 0 auto; }

/* ---------- Honeypot (never shown to humans) ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step.active { animation: none; }
  .progress-fill { transition: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .card { padding: 28px 18px 34px; }
  .form-nav { flex-wrap: wrap; }
  .btn { flex: 1; padding: 13px 18px; }
}
