/* Outfit (SIL Open Font Licence), self-hosted; it is also the logo typeface */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Colours come from the Insightsoft logo */
:root {
  --navy: #275587;
  --navy-deep: #173a63;
  --sky: #a9cfe3;
  --pink: #f0e3ea;
  --lavender: #e5e5f1;
  --mist: #e5eaf0;
  --mint: #e2eeec;

  --bg: #ffffff;
  --tint: #f5f7fa;
  --surface: #ffffff;
  --text: #1c2733;
  --muted: #566475;
  --line: #e2e7ee;
  --brand: var(--navy);
  --on-brand: #ffffff;

  --display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(23 58 99 / .06), 0 8px 24px rgb(23 58 99 / .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --pink: rgb(240 227 234 / .10);
    --lavender: rgb(229 229 241 / .10);
    --mist: rgb(229 234 240 / .10);
    --mint: rgb(226 238 236 / .10);
    --bg: #0f1a26;
    --tint: #132131;
    --surface: #172839;
    --text: #e6ebf1;
    --muted: #a3b1c0;
    --line: #243649;
    --brand: #9cc3e8;
    --on-brand: #0f1a26;
    --shadow: 0 8px 24px rgb(0 0 0 / .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

main { flex: 1; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; color: var(--brand); letter-spacing: -0.015em; }
h3 { font-weight: 500; letter-spacing: 0; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: 0 0 1rem; }
h3 { font-size: 1.35rem; margin: 0 0 .5rem; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
@media (prefers-color-scheme: dark) { a:hover { color: #fff; } }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: .5rem; }

.eyebrow {
  margin: 0 0 .75rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 38rem; }

/* Buttons */
.button {
  display: inline-block;
  background: var(--brand); color: var(--on-brand);
  padding: .8rem 1.5rem; border-radius: 6px; border: 2px solid var(--brand);
  text-decoration: none; font-weight: 600; line-height: 1.2;
  transition: background .15s, color .15s, border-color .15s;
}
.button:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.button-small { padding: .5rem 1rem; font-size: .95rem; }
.button-ghost { background: transparent; color: var(--brand); }
.button-ghost:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.button-light { background: #fff; border-color: #fff; color: var(--navy-deep); }
.button-light:hover { background: var(--sky); border-color: var(--sky); color: var(--navy-deep); }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: .25rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a:not(.button) { text-decoration: none; color: var(--muted); font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.button):hover { color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--sky); }
@media (max-width: 34rem) {
  .brand img { height: 36px; }
  .site-nav { gap: 1rem; width: 100%; }
  .site-nav .button { margin-left: auto; }
}

/* Pastel squares from the logo, used as decoration */
.squares, .art-squares { display: grid; gap: 10px; }
.squares i:nth-child(1), .art-squares i:nth-child(1) { background: var(--pink); }
.squares i:nth-child(2), .art-squares i:nth-child(2) { background: var(--lavender); }
.squares i:nth-child(3), .art-squares i:nth-child(3) { background: var(--mist); }
.squares i:nth-child(4), .art-squares i:nth-child(4) { background: var(--mint); }

/* Home hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.hero-art { position: relative; min-height: 22rem; }
@media (max-width: 59.99rem) { .hero-art { display: none; } }
.art-squares { position: absolute; left: 0; top: -1rem; grid-template-rows: repeat(4, 5.5rem); width: 5.5rem; }
.browser {
  position: absolute; left: 3.5rem; right: 0; top: 2.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.browser-bar { display: flex; gap: 6px; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--tint); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-body { padding: 1rem; }
.mock-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.mock-nav b { width: 2rem; height: 2rem; border-radius: 6px; background: var(--brand); margin-right: auto; opacity: .85; }
.mock-nav em, .mock-tiles em { display: block; height: .5rem; border-radius: 4px; background: var(--line); }
.mock-nav em { width: 3rem; }
.mock-banner { height: 7rem; border-radius: 8px; background: linear-gradient(120deg, var(--navy) 0%, #4c7fb3 55%, var(--sky) 100%); margin-bottom: 1rem; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.mock-tiles div { border: 1px solid var(--line); border-radius: 8px; padding: .6rem; display: grid; gap: .4rem; }
.mock-tiles strong { font-size: .75rem; color: var(--brand); font-weight: 600; }
.mock-tiles em:last-child { width: 60%; }

/* Highlights strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--tint); }
.strip-grid { display: grid; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
@media (min-width: 44rem) { .strip-grid { grid-template-columns: repeat(3, 1fr); } }
.strip p { margin: 0; color: var(--muted); font-size: .95rem; }
.strip strong { display: block; font: 400 1.3rem/1.3 var(--display); color: var(--brand); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { margin: 0; color: var(--muted); }
.icon {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.25rem;
  border-radius: 10px; background: var(--lavender); color: var(--brand);
}
.card:nth-child(2) .icon { background: var(--mint); }
.card:nth-child(3) .icon { background: var(--pink); }
.icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.work-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) { .work-grid { grid-template-columns: 1fr 1.1fr; gap: 4rem; } }
.work-grid p { color: var(--muted); }
.quote {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem; box-shadow: var(--shadow); border-top: 4px solid var(--sky);
}
.quote blockquote { margin: 0; }
.quote blockquote p { font: 300 1.3rem/1.55 var(--display); margin: .75rem 0 1.25rem; color: var(--text); }
.quote figcaption { color: var(--muted); font-size: .95rem; }
.quote figcaption strong { display: block; color: var(--text); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 44rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 2px solid var(--line); padding-top: 1.25rem; margin: 0; }
.steps li::before { content: "0" counter(step); display: block; font: 400 1.1rem var(--display); color: var(--muted); letter-spacing: .1em; margin-bottom: .5rem; }
.steps p { margin: 0; color: var(--muted); }

/* Call to action band */
.cta { background: var(--navy-deep); color: #e4ecf5; }
@media (prefers-color-scheme: dark) { .cta { background: #1d3a5c; } }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.cta h2 { color: #fff; margin-bottom: .5rem; }
.cta p { margin: 0; max-width: 34rem; }

/* Photo band */
.photo-band { padding: 0 0 clamp(3.5rem, 8vw, 6rem); }
.photo-grid { display: grid; gap: 1rem; }
@media (min-width: 44rem) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 44rem) { .photo-grid picture:nth-child(2) img { transform: translateY(1.5rem); } }

/* Inner pages */
.page-hero { position: relative; overflow: hidden; background: var(--tint); border-bottom: 1px solid var(--line); padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { max-width: 44rem; }
.page-hero .lead { margin-bottom: 0; }
.page-hero .squares { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); grid-template-columns: repeat(2, 4.5rem); grid-auto-rows: 4.5rem; }
@media (max-width: 52rem) { .page-hero .squares { display: none; } }

.page-photo { margin-top: -1.5rem; position: relative; z-index: 1; }
.page-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.page-hero:has(+ .page-photo) { padding-bottom: clamp(4rem, 8vw, 5.5rem); }

.prose { max-width: 48rem; padding-top: 3rem; padding-bottom: 5rem; margin-left: auto; margin-right: auto; }
@media (min-width: 72rem) { .prose { margin-left: max(0px, calc((100% - 72rem) / 2)); } }
.prose h2 { font-size: 1.9rem; margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--sky); }

.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.contact-card p { margin: 0; color: var(--muted); }
.contact-label { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.big-email { font: 400 clamp(1.5rem, 4.5vw, 2.2rem)/1.3 var(--display); margin: .5rem 0 1rem !important; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--tint); border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
@media (min-width: 44rem) { .footer-grid { grid-template-columns: 2fr 1fr 1.4fr; } }
.site-footer p { margin: 0 0 .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-brand { font: 500 1.35rem var(--display); color: var(--brand); }
.footer-heading { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.footer-base { border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 1.5rem; font-size: .875rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer-base p { margin: 0; }
.credits, .site-footer .credits a { color: var(--muted); }
.site-footer .credits a { text-decoration: underline; text-decoration-color: var(--line); }

/* Cookie consent banner (only rendered when Google Analytics is configured) */
.cookie-banner {
  position: fixed; z-index: 20; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 34rem; margin-left: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgb(15 26 38 / .18);
  padding: 1.25rem 1.25rem 1rem; font-size: .95rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 1rem; color: var(--muted); }
.cookie-banner strong { color: var(--text); }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie-actions .button { flex: 1 1 8rem; text-align: center; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; }
.link-button:hover { color: var(--brand); text-decoration: underline; }

.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; background: var(--tint); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
