/* ============================================================
   PlanRP.ca — main stylesheet
   Palette from the logo: navy / red / white, with silver for
   secondary text. Minimal, premium, mobile-first.
   ============================================================ */

:root {
  --ink: #001e4d;          /* logo navy — primary text & surfaces */
  --red: #db0018;          /* logo red — accents only */
  --white: #fbfbfa;
  --silver: #c9cfd8;
  --silver-dark: #7c8596;
  --slate: #3a4459;        /* body copy */
  --line: rgba(0, 30, 77, 0.14);
  --radius: 18px;
  --font-latin: "Archivo", "Segoe UI", Arial, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease-exp: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The hidden attribute must always win, even over later display: rules
   (e.g. flex containers toggled via el.hidden in JS). */
[hidden] { display: none !important; }

/* Focus mode: once the applicant starts the form, the rest of the site
   recedes behind a blur so the form is the sole focus (released on submit). */
body.form-focus #bg-fx,
body.form-focus .site-header,
body.form-focus main > section:not(#apply),
body.form-focus .site-footer {
  filter: blur(7px);
  opacity: 0.4;
  transition: filter 0.6s ease, opacity 0.6s ease;
}
body.form-focus #bg-fx,
body.form-focus main > section:not(#apply),
body.form-focus .site-footer { pointer-events: none; user-select: none; }

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--white); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ============================== Loader ============================== */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.loader-logo { width: min(200px, 48vw); opacity: 0; }

.loader-count {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--silver-dark);
  font-variant-numeric: tabular-nums;
}

/* Striped "pole" loading bar (reference 02, recoloured navy + white stripes
   with a red leading edge). Every loading state on the site uses it. */
.pole-bar {
  width: min(300px, 64vw);
  height: 22px;
  padding: 3px;
  border-radius: 22px;
  outline: 2px solid var(--silver);
  outline-offset: 2px;
  background: var(--white);
  overflow: hidden;
}

.pole-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 20px;
  background-color: var(--ink);
  background-size: 28px 28px;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.22) 25%, transparent 25%,
    transparent 50%, rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.22) 75%, transparent 75%, transparent
  );
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.14), inset -4px 0 0 var(--red);
  animation: pole-move 0.9s linear infinite;
}

@keyframes pole-move {
  100% { background-position: 28px 28px; }
}

/* ========================== Background FX =========================== */

#bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-tool {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--ink);
  opacity: 0.045; /* very subtle — barely-there floating motifs */
  will-change: transform;
}

.bg-tool.is-silver { color: var(--silver-dark); opacity: 0.07; }
.bg-tool.is-red { color: var(--red); opacity: 0.05; }

.bg-tool svg { width: 100%; height: 100%; }

/* ============================= Header =============================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

/* On mobile the floating background tools drift right under the top bar; a
   translucent header lets them read as dark dots moving through it. Make the
   mobile header solid so the bar stays clean. */
@media (max-width: 760px) {
  .site-header {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 19px;
  color: var(--ink);
}
.brand-mark { width: 28px; height: 28px; }
.brand b, .ty-brand b { font-weight: 900; color: var(--red); }

.header-right { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--white);
}

.lang-switch button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--silver-dark);
  transition: color 0.25s, background 0.25s;
}

.lang-switch button.is-active { background: var(--ink); color: var(--white); }

/* ============================= Buttons ============================== */

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--ink);
  transition: background 0.3s var(--ease-exp), color 0.3s var(--ease-exp), transform 0.3s var(--ease-exp);
}

.btn-pill:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.btn-pill:active { transform: translateY(0); }

.btn-black { background: var(--ink); color: var(--white); }
.btn-black:hover { background: var(--white); color: var(--ink); }

.btn-small { padding: 9px 18px; font-size: 11px; }

.btn-pill .arrow { width: 16px; height: 16px; }

/* ============================== Hero ================================ */

#hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(64px + var(--pad)) var(--pad) var(--pad);
  overflow: hidden;
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.hero-tagline {
  font-size: clamp(26px, 4.4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 17em;
}

.hero-tagline .line { display: block; }

.hero-tagline .line-sub {
  margin-top: 14px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--slate);
  max-width: 34em;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------- split-flap board (hero-board.js) ---------------------- */

.board-stage {
  position: relative;
  z-index: 1;
  margin: 28px 0 18px;
  transform-style: preserve-3d;
  will-change: transform;
}

.board-wrap { container-type: inline-size; }

.board {
  --gap: clamp(3px, 0.9cqw, 12px);
  display: grid;
  grid-template-columns: repeat(var(--cols, 7), 1fr);
  gap: var(--gap);
  font-size: calc((100cqw - (var(--cols, 7) - 1) * var(--gap)) / var(--cols, 7) * 0.98);
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.tile {
  --tile: #0a2a5e;
  --tile-top: #0d3170;
  position: relative;
  aspect-ratio: 0.74;
  border-radius: 0.09em;
  box-shadow: 0 0.12em 0.3em -0.08em rgba(0, 30, 77, 0.45);
  color: #fff;
  cursor: default;
}

.tile .half,
.tile .leaf {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--tile);
  backface-visibility: hidden;
}

.tile .top,
.tile .leaf-top {
  top: 0;
  border-radius: 0.09em 0.09em 0 0;
  background: linear-gradient(180deg, var(--tile-top), var(--tile));
  transform-origin: 50% 100%;
}

.tile .bot,
.tile .leaf-bot {
  bottom: 0;
  border-radius: 0 0 0.09em 0.09em;
  transform-origin: 50% 0;
  /* the hinge line between the two flaps */
  border-top: max(1px, 0.012em) solid rgba(0, 10, 30, 0.55);
}

.tile .leaf { visibility: hidden; z-index: 2; }
.tile .leaf-top { box-shadow: inset 0 -0.2em 0.3em -0.2em rgba(0, 0, 0, 0.35); }

.tile .ch {
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile .top .ch, .tile .leaf-top .ch { top: 0; }
.tile .bot .ch, .tile .leaf-bot .ch { top: -100%; }

.tile .is-red { --tile: #c20016; --tile-top: var(--red); background-color: var(--tile); }
.tile .top.is-red, .tile .leaf-top.is-red { background: linear-gradient(180deg, var(--red), #c20016); }
.tile .bot.is-red, .tile .leaf-bot.is-red { background: #c20016; }

.route-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(10px, 1.6vw, 20px);
}

.route-label {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-dark);
}

.route-wrap { flex: 1; max-width: 620px; }

.board-route { --gap: clamp(1.5px, 0.4cqw, 4px); font-weight: 700; }
.board-route .tile { box-shadow: none; }

@media (max-width: 560px) {
  .route-label { display: none; }
}

.hero-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--silver-dark);
}

.hero-scroll { display: flex; align-items: center; gap: 8px; }
.scroll-tick { display: inline-block; }

/* ============================ Sections ============================== */

.section {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 12vh, 150px) var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dark);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 22px;
  text-transform: uppercase;
}

/* split-heading word wrappers (injected by JS) */
.section-title .w { display: inline-block; overflow: clip; vertical-align: top; }
.section-title .w > span { display: inline-block; }

.section-intro {
  font-size: clamp(17px, 2vw, 21px);
  max-width: 640px;
  color: var(--slate);
  margin-bottom: 40px;
}

/* Compact sections keep the whole page short so the form stays the focus. */
.section-compact { padding-top: clamp(48px, 8vh, 90px); padding-bottom: clamp(48px, 8vh, 90px); }

.compact-title {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
  margin-bottom: 30px;
}

/* --------------------- Why Canada (icon + title) ------------------- */

.why-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 26px;
}

@media (min-width: 620px) { .why-grid { grid-template-columns: 1fr 1fr; } }

.why-grid li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.why-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}

.why-ic svg { width: 22px; height: 22px; }

.why-grid h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.why-grid p { font-size: 14px; color: var(--silver-dark); }

/* ------------------- Before you apply (slim band) ------------------ */

.preform { max-width: 1000px; }

.preform-lead {
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--slate);
  max-width: 720px;
  margin-bottom: 22px;
}

.preform-notices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) { .preform-notices { grid-template-columns: 1.1fr 1fr; } }

.mini-notice {
  border-radius: var(--radius);
  padding: 18px 20px;
}

.mini-notice h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mini-notice p { font-size: 13.5px; line-height: 1.5; }

.mini-french { background: var(--ink); color: #d5dbe6; box-shadow: inset 0 3px 0 var(--red); }
.mini-french h3 { color: var(--white); }

.mini-fraud { border: 1.5px dashed var(--silver-dark); color: var(--slate); }
.mini-fraud h3 { color: var(--ink); }

/* ------------------- Requirements (condensed) --------------------- */

.req-compact {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) { .req-compact { grid-template-columns: 1fr 1fr; column-gap: 40px; } }

.req-compact li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.req-compact b { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.req-compact span { font-size: 14px; color: var(--silver-dark); }

/* ------------------------- Open positions -------------------------- */

.section-lead {
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--slate);
  max-width: 640px;
  margin: -12px 0 24px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.chip {
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--slate);
  transition: all 0.25s var(--ease-exp);
}

.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.pos-list { list-style: none; border-top: 1px solid var(--line); }

.pos {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.pos-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 30, 77, 0.05);
  color: var(--ink);
  transition: background 0.3s, color 0.3s;
}

.pos-ic svg { width: 24px; height: 24px; }

.pos:hover .pos-ic { background: var(--ink); color: var(--white); }

.pos-body { flex: 1; min-width: 0; }

.pos-body h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }

.pos-provs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

.prov {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--silver-dark);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}

.pos-apply {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease-exp), color 0.3s var(--ease-exp), transform 0.3s var(--ease-exp);
}

.pos-apply svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease-exp); }
.pos-apply:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.pos-apply:hover svg { transform: translateX(3px); }

/* Phones: the button collapses to an arrow so titles get the width. */
@media (max-width: 480px) {
  .chips { gap: 6px; }
  .chip { padding: 7px 11px; }
  .pos { gap: 12px; }
  .pos-ic { width: 42px; height: 42px; border-radius: 12px; }
  .pos-apply { padding: 11px; }
  .pos-apply span { display: none; }
}

.pos-more {
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pos-note { margin-top: 22px; font-size: 14px; color: var(--slate); }
.pos-note-link { font-weight: 700; color: var(--red); margin-inline-start: 4px; white-space: nowrap; }

/* --------------------------- How it works --------------------------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  background: color-mix(in srgb, var(--white) 80%, transparent);
}

.step-n { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--red); }
.steps h3 { font-size: 18px; font-weight: 900; letter-spacing: -0.01em; margin: 6px 0 4px; }
.steps p { font-size: 14px; color: var(--slate); }

/* ======================= Application sheet ========================== */

.apply-section {
  max-width: 900px;
  padding-bottom: clamp(60px, 8vh, 120px);
}

.sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px 28px var(--radius) var(--radius);
  box-shadow: 0 -18px 60px -30px rgba(0, 30, 77, 0.4), 0 30px 60px -40px rgba(0, 30, 77, 0.3);
  padding: 18px clamp(18px, 4vw, 48px) clamp(28px, 4vw, 48px);
  will-change: transform;
}

.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 3px;
  background: var(--silver);
  margin: 0 auto 26px;
}

.sheet-head h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.sheet-head p { color: var(--silver-dark); margin: 6px 0 8px; }

fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 26px 0 8px;
  margin-top: 26px;
}

legend {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-inline-end: 14px;
}

.most-important {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
  margin-inline-start: 6px;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 18px 24px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.field { display: block; margin-bottom: 18px; }
.grid-2 .field { margin-bottom: 0; }
.field-narrow { max-width: 320px; }

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.opt, .skippable {
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  color: var(--silver-dark);
}

input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 2px;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.3s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23001e4d' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

input:focus, select:focus { outline: none; border-bottom-color: var(--ink); }

input::placeholder { color: var(--silver); }

.field.has-error input,
.field.has-error select { border-bottom-color: #b3261e; }

.field-note {
  font-size: 13px;
  color: var(--silver-dark);
  margin-top: 14px;
}

.field-hint {
  font-size: 13px;
  color: var(--silver-dark);
  margin: 2px 0 16px;
}

/* French audio recorder */
.audio-intro { margin-top: 0; margin-bottom: 14px; }

.audio-rec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: color-mix(in srgb, var(--white) 70%, transparent);
}

.audio-prompt {
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  color: var(--slate);
  margin-bottom: 14px;
}

.audio-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }

/* Record is the primary, prominent action (filled) */
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.audio-btn:hover { transform: translateY(-2px); }
.audio-btn .rec-dot { background: #ff5a4d; }

/* Upload is a small secondary fallback link */
.audio-alt {
  font-size: 13px;
  font-weight: 600;
  color: var(--silver-dark);
  text-decoration: underline;
  cursor: pointer;
}
.audio-alt:hover { color: var(--ink); }
.audio-alt.audio-upload-solo {
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  color: var(--ink);
  font-weight: 700;
}
.audio-alt.audio-upload-solo:hover { background: var(--ink); color: var(--white); }

.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a4d; flex: none; }

#audio-record.is-recording { background: var(--ink); color: var(--white); }
#audio-record.is-recording .rec-dot { animation: rec-pulse 1s infinite; }
@keyframes rec-pulse { 50% { opacity: 0.25; } }

.audio-preview { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.audio-preview audio { height: 40px; max-width: 100%; }

.audio-remove {
  border: 0;
  background: none;
  color: var(--silver-dark);
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.audio-status { font-size: 13px; color: var(--silver-dark); margin-top: 10px; min-height: 1em; }

/* segmented radio pills */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segmented label { position: relative; }

.segmented input { position: absolute; opacity: 0; inset: 0; }

.segmented span {
  display: inline-block;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  transition: all 0.25s var(--ease-exp);
  user-select: none;
}

.segmented label:hover span { border-color: var(--ink); }

.segmented input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.segmented input:focus-visible + span { outline: 2px solid var(--silver-dark); outline-offset: 2px; }

.segmented.has-error span { border-color: #b3261e; }

/* dropzones */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1.5px dashed var(--silver-dark);
  border-radius: var(--radius);
  padding: 26px 18px;
  cursor: pointer;
  color: var(--silver-dark);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.dropzone:hover, .dropzone.is-drag { border-color: var(--ink); color: var(--ink); background: rgba(0, 30, 77, 0.03); }

.dropzone.has-error { border-color: #b3261e; }

.dz-slim { padding: 16px 18px; }

.dz-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  flex: none;
}

.dz-text { font-size: 14px; font-weight: 600; }

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.thumb img,
.thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb video { background: #000; }
.thumb.is-video::before {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 1;
}

.thumb button {
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 30, 77, 0.75);
  color: var(--white);
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* checkboxes */
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  margin-top: 14px;
  max-width: 640px;
}

.check input {
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1.5px solid var(--silver-dark);
  border-radius: 7px;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  cursor: pointer;
}

.check input:checked { background: var(--ink); border-color: var(--ink); }

.check input:checked::after {
  content: "";
  width: 11px;
  height: 6px;
  border: 2.5px solid var(--white);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translateY(-1px);
}

.check input:focus-visible { outline: 2px solid var(--silver-dark); outline-offset: 2px; }

.check span { font-size: 14px; color: var(--slate); }

.check.has-error input { border-color: #b3261e; }

.notice-text {
  background: rgba(0, 30, 77, 0.045);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14px;
  margin-top: 16px;
}


.form-error {
  color: #b3261e;
  font-size: 14px;
  font-weight: 600;
  margin-top: 22px;
}

.btn-submit {
  margin-top: 26px;
  width: 100%;
  justify-content: center;
  padding: 18px 26px;
  font-size: 14px;
}

.pole-mini {
  width: 130px;
  height: 14px;
  padding: 2px;
  outline-width: 1.5px;
  outline-offset: 1px;
  outline-color: rgba(255, 255, 255, 0.5);
  background: transparent;
}

.pole-mini .pole-bar-fill { width: 100%; background-color: var(--white); background-image: linear-gradient(-45deg, var(--silver-dark) 25%, transparent 25%, transparent 50%, var(--silver-dark) 50%, var(--silver-dark) 75%, transparent 75%, transparent); box-shadow: none; }

.btn-submit:hover .pole-mini { outline-color: rgba(0, 30, 77, 0.4); }

/* position picker (top of the form) */
.position-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 12px 16px 12px 12px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}

.position-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--white);
}

.position-icon svg { width: 24px; height: 24px; }

.position-text { flex: 1; min-width: 0; }

.position-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.position-name {
  display: block;
  padding-top: 2px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The native select sits invisibly over the whole card: tap anywhere to
   open the OS picker (best UX on phones); .position-name mirrors it. */
.position-pick .position-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px; /* stops iOS zooming on focus */
}

.position-pick:focus-within { outline: 2px solid var(--silver-dark); outline-offset: 3px; }

.position-caret { flex: none; width: 12px; height: 8px; color: var(--ink); }

/* vertical radio cards (French proof) */
.choice-list { display: grid; gap: 8px; }
@media (min-width: 640px) { .choice-list { grid-template-columns: 1fr 1fr; } }

.choice-list label { position: relative; display: block; }
.choice-list input { position: absolute; opacity: 0; inset: 0; }

.choice-list span {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.25s var(--ease-exp);
}

.choice-list span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--silver-dark);
  transition: all 0.25s var(--ease-exp);
}

.choice-list label:hover span { border-color: var(--ink); }
.choice-list input:checked + span { border-color: var(--ink); color: var(--ink); background: rgba(0, 30, 77, 0.04); }
.choice-list input:checked + span::before { border: 5px solid var(--ink); }
.choice-list input:focus-visible + span { outline: 2px solid var(--silver-dark); outline-offset: 2px; }
.choice-list.has-error span { border-color: #b3261e; }

.field-follow { margin-top: 18px; }
.grid-gap-top { margin-top: 18px; }
.field-label-top { margin-top: 22px; }
.fr-commit .check { margin-top: 12px; }

.req-tag {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--red);
}

/* thank-you */
.thankyou {
  text-align: center;
  padding: clamp(30px, 6vw, 70px) 8px;
  max-width: 640px;
  margin: 0 auto;
}

.ty-mark { width: 76px; margin: 0 auto 26px; color: var(--ink); }

.ty-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.thankyou h2 {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.thankyou p { color: var(--slate); margin-bottom: 26px; }

.ty-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

/* ============================= Footer =============================== */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px var(--pad) 40px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-logo { width: 150px; margin: 0 auto 16px; }

.site-footer p { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver-dark); }

.footer-small { margin-top: 8px; font-size: 11px; }
.footer-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-link:hover { color: var(--red); }

/* =========================== Utilities ============================== */

[data-reveal] { opacity: 0; }

html.no-motion [data-reveal],
html.no-motion .pos { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole-bar-fill { animation: none; }
}
