/* ===========================================================
   LH GROUP — Career portal
   Shared styles. Brand theming via [data-brand] on <body>.
   =========================================================== */

:root {
  --ink: #1c1c1e;
  --ink-soft: #5b5b62;
  --line: #e6e4df;
  --field-bg: #ffffff;
  --field-line: #d9d6cf;
  --paper: #ffffff;
  --radius: 14px;
  --shadow: 0 24px 60px -28px rgba(20, 22, 35, .35);
  --maxw: 1180px;

  /* defaults, overridden per brand */
  --brand: #002a5c;
  --brand-deep: #001b3d;
  --accent: #002a5c;
  --panel-text: #ffffff;
  --panel-soft: rgba(255, 255, 255, .72);
  --display: "Inter", system-ui, sans-serif;
  --display-tracking: -0.01em;
  --display-transform: none;
}

/* ---- Brand themes ---- */
body[data-brand="polo"] {
  --brand: #002a5c; --brand-deep: #001833; --accent: #b08d57;
  --display: "EB Garamond", Georgia, serif;
  --display-tracking: 0.005em;
}
body[data-brand="vilebrequin"] {
  --brand: #041e41; --brand-deep: #02132c; --accent: #1f93a8;
  --display: "Inter", system-ui, sans-serif;
  --display-tracking: 0.12em;
  --display-transform: uppercase;
}
body[data-brand="empoli"] {
  --brand: #161616; --brand-deep: #000000; --accent: #be1e2d;
  --display: "GFS Didot", "EB Garamond", Georgia, serif;
  --display-tracking: 0.01em;
}
body[data-brand="lapinhouse"] {
  --brand: #b91e2d; --brand-deep: #97121f; --accent: #b91e2d;
  --display: "Quicksand", "Inter", sans-serif;
  --display-tracking: 0.005em;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #f4f2ee;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ===========================================================
   Split layout
   =========================================================== */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 0.82fr) 1.18fr;
}

/* ---- Brand panel (left) ---- */
.panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 15% 0%, color-mix(in srgb, var(--brand) 86%, white) 0%, var(--brand) 42%, var(--brand-deep) 100%);
  color: var(--panel-text);
  padding: clamp(34px, 4vw, 66px);
  display: flex;
  flex-direction: column;
}

/* subtle texture lines */
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -36deg, rgba(255,255,255,.05) 0 1px, transparent 1px 26px);
  pointer-events: none;
  opacity: .5;
}

.panel > * { position: relative; z-index: 1; }

.panel__top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--panel-soft);
  font-weight: 600;
}
.panel__top .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent);
}

.logocard {
  margin: clamp(34px, 6vh, 70px) 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 30px 34px;
  width: fit-content;
  max-width: min(360px, 78%);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logocard img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 96px;
  object-fit: contain;
}

.panel__role {
  margin-top: clamp(30px, 6vh, 56px);
}
.panel__role .eyebrow {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--panel-soft);
  margin-bottom: 14px;
  font-weight: 600;
}
.panel__role h1 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  line-height: 1.05;
  margin: 0 0 18px;
}
.panel__role p {
  margin: 0;
  max-width: 34ch;
  color: var(--panel-soft);
  font-size: 1.02rem;
}

.panel__foot {
  margin-top: clamp(26px, 5vh, 46px);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 13px;
  color: var(--panel-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===========================================================
   Form side (right)
   =========================================================== */
.formside {
  background: var(--paper);
  padding: clamp(34px, 4.4vw, 76px) clamp(26px, 4.4vw, 90px);
  display: flex;
  align-items: center;
}
.form-wrap { width: 100%; max-width: 560px; margin: 0 auto; }

.form-head h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--ink);
}
.form-head p { margin: 0 0 30px; color: var(--ink-soft); font-size: 1.02rem; }

form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field { display: grid; gap: 7px; }
.field label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
}
.field label .opt { color: var(--ink-soft); font-weight: 500; }
.field label .req { color: var(--accent); margin-left: 2px; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--field-line);
  border-radius: 11px;
  padding: 13px 15px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #aaa6a0; }

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

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  background: #fff;
}

.field[data-error="1"] input,
.field[data-error="1"] textarea {
  border-color: #d33; background: #fdf5f4;
}
.field .err {
  font-size: .78rem; color: #c0392b; min-height: 0; display: none;
}
.field[data-error="1"] .err { display: block; }

/* ---- GDPR consent ---- */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  background: #faf9f6;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 15px 16px;
}
.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 2px 0 0;
  width: 22px; height: 22px;
  border: 1.8px solid var(--field-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background .15s ease, border-color .15s ease;
  flex: none;
}
.consent input[type="checkbox"]::before {
  content: "";
  width: 12px; height: 12px;
  transform: scale(0);
  transition: transform .12s ease;
  background: #fff;
  clip-path: polygon(14% 47%, 0 60%, 40% 100%, 100% 18%, 86% 5%, 38% 70%);
}
.consent input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.consent input[type="checkbox"]:checked::before { transform: scale(1); }
.consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.consent label { font-size: .86rem; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent.is-error { border-color: #d33; background: #fdf5f4; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Submit ---- */
.submit {
  margin-top: 6px;
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: .01em;
  padding: 15px 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .12s ease, background .16s ease, box-shadow .16s ease;
  box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--brand) 70%, black);
}
.submit:hover { background: var(--brand-deep); transform: translateY(-1px); }
.submit:active { transform: translateY(0); }
.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
}
.submit[disabled] { opacity: .65; cursor: progress; transform: none; }
.submit .spin {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
.submit.is-loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-foot {
  margin-top: 4px; font-size: .8rem; color: var(--ink-soft); text-align: center;
}

/* ---- Success / error banners ---- */
.notice {
  display: none;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: .95rem;
  align-items: flex-start;
  gap: 12px;
}
.notice.show { display: flex; }
.notice.ok { background: #eef7f0; border: 1.5px solid #cfe8d6; color: #1f6b3a; }
.notice.bad { background: #fdf3f2; border: 1.5px solid #f3d4d0; color: #b23b30; }

.success-card { display: none; text-align: center; padding: 18px 0; }
.success-card.show { display: block; }
.success-card .tick {
  width: 64px; height: 64px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: var(--accent);
  display: grid; place-content: center; margin: 0 auto 20px;
}
.success-card h2 {
  font-family: var(--display); font-weight: 600;
  letter-spacing: var(--display-tracking); text-transform: var(--display-transform);
  font-size: 1.7rem; margin: 0 0 10px;
}
.success-card p { color: var(--ink-soft); margin: 0 auto; max-width: 40ch; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .panel { padding: 30px 26px 34px; }
  .logocard { margin: 26px 0 0; max-width: 260px; padding: 22px 26px; }
  .logocard img { max-height: 64px; }
  .panel__role { margin-top: 26px; }
  .panel__foot { display: none; }
  .formside { padding: 32px 24px 56px; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
}

/* ===========================================================
   Motion / a11y
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition: none !important; }
}

/* ===========================================================
   Portal index page
   =========================================================== */
.portal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) clamp(22px, 5vw, 40px) 80px;
}
.portal__head { max-width: 720px; margin-bottom: clamp(34px, 5vw, 60px); }
.portal__logo { display: block; height: clamp(58px, 7vw, 78px); width: auto; margin-bottom: clamp(26px, 4vw, 40px); }
.portal__head .eyebrow {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: #98948c; font-weight: 600; margin-bottom: 16px;
}
.portal__head h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.06; margin: 0 0 18px; color: #14213a;
}
.portal__head p { font-size: 1.1rem; color: var(--ink-soft); margin: 0; max-width: 56ch; }

.brandgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.bcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  min-height: 230px;
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  isolation: isolate;
}
.bcard:hover { transform: translateY(-4px); box-shadow: 0 34px 70px -30px rgba(20,22,35,.5); }
.bcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 100% at 20% 0%,
     color-mix(in srgb, var(--c) 88%, white), var(--c) 55%, var(--cd) 100%);
}
.bcard .chip {
  align-self: flex-start;
  background: #fff; border-radius: 11px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; width: auto; max-width: 75%;
}
.bcard .chip img { max-height: 38px; max-width: 100%; display: block; object-fit: contain; }
.bcard .meta { margin-top: auto; }
.bcard .meta .role { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.bcard .meta .go {
  margin-top: 8px; font-weight: 600; font-size: 1.15rem;
  display: flex; align-items: center; gap: 8px;
}
.bcard .meta .go svg { transition: transform .18s ease; }
.bcard:hover .meta .go svg { transform: translateX(4px); }

.portal__foot {
  margin-top: 46px; font-size: .85rem; color: #98948c;
}
