/* WhiteXpence front page. Colours are the app's theme (theme/theme.ts);
   type, buttons and layout rhythm follow whitegate.co.uk so the two sites
   read as a pair. */

/* Fonts are served from this site, not Google, so visitors' details aren't
   sent to a third party. Latin subset only; licences in /fonts/OFL-*.txt. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/poppins-300.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/open-sans-600.woff2) format("woff2"); }

:root {
  --navy: #0F2F72;
  --blue: #1B52C8;
  --ink: #27272A;
  --tint: #F2F5FB;
  --slate: #A0ACC7;
  --secondary: #5B6785;
  --border: #E2E8F4;
  --white: #FFFFFF;
  --danger: #dc2626;

  --radius: 20px;
  --wrap: 1100px;
  --gutter: 24px;
  --shadow: 0 10px 30px rgba(15, 47, 114, 0.08);

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-btn: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 800px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: var(--white); padding: 8px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-btn);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  padding: 18px 34px;
  border: 2px solid var(--blue);
  border-radius: 30px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn--small { padding: 11px 20px; font-size: 13px; }
.btn--light { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--tint); border-color: var(--tint); }
.btn--outline { background: transparent; border-color: rgba(255,255,255,.8); color: var(--white); }
.btn--outline:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn[disabled] { opacity: .6; cursor: progress; }

.actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.actions--stack { flex-direction: column; align-items: center; }
.actions--stack .btn { min-width: 240px; text-align: center; }

/* ---------- Wordmark ---------- */

.brand { text-decoration: none; }
.brand__name {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  font-size: 24px;
  line-height: 1;
}
.brand--large .brand__name { font-size: 40px; }
.brand__logo { display: block; width: auto; height: 32px; }
.brand--large .brand__logo { height: 52px; }

.by {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--secondary);
  font-size: 13px; font-weight: 400;
}
.by img { width: 92px; height: auto; display: block; }

/* ---------- Headers ---------- */

.topbar {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px var(--gutter) 8px;
  gap: 6px;
}
.topbar .nav { margin-top: 28px; }
/* Sign in sits in the top right, level with the logo, lined up with the
   page's content edge. */
.topbar { position: relative; }
.topbar__signin {
  position: absolute; top: 42px;
  right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 400; font-size: 16px;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:not(.btn):hover, .nav a.is-current { color: var(--blue); }
.nav a.is-current { border-bottom-color: var(--blue); }

.stickybar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 16px rgba(15,47,114,.08);
  transform: translateY(-110%);
  transition: transform .25s ease;
}
.stickybar.is-shown { transform: none; }
.stickybar__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.menu-btn { display: none; }

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 44px 0 104px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 700; letter-spacing: -1px; color: var(--ink); }
.hero__sub {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; line-height: 1.45;
  max-width: 760px; margin: 28px auto 0; color: var(--ink);
}
.hero__text { max-width: 640px; margin: 20px auto 0; color: var(--secondary); font-size: 17px; }

/* ---------- Bands & titles ---------- */

.band { padding: 96px 0; }
.band--tint { background: var(--tint); }

.title { text-align: center; font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; }
.title::after {
  content: ""; display: block; width: 80px; height: 3px;
  background: var(--navy); margin: 18px auto 0;
}
.title--left { text-align: left; }
.title--left::after { margin-left: 0; }

.intro { text-align: center; max-width: 620px; margin: 22px auto 0; color: var(--secondary); font-size: 17px; }

/* ---------- Text + image split ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split__text h2 { margin-bottom: 32px; }
.lead-out { font-weight: 500; color: var(--navy); }

.split__media { position: relative; min-height: 520px; }

/* The phone mock-up */
.phone {
  margin: 0; width: 270px; position: absolute; left: 4%; top: 0;
  background: #1c2333; border-radius: 38px; padding: 11px;
  box-shadow: 0 30px 60px rgba(15,47,114,.22);
}
.phone__screen { background: var(--white); border-radius: 28px; overflow: hidden; font-size: 12px; line-height: 1.4; }
.app-bar {
  background: var(--navy); color: var(--white); font-weight: 600; font-size: 14px;
  padding: 26px 16px 14px; display: flex; gap: 10px; align-items: center;
}
.app-bar__back { font-size: 22px; line-height: 0.6; }
.app-body { padding: 14px; display: grid; gap: 9px; }
.receipt-thumb {
  display: flex; align-items: center; gap: 10px;
  background: var(--tint); border-radius: 12px; padding: 10px;
  color: var(--secondary); font-weight: 500;
}
.field { border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; display: grid; }
.field label { font-size: 10px; color: var(--secondary); font-weight: 500; }
.field span { color: var(--ink); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-btn {
  background: var(--blue); color: var(--white); text-align: center; border-radius: 999px;
  padding: 10px; font-weight: 600; margin-top: 4px;
}

/* The approver card beside it */
.card-stack { margin: 0; position: absolute; right: 0; bottom: 8px; width: 300px; }
.mini-card {
  background: var(--white); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(15,47,114,.16); font-size: 13px; line-height: 1.5;
}
.mini-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mini-card__head strong { color: var(--navy); }
.pill { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.pill--blue { background: #E4ECFB; color: var(--blue); }
.mini-card__line { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--border); }
.mini-card__total { display: flex; justify-content: space-between; padding: 8px 0 0; border-top: 1px solid var(--border); font-weight: 500; }
.mini-card__actions { display: flex; gap: 8px; margin-top: 14px; }
.mini-btn {
  background: var(--blue); color: var(--white); border-radius: 999px; padding: 6px 14px;
  font-weight: 600; font-size: 12px;
}
.mini-btn--ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }

/* ---------- Cards ---------- */

.cards { display: grid; gap: 28px; margin-top: 56px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--why { grid-template-columns: repeat(2, 1fr); }

.module { text-align: center; }
.module__art {
  background: var(--tint); border-radius: var(--radius);
  height: 170px; display: grid; place-items: center; margin-bottom: 22px;
}
.module__art svg { width: 84px; height: 84px; }
.module h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.module p { font-size: 15px; color: var(--secondary); }

/* Icon tile on the left, title and text beside it. */
.why {
  background: var(--white); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
  display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; align-content: start;
}
.why__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--tint);
  display: grid; place-items: center; grid-row: span 2;
}
.why__icon svg {
  width: 26px; height: 26px; fill: none; stroke: var(--blue);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.why h3 { font-size: 18px; font-weight: 600; margin: 2px 0 8px; }
.why p { font-size: 15px; margin: 0; color: var(--secondary); }

/* ---------- FAQ ---------- */

.faq { margin-top: 48px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 48px 22px 4px; font-weight: 500; font-size: 18px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 11px; height: 11px; margin-top: -8px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--blue); }
.faq details p { padding: 0 48px 22px 4px; margin: 0; color: var(--secondary); }

/* ---------- Closing band ---------- */

/* No stock photo yet: a navy ground with the Whitegate slant as texture. */
.closing {
  position: relative; overflow: hidden; text-align: center; color: var(--white);
  padding: 112px 0;
  background:
    linear-gradient(115deg, rgba(27,82,200,.0) 0 55%, rgba(27,82,200,.35) 55% 70%, rgba(27,82,200,.15) 70%),
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.08), transparent 45%),
    var(--navy);
}
.closing h2 { color: var(--white); font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
.closing p { max-width: 600px; margin: 20px auto 0; font-size: 17px; opacity: .9; }

/* ---------- Contact form ---------- */

.contact { margin-top: 44px; display: grid; gap: 20px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.input em { font-style: normal; font-weight: 300; color: var(--secondary); }
.input input, .input textarea {
  font: inherit; font-weight: 300; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px;
  background: var(--white); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.input textarea { resize: vertical; min-height: 150px; }
.input input:focus, .input textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,82,200,.15);
}
.input [aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
.form-note { margin: 0; font-size: 14px; color: var(--secondary); }
.form-msg { margin: 0; min-height: 0; font-weight: 400; }
.form-msg.is-error { color: var(--danger); }
.contact .btn { justify-self: start; }

.sent { margin-top: 44px; text-align: center; background: var(--tint); border-radius: var(--radius); padding: 40px 24px; }
.sent__tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--blue);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.sent__tick svg { width: 28px; height: 28px; fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sent p { margin: 0; font-size: 18px; font-weight: 400; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--border); padding-top: 64px; }
.footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__brand .brand__logo { height: 36px; }
.footer__brand p { color: var(--secondary); margin: 14px 0 14px; }
.footer h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.footer nav { display: grid; gap: 8px; align-content: start; }
.footer nav a { color: var(--blue); text-decoration: none; font-weight: 400; }
.footer nav a:hover { text-decoration: underline; }
.footer__bar { border-top: 1px solid var(--border); padding: 18px 0; font-size: 14px; color: var(--secondary); }

/* ---------- Smaller screens ---------- */

@media (max-width: 1000px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split__media { max-width: 560px; width: 100%; margin: 0 auto; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 72px; }

  /* Phones: the compact bar is always there, with a menu. */
  .topbar { display: none; }
  .stickybar { transform: none; }
  body { padding-top: 64px; }
  .stickybar__inner { padding: 12px var(--gutter); flex-wrap: wrap; }

  .menu-btn {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; border-radius: 10px;
  }
  .menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
    content: ""; display: block; width: 22px; height: 2px; background: var(--navy);
    border-radius: 2px; position: relative; transition: transform .2s, background-color .2s;
  }
  .menu-btn__bars::before { position: absolute; top: -7px; }
  .menu-btn__bars::after { position: absolute; top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav--sticky {
    display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 12px;
  }
  .nav--sticky.is-open { display: flex; }
  .nav--sticky a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav--sticky a.is-current { border-bottom-color: var(--border); }
  .nav--sticky .btn { margin-top: 14px; text-align: center; }

  .hero { padding: 36px 0 64px; }
  .band { padding: 72px 0; }
  .closing { padding: 80px 0; }

  .cards--4, .cards--why { grid-template-columns: 1fr; }
  .cards { margin-top: 40px; }
  .module__art { height: 130px; }
  .module__art svg { width: 68px; height: 68px; }
  .why { padding: 24px 20px; column-gap: 16px; grid-template-columns: 44px 1fr; }
  .why__icon { width: 44px; height: 44px; }

  .split__media { min-height: 0; display: grid; justify-items: center; gap: 0; }
  .phone { position: relative; left: auto; top: auto; width: 250px; }
  .card-stack { position: relative; right: auto; bottom: auto; width: 100%; max-width: 320px; margin-top: -60px; }

  .actions .btn { width: 100%; max-width: 320px; text-align: center; }
  .contact__row { grid-template-columns: 1fr; }
  .contact .btn { justify-self: stretch; text-align: center; }

  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
