/* Five North — Ink & Coral */
:root {
  --ink: #1A1F2E;
  --paper: #FAF6F2;
  --coral: #F07F68;
  --dusk: #9098A8;
  --soft: #C3C8D3;
  --rule: #343B4F;
  --card: #242A3B;
  --shadow: #232A3C;
  --pad: clamp(24px, 8.3vw, 120px);
}

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

html { background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral); }
a:hover { color: var(--paper); }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 600;
  z-index: 10;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Navigation */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px var(--pad);
}
.site-header--home { justify-content: flex-end; padding-top: 48px; }
.site-header--page { min-height: 96px; border-bottom: 1px solid var(--rule); }

.nav { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.nav a {
  color: var(--dusk);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] { color: var(--coral); font-weight: 600; }

.logo-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--paper);
}
.logo-inline svg { width: 26px; height: auto; }
.logo-inline .divider { width: 1px; height: 24px; background: #4A5268; }
.wordmark {
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.wordmark b { font-weight: 600; }
.logo-inline .wordmark { font-size: 20px; }

/* Background chevron */
.bg-chevron {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Home hero */
.home {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3vw, 40px);
  padding: 48px var(--pad) 96px;
  text-align: center;
}
.hero-mark { width: clamp(120px, 17vw, 240px); height: auto; }
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 10vw, 144px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.hero h1 b { font-weight: 600; }
.tagline {
  margin: 0;
  padding-left: 0.5em;
  font-size: clamp(13px, 1.4vw, 20px);
  font-weight: 600;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--dusk);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 8px;
  background: var(--coral);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--paper); color: var(--ink); }
.hero .button { margin-top: 24px; }

/* Inner pages */
.page { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: clamp(56px, 6.7vw, 96px) var(--pad) clamp(72px, 7.8vw, 112px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 4.5vw, 64px);
}
.page-intro { display: flex; flex-direction: column; gap: 20px; }
.eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
}
.page h1 {
  margin: 0;
  font-size: clamp(48px, 6.7vw, 96px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.accent { color: var(--coral); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 32px 44px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--coral);
  border-radius: 12px;
}
.card .eyebrow { font-size: 14px; }
.card h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.15;
  font-weight: 600;
}
.card p { margin: 0; color: var(--soft); font-size: 19px; }
.card hr { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--rule); }
.card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusk);
}
.card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.card li {
  position: relative;
  padding-left: 30px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}
.card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 600;
}
.card .card-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.empty-state {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 40px 32px 44px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--coral);
  border-radius: 12px;
}
.empty-state h2 { margin: 0; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; font-weight: 600; }
.empty-state p { margin: 0; color: var(--soft); font-size: 19px; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 28px var(--pad);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusk);
}
@media (max-width: 640px) { .site-footer p { font-size: 11px; letter-spacing: 0.14em; } }
.home .site-footer { border-top: 0; padding-bottom: 32px; }

/* Responsive */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header--page { flex-direction: column; align-items: flex-start; padding-top: 24px; padding-bottom: 20px; }
  .site-header--home { justify-content: center; padding-top: 28px; }
  .nav { gap: 10px 14px; justify-content: center; }
  .nav a { font-size: 11.5px; letter-spacing: 0.1em; }
  .card, .empty-state { padding: 32px 24px 36px; }
  .button { width: 100%; justify-content: center; }
  .hero .button { width: auto; }
  .tagline { font-size: 12px; letter-spacing: 0.28em; padding-left: 0.28em; white-space: nowrap; }
}

/* Research articles */
.research-list .card h2 a { color: var(--paper); text-decoration: none; }
.research-list .card h2 a:hover { color: var(--coral); }
.article {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.back-link { font-size: 15px; font-weight: 600; text-decoration: none; }
.article-meta { margin: 0; font-size: 15px; color: var(--dusk); }
.page-intro .standfirst { max-width: 760px; }

.standfirst { margin: 0; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.5; color: var(--soft); }
.article-body { max-width: 760px; display: flex; flex-direction: column; gap: 20px; padding-top: 28px; border-top: 1px solid var(--rule); }
.article-body p, .article-body li { margin: 0; font-size: 19px; line-height: 1.7; color: #E4E1DC; }
.article-body h2 { margin: 24px 0 0; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; font-weight: 600; }
.article-body ul, .article-body ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 12px; }
.article-body li::marker { color: var(--coral); font-weight: 600; }
.article-body strong { color: var(--paper); font-weight: 600; }
.article-cta { margin-top: 24px; }
.cards.research-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .cards.research-list { grid-template-columns: 1fr; } }

/* Contact */
.contact-details {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
  max-width: 960px;
}
.contact-details div { padding-top: 20px; border-top: 2px solid var(--rule); }
.contact-details div:first-child { border-top-color: var(--coral); }
.contact-details dt {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusk);
}
.contact-details dd { margin: 0; }
.contact-details a {
  color: var(--paper);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}
.contact-details a:hover { color: var(--coral); }
@media (max-width: 640px) { .contact-details { grid-template-columns: 1fr; } }

/* Home: the chevron draws itself once on load */
.hero-mark polyline {
  stroke-dasharray: 101;
  stroke-dashoffset: 101;
  animation: fn-draw 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards;
}
@keyframes fn-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-mark polyline { animation: none; stroke-dashoffset: 0; }
}

/* Shared section headings */
.section-title {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section { display: flex; flex-direction: column; gap: 32px; padding-top: clamp(16px, 2.5vw, 40px); }

/* Services: challenges */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
}
.challenge {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
  border-top: 3px solid var(--rule);
}
.challenge:first-child { border-top-color: var(--coral); }
.challenge h2 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2; font-weight: 600; }
.challenge p { margin: 0; color: var(--soft); font-size: 18px; }
.challenge a { margin-top: 6px; font-size: 15px; font-weight: 600; text-decoration: none; }
.card { scroll-margin-top: 32px; }

/* About */
.experience-grid, .mini-grid, .steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.experience-grid div, .steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 20px;
  border-top: 2px solid var(--rule);
}
.experience-grid div:first-child, .steps li:first-child { border-top-color: var(--coral); }
.experience-grid strong { font-size: clamp(30px, 2.6vw, 38px); line-height: 1.1; font-weight: 600; }
.experience-grid span { color: var(--soft); font-size: 17px; line-height: 1.45; }
.mini-grid { gap: 20px; }
.mini-grid div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.mini-grid h3 { margin: 0; font-size: 20px; font-weight: 600; }
.mini-grid p { margin: 0; color: var(--soft); font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps .step-number { font-size: 14px; font-weight: 600; letter-spacing: 0.15em; color: var(--coral); }
.steps h3 { margin: 0; font-size: 24px; font-weight: 600; }
.steps p { margin: 0; color: var(--soft); font-size: 17px; }

/* About: question picker */
.picker { display: flex; flex-direction: column; gap: 24px; }
.picker-options { display: flex; flex-wrap: wrap; gap: 12px; }
.picker-option {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid #4A5268;
  border-radius: 8px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}
.picker-option:hover { border-color: var(--soft); }
.picker-option[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); background: var(--card); font-weight: 600; }
.picker-option:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.picker-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 820px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--coral);
  border-radius: 12px;
}
.picker-panel[hidden] { display: none; }
.picker-panel h3 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; font-weight: 600; }
.picker-panel p { margin: 0; color: var(--soft); font-size: 18px; }
.picker-panel .picker-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.picker-panel .picker-links a { font-size: 16px; font-weight: 600; text-decoration: none; }

@media (max-width: 960px) {
  .challenge-grid { grid-template-columns: 1fr; }
  .experience-grid, .mini-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .experience-grid, .mini-grid, .steps { grid-template-columns: 1fr; }
  .picker-option { width: 100%; text-align: left; }
  .picker-panel { padding: 24px; }
}

/* Services: one clean row per service */
.service-table { display: flex; flex-direction: column; }
.service-head, .service-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 56px;
}
.service-head { padding-bottom: 18px; }
.service-head p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusk);
}
.service-row {
  padding: 48px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 32px;
}
.service-head + .service-row { border-top: 2px solid var(--coral); }
.service-challenge .challenge-title { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: var(--paper); }
.service-challenge p { margin: 0; font-size: 16px; color: var(--dusk); }
.service-answer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.service-answer h2 { margin: 0; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; font-weight: 600; }
.service-answer p { margin: 0; font-size: 18px; color: var(--soft); }
.service-answer .eyebrow { font-size: 14px; color: var(--coral); }
.service-answer a { margin-top: 8px; font-size: 16px; font-weight: 600; text-decoration: none; }
.service-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.service-list li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.45; }
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 2px;
  background: var(--coral);
}
.cell-label { display: none; }
@media (max-width: 900px) {
  .service-head { display: none; }
  .service-row { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .service-table .service-row:first-of-type { border-top: 2px solid var(--coral); }
  .service-row .cell-label {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dusk);
  }
}

/* About: same row structure as Services */
.info-table { display: flex; flex-direction: column; }
.info-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.2fr);
  gap: 56px;
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}
.info-row:first-child { border-top: 2px solid var(--coral); }
.info-row h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; }
.info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; }
.info-list li { font-size: 17px; color: var(--soft); }
.info-list strong { color: var(--paper); font-weight: 600; }
.info-list a { color: var(--paper); font-weight: 600; text-decoration: none; margin-right: 6px; }
.info-list a:hover { color: var(--coral); }
@media (max-width: 900px) {
  .info-row { grid-template-columns: 1fr; gap: 20px; padding: 32px 0; }
  .info-list { grid-template-columns: 1fr; }
}

.info-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 760px; }
.info-text p { margin: 0; font-size: 19px; line-height: 1.6; color: var(--soft); }
.info-text a { font-size: 16px; font-weight: 600; text-decoration: none; }

/* Services: combined page extras */
.service-table + .info-table .info-row:first-child { border-top: 1px solid var(--rule); }
.closing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--rule);
}
.closing a { font-size: 16px; font-weight: 600; text-decoration: none; }

/* Get in touch: four steps in the shared card style */
.cards.step-cards { list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .cards.step-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards.step-cards { grid-template-columns: 1fr; } }
