/* ==========================================================================
   Global Quantum — shared components
   Header, footer, buttons, cards, form controls, accordion, notices.
   ========================================================================== */

/* --- Logo ------------------------------------------------------------------
   Mark + wordmark positioned exactly as in the Figma logo group. */

.logo {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: var(--logo-w, 120px);
  height: var(--logo-h, 32.2px);
}
.logo img { position: absolute; width: auto; height: auto; max-width: none; }
.logo__mark { inset: 0 79.37% 0 0; width: 20.63% !important; height: 100% !important; }
.logo__word { inset: 7.48% 0 7.48% 27.43%; width: 72.57% !important; height: 85.04% !important; }

/* --- Header ----------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: var(--header-offset);
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.site-header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2 * var(--gutter), var(--container-wide));
  margin-inline: auto;
  padding: 12px 12px 12px 16px;
  background: var(--white);
  border-radius: 60px;
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled .site-header__bar { box-shadow: var(--shadow-card); }
/* Header logo with tagline (single horizontal SVG, 220 × 40) */
.logo-tagline { display: block; flex-shrink: 0; width: 132px; height: 24px; }
.logo-tagline img { width: 100%; height: 100%; }
/* Narrow phones: keep the logo clear of the header buttons */
@media (max-width: 369px) {
  .logo-tagline { width: 110px; height: 20px; }
}
@media (max-width: 359px) {
  .site-header__bar { padding-left: 12px; }
  .site-header__actions .btn:not(.btn--login) img { display: none; }
}
@media (max-width: 339px) {
  .logo-tagline { width: 100px; height: 18px; }
}
.site-header__actions { display: flex; align-items: center; gap: 4px; }

@media (min-width: 700px) {
  .site-header__bar { padding-left: 24px; }
  .logo-tagline { width: 176px; height: 32px; }
  .site-header__actions { gap: 12px; }
}

/* --- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.btn img { flex-shrink: 0; width: 20px; height: 20px; transition: transform 0.2s ease; }

/* Very narrow phones: let long button labels wrap instead of running off screen */
@media (max-width: 359px) {
  .btn:not(.btn--nav) { height: auto; min-height: 52px; padding-block: 12px; white-space: normal; text-align: center; line-height: 1.25; }
}
.btn:hover img { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

@media (min-width: 1200px) {
  .btn { height: 56px; padding: 0 24px; font-size: 18px; }
}

/* White pill with gold gradient hairline border */
.btn--outline {
  height: 54px;
  border: 1px solid transparent;
  background: linear-gradient(var(--white), var(--white)) padding-box, var(--gold) border-box;
  color: var(--navy);
}
.btn--outline:hover { box-shadow: 0 6px 16px rgba(11, 36, 116, 0.12); }
@media (min-width: 1200px) { .btn--outline { height: 58px; } }

/* White pill, no border (on dark backgrounds) */
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }

/* Solid navy (form submit) */
.btn--primary {
  width: 100%;
  height: auto;
  min-height: 52px;
  padding-block: 12px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}
.btn--primary img { width: 16px; height: 16px; }
.btn--primary:hover { background: #122f8c; }
.btn--primary[disabled] { opacity: 0.6; cursor: progress; }
@media (min-width: 1200px) {
  .btn--primary { min-height: 56px; font-size: 18px; }
  .btn--primary img { width: 20px; height: 20px; }
}

/* Solid navy pill, sized like .btn--outline so the two sit side by side */
.btn--navy {
  height: 54px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
}
.btn--navy:hover { background: #122f8c; }
@media (min-width: 1200px) { .btn--navy { height: 58px; } }

/* Small navy pill (header) */
.btn--nav {
  gap: 4px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}
.btn--nav img { width: 12px; height: 12px; }
.btn--nav:hover { background: #122f8c; }

/* Light pill with account icon (header) */
.btn--login {
  border-color: var(--field-border);
  background: var(--field-bg);
  color: var(--text);
  font-weight: 400;
}
.btn--login:hover { border-color: #a4b3e3; background: var(--white); }
.btn__icon { display: grid; place-items: center; flex-shrink: 0; width: 12px; height: 12px; }
.btn--login .btn__icon img { width: 9px; height: 10.33px; }
.btn--login:hover img { transform: none; }

@media (max-width: 439px) {
  .btn--login { width: 34px; padding: 0; }
  .btn--login .btn__label { display: none; }
}
@media (min-width: 700px) {
  .btn--nav { gap: 10px; height: 42px; padding: 0 18px; font-size: 14px; }
}

/* --- Cards ------------------------------------------------------------------- */

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.card--gold {
  border: 1px solid transparent;
  background: linear-gradient(var(--white), var(--white)) padding-box, var(--gold) border-box;
}
.card--gold-2 { border-width: 2px; }

/* --- Notice (dashed info box) ---------------------------------------------- */

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border: 1px dashed var(--dashed);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 10px;
}
.notice__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* --- Tag pills ------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
}
.tag img { flex-shrink: 0; }
.tag--grey { background: var(--pill-grey); color: var(--text); }
.tag--blue { background: var(--pill-blue); color: var(--navy); }
.tag--red { background: var(--pill-red); color: var(--red); }

/* --- Check list ------------------------------------------------------------- */

.check-list { list-style: none; display: grid; gap: 16px; }
.check-list li { display: flex; align-items: center; gap: 12px; }
.check-list__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

/* --- Form controls --------------------------------------------------------- */

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.form__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form__group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.form__inputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.form__fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.form__fieldset legend { padding: 0; margin-bottom: 10px; }

.field {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 2px 14px 0; /* 2px top: centres the letters optically, as in Figma */
  border: 1px solid var(--field-border);
  border-radius: var(--radius-pill);
  background: var(--field-bg);
  color: var(--navy);
  font-size: 14px;
  line-height: 1.2;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.field::placeholder { color: var(--placeholder); opacity: 1; }
.field:hover { border-color: var(--navy); }
.field:focus { outline: none; border-color: var(--navy); background: var(--white); box-shadow: 0 0 0 3px rgba(11, 36, 116, 0.12); }
.field:user-invalid { border-color: var(--error); background: #fff7f7; }

textarea.field {
  display: block;
  min-height: 44px;
  padding-top: 13.5px;
  padding-bottom: 12.5px;
  border-radius: 22px;
  resize: none;
  overflow: hidden;
}

.field-label { color: var(--text); font-size: 14px; }

/* Native select styled as the design's dropdown */
.select { position: relative; }
.select .field {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
.select .field:invalid,
.select .field.is-placeholder { color: var(--placeholder); }
.select option { color: var(--navy); }
.select__chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
}

/* Checkbox */
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--text); font-size: 12px; }
.checkbox span { padding-top: 4px; } /* first line centred on the box; longer labels wrap below */
.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: var(--field-bg);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.checkbox input::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.15s ease;
}
.checkbox input:hover { border-color: var(--navy); }
.checkbox input:user-invalid { border-color: var(--error); background: #fff7f7; }
.checkbox input:checked { background: var(--navy); border-color: var(--navy); }
.checkbox input:checked::after { transform: rotate(-45deg) scale(1); }
@media (min-width: 1200px) {
  .checkbox { font-size: 16px; }
  .checkbox span { padding-top: 3px; }
  .checkbox input { width: 28px; height: 28px; }
}

.form__status {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
}
.form__status[hidden] { display: none; }
.form__status--success { background: #eaf7ee; color: #1f5e33; }
.form__status--error { background: #fdecea; color: #8a1c14; }

.form__legal {
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  color: var(--muted-light);
  font-size: 10px;
}

/* States set on the <form> by js/forms.js */
.form__fail { display: none; }
.form.has-error .form__fail { display: block; }
.form.is-submitting [type="submit"] { opacity: 0.6; cursor: progress; }
.form.is-sent { display: none; }
.form__status:focus { outline: none; }
.form__status a { color: inherit; }

/* --- Accordion (FAQ) ------------------------------------------------------- */

.accordion { display: grid; gap: 16px; }

.accordion__item {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.accordion__heading { margin: 0; font: inherit; }
.accordion__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}
.accordion__trigger > span:not(.accordion__icon) { flex: 1; }
.accordion__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}
.accordion__trigger > span:not(.accordion__icon),
.accordion__icon { transition: opacity 0.15s ease; }
.accordion__trigger:hover > span:not(.accordion__icon),
.accordion__trigger:hover .accordion__icon { opacity: 0.7; }
.accordion__icon .icon-minus { display: none; }
.accordion__trigger[aria-expanded="true"] .icon-minus { display: block; }
.accordion__trigger[aria-expanded="true"] .icon-plus { display: none; }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.accordion__panel > div { overflow: hidden; }
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__body {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--divider-blue);
  font-size: 14px;
}
.accordion__body p + p { margin-top: 0.75em; }

@media (min-width: 700px) {
  .accordion__item { padding: 32px; }
  .accordion__trigger { font-size: 20px; }
  .accordion__body { font-size: 16px; }
}

/* --- Footer ------------------------------------------------------------------ */

.site-footer {
  padding: 40px 0 24px;
  background: linear-gradient(to bottom, var(--page-bg), var(--white));
  color: var(--muted);
  font-size: 10px;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer .logo { --logo-w: 90px; --logo-h: 24px; }
.site-footer a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { color: var(--navy); }
.site-footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }

@media (min-width: 700px) {
  .site-footer { padding: 40px 0; }
  .site-footer__inner { gap: 40px; }
  .site-footer .logo { --logo-w: 80px; --logo-h: 21px; }
}
