/* ══════════════════════════════════════════════════════════════════════════
   Boldline Strategies — holding page
   Every value below is lifted from the main site build (globals.css,
   Hero.tsx, contact/page.tsx, Navbar.tsx, Footer.tsx). Where a muted value
   had to be raised to clear WCAG AA against the video backdrop, the brand
   original is recorded in the comment beside it.
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Font ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 700;         /* 300 / 400 / 500 / 600 / 700 all instanced from this file */
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Tokens ───────────────────────────────────────────────────────────── */
:root {
  --black:  #000000;
  --white:  #FFFFFF;
  --cyan:   #4CD5F7;

  --border:       rgba(255, 255, 255, 0.07);
  --field-border: rgba(255, 255, 255, 0.12);
  --field-border-focus: rgba(255, 255, 255, 0.35);
  --field-bg:     rgba(0, 0, 0, 0.3);

  /* Muted text, raised from the brand values to clear AA over the video.
     Brand originals: support 0.45 · eyebrow 0.35 · label 0.4 · sub 0.45
     · pill 0.45 · placeholder 0.2 · footer 0.35
     --text-on-video is for muted copy sitting straight on the footage with no
     glass surface under it, where the backdrop runs brightest. */
  --text-support:     rgba(255, 255, 255, 0.75);
  --text-on-video:    rgba(255, 255, 255, 0.85);
  --text-eyebrow:     rgba(255, 255, 255, 0.55);
  --text-label:       rgba(255, 255, 255, 0.7);
  --text-sub:         rgba(255, 255, 255, 0.7);
  --text-optional:    rgba(255, 255, 255, 0.45);
  --text-placeholder: rgba(255, 255, 255, 0.55);
  --text-error:       #FFA8A8;               /* brand rgba(255,80,80,0.85) reads 2.2:1 here */
  --border-error:     rgba(255, 80, 80, 0.55);

  --edge-pad:    clamp(24px, 6.25vw, 80px);
  --hero-top:    clamp(120px, 16vh, 180px);
  /* Hero and form read as one scene: the hero is sized by its copy rather than
     the viewport, and the space between the two blocks is about a third of what
     a full-height hero plus a full section pad produced. */
  --hero-bottom: clamp(32px, 5vh, 56px);
  --contact-top: clamp(40px, 5vh, 56px);
  --contact-bottom: clamp(28px, 3.5vw, 50px);
  --section-pad: clamp(80px, 10vw, 160px);

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.12) 100%);
  --glass-shadow: 0 1px 0 rgba(255,255,255,0.25) inset,
                  0 -1px 0 rgba(255,255,255,0.06) inset,
                  0 0 80px rgba(0,0,0,0.9);
  --glass-shadow-flat: 0 1px 0 rgba(255,255,255,0.25) inset,
                       0 -1px 0 rgba(255,255,255,0.06) inset;

  --ease-glass: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slide: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-pop:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Base ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  background-color: #000000;          /* never transparent — no white flash on load */
  color: var(--white);
  overflow-x: hidden;
}

body {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
  font-weight: 400;
  background-color: #000000;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; }
[hidden] { display: none !important; }

/* ─── Film grain ───────────────────────────────────────────────────────── */
@keyframes grain {
  0%, 100% { transform: translate(0px,  0px);  }
  20%      { transform: translate(-1px, 1px);  }
  40%      { transform: translate(1px,  -1px); }
  60%      { transform: translate(-1px, 0px);  }
  80%      { transform: translate(0px,  1px);  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
}

/* ─── Focus ────────────────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
.pill__input:focus-visible + .pill__face {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ══ Loading screen ═════════════════════════════════════════════════════ */
@keyframes loader-logo {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #000000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ease-glass), visibility 0s linear 0.6s;
}

.loader__logo {
  width: clamp(150px, 26vw, 200px);
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  animation: loader-logo 0.5s ease-out both;
}

.loader__track {
  display: block;
  width: clamp(150px, 26vw, 200px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loader__line {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);          /* cyan use 1 of 2 */
}

.loader.is-filling .loader__line { width: 100%; transition: width 2s linear; }
.loader.is-done    .loader__line { width: 100%; transition: width 0.25s var(--ease-glass); }

html.is-loaded .loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ══ Fixed scene ════════════════════════════════════════════════════════ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #000000;
  background-image: url('../img/hero-poster.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

.backdrop__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-glass);
}
.backdrop__video.is-playing { opacity: 1; }

.page { position: relative; z-index: 1; }

/* ══ Masthead ═══════════════════════════════════════════════════════════ */
.masthead {
  position: absolute;
  top: clamp(28px, 4vh, 44px);
  left: var(--edge-pad);
  z-index: 3;
}

.masthead__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 8px;
}

.masthead__logo {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

/* ══ Hero ═══════════════════════════════════════════════════════════════ */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-rise-lg {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The hero is sized so the card's top edge lands about 210px inside the fold —
   heading, subheading and the first field or two — on any normal desktop
   height. The 720px cap stops a very tall display reopening a void; the hero's
   own content is the floor, so a short viewport just pushes the card down. */
.hero {
  position: relative;
  min-height: min(calc(100svh - 296px), 720px);
  padding: var(--hero-top) var(--edge-pad) var(--hero-bottom);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__copy { max-width: 900px; text-align: left; }

.hero__eyebrow,
.hero__headline,
.hero__support { opacity: 0; }

html.is-loaded .hero__eyebrow { animation: hero-rise    0.5s ease-out 0.05s both; }
html.is-loaded .hero__headline { animation: hero-rise-lg 0.6s ease-out 0.1s  both; }
html.is-loaded .hero__support  { animation: hero-rise    0.6s ease-out 0.25s both; }

.hero__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-eyebrow);
  margin-bottom: 16px;
}

/* 14em holds the headline to two lines. Measured in Manrope 400 with the
   -0.02em tracking: "established UK businesses." is 12.13em and the line only
   takes another word at 16.48em, so 14em sits clear of both. text-wrap:balance
   keeps the lines even and stops an orphan where the measure has to narrow. */
.hero__headline {
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 14em;
  text-wrap: balance;
  margin: 0 0 20px;
  color: var(--white);
  background: linear-gradient(90deg,
              rgba(255,255,255,0.3) 0%,
              rgba(255,255,255,0.55) 20%,
              #ffffff 50%,
              rgba(255,255,255,0.55) 80%,
              rgba(255,255,255,0.3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.08em;
}

.hero__support {
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-support);
  max-width: 640px;
  margin: 0;
}

/* ══ Contact ════════════════════════════════════════════════════════════ */
.contact {
  padding: var(--contact-top) var(--edge-pad) var(--contact-bottom);
}

/* Left aligned to the edge pad, the same line the hero copy starts on. */
.contact__direct {
  max-width: 720px;
  margin: 0 0 clamp(12px, 1.5vw, 20px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-on-video);
  text-align: left;
}

.contact__link {
  white-space: nowrap;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transition: text-decoration-color 0.2s ease;
}
.contact__link:hover { text-decoration-color: var(--white); }

/* ── Liquid glass card ── */
.card {
  max-width: 720px;
  margin-inline: 0;                   /* one left alignment down the whole page */
  border-radius: 16px;
  padding: clamp(20px, 2.5vw, 32px);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
}

.card__heading {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 6px;
}

.card__sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-sub);
  margin: 0 0 16px;
}

/* ── Form ── */
.form { display: flex; flex-direction: column; gap: 14px; }

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.field { border: 0; }

.field__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 5px;
  padding: 0;
}

.field__optional {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-optional);
}

.field__input {
  display: block;
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--white);
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease;
}
.field__input:focus { border-color: var(--field-border-focus); }
.field__input::placeholder { color: var(--text-placeholder); }
.field__input--area { min-height: 88px; resize: vertical; }

.field__input[aria-invalid='true'] { border-color: var(--border-error); }

.field__error {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-error);
  letter-spacing: 0.03em;
  margin: 6px 0 0;
}

/* ── Service pills ── */
@keyframes pill-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.pills__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* position: relative keeps the visually hidden radio inside its own pill, so
   focus never scrolls the page to a stray 1px box elsewhere in the document. */
.pill { position: relative; display: inline-flex; cursor: pointer; }

.pill__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.pill__face {
  display: inline-block;
  border: 1px solid var(--field-border);
  border-radius: 50px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-label);
  background: transparent;
  transition: all 0.22s ease;
}

.pill:hover .pill__face { border-color: rgba(255, 255, 255, 0.28); color: var(--white); }

.pill__input:checked + .pill__face {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.pill.is-popping .pill__face { animation: pill-pop 0.35s var(--ease-pop) both; }
.pill:active .pill__face { transform: scale(0.93); }

/* ── Submit button ── */
@keyframes btn-shimmer {
  0%   { left: -80%; opacity: 0; }
  10%  { opacity: 1; }
  60%  { left: 130%; opacity: 0.6; }
  100% { left: 130%; opacity: 0; }
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.form__foot { padding-top: 2px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border: none;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  font-family: inherit;
}

.btn__base,
.btn__glass {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  transition: opacity 0.5s var(--ease-glass);
  z-index: 0;
}

.btn__base {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 1;
}

.btn__glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow-flat);
  opacity: 0;
}

.btn__shimmer {
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0) 35%,
              rgba(255,255,255,0.12) 50%, rgba(255,255,255,0) 65%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

/* The slot clips the sliding duplicate, so its height has to contain the whole
   line box or it eats descenders. Manrope's line box is 1.366em — 19.1px at the
   label's 14px — so both the slot and the label are pinned to 20px. In px, not
   em, because em here resolved against the button's inherited font-size, which
   clamps down to 15px on narrow viewports and clipped harder there. The hover
   copy translates by 100% of its own 20px height, so the slide is unchanged. */
.btn__slot {
  position: relative;
  z-index: 1;
  height: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.btn__text {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.5s var(--ease-slide), opacity 0.3s ease;
}

.btn__text--default { color: #000000; transform: translateY(0%); opacity: 1; }
.btn__text--hover   { position: absolute; color: var(--white); transform: translateY(100%); opacity: 0;
                      transition: transform 0.5s var(--ease-slide), opacity 0.3s ease 0.05s; }

.btn:hover .btn__base,
.btn:focus-visible .btn__base  { opacity: 0; }
.btn:hover .btn__glass,
.btn:focus-visible .btn__glass { opacity: 1; }
.btn:hover .btn__shimmer,
.btn:focus-visible .btn__shimmer { animation: btn-shimmer 2.2s ease-in-out 0s infinite; }
.btn:hover .btn__text--default,
.btn:focus-visible .btn__text--default { transform: translateY(100%); opacity: 0; }
.btn:hover .btn__text--hover,
.btn:focus-visible .btn__text--hover   { transform: translateY(0%); opacity: 1; }

.btn__spinner {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  border-radius: 50%;
  opacity: 0;
  animation: btn-spin 0.65s linear infinite;
}

/* The label stays in flow while loading so the button keeps its own width and
   nothing jumps; only the spinner is swapped in over it. */
.btn.is-loading { cursor: not-allowed; }
.btn.is-loading .btn__slot { opacity: 0; }
.btn.is-loading .btn__spinner { opacity: 1; }
.btn.is-loading .btn__base { opacity: 1; background: rgba(255, 255, 255, 0.7); }
.btn.is-loading .btn__glass { opacity: 0; }

.form__failure {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-error);
  margin: 14px 0 0;
  max-width: 420px;
}

/* ── Success state ── */
@keyframes success-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-block: clamp(16px, 3vw, 32px);
  animation: success-in 0.5s ease-out both;
}

.success__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(76, 213, 247, 0.06);       /* cyan use 2 of 2 */
  border: 1px solid rgba(76, 213, 247, 0.2);
  margin-bottom: 4px;
}

.success__heading {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--white);
  margin: 0;
}

.success__body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-support);
  margin: 0;
}

/* ══ Footer ═════════════════════════════════════════════════════════════ */
.footer {
  border-top: 0.5px solid var(--border);
  padding: clamp(32px, 4vw, 48px) var(--edge-pad);
  text-align: left;                   /* one left alignment down the whole page */
}

.footer__copy {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-on-video);
  margin: 0;
}

/* ══ Mobile ═════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .masthead__logo { height: 36px; }

  .hero { padding-top: clamp(104px, 14vh, 140px); }

  .hero__headline {
    font-size: clamp(26px, 7.5vw, 34px);
    line-height: 1.25;
    padding-bottom: 0.15em;
  }

  .hero__support { font-size: 15px; }

  /* iOS zooms the viewport when a focused field is under 16px. The desktop
     spec stays at the brand's 14px; this only applies below 768px, where the
     field is full width and the larger text is not visible as a design change. */
  .field__input { font-size: 16px; }

  .btn,
  .btn.is-loading { width: 100%; }
}

/* ══ Reduced motion ═════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }

  .backdrop__video { display: none; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══ Forced colours ═════════════════════════════════════════════════════ */
@media (forced-colors: active) {
  .hero__headline { -webkit-text-fill-color: CanvasText; background: none; }
  .btn { border: 1px solid ButtonText; }
}
