/* Corthal landing page.
   Brand: logo blue #0A2A8A, Newsreader (headings), Hanken Grotesk (body).
   Direction: restrained, left-aligned, sharp corners, one blue band for the case study. */

:root {
  --blue: #0A2A8A;
  --blue-deep: #071E66;
  --ink: #12182A;
  --muted: #535B6E;
  --line: #DDE1EA;
  --paper: #FFFFFF;
  --tint: #F5F6FA;
  --on-blue: #FFFFFF;
  --on-blue-muted: #C3CCEA;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 136px);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Type */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
h2 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: clamp(32px, 5vw, 56px);
}
h3 {
  font-size: 24px;
  line-height: 1.2;
}

.label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 24px;
}

.intro {
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 clamp(40px, 6vw, 64px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.brand img { width: 148px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}
.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding-block: 8px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover { border-bottom-color: var(--blue); color: var(--blue); }
.nav-cta {
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 9px 18px;
}
.nav-cta:hover { background: var(--blue); color: var(--on-blue); }

/* Hero: Kingston photo under a brand-blue tint, white text on top.
   Placeholder photo: Kingston City Hall, Yajun Dong on Pexels (free licence, no credit required).
   Swap for our own Kingston photo or video later. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--blue);
  color: var(--on-blue);
  padding-block: clamp(96px, 15vw, 200px) clamp(88px, 13vw, 168px);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 30, 102, 0.92) 0%, rgba(10, 42, 138, 0.78) 45%, rgba(10, 42, 138, 0.45) 100%),
    url("assets/hero-kingston.jpg") center 45% / cover no-repeat;
}
.hero h1 { color: var(--on-blue); }
.hero .label { color: var(--on-blue-muted); }
.hero .lede { color: #DCE2F5; }
.hero .button { background: var(--paper); color: var(--blue); }
.hero .button:hover { background: var(--tint); }
.hero .button:focus-visible { outline-color: var(--paper); }
.lede {
  font-size: clamp(18px, 1.8vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
  margin: 28px 0 40px;
}
.button {
  display: inline-block;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 16px 30px;
  transition: background-color 0.2s ease;
}
.button:hover { background: var(--blue-deep); }

/* Sections */
section[id] { scroll-margin-top: 72px; }
.section { padding-block: var(--section); }
.section-tint { background: var(--tint); }

/* How it works: one horizontal line with the four steps along it */
.steps {
  --node: 11px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 40px;
}
.steps::before {
  content: "";
  position: absolute;
  top: calc(var(--node) / 2 + 64px);
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.steps li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.step-num {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  color: var(--blue);
  height: 48px;
}
.steps li::after {
  content: "";
  width: var(--node);
  height: var(--node);
  background: var(--blue);
  margin-block: 4px 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--paper);
}
.steps h3 { order: 2; }
.steps p {
  order: 3;
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}
.aside {
  margin: clamp(40px, 6vw, 64px) 0 0;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--ink);
}

/* Case study */
.case {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--blue);
  color: var(--on-blue);
  padding-block: clamp(80px, 10vw, 120px);
}
/* Fine diagonal lines, fading in from the left */
.case-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 25%, #000 100%);
}
.case-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px clamp(40px, 7vw, 112px);
  align-items: start;
}
.case-text { display: grid; gap: 18px; }
.case-body-2 { color: var(--on-blue-muted); font-size: 16px; }
.case h2 { color: var(--on-blue); margin-bottom: 8px; }
.label-inverse { color: var(--on-blue-muted); }
.case-sub {
  margin: 0;
  color: var(--on-blue-muted);
  font-size: 16px;
}
.case-body {
  max-width: 62ch;
  font-size: 18px;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: clamp(56px, 7vw, 80px) 0 0;
  padding: 0;
}
.stats div {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}
.stats dd {
  order: -1;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 5.6vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}
.stats dt {
  font-size: 15px;
  color: var(--on-blue-muted);
  line-height: 1.45;
}
.source {
  margin: 32px 0 0;
  font-size: 13px;
  color: var(--on-blue-muted);
}

/* Who we are */
.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
}
.person {
  border-top: 1px solid var(--ink);
  padding-top: 24px;
  min-width: 0;
}
.role {
  margin: 6px 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.person p:last-child {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

/* Two-column section: heading on the left, content on the right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 40px clamp(40px, 7vw, 112px);
  align-items: start;
}
.split-head { position: sticky; top: 112px; }
.split-head h2 { margin-bottom: 20px; }
.split-note { margin: 0; color: var(--muted); }

/* FAQ: expandable questions */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 26px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue); }
.faq-item summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.faq-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--blue);
  transition: transform 0.25s ease;
}
.faq-icon::before { left: 0; right: 0; top: 6.5px; height: 1px; }
.faq-icon::after { top: 0; bottom: 0; left: 6.5px; width: 1px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-item p {
  margin: 0 0 28px;
  max-width: 60ch;
  color: var(--muted);
}

/* Contact: closing statement */
.contact {
  padding-block: clamp(96px, 14vw, 176px);
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px clamp(40px, 7vw, 112px);
  align-items: end;
}
.contact h2 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.contact-intro {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 20px);
  color: var(--muted);
  max-width: 44ch;
}
.contact-people { display: grid; gap: 28px; }
.contact-person {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
  display: grid;
  gap: 6px;
}
.contact-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-person a {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  text-decoration: none;
  overflow-wrap: anywhere;
  justify-self: start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-person a:hover { border-bottom-color: var(--blue); }
.where { margin: 0; color: var(--muted); font-size: 15px; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #A9B0C2;
  padding-block: 48px;
  font-size: 14px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
}
.footer-row img { width: 120px; }
.footer-row p { margin: 0; }
.footer-row p:last-child { margin-left: auto; }

/* Fade-in on scroll (added by script.js; nothing is hidden without it) */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-ready .reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* Narrow screens */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .contact-grid, .case-top { grid-template-columns: minmax(0, 1fr); }
  .split-head { position: static; }
  /* Steps become a vertical line */
  .steps { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-left: 36px; }
  .steps::before { top: 6px; bottom: 6px; left: 5px; right: auto; width: 1px; height: auto; }
  .steps li::after { position: absolute; left: -36px; top: 4px; margin: 0; }
  .step-num { font-size: 32px; height: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-row { height: 64px; }
  .site-nav .nav-link:not(.nav-cta) { display: none; }
  .nav-cta { padding: 7px 14px; font-size: 14px; }
  .hero-media {
    background:
      linear-gradient(180deg, rgba(7, 30, 102, 0.88) 0%, rgba(10, 42, 138, 0.80) 100%),
      url("assets/hero-kingston-1200.jpg") center / cover no-repeat;
  }
  .brand img { width: 124px; }
  .people, .stats { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 28px; }
  .faq-item summary { font-size: 19px; padding-block: 22px; }
  .footer-row p:last-child { margin-left: 0; }
}
