/* ============================================================
   LATROS — Job application landing page

   The visual system is the one from the LATROS booking flow:
   a cream ground, ink text, a butter-yellow call to action,
   blush and sage panels for the soft moments, orchid as the
   single bright "you are here" accent, pill geometry and
   Manrope throughout.

   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 palette — shared with booking.latros.gr */
  --cream: #FAF7F0;             /* page ground */
  --ink: #292724;               /* text, and the fill of anything chosen */
  --butter: #E8D58A;            /* primary action */
  --butter-2: #DCC66E;          /* its hover shade */
  --blush: #F0DBD8;             /* soft panel — consent */
  --sage: #CBD4C4;              /* soft panel — success */
  --orchid: #E255D2;            /* one bright accent, used sparingly */
  --muted: #5E5852;             /* secondary text */
  --white: #FFFFFF;
  --placeholder: #78716A;
  --on-sage: #46553F;           /* text that has to sit on sage */
  --line: rgb(41 39 36 / 10%);
  --line-2: rgb(41 39 36 / 20%);
  --err: #B5473A;

  /* Typography */
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shape & rhythm */
  --r-panel: 32px;
  --r-card: 24px;
  --r-field: 18px;
  --pill: 999px;
  --shadow: 0 5px 12px rgb(41 39 36 / 8%);

  color-scheme: light;
}

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

html {
  background: var(--cream);
  caret-color: var(--ink);
  accent-color: var(--ink);
  scrollbar-color: var(--line-2) transparent;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

::selection { background: var(--butter); color: var(--ink); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

p { text-wrap: pretty; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink); text-underline-offset: 2px; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

button, a, input, select, textarea, label { touch-action: manipulation; }

/* Several components below set their own display, which would otherwise win
   over the hidden attribute the wizard toggles on buttons and panels. */
[hidden] { display: none !important; }

.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;
  align-items: center;
  height: 64px;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* The wordmark is the client's own artwork, so it is an image rather than
   tracked-out type. width/height are declared on the tag as well, so the
   header doesn't reflow while the file loads. */
.logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 70vw;
}

@media (max-width: 480px) {
  .logo { height: 20px; }
}

/* ---------- Hero ---------- */
/* Left-aligned and set tight, the way the booking flow sets its headings —
   the page reads as one editorial column rather than a centred poster. */
.hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 26px 20px 4px;
}

.hero h1 {
  margin: 0 0 10px;
  font: 600 clamp(30px, 7vw, 42px)/1.05 var(--font);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Form shell ---------- */
/* No card: the form sits straight on the cream, and the white belongs to the
   fields themselves. Only the moments that need lifting — consent, success,
   the upload — get a panel of their own. */
.form-shell {
  padding: 0 20px 72px;
}

.card {
  max-width: 680px;
  margin: 0 auto;
}

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

/* One segment per step: the current one fills part-way, finished ones fill
   completely. grid-auto-flow keeps it agnostic about how many steps exist. */
.bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}

.seg {
  position: relative;
  height: 6px;
  border-radius: var(--pill);
  background: var(--line);
  overflow: hidden;
}

.seg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--butter);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seg.now::after { transform: scaleX(0.42); }
.seg.done::after { transform: scaleX(1); }

/* Step chips. On phones they bleed to both edges and scroll, with the mask
   fading the last one so it's obvious there is more to the right. */
.props {
  list-style: none;
  display: flex;
  gap: 8px 5px;
  margin: 14px -20px 0;
  padding: 0 36px 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}

.props::-webkit-scrollbar { display: none; }

@media (min-width: 740px) {
  /* Wide enough to show every chip at once: drop the bleed and the fade and
     let the row wrap instead of scroll. */
  .props {
    flex-wrap: wrap;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.prop { flex: 0 0 auto; }

.prop button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  max-width: 280px;
  padding: 0 13px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--font);
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}

.prop .dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  color: var(--cream);
}

.prop .dot svg { display: none; }

.prop.now button {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
}

.prop.now .dot { border-color: var(--orchid); }

.prop.now .dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orchid);
}

/* A finished step is a real button — tapping it goes back to that answer. */
.prop.done button { cursor: pointer; }
.prop.done button:hover { border-color: var(--line-2); background: var(--white); }
.prop.done .dot { background: var(--ink); border-color: var(--ink); }
.prop.done .dot svg { display: block; }

.progress-label {
  margin: 12px 0 0;
  font: 500 13px/1 var(--font);
  color: var(--muted);
}

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

.step.active {
  display: block;
  animation: step-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.step h2 {
  margin: 0 0 6px;
  font: 600 clamp(21px, 4.5vw, 26px)/1.15 var(--font);
  letter-spacing: -0.03em;
  text-wrap: balance;
  outline: none; /* receives focus programmatically */
}

.step-hint {
  margin: 0 0 24px;
  max-width: 52ch;
  font-size: 15px;
  color: var(--muted);
}

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

/* Small, quiet and nudged in by 6px so it lines up with the text inside the
   input below it rather than with the input's border. */
.field > label,
.group-label {
  display: block;
  margin: 0 0 6px 6px;
  font: 500 13px/1.3 var(--font);
  color: var(--muted);
}

legend.group-label { padding: 0; }

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

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-field);
  background: var(--white);
  font: 500 16px/1.3 var(--font);
  color: var(--ink);
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  height: auto;
  min-height: 96px;
  padding: 14px 18px;
  line-height: 1.5;
  resize: vertical;
}

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

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgb(232 213 138 / 50%);
}

/* Native select chrome replaced with the same chevron the booking flow uses. */
select {
  padding-right: 44px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23292724' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center/16px;
  cursor: pointer;
}

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

.date-selects select {
  padding: 0 34px 0 14px;
  background-position: right 12px center;
  min-width: 0; /* grid items default to min-width:auto and would overflow */
}

/* On phones the three columns genuinely don't fit: "Φεβρουαρίου" alone needs
   ~100px, and the chevron eats ~16px of every column on top of the padding.
   Shrinking the text isn't an option — under 16px iOS Safari zooms the page
   on focus — so the year wraps to its own line instead, and sits under the
   day column so the row still reads Ημέρα → Μήνας → Έτος. */
@media (max-width: 480px) {
  .date-selects {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

/* ---------- 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 {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.btn-add {
  margin-top: 12px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  font: 600 13px/1 var(--font);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-add:hover { background: var(--white); }

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

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

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

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

.choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line-2);
  border-radius: var(--pill);
  background: var(--white);
  font: 500 14px/1.3 var(--font);
  color: var(--ink);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

/* Chosen = filled ink, the way every selected thing reads in the booking
   flow (a picked day, a picked slot, a picked extra). */
.choice:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* The ring belongs to the whole pill, so the control inside doesn't draw a
   second one. */
.choice:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.choice input:focus-visible { outline: none; }

/* The native control is kept — only its chrome is replaced — so the box
   still says "several of these" and the circle still says "one of these". */
.choice input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.choice input[type="radio"] { border-radius: 50%; }

.choice input:checked {
  border-color: var(--butter);
  background: var(--butter) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23292724' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/12px;
}

.choice input[type="radio"]:checked {
  background-image: none;
  box-shadow: inset 0 0 0 3.5px var(--ink);
}

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

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

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

/* An extra, non-exclusive, never-required option that reads as part of the
   field above it (e.g. Παιδιά under marital status) but is its own .field —
   not folded into that fieldset — so it never inherits its error state. The
   hairline ties it back to that field visually instead. */
.choices-extra {
  margin-top: -6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.choices-hint {
  margin: 0 0 8px;
  font: 500 13px/1.3 var(--font);
  color: var(--muted);
}

/* ---------- Social profile inputs ---------- */
.social-note { margin: 0 0 12px; }

.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.social-row input { flex: 1; }

/* Brand-tinted icon tile so each platform is recognisable at a glance */
.social-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-field);
  background: var(--white);
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

/* Icon lights up in the platform's colour once that field has content */
.social-row:focus-within .social-icon,
.social-row .social-icon.filled { border-color: currentColor; }

.social-row:focus-within .social-icon.ig,
.social-icon.ig.filled { color: #C13584; }
.social-row:focus-within .social-icon.tt,
.social-icon.tt.filled { color: #010101; }
.social-row:focus-within .social-icon.fb,
.social-icon.fb.filled { color: #1877F2; }
.social-row:focus-within .social-icon.yt,
.social-icon.yt.filled { color: #FF0000; }

@media (max-width: 380px) {
  .social-icon { width: 46px; height: 46px; }
}

/* ---------- File upload ---------- */
.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-card);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

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

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

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

.file-drop .file-label { font: 500 14px/1.4 var(--font); color: var(--muted); }

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

.field-note {
  margin: 8px 0 0 6px;
  font: 400 13px/1.4 var(--font);
  color: var(--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(--err);
}

.field-error {
  margin: 6px 0 0 6px;
  font: 500 13px/1.3 var(--font);
  color: var(--err);
}

.form-error {
  display: flex;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--err);
  border-radius: var(--r-card);
  background: var(--white);
  font: 500 14px/1.45 var(--font);
  color: var(--err);
}

/* ---------- Consent (step 6) ---------- */
.consent-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--r-card);
  background: var(--blush);
  font: 400 14px/1.45 var(--font);
  cursor: pointer;
}

.consent-box input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--line-2);
  border-radius: 7px;
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.consent-box input:checked {
  border-color: var(--ink);
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23FAF7F0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/13px;
}

.field.has-error .consent-box input { border-color: var(--err); }

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--pill);
  font: 600 15px/1 var(--font);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

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

.btn-primary {
  margin-left: auto;
  background: var(--butter);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.btn-primary:hover { background: var(--butter-2); }

.btn-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-ghost {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover { background: var(--white); }

/* ---------- Success panel ---------- */
.success {
  margin-top: 26px;
  padding: 28px 24px;
  border-radius: var(--r-panel);
  background: var(--sage);
}

.success-icon {
  width: 48px;
  height: 48px;
  margin: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 1.4rem;
}

.success h2 {
  margin: 0 0 10px;
  font: 600 clamp(26px, 6vw, 34px)/1.1 var(--font);
  letter-spacing: -0.03em;
  outline: none;
}

.success p {
  margin: 0;
  max-width: 46ch;
  font-size: 15px;
  color: var(--on-sage);
}

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

/* ---------- Touch targets ---------- */
@media (pointer: coarse) {
  .prop button { height: 40px; }
  .choice { min-height: 44px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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