/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  zoom: var(--z);
}
body {
  margin: 0;
  min-height: calc(100vh / var(--z)); /* zoom scales vh too, so divide it back out */
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}
main {
  flex: 1;
}
img,
svg {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
a {
  color: var(--color-navy);
}
:focus-visible {
  outline: 2px solid var(--color-navy);
  outline-offset: 3px;
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
  background: var(--color-bg);
}
.brand {
  display: block;
  line-height: 0;
}
.brand img {
  height: 22px;
  width: auto;
}
@media (min-width: 900px) {
  /* Content is capped at the 1536px design width and centered; backgrounds stay full width. */
  .site-header {
    justify-content: flex-start;
    padding-inline: max(clamp(1.5rem, 5.5vw, 5.3rem), calc((100% - var(--page-max)) / 2 + 5.3rem));
  }
  .brand img {
    height: clamp(32px, 2.73vw, 42px);
  }
}

/* ---------- Hero: tagline panel + form (mobile first: stacked) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-surface);
}

.hero__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 338px;
  padding: 3.5rem 1.5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}
.hero__intro-main {
  margin-block: auto;
  position: relative;
  z-index: 1;
}
.hero__title {
  font-size: clamp(1.15rem, 4.8vw, 1.5rem);
  font-weight: 500;
  line-height: 1.33;
  color: var(--color-navy);
}
.hero__tagline {
  margin-top: 0.85rem;
  font-size: clamp(0.7rem, 2.8vw, 0.9rem);
  font-weight: 500;
  line-height: 1.56;
  color: var(--color-text-tagline);
}
.hero__tagline span {
  font-family: var(--font-mono);
}
.hero__copyright {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  max-width: 24rem;
  font-size: clamp(0.62rem, 2.4vw, 0.78rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}
.hero__motif {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(46%, 220px);
  pointer-events: none;
  z-index: 0;
}

.hero__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.25rem 1.5rem 3rem;
}
.hero__form-title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.84;
  text-align: center;
  color: var(--color-text);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 57fr 43fr; /* 876px / 660px of the 1536px frame */
    /* 770px at 1536px; on tall screens the grey band grows so the footer is not left far below it. */
    min-height: max(
      clamp(560px, 50.1vw, 770px),
      calc(100vh / var(--z) - var(--nav-h) - var(--footer-h))
    );
    padding-inline: max(0px, calc((100% - var(--page-max)) / 2));
  }
  .hero__intro {
    min-height: 0;
    padding: 3rem 2rem 3.4rem;
  }
  .hero__title {
    font-size: clamp(1.5rem, 2.34vw, 2.25rem);
    line-height: 1.33;
  }
  .hero__tagline {
    margin-top: 1.3rem;
    font-size: clamp(0.95rem, 1.43vw, 1.375rem);
  }
  .hero__copyright {
    margin-top: 3rem;
    max-width: none;
    font-size: clamp(0.8rem, 1.43vw, 1.375rem);
  }
  .hero__motif {
    width: 40.3%;
    max-width: 353px;
  }
  .hero__form {
    justify-content: center;
    padding: 4rem 2rem;
  }
  .hero__form-title {
    font-size: clamp(1.2rem, 1.76vw, 1.6875rem);
    line-height: 1.85;
  }
}

/* ---------- Form ---------- */
.lead-form {
  width: 100%;
  max-width: 412px;
  margin-top: 1.5rem;
  display: grid;
  gap: 1.4rem;
}
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text);
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-line);
}
/* The message is a single underlined line that grows with the text (up to 3 lines, see site.js). */
.field textarea {
  resize: none;
  overflow-y: hidden;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-navy);
}
.field--error input,
.field--error textarea {
  border-color: var(--color-error);
}
.field__error,
.form-alert {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--color-error);
}
.form-alert {
  margin-top: 0;
}

.field__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.field__counter {
  margin: 0.3rem 0 0 auto;
  white-space: nowrap;
  font-size: 0.75rem;
  color: rgb(58 58 58 / 0.6);
}
.field__counter.is-max {
  color: var(--color-error);
}

/* ---------- Success / error toast (bottom centre, auto-dismiss) ---------- */
.toasts {
  position: fixed;
  left: 0;
  bottom: 1.5rem;
  z-index: 9999;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-inline: 1rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  max-width: min(90vw, 600px);
  padding: 1.1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--color-text);
  background: #ecedf4; /* navy at 8% over white */
  border: 1px solid rgb(39 58 128 / 0.16);
  border-radius: 8px;
  box-shadow: 0 4px 4px rgb(58 58 58 / 0.04);
  pointer-events: auto;
}
.toast__close {
  display: none;
  flex: none;
  padding: 0;
  line-height: 0;
  color: var(--color-navy);
  background: none;
  border: 0;
  cursor: pointer;
}
.toast__close svg {
  width: 28px;
  height: 28px;
}
@media (min-width: 1280px) {
  .toast {
    max-width: min(80vw, 600px);
    font-size: 1rem;
  }
  .toast__close {
    display: block;
  }
}

.btn {
  justify-self: center;
  min-width: 6.5rem;
  padding: 0.6rem 1.6rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-navy);
  background: transparent;
  border: 1px solid var(--color-navy);
  border-radius: 3.2px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.btn:hover {
  background: var(--color-navy);
  color: #fff;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

@media (min-width: 900px) {
  .field label {
    font-size: clamp(0.9rem, 1.3vw, 1.25rem);
  }
  .field input,
  .field textarea {
    font-size: 1rem;
  }
  .lead-form {
    gap: clamp(1.4rem, 3.6vw, 3.4rem);
    margin-top: clamp(1.5rem, 3vw, 3rem);
  }
  .btn {
    min-width: 9.4rem;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }
}

/* ---------- Footer / social ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-h);
  background: var(--color-bg);
}
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Grey icon by default; on hover or keyboard focus it fades to the coloured icon of the network
   (same behaviour as the Indus.Care site). Both sit in the same grid cell, centred on each other. */
.social {
  --social-h: 20px;
}
.social a {
  display: grid;
  place-items: center;
  min-width: var(--social-h);
  height: var(--social-h);
  line-height: 0;
  color: var(--color-icon);
}
.social svg,
.social__colour {
  grid-area: 1 / 1;
  height: var(--social-h);
  width: auto;
  display: block;
  transition: opacity 0.4s;
}
.social__colour {
  opacity: 0;
  pointer-events: none;
}
.social a:hover svg,
.social a:focus-visible svg {
  opacity: 0;
}
.social a:hover .social__colour,
.social a:focus-visible .social__colour {
  opacity: 1;
}
@media (min-width: 900px) {
  .social {
    --social-h: clamp(24px, 2.3vw, 35px);
    gap: 1.9rem;
  }
}

/* ---------- Message pages (thank you, errors) ---------- */
.message {
  display: grid;
  place-items: center;
  min-height: 55vh;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--color-surface);
}
.message h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 500;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
}
.message p {
  margin-bottom: 1.75rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
