/* ==========================================================================
   Latchman Consulting — site styles
   Plain CSS, no framework. Edit the variables in :root to retheme.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour — taken directly from the logo */
  --navy: #14304a;
  --navy-deep: #0e1f31;
  --teal: #2a8c8a;
  --teal-dark: #216f6d;
  --teal-tint: #e6f2f1;
  --ink: #1b2a3a;
  --ink-soft: #4a5563;
  --line: #d9dde3;
  --paper: #f6f5f0;
  --white: #ffffff;

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  --text-3xl: clamp(2.5rem, 1.8rem + 3.2vw, 4.2rem);
  --leading-tight: 1.1;
  --leading-body: 1.6;

  /* Space (8px scale) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --s-8: 8rem;

  /* Radius — kept small on purpose */
  --r-sm: 3px;
  --r-md: 6px;

  --measure: 62ch;
  --wrap: 72rem;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--navy);
  margin: 0 0 var(--s-2);
  letter-spacing: -0.005em;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; }

p { margin: 0 0 var(--s-2); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--s-2); padding-left: 1.2em; max-width: var(--measure); }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }
a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
img, svg { max-width: 100%; height: auto; display: block; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s-2); top: -4rem;
  background: var(--navy); color: var(--white); padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm); z-index: 100; text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--s-3), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s-6); }
.section--tight { padding-block: var(--s-5); }
.section--paper { background: var(--paper); }
.section--navy {
  background: var(--navy) url("../images/cta-band.svg") center center / cover no-repeat;
  color: var(--white);
}
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a { color: var(--white); }
@media (min-width: 48em) {
  .section { padding-block: var(--s-7); }
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: var(--s-2);
}
.section--navy .eyebrow { color: #9fd3d1; }

.lede { font-size: var(--text-lg); color: var(--ink-soft); }
.section--navy .lede { color: #d6dde4; }

.grid { display: grid; gap: var(--s-4); }
@media (min-width: 40em) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: var(--s-5); align-items: center; }
@media (min-width: 56em) {
  .split { grid-template-columns: 1.15fr 1fr; gap: var(--s-6); }
  .split--reverse > :first-child { order: 2; }
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding-block: var(--s-2);
}
.brand { display: inline-flex; text-decoration: none; }
.brand img { width: clamp(11rem, 20vw, 15rem); height: auto; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.55rem 0.9rem; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer;
}
.nav-toggle span[aria-hidden] { display: inline-block; width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.site-nav a {
  display: block; padding: 0.75rem 0; text-decoration: none; font-weight: 700;
  color: var(--navy); border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--teal-dark); }
.site-nav a:hover { color: var(--teal-dark); }

/* Mobile: nav collapsed below header */
.site-nav { display: none; width: 100%; }
.site-nav.is-open { display: block; }
.site-header .wrap { flex-wrap: wrap; }

@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav ul { flex-direction: row; gap: var(--s-3); flex-wrap: nowrap; }
  .site-nav a { white-space: nowrap; }
  .site-nav a { border-bottom: 0; padding: 0.25rem 0; position: relative; }
  .site-nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.35rem; height: 2px; background: var(--teal);
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 0.85rem 1.5rem; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  line-height: 1.2; cursor: pointer; font: inherit; font-weight: 700;
}
.btn--primary { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn--primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--white); }
.section--navy .btn--secondary { color: var(--white); border-color: var(--white); }
.section--navy .btn--secondary:hover { background: var(--white); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--s-6) var(--s-6); }
@media (min-width: 56em) { .hero { padding-block: var(--s-7); } }
.hero h1 { max-width: 17ch; }
.hero .lede { max-width: 48ch; }
.hero-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); }

.page-hero { padding-block: var(--s-6) var(--s-5); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 20ch; }

.page-hero--split { border-bottom: 1px solid var(--line); }
.page-hero--split .split { align-items: center; }
.page-hero--split h1 { max-width: 14ch; }
.page-hero--split .figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cards.cards--3 { grid-template-columns: 1fr; }
@media (min-width: 40em) { .cards.cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .cards.cards--3 { grid-template-columns: repeat(3, 1fr); } }
.jump-card h3 { margin-bottom: 0.6rem; }
.jump-card h3 a { color: var(--navy); text-decoration: none; }
.jump-card h3 a:hover { color: var(--teal-dark); text-decoration: underline; }
.jump-card p { max-width: none; }
.service .eyebrow { margin-bottom: var(--s-1); }
.service h2 { max-width: 18ch; }
.service p { max-width: 52ch; }
@media (max-width: 39.99em) { .page-hero--split h1 { max-width: 12ch; } }

/* --------------------------------------------------------------------------
   Capability strip
   -------------------------------------------------------------------------- */
.strip { background: var(--navy); color: var(--white); padding-block: var(--s-3); }
.strip ul {
  list-style: none; margin: 0; padding: 0; max-width: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.045em; text-transform: uppercase;
}
.strip li {
  margin: 0;
  padding: 0.6rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
@media (min-width: 40em) {
  .strip ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip li { border-bottom: 0; }
}
@media (min-width: 64em) {
  .strip ul { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; }
  .strip li { padding: 0.25rem 0.75rem; white-space: normal; text-wrap: balance; }
  .strip li + li { border-left: 1px solid rgba(255,255,255,0.25); }
}

/* --------------------------------------------------------------------------
   Content blocks
   -------------------------------------------------------------------------- */
.intro p { font-size: var(--text-xl); font-family: var(--font-display); color: var(--navy); line-height: 1.35; max-width: 34ch; }

.problems { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: var(--s-2) var(--s-5); }
@media (min-width: 40em) { .problems { grid-template-columns: repeat(2, 1fr); } }
.problems li {
  margin: 0; padding: var(--s-2) 0 var(--s-2) var(--s-3);
  border-left: 3px solid var(--teal); font-size: var(--text-lg); color: var(--navy); font-weight: 700;
}

/* Lines are drawn by each card, not by an exposed container background, so a grid
   with an incomplete last row no longer shows grey blocks where cells are empty. */
/* Each card carries a full border and overlaps its neighbours by 1px, so shared
   edges collapse to a single line and empty cells draw nothing at all. */
.cards { display: grid; gap: 0; background: var(--white); }
@media (min-width: 40em) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--white); padding: var(--s-4); border: 1px solid var(--line); margin: 0 -1px -1px 0; }
.card h3 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 700; margin-bottom: var(--s-1); }
.card p { color: var(--ink-soft); font-size: var(--text-sm); }
.card a { font-weight: 700; font-size: var(--text-sm); }
.card ul { font-size: var(--text-sm); color: var(--ink-soft); margin-top: var(--s-1); }

.service { padding-block: var(--s-5); border-top: 1px solid var(--line); }
.service:first-of-type { border-top: 0; }
.service .grid { align-items: start; }
.service ul { columns: 1; column-gap: var(--s-4); list-style: none; padding: 0; max-width: none; }
@media (min-width: 48em) { .service ul { columns: 2; } }
.service li { break-inside: avoid; padding-left: 1.1em; position: relative; }
.service li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.45em; height: 0.45em; background: var(--teal); border-radius: 1px; }

.feature { border: 1px solid var(--line); background: var(--white); }
.feature-body { padding: var(--s-4); }
@media (min-width: 56em) {
  .feature { display: grid; grid-template-columns: 1fr 1fr; }
  .feature-body { padding: var(--s-5); }
}
.feature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.caption { font-size: var(--text-sm); color: var(--ink-soft); margin-top: var(--s-1); }

.figure { margin: 0; }
.figure img { width: 100%; object-fit: cover; border-radius: var(--r-md); }

.list-plain { list-style: none; padding: 0; max-width: none; }
.list-plain li { padding-left: 1.1em; position: relative; }
.list-plain li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.45em; height: 0.45em; background: var(--teal); border-radius: 1px; }

.stack > * + * { margin-top: var(--s-2); }
.toc { font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-3); max-width: 40rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; color: var(--navy); }
.field input, .field textarea {
  font: inherit; padding: 0.8rem 0.9rem; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field-hint { font-size: var(--text-sm); color: var(--ink-soft); }
.form-note { font-size: var(--text-sm); color: var(--ink-soft); }
.form-status { font-weight: 700; color: var(--teal-dark); }
.contact-aside { background: var(--paper); padding: var(--s-4); border-radius: var(--r-md); }
.contact-aside a { font-weight: 700; word-break: break-all; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #c9d2db; padding-block: var(--s-6) var(--s-4); font-size: var(--text-sm); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.footer-grid { display: grid; gap: var(--s-4); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .footer-label { font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: 0.12em; text-transform: uppercase; color: #9fd3d1; margin-bottom: var(--s-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .brand img { width: 12rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--s-5); padding-top: var(--s-3); color: #8f9baa; }
.footer-legal p { max-width: none; }

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; max-width: none; display: grid; gap: var(--s-3); counter-reset: step; }
@media (min-width: 56em) { .steps { grid-template-columns: repeat(5, 1fr); gap: var(--s-4); } }
.steps li { counter-increment: step; margin: 0; padding-top: var(--s-2); border-top: 2px solid var(--teal); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: var(--text-2xl); color: var(--teal); line-height: 1; margin-bottom: var(--s-1); }
.steps h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--s-1); }
.steps p { font-size: var(--text-sm); color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); max-width: var(--measure); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: var(--s-2) 2.2rem var(--s-2) 0; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: var(--s-2); font-size: 1.5rem; line-height: 1; color: var(--teal); font-weight: 500; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary h3 { display: inline; font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; margin: 0; }
.faq-item p { padding-bottom: var(--s-3); color: var(--ink-soft); }


/* Navy page hero — used on Services */
.page-hero--navy {
  background: var(--navy) url("../images/dots.svg") repeat;
  color: var(--white);
  border-bottom: 0;
}
.page-hero--navy h1, .page-hero--navy h2 { color: var(--white); }
.page-hero--navy .eyebrow { color: #9fd3d1; }
.page-hero--navy .lede { color: #d6dde4; }
.page-hero--navy a { color: #9fd3d1; }
.page-hero--navy .figure img { border-radius: var(--r-md); aspect-ratio: 16 / 10; }
