@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Work+Sans:wght@400;500;600&display=swap');

/* ==========================================================================
   Digital First — Contact form styles
   Shared by: the static HTML preview AND the Umbraco Forms "DigitalFirst" theme.
   The class names under .df-form are emitted by the theme's Form.cshtml /
   FieldType.*.cshtml views, so editing here restyles the live Umbraco form.
   ========================================================================== */

:root {
  --df-bg:           #1B1B32;
  --df-hero-top:     #353266;
  --df-hero-bottom:  #2E2A4E;
  --df-panel:        #F9F7FA;
  --df-yellow:       #FFC400;
  --df-yellow-dark:  #E6B000;
  --df-lavender:     #C7BCFF;
  --df-ink:          #26244B;   /* deep indigo text on light panel */
  --df-ink-2:        #3A3866;
  --df-muted:        #6E6C8A;   /* helper / placeholder text */
  --df-line:         #DCDAE6;   /* input underline / chip border */
  --df-line-soft:    #ECEAF2;

  --df-radius-card:  30px;
  --df-radius-pill:  999px;

  --df-font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --df-font-body: "Work Sans", "Segoe UI", system-ui, sans-serif;

  --df-pad-card:   clamp(28px, 4vw, 56px);
}

/* ---- page shell (preview only; Umbraco supplies its own page chrome) ---- */
.df-page {
  margin: 0;
  background: var(--df-bg);
  color: #fff;
  font-family: var(--df-font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---- the card (form OR confirmation share this) ---- */
.df-card {
  max-width: 840px;
  margin: clamp(20px, 3vw, 44px) auto clamp(28px, 4vw, 60px);
  border-radius: var(--df-radius-card);
  overflow: hidden;
  background: var(--df-panel);
  /* The form sits on the page's own (light) background, so the card edge is a
     subtle light-grey border + soft lift shadow (a white border would vanish on
     a light page). */
  border: 1px solid var(--df-line);
  box-shadow: 0 30px 70px -34px rgba(27, 27, 50, 0.35);
}

/* hero band at top of the card. Uses the design's exact desktop values so the
   840px contact form matches the HTML mockup 1:1; the narrow side-column case
   (≤600px card, e.g. /technology/*) steps down via the container query below. */
.df-hero {
  background: linear-gradient(150deg, var(--df-hero-top) 0%, var(--df-hero-bottom) 100%);
  padding: 52px 56px;
  position: relative;
  overflow: hidden;
}
.df-hero::after { /* faint arc texture, matches mockup */
  content: "";
  position: absolute;
  right: -120px;
  bottom: -260px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1.5px solid rgba(199, 188, 255, 0.10);
  box-shadow: 0 0 0 40px rgba(199, 188, 255, 0.04);
  pointer-events: none;
}
.df-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.df-hero__title {
  font-family: var(--df-font-head);
  font-weight: 800;
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
  max-width: 12ch;
}
.df-hero__title em { font-style: normal; color: var(--df-lavender); }
.df-stat { text-align: right; flex: none; padding-top: 6px; }
.df-stat__num {
  font-family: var(--df-font-head);
  font-weight: 800;
  font-size: 42px;
  color: var(--df-yellow);
  line-height: 1;
}
.df-stat__label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 8px;
}

/* light panel that holds the fields — design's exact desktop values (narrow
   side-column steps down via the container query below). */
.df-panel { padding: 48px 56px 50px; }

/* ---- form layout ---- */
.df-form { margin: 0; }
.df-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px clamp(28px, 4vw, 56px);
}
.df-field { display: flex; flex-direction: column; }
.df-field--full { grid-column: 1 / -1; }

.df-label {
  font-family: var(--df-font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--df-ink);
  margin-bottom: 10px;
  display: block;
}
.df-label .df-opt { color: var(--df-muted); font-weight: 500; }

.df-input,
.df-textarea {
  font-family: var(--df-font-body);
  font-size: 17px;
  color: var(--df-ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--df-line);
  padding: 8px 2px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.18s ease;
}
.df-textarea { resize: none; min-height: 30px; line-height: 1.5; }
.df-input::placeholder,
.df-textarea::placeholder { color: var(--df-muted); opacity: 0.85; }
.df-input:focus,
.df-textarea:focus { border-bottom-color: var(--df-ink); }

/* ---- chips (checkbox / radio list rendered as pills) ---- */
.df-chipset { margin-top: 6px; }
.df-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  padding: 0;
  list-style: none;
}
.df-chip { position: relative; }
.df-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.df-chip label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--df-ink-2);
  background: #fff;
  border: 1.5px solid var(--df-line);
  border-radius: var(--df-radius-pill);
  padding: 9px 18px;
  transition: all 0.15s ease;
  user-select: none;
}
.df-chip label:hover { border-color: var(--df-lavender); }
.df-chip input:checked + label {
  background: var(--df-ink);
  border-color: var(--df-ink);
  color: #fff;
}
.df-chip input:focus-visible + label { outline: 2px solid var(--df-lavender); outline-offset: 2px; }

/* ---- submit row ---- */
.df-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(14px, 2vw, 22px);
}
.df-btn {
  font-family: var(--df-font-head);
  font-weight: 600;
  font-size: 17px;
  border: none;
  border-radius: var(--df-radius-pill);
  padding: 16px 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.df-btn svg { width: 18px; height: 18px; }
.df-btn--primary { background: var(--df-yellow); color: var(--df-ink); }
.df-btn--primary:hover { background: var(--df-yellow-dark); transform: translateY(-1px); }
.df-btn--ghost {
  background: transparent;
  color: var(--df-ink);
  border: 1.5px solid var(--df-line);
}
.df-btn--ghost:hover { border-color: var(--df-ink); }

/* ---- validation ---- */
.df-input.df-invalid,
.df-textarea.df-invalid { border-bottom-color: #D64545; }
.df-error {
  color: #D64545;
  font-size: 13.5px;
  margin-top: 7px;
  display: none;
}
.df-field.df-has-error .df-error { display: block; }
.field-validation-error { color: #D64545; font-size: 13.5px; margin-top: 7px; display: block; }

/* ==========================================================================
   Confirmation ("We've got it from here.")
   ========================================================================== */
.df-confirm .df-hero__inner { align-items: center; gap: 26px; }
.df-check {
  width: 64px; height: 64px; flex: none;
  border-radius: 50%;
  background: var(--df-lavender);
  display: grid; place-items: center;
}
.df-check svg { width: 30px; height: 30px; color: var(--df-hero-bottom); }
.df-confirm__title {
  font-family: var(--df-font-head);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: #fff;
}
.df-confirm__sub { font-size: 17px; color: rgba(255,255,255,0.85); margin: 0; max-width: 52ch; line-height: 1.45; }

.df-steps__kicker {
  font-family: var(--df-font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--df-muted);
  margin: 0 0 22px;
}
.df-steps { display: flex; flex-direction: column; gap: 24px; margin: 0 0 clamp(28px, 4vw, 38px); padding: 0; list-style: none; }
.df-step { display: flex; gap: 20px; align-items: flex-start; }
.df-step__num {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: var(--df-ink);
  color: #fff;
  font-family: var(--df-font-head);
  font-weight: 700;
  font-size: 18px;
  display: grid; place-items: center;
}
.df-step__title {
  font-family: var(--df-font-head);
  font-weight: 700;
  font-size: 19px;
  color: var(--df-ink);
  margin: 4px 0 6px;
}
.df-step__body { font-size: 16.5px; color: var(--df-ink-2); line-height: 1.5; margin: 0; max-width: 60ch; }
.df-confirm__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ==========================================================================
   Umbraco Forms "default theme" bridge
   These rules map the class names Umbraco Forms emits out-of-the-box onto the
   Digital First look, so the rendered form matches even before/without the
   custom field-view overrides. The DigitalFirst theme's Form.cshtml ALSO adds
   .df-* classes; both are covered here.
   ========================================================================== */
.df-panel .umbraco-forms-form { margin: 0; }
.df-panel .umbraco-forms-page > .umbraco-forms-fieldset,
.df-panel .umbraco-forms-fieldset { border: 0; margin: 0; padding: 0; }
.df-panel .umbraco-forms-caption { display: none; } /* fieldset caption — hidden, hero carries it */

/* two-column grid from Forms' row/column structure */
.df-panel .umbraco-forms-row,
.df-panel .row-fluid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px clamp(28px, 4vw, 56px);
  margin: 0;
}
.df-panel .umbraco-forms-column { min-width: 0; }
/* full-width fields (chips / textarea) span the grid */
.df-panel .umbraco-forms-field.longanswer,
.df-panel .umbraco-forms-field.checkboxlist,
.df-panel .umbraco-forms-field.multiplechoice,
.df-panel .umbraco-forms-field.titleanddescription { grid-column: 1 / -1; }

.df-panel .umbraco-forms-field { margin-bottom: 26px; }
.df-panel .umbraco-forms-label {
  font-family: var(--df-font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--df-ink);
  margin-bottom: 10px;
  display: block;
}
.df-panel .umbraco-forms-mandatory { color: var(--df-yellow-dark); }
.df-panel .umbraco-forms-tooltip,
.df-panel .help-block { color: var(--df-muted); font-size: 14px; }

.df-panel input.text,
.df-panel input[type="text"],
.df-panel input[type="email"],
.df-panel input[type="tel"],
.df-panel input[type="number"],
.df-panel textarea {
  font-family: var(--df-font-body);
  font-size: 17px;
  color: var(--df-ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--df-line);
  border-radius: 0;
  padding: 8px 2px 12px;
  /* styles.css sets `.umbraco-forms-form input.text { height:50px; line-height:50px;
     margin:.5em 0 10px }`, which inflated every field ~34px taller than the mockup.
     Reset to the design's tight rhythm — this is the main height/whitespace reduction. */
  height: auto;
  line-height: 1.2;
  margin: 0;
  width: 100%;
  outline: none;
  box-shadow: none;
  transition: border-color 0.18s ease;
}
.df-panel textarea { resize: vertical; min-height: 30px; line-height: 1.5; margin: 0; }

/* The validation wrapper (outer span, carries .df-error) shouldn't reserve a 7px
   gap under every field when there's no error. Only the inner message keeps its
   gap when an error is actually shown. */
.df-panel .field-validation-error.df-error { margin-top: 0; }
.df-panel input.text::placeholder,
.df-panel textarea::placeholder { color: var(--df-muted); opacity: 0.85; }
.df-panel input.text:focus,
.df-panel textarea:focus { border-bottom-color: var(--df-ink); box-shadow: none; }

/* submit button */
.df-panel .umbraco-forms-navigation { display: flex; justify-content: flex-end; margin-top: clamp(14px,2vw,22px); }
.df-panel button[type="submit"],
.df-panel input[type="submit"],
.df-panel .btn.primary,
.df-panel button.primary {
  font-family: var(--df-font-head);
  font-weight: 600;
  font-size: 17px;
  border: none;
  border-radius: var(--df-radius-pill);
  padding: 16px 30px;
  cursor: pointer;
  background: var(--df-yellow);
  color: var(--df-ink);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: background 0.18s ease, transform 0.12s ease;
}
.df-panel button[type="submit"]:hover,
.df-panel .btn.primary:hover { background: var(--df-yellow-dark); transform: translateY(-1px); }

/* Forms server-side validation messages */
.df-panel .field-validation-error,
.df-panel .validation-summary-errors { color: #D64545; font-size: 13.5px; }
.df-panel input.input-validation-error,
.df-panel textarea.input-validation-error { border-bottom-color: #D64545; }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .df-panel .umbraco-forms-row,
  .df-panel .row-fluid { grid-template-columns: 1fr; }
  .df-panel .umbraco-forms-navigation { justify-content: stretch; }
  .df-panel .umbraco-forms-navigation button { width: 100%; justify-content: center; }
  .df-grid { grid-template-columns: 1fr; }
  .df-hero__inner { flex-direction: column; }
  .df-stat { text-align: left; }
  .df-actions { justify-content: stretch; }
  .df-actions .df-btn { width: 100%; justify-content: center; }
}

/* ============================================================================
   Umbraco integration deltas (appended — keep the design values above intact)
   ============================================================================ */

/* Enable container queries so the card responds to ITS OWN width, not the
   viewport — needed because the form renders both full-width (contact page)
   and in narrow side columns (e.g. /technology/* pages). */
.df-card { container-type: inline-size; }

/* The site-wide styles.css sets `.umbraco-forms-form { padding: 10px 0 }`. The theme's
   card ALSO carries that class, so the 10px of off-white card background showed as a
   strip ABOVE the purple hero — the "white gap" the design didn't have, which also made
   the hero read as a detached square block. Higher specificity (.df-card.umbraco-forms-form)
   wins over the host rule regardless of stylesheet order, so the hero sits flush to the
   rounded top on every page. */
.df-card.umbraco-forms-form { padding: 0; }

/* /technology & /services pages load masterlayout.css with
   `.form-section-form .umbraco-forms-form { background: transparent }` (0,2,0) which blanks
   our card panel (the card carries .umbraco-forms-form). Restore the panel fill so the form
   AND the confirmation card read as solid cards there too. */
.df-card.umbraco-forms-form { background: var(--df-panel) !important; }

/* Confirmation hero sits on the dark purple band; force its heading + sub white so the
   host's global h1/text colour can't make it purple-on-purple (same fix as .df-hero__title). */
.df-card .df-hero .df-confirm__title { color: #fff !important; }
.df-card .df-hero .df-confirm__sub { color: rgba(255, 255, 255, 0.86) !important; }

/* The hero title is an <h1>; force the white colour, zero margin AND the
   container-scaled size so a host page's global h1 rules (the purple-on-purple
   colour bug, and any h1 font-size/margin) can never distort it. */
.df-card .df-hero .df-hero__title {
  color: #fff !important;
  margin: 0 !important;
  font-size: 52px !important;
  line-height: 1.04 !important;
}

/* The field rows sit in .df-grid (26px row-gap). The Forms bridge also gives each
   .umbraco-forms-field a 26px margin-bottom, which DOUBLED the row spacing and made
   the card ~290px taller than the mockup. Zero it inside the grid so the only
   vertical rhythm is the grid gap — matches the HTML's spacing. */
.df-panel .df-grid > .umbraco-forms-field,
.df-panel .df-grid > .df-form-field { margin-bottom: 0; }

/* (The dark full-bleed "page stage" was removed — per the design only the FORM is
   themed; the contact page keeps its own original light background, same as the
   embedded forms on other pages.) */

/* Narrow container (side column): stack the hero (title over stat) and drop the
   field grid to one column. Sizing/padding is handled by the cqi clamps above,
   so this block only changes LAYOUT, not scale — that keeps the proportions
   continuous across widths instead of snapping at the breakpoint. */
@container (max-width: 600px) {
  .df-hero { padding: 30px 28px; }
  .df-card .df-hero .df-hero__title { font-size: 30px !important; }
  .df-stat__num { font-size: 30px; }
  .df-panel { padding: 30px 28px 34px; }
  .df-hero__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .df-stat  { text-align: left; padding-top: 0; }
  .df-grid  { grid-template-columns: 1fr; gap: 18px; }
}
/* fallback for browsers without container-query support */
@media (max-width: 600px) {
  .df-grid  { grid-template-columns: 1fr; }
  .df-hero__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .df-stat  { text-align: left; }
}

/* ----- "What are you looking to achieve?" rendered as pill chips -----
   The theme's FieldType.CheckBoxList view isn't resolved (Forms uses its DEFAULT
   field views and we restyle that markup via CSS, same as the text inputs). So
   style Forms' out-of-the-box checkbox-list markup
   `.checkboxlist > div > input[type=checkbox] + label` into the chips look. */
.df-panel .checkboxlist {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.df-panel .checkboxlist > div { position: relative; margin: 0; }
.df-panel .checkboxlist input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.df-panel .checkboxlist label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--df-font-body);
  font-size: 15px;
  color: var(--df-ink-2);
  background: #fff;
  border: 1.5px solid var(--df-line);
  border-radius: var(--df-radius-pill);
  padding: 9px 18px;
  margin: 0;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  user-select: none;
}
.df-panel .checkboxlist label:hover { border-color: var(--df-lavender); }
.df-panel .checkboxlist input[type="checkbox"]:checked + label {
  background: var(--df-ink);
  border-color: var(--df-ink);
  color: #fff;
}
.df-panel .checkboxlist input[type="checkbox"]:focus-visible + label {
  outline: 2px solid var(--df-lavender);
  outline-offset: 2px;
}

/* ----- submit confirmation -----
   On submit Forms renders a core <span class="umbraco-forms-submitmessage"> (the cleared,
   now-empty "message on submit"); the REAL design confirmation card is rendered by the
   theme's Script.cshtml submitted branch (.df-card.df-confirm). So hide the redundant core
   span to avoid an empty box above the confirmation. */
.umbraco-forms-submitmessage { display: none; }

/* the confirmation card needs vertical breathing room on the page, like the form.
   scroll-margin-top keeps the hero clear of the site header when we scroll to it on submit. */
.df-card.df-confirm { margin: clamp(20px, 3vw, 44px) auto clamp(28px, 4vw, 60px); scroll-margin-top: 90px; }

/* ============================================================================
   Contact Us page — muted df-monogram background + footer breathing room.
   Scoped to .ContactPageDiv so ONLY the Contact Us page is affected.
   ============================================================================ */
.ContactPageDiv {
  position: relative;
  overflow: hidden;                              /* clip the bleeding monograms */
  background: linear-gradient(165deg, #F6F3FC 0%, #EDE9F6 58%, #E8E3F4 100%);
  padding-bottom: clamp(64px, 8vw, 120px);       /* space after the contact details, before the footer */
}
/* Two oversized df monograms frame the centred form on a diagonal — they fill the side
   whitespace and the top-right one reads immediately (above the fold), grounded by the
   bottom-left one. Both muted (the PNG is already a faint ~14%-alpha watermark). */
.ContactPageDiv::before,
.ContactPageDiv::after {
  content: "";
  position: absolute;
  aspect-ratio: 1 / 1;
  background-image: url("/images/Custom/df-monogram.png");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}
.ContactPageDiv::before {        /* upper-right — visible above the fold */
  right: -10%;
  top: -3%;
  width: min(50vw, 620px);
  background-position: right top;
  opacity: 0.85;
}
.ContactPageDiv::after {         /* lower-left — grounds the composition */
  left: -9%;
  bottom: -6%;
  width: min(54vw, 700px);
  background-position: left bottom;
  opacity: 0.7;
}
/* keep the form + contact details above the watermarks */
.ContactPageDiv > * { position: relative; z-index: 1; }
