/* Guild Group — shared styles for / and /contact/
   Layout, scale and colours measured from guildretirement.co.uk and guildhealthcare.co.uk (1440px desktop, 375px mobile);
   navy, gold and copy from guild-group.co.uk. */

/* Sofia Pro, the Guild family typeface: the unmodified WOFF2 files used by guildretirement.co.uk (Light and Semi-bold only,
   as on the sister sites). Self-hosted under the Group's Sofia Pro web licence; see README.md. */
@font-face {
  font-family: "Sofia Pro";
  src: url("/assets/fonts/sofiapro-light-webfont.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Pro";
  src: url("/assets/fonts/sofiapro-semibold-webfont.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Arial tuned to Sofia Pro's widths (Light 102.8%, Semi-bold 96.8% of Arial) and vertical metrics (2200/575 and 2265/579 per 2048 em),
   so the swap does not shift layout. */
@font-face {
  font-family: "Sofia Pro Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  font-weight: 300;
  size-adjust: 102.8%;
  ascent-override: 104.5%;
  descent-override: 27.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Sofia Pro Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold");
  font-weight: 600;
  size-adjust: 96.8%;
  ascent-override: 114.3%;
  descent-override: 29.2%;
  line-gap-override: 0%;
}

:root {
  /* Brand colours */
  --navy: #00293a;          /* Guild Group navy */
  --gold: #e99f03;          /* Guild Group accent */
  --gold-hover: #f5b433;
  --green: #a2d45e;         /* Guild Retirement accent */
  --green-tint: #edf6e5;
  --coral: #efa693;         /* Guild Healthcare accent */
  --coral-tint: #fcf0e9;
  --error: #b3261e;
  --error-tint: #fdeceb;
  --success: #3d6b14;
  --field-border: #6b7f89;
  --field-bg: #fff;
  --on-dark-rule: rgb(255 255 255 / 0.14);

  /* Type */
  --font: "Sofia Pro", "Sofia Pro Fallback", Arial, sans-serif;
  /* Sizes measured on guildretirement.co.uk / guildhealthcare.co.uk. Only two weights exist, as on the sister sites:
     300 (Light) and 600 (Semi-bold). */
  --fs-body: 1.0625rem;                                              /* 17px mobile, 18px from 768px */
  --lh-body: 1.3;                                                    /* 23.4px at 18px, 22.1px at 17px */
  --fs-small: 0.9375rem;
  --fs-display: clamp(3.375rem, 3.023rem + 1.5vw, 4.375rem);        /* 54 → 70px */
  --fs-display-sm: clamp(3.375rem, 3.199rem + 0.751vw, 3.875rem);   /* 54 → 62px, contact page heading */
  --fs-subhead: 2.9375rem;                                           /* 47px "Contact/find us" tier */
  --fs-h2: 2.5rem;                                                   /* 40px section titles, every width */
  --fs-h3: 2.5rem;                                                   /* 40px panel titles, every width */
  --fs-nav: 1.125rem;

  /* Layout */
  --container: 1140px;
  --gutter: clamp(24px, 6vw, 40px);
  --inset: clamp(0px, 6.7vw - 1rem, 80px);                         /* sister sites indent content 80px inside the 1140px frame */
  --space-xl: clamp(64px, 7vw, 104px);
  --space-l: clamp(44px, 5vw, 72px);
  --header-pad: 30px;                                              /* 140px mobile header, as on the sister sites */
  --logo-h: 80px;                                                  /* "Guild" word ≈ 56 × 18px, same as the sister logos */
  --hero-h: clamp(440px, 46.875vw, 700px);                         /* 675px at 1440px, as on the sister sites */
  --curve-h: min(17.9vw, 260px);                                   /* 258px curve band at 1440px */
  --radius-pill: 999px;
  --focus: var(--navy);
}

@media (min-width: 768px) {
  :root { --header-pad: 28px; --fs-body: 1.125rem; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
h1, h2, h3, p, ul, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
b, strong { font-weight: 600; }
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--navy); }

.visually-hidden {
  position: absolute !important;
  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: 16px; top: -100px; z-index: 100;
  padding: 12px 20px;
  background: var(--gold); color: var(--navy);
  font-weight: 600; text-decoration: none;
  border-radius: var(--radius-pill);
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.light { font-weight: 300; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 12px 28px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-hover); }
.btn--outline { border-color: var(--accent, var(--gold)); color: var(--navy); background: #fff; }
.btn--outline:hover { background: var(--accent, var(--gold)); }
.btn .arrow { width: 32px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Header */
.site-header {
  --focus: var(--gold);
  position: relative; z-index: 20;
  background: var(--navy); color: #fff;
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px;
  padding-block: var(--header-pad);
}
.brand { display: block; flex: none; border-radius: 4px; }
.brand img { height: var(--logo-h); width: auto; }

.nav-toggle { display: none; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: var(--fs-nav); line-height: 20px; }
.site-nav .nav-link { display: block; padding: 13px 20px; color: #fff; transition: color 0.15s; }
.site-nav .nav-link:hover, .site-nav .nav-link[aria-current="page"] { color: var(--gold); }
.site-nav .btn { min-height: 40px; padding: 9px 22px; margin-left: 12px; font-size: var(--fs-nav); }

@media (max-width: 1023px) and (min-width: 768px) {
  .site-nav .nav-link { padding-inline: 14px; }
}

/* Without JavaScript the narrow-screen menu stays visible as a wrapped row under the logo. */
@media (max-width: 767px) {
  .site-nav { flex-basis: 100%; }
  .site-nav .nav-link { padding: 10px 12px 10px 0; }
  .site-nav .btn { margin-left: 0; }

  .js .site-header__inner { flex-wrap: nowrap; }
  .js .nav-toggle {
    display: grid; place-items: center;
    width: 48px; height: 48px; margin-right: -6px;
    background: none; border: 0; border-radius: 6px;
    color: var(--gold); cursor: pointer;
  }
  .nav-toggle svg { width: 34px; height: 34px; }
  .nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: block; }

  .js .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 4px var(--gutter) 28px;
    background: var(--navy);
    border-top: 1px solid var(--on-dark-rule);
    box-shadow: 0 12px 24px rgb(0 0 0 / 0.18);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { display: block; }
  .js .site-nav .nav-link { padding: 16px 0; font-size: 1.25rem; border-bottom: 1px solid var(--on-dark-rule); }
  .js .site-nav .btn { margin-top: 24px; min-height: 48px; padding-inline: 32px; font-size: 1.125rem; }
}

/* Hero */
.hero {
  --focus: #fff;
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  min-height: var(--hero-h);
  overflow: hidden;
  background: var(--navy); color: #fff;
  text-align: center;
}
.hero__media img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 35%;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(0 41 58 / 0.32); }
.hero__curve {
  position: absolute; z-index: -1; left: -10%; bottom: -1px;
  width: 120%; max-width: none; height: var(--curve-h);
  fill: #fff; pointer-events: none;
}
.hero__content {
  width: 100%; max-width: 52rem;
  padding: clamp(40px, 5vw, 72px) var(--gutter) calc(var(--curve-h) * 0.55 + 16px);
}
.hero__title { font-size: clamp(3.75rem, 2.9rem + 3.6vw, 6rem); font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.hero__pron { margin-top: 0.18em; color: var(--gold); font-size: clamp(2rem, 1.6rem + 1.7vw, 3.125rem); line-height: 1.15; }
.hero__pron i { font-weight: 600; }
.hero__def { max-width: 20em; margin: 0.4em auto 0; font-size: clamp(1.1875rem, 1rem + 0.85vw, 1.75rem); line-height: 1.4; }
.hero__scroll {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; margin-top: clamp(24px, 3.4vw, 48px);
  border-radius: 50%;
  background: var(--gold); color: var(--navy);
}
.hero__scroll svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */
.section { padding-block: var(--space-xl) 0; }
.hero + .section { padding-top: clamp(20px, 2.1vw, 30px); }               /* sister sites: first heading ~30px under the hero */
.display { font-size: var(--fs-display); font-weight: 300; line-height: 1; letter-spacing: -0.012em; }
.display b { font-weight: 600; }
.display .line { display: block; }
.display--rule::after {
  content: ""; display: block;
  width: min(390px, 100%); height: 4px; margin-top: 19px;
  background: var(--gold);
}
.section--tight { padding-top: clamp(40px, 4vw, 58px); }           /* sister contact pages start ~60px under the header */
.display--sm { font-size: var(--fs-display-sm); }
.section-title { font-size: var(--fs-h2); font-weight: 600; line-height: 1; text-align: center; }
.prose p + p { margin-top: 1.3em; }

.split { display: grid; gap: 32px; }
/* Sister geometry at 1440px: two 570px halves; heading inset 80px (460px wide); text 30px into the right half, 350px wide */
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; column-gap: 0; }
  .split > :first-child { padding-left: var(--inset); padding-right: 30px; }
  .split__body { max-width: 380px; padding: 12px 0 0 30px; }
}

/* Offering rows: image beside a tinted panel, alternating, as on the sister sites */
/* guildretirement.co.uk rows: image 540 + gap 30 + panel 570, mirrored on the next row, so the split steps 30px; rows 30px apart */
.features { display: grid; gap: 30px; margin-top: clamp(28px, 2.4vw, 34px); }
.feature { display: grid; }
.feature--retirement { --accent: var(--green); --tint: var(--green-tint); }
.feature--healthcare { --accent: var(--coral); --tint: var(--coral-tint); }
.feature__media img { width: 100%; aspect-ratio: 540 / 470; object-fit: cover; }
.feature__panel {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px;
  padding: clamp(30px, 3.4vw, 48px) clamp(30px, 4.9vw, 70px) clamp(30px, 3.4vw, 48px) clamp(30px, 5.6vw, 80px); /* text 80px in, 420px wide */
  background: var(--tint);
}
.feature__title { font-size: var(--fs-h3); font-weight: 300; line-height: 1; }
.feature__title b { font-weight: 600; }
.feature__panel .btn { margin-top: 10px; padding-inline: 22px; }
.feature__panel .btn .arrow { width: 26px; }
.feature--retirement .feature__media img { object-position: 22% 50%; }
@media (min-width: 768px) {
  .feature { grid-template-columns: 54fr 57fr; column-gap: 30px; }
  .feature--reverse { grid-template-columns: 57fr 54fr; }
  .feature--reverse .feature__media { order: 2; }
  .feature__media img { height: 100%; }
}

/* Social */
.social { text-align: center; }
.social__title { font-size: var(--fs-h2); font-weight: 600; line-height: 1; }
.social-links { display: flex; justify-content: center; gap: 14px; margin-top: 20px; }
.social-links a {
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  transition: background-color 0.15s;
}
.social-links a:hover { background: var(--gold-hover); }
.social-links svg { width: 24px; height: 24px; fill: currentColor; }

/* Footer: the sister sites' layout. Page links on the left (current page in the accent colour), then the other Guild
   brands; on the right and right-aligned, the heart mark, contact lines and 24px social icons; the legal line centred
   beneath. On phones everything is centred, contact block first, as on the sister sites. */
.site-footer {
  --focus: var(--gold);
  margin-top: var(--space-xl);
  background: var(--navy); color: #fff;
  font-size: 1.0625rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; gap: 44px; padding-block: 30px; text-align: center; }
.footer-links, .footer-brands { line-height: 22px; }
.footer-links li > *, .footer-brands a { display: inline-block; padding-block: 1px; }
.footer-links { font-weight: 600; }
.footer-links a[aria-current="page"] { color: var(--gold); }
.footer-brands { margin-top: 22px; }
.footer-brands b { font-weight: 600; }
.footer-contact { order: -1; display: grid; justify-items: center; }
.footer-mark { display: block; border-radius: 4px; }
.footer-mark img { width: 70px; }
.footer-contact__list { margin-top: 14px; font-weight: 600; line-height: 25.5px; }
.footer-contact__list a { display: inline-flex; align-items: center; gap: 7px; }
.footer-contact__list svg { width: 14px; height: 14px; flex: none; color: var(--gold); fill: currentColor; }
.social-links--sm { gap: 9px; margin-top: 14px; }
.social-links--sm a { width: 24px; height: 24px; }
.social-links--sm svg { width: 13px; height: 13px; }
.site-footer__base p { padding-block: 30px; font-size: 0.8125rem; line-height: 1.5; text-align: center; }
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; align-items: start; padding-block: 50px 72px; text-align: left; }
  .footer-contact { order: 0; justify-items: end; text-align: right; }
  .site-footer__base p { padding-block: 14px 50px; }
}

/* Contact page */
.contact__grid { display: grid; gap: 56px; }
/* Same halves as the sister contact pages: details 230–690px, form 750–1210px at 1440px */
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; column-gap: 0; }
  .contact__info { padding-left: var(--inset); padding-right: 30px; }
  .contact__form { padding-left: 30px; padding-right: var(--inset); }
}
.contact__intro { margin-top: 38px; }
.contact__heading { margin-top: 44px; font-size: var(--fs-subhead); font-weight: 600; line-height: 1; }
.contact-list { display: grid; gap: 18px; margin-top: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 26px; height: 26px; margin-top: -1px; color: var(--gold); fill: var(--gold); }
.contact-list a { font-weight: 600; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: var(--fs-small); font-weight: 600; }
.text-link .arrow { width: 30px; height: 11px; overflow: visible; fill: none; stroke: var(--gold); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Form */
.enquiry { display: grid; gap: 22px; }
.enquiry__note { font-size: var(--fs-small); }
.field label { display: block; margin-bottom: 8px; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.field label span[aria-hidden] { color: var(--error); }
.field input, .field select, .field textarea {
  display: block; width: 100%;
  min-height: 52px; padding: 12px 16px;
  background: var(--field-bg); color: var(--navy);
  border: 1px solid var(--field-border); border-radius: 4px;
  font: inherit; font-size: 1.0625rem; line-height: 1.4;
}
.field textarea { min-height: 170px; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2300293a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 20px;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--navy);
}
/* Without JavaScript the browser's own constraint checks drive the error state; with it, aria-invalid does. */
html:not(.js) .field :user-invalid,
.field [aria-invalid="true"] { border: 2px solid var(--error); background-color: var(--error-tint); }
.field__error { display: none; margin-top: 8px; color: var(--error); font-size: var(--fs-small); font-weight: 600; }
.field__error:not(:empty) { display: flex; gap: 6px; }
.field__error:not(:empty)::before { content: "!"; display: grid; place-items: center; flex: none; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.8em; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry .btn--gold { justify-self: start; min-width: 218px; min-height: 52px; font-size: 1.0625rem; }
.enquiry[aria-busy="true"] .btn--gold { opacity: 0.75; cursor: progress; }
.form-status, .form-note { padding: 16px 20px; border-left: 5px solid; border-radius: 2px; }
.form-status:empty { display: none; }
.form-status p + p { margin-top: 8px; }
.form-status a, .form-note a { font-weight: 600; }
.form-status.is-success { background: var(--green-tint); border-color: var(--success); }
.form-status.is-error, .form-note { background: var(--error-tint); border-color: var(--error); }
.form-note { display: none; }
.form-note:target { display: block; }
.form-note--success { background: var(--green-tint); border-color: var(--success); }
