/* Sequentia Group: sqlgroup.co.uk
   Palette and type follow SQL Brand Guidelines.
   Display face: Flatline is the brand headline face but is not licensed for web use.
   Raleway (the brand body face) is used across display and body at contrasting
   weights and tracking until a Flatline webfont licence is in place. */

:root {
  --ink:       #000231;  /* Dark Blue : dominant */
  --structure: #404E6B;  /* Grey Blue : structure and hierarchy */
  --grey:      #717374;  /* Grey      : supporting copy */
  --slate:     #ADB697;  /* Slate     : the single accent */
  --light:     #D8D8D8;  /* Light Grey: rules and fills */
  --white:     #ffffff;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --rule: 1px solid var(--light);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: Raleway, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  font-variant-numeric: lining-nums tabular-nums;
}

h1, h2, h3, h4 { font-weight: 200; letter-spacing: 0.01em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.4rem, 1.2rem + 5vw, 5.25rem); letter-spacing: -0.005em; }
h2 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); font-weight: 300; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
a { color: inherit; }

/* Brand rule: section labels are set in caps. */
.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--structure);
  margin: 0 0 1.5rem;
}
.on-ink .label { color: var(--slate); }

.wrap { width: min(100%, 76rem); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(3.5rem, 8vw, 7.5rem); }
.on-ink { background: var(--ink); color: var(--white); }
.on-ink p { color: #cfd3df; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
}

/* ── Masthead ─────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 2, 49, 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.masthead .wrap { display: flex; align-items: center; gap: 2rem; min-height: 68px; }
.masthead img { height: 26px; width: auto; display: block; }
.nav { margin-left: auto; display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); align-items: center; }
.nav a {
  color: #cfd3df; text-decoration: none; font-size: 0.875rem;
  font-weight: 500; letter-spacing: 0.02em; padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--white); border-bottom-color: var(--slate); }
.nav .nav-cta { color: var(--ink); background: var(--slate); padding: 0.55rem 1.05rem; border-bottom: 0; }
.nav .nav-cta:hover { background: var(--white); }
@media (max-width: 54rem) { .nav a:not(.nav-cta) { display: none; } }

/* ── Hero ─────────────────────────────────────────────── */
.hero { position: relative; overflow: clip; padding-block: clamp(4rem, 12vw, 9rem); }
/* The thin S monogram is the brand's signature motif. */
.hero::after {
  content: ""; position: absolute; right: -8%; top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 40rem); aspect-ratio: 1;
  background: url("../assets/s-watermark.png") center / contain no-repeat;
  opacity: 0.55; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; }
.hero .standfirst {
  font-size: clamp(1.05rem, 0.95rem + 0.7vw, 1.4rem);
  font-weight: 300; color: #cfd3df; max-width: 52ch; margin-top: 1.75rem;
}

/* The sequence rule: the organising device of the page. */
.sequence { margin-top: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid rgba(255,255,255,0.22); padding-top: 1rem; }
.sequence ol { display: flex; flex-wrap: wrap; gap: 0 clamp(1.25rem, 4vw, 3.5rem); list-style: none; margin: 0; padding: 0; }
.sequence li { position: relative; padding-top: 1rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em; color: #cfd3df; }
.sequence li::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 1px; height: 0.7rem; background: var(--slate);
}
.sequence li:first-child { color: var(--white); }

.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: clamp(2rem, 4vw, 2.75rem); }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.04em; padding: 0.85rem 1.6rem; border: 1px solid transparent;
}
.btn-primary { background: var(--slate); color: var(--ink); }
.btn-primary:hover { background: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,0.45); color: var(--white); }
.btn-ghost:hover { border-color: var(--slate); color: var(--slate); }
.on-white .btn-ghost { border-color: var(--structure); color: var(--ink); }
.on-white .btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* ── Evidence ─────────────────────────────────────────── */
.evidence { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 2.5rem; }
.evidence div { padding: 1.75rem 1.5rem 1.75rem 0; border-top: 1px solid rgba(255,255,255,0.22); }
.evidence .fig { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 200; line-height: 1; display: block; }
.evidence p { font-size: 0.95rem; margin: 0.9rem 0 0; max-width: 30ch; }
.evidence cite { display: block; margin-top: 0.8rem; font-size: 0.75rem; font-style: normal; color: #8e95ad; max-width: 32ch; }

/* ── Spine: the method and anything sequential ────────── */
.spine { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.spine::before { content: ""; position: absolute; left: 0; top: 0.55rem; bottom: 0.55rem; width: 1px; background: var(--light); }
.spine > li { position: relative; padding: 0 0 2rem 2.25rem; }
.spine > li:last-child { padding-bottom: 0; }
.spine > li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 0.95rem; height: 1px; background: var(--structure);
}
.spine h3 { margin-bottom: 0.4rem; }
.spine p { margin: 0; color: var(--grey); }

/* ── Columns ──────────────────────────────────────────── */
.cols { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 3rem; }
.col { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.col h3 { margin-bottom: 0.75rem; }
.col p { color: var(--grey); font-size: 0.97rem; }
.col ul { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--grey); font-size: 0.95rem; }
.col li { margin-bottom: 0.4rem; }
.col.accent { border-top-color: var(--slate); }

.lede { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem); font-weight: 300; max-width: 46ch; color: var(--ink); }

/* ── Outcomes ─────────────────────────────────────────── */
.outcomes { width: 100%; border-collapse: collapse; margin-top: 2.5rem; font-size: 0.97rem; }
.outcomes th, .outcomes td { text-align: left; padding: 1.1rem 1rem 1.1rem 0; border-bottom: var(--rule); vertical-align: top; }
.outcomes th { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--structure); border-bottom-color: var(--structure); }
.outcomes td:last-child { color: var(--grey); }

/* ── Proof ────────────────────────────────────────────── */
.proof { border-left: 2px solid var(--slate); padding-left: clamp(1.25rem, 3vw, 2.5rem); margin-top: 2.5rem; }
.proof dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem 2rem; margin: 2rem 0 0; }
.proof dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--structure); margin-bottom: 0.4rem; }
.proof dd { margin: 0; font-size: 0.97rem; }

/* ── Engagements ──────────────────────────────────────── */
.engage { display: grid; gap: 1px; background: var(--light); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 3rem; border: 1px solid var(--light); }
.engage > div { background: var(--white); padding: clamp(1.5rem, 3vw, 2.25rem); }
.engage .term { font-size: 0.8rem; color: var(--structure); font-weight: 600; letter-spacing: 0.08em; margin-bottom: 0.9rem; }
.engage h3 { margin-bottom: 0.6rem; }
.engage p { font-size: 0.95rem; color: var(--grey); margin: 0; }

/* ── Team ─────────────────────────────────────────────── */
.team { display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2.5rem; }
.team div { border-top: var(--rule); padding-top: 1rem; }
.team .name { font-weight: 500; display: block; }
.team .role { color: var(--grey); font-size: 0.92rem; }

/* ── Booking form ─────────────────────────────────────── */
.booking { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 58rem) { .booking { grid-template-columns: 0.9fr 1.1fr; } }
form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; color: var(--structure); }
input, select, textarea {
  font: inherit; font-size: 0.97rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--light); border-radius: 0; padding: 0.75rem 0.85rem; width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--structure); }
textarea { min-height: 7rem; resize: vertical; }
.hint { font-size: 0.82rem; color: var(--grey); margin: 0; }
button[type="submit"] {
  font: inherit; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em;
  background: var(--ink); color: var(--white); border: 0; padding: 0.95rem 1.6rem;
  cursor: pointer; justify-self: start;
}
button[type="submit"]:hover { background: var(--structure); }
.form-status { margin: 0; font-size: 0.92rem; color: var(--structure); min-height: 1.4em; }
.contact-direct { border-top: 2px solid var(--ink); padding-top: 1.5rem; }
.contact-direct a { color: var(--ink); }

/* ── Footer ───────────────────────────────────────────── */
footer { background: var(--ink); color: #cfd3df; padding-block: clamp(3rem, 6vw, 4.5rem); font-size: 0.9rem; }
footer img { height: 30px; width: auto; margin-bottom: 1.75rem; }
.foot-grid { display: grid; gap: 2rem clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
footer h2 { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--slate); margin-bottom: 1rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 0.5rem; }
footer a { color: #cfd3df; text-decoration: none; border-bottom: 1px solid transparent; }
footer a:hover { color: var(--white); border-bottom-color: var(--slate); }
footer p { max-width: 38ch; }
.colophon { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.8rem; color: #8e95ad; }
.colophon p { max-width: none; margin: 0 0 0.5em; }

/* ── Policy pages ─────────────────────────────────────── */
.doc { padding-block: clamp(3rem, 7vw, 5.5rem); }
.doc .wrap { width: min(100%, 48rem); }
.doc h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); margin-bottom: 0.75rem; }
.doc .updated { color: var(--grey); font-size: 0.9rem; margin-bottom: 3rem; }
.doc h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); margin: 2.75rem 0 0.9rem; }
.doc h3 { margin: 1.75rem 0 0.5rem; }
.doc ul, .doc ol { max-width: var(--measure); color: var(--ink); padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 0.8rem 1rem 0.8rem 0; border-bottom: var(--rule); vertical-align: top; }
.doc th { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--structure); }
.back { display: inline-block; margin-bottom: 2rem; font-size: 0.85rem; color: var(--structure); text-decoration: none; border-bottom: 1px solid var(--light); }
.back:hover { border-bottom-color: var(--structure); }
.todo { background: #fbfbf7; border-left: 2px solid var(--slate); padding: 1rem 1.25rem; font-size: 0.92rem; color: var(--grey); }
.todo p { margin: 0; max-width: none; }

/* Inner page hero */
.page-hero { padding-block: clamp(3.5rem, 9vw, 6.5rem); position: relative; overflow: clip; }
.page-hero h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4rem); max-width: 20ch; }
.page-hero .standfirst { font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.3rem); font-weight: 300; color: #cfd3df; max-width: 56ch; margin-top: 1.5rem; }

/* Current page in the navigation */
.nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--slate); }

/* Text links that lead on to another page */
.more { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: 0.9rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--slate); padding-bottom: 2px; }
.more:hover { border-bottom-color: var(--ink); }
.on-ink .more { color: var(--white); }

/* LinkedIn band */
.linkedin { border-top: var(--rule); border-bottom: var(--rule); }
.linkedin .wrap { display: grid; gap: 2rem; align-items: center; grid-template-columns: minmax(0,1fr); }
@media (min-width: 52rem) { .linkedin .wrap { grid-template-columns: 1.2fr 1fr; } }
.linkedin h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
.linkedin p { color: var(--grey); margin: 0.9rem 0 0; }
.li-links { display: grid; gap: 0.75rem; }
.li-link { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); border: 1px solid var(--light); padding: 1rem 1.25rem; }
.li-link:hover { border-color: var(--ink); }
.li-link strong { font-weight: 600; display: block; }
.li-link span { color: var(--grey); font-size: 0.88rem; }
.li-link em { font-style: normal; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; color: var(--structure); white-space: nowrap; }

/* Closing call to action */
.cta-band h2 { max-width: 18ch; }
.cta-band p { margin-top: 1rem; }
footer .tagline { color: var(--white); font-weight: 300; font-size: 1.1rem; max-width: 30ch; }
