/* =========================================================
   K1 Protection — Editorial · Restrained
   ========================================================= */

:root {
  --bg: #0c0d0e;
  --bg-2: #131415;
  --surface: #17191b;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #ece9e2;
  --text-dim: #9a9691;
  --text-mute: #85817b;
  --accent: #7fbb9b;            /* muted sage (derived from K1 green) */
  --accent-deep: #1f4a34;
  --rule: rgba(255, 255, 255, 0.08);

  --max: 1200px;
  --max-narrow: 960px;
  --gutter: clamp(22px, 4vw, 48px);

  --radius-sm: 4px;
  --radius: 6px;

  --font-display: "Fraunces", "Tiempos", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --skyline-image: url("../img/london-skyline.jpg");

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-400-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: optional;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-400-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-italic-400.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@supports (background-image: image-set(url("../img/london-skyline-1280.webp") type("image/webp"))) {
  :root {
    --skyline-image: image-set(
      url("../img/london-skyline-1280.webp") type("image/webp"),
      url("../img/london-skyline.jpg") type("image/jpeg")
    );
  }
}

@media (min-width: 900px) {
  @supports (background-image: image-set(url("../img/london-skyline-1920.webp") type("image/webp"))) {
    :root {
      --skyline-image: image-set(
        url("../img/london-skyline-1920.webp") type("image/webp"),
        url("../img/london-skyline.jpg") type("image/jpeg")
      );
    }
  }
}

@media (min-width: 1800px) {
  @supports (background-image: image-set(url("../img/london-skyline.webp") type("image/webp"))) {
    :root {
      --skyline-image: image-set(
        url("../img/london-skyline.webp") type("image/webp"),
        url("../img/london-skyline.jpg") type("image/jpeg")
      );
    }
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* =========================================================
   Typography
   ========================================================= */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.h1 {
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.h2 {
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.018em;
}
.h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(16px, 1.15vw, 18px);
  color: var(--text-dim);
  max-width: 62ch;
  line-height: 1.65;
}

/* Inline italic emphasis for display headings — replaces the gradient accent */
.accent-text {
  font-style: italic;
  font-weight: 400;
  color: var(--text);
}

/* Uppercase small label with leading rule, not a pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* =========================================================
   Layout helpers
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container.narrow { max-width: var(--max-narrow); }

main, header, footer, section { position: relative; }

section {
  padding: clamp(80px, 11vw, 140px) 0;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* =========================================================
   Navigation — editorial, thin, no glass-blur pill
   ========================================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 13, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.logo-text { display: block; line-height: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-phone {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 12px;
  transition: color 0.2s;
}
.nav-phone:hover { color: var(--text); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Buttons — flat, no shine or glow
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--text);
  transition: gap 0.25s var(--ease), opacity 0.2s;
}
.btn-link:hover { gap: 14px; opacity: 0.75; }
.btn-link svg { transition: transform 0.25s var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }

/* =========================================================
   Hero — editorial, single-column, large serif
   ========================================================= */

.hero {
  position: relative;
  min-height: 94vh;
  padding: 180px 0 96px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 13, 14, 0.55) 0%, rgba(12, 13, 14, 0.7) 60%, var(--bg) 100%),
    var(--skyline-image) center 30%/cover no-repeat;
  z-index: -1;
  filter: grayscale(0.35) contrast(1.02);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  width: 100%;
  max-width: 1000px;
}

.hero-content .eyebrow { margin-bottom: 36px; }
.hero-content h1 { margin-bottom: 28px; }
.hero-content .lead {
  margin-bottom: 44px;
  font-size: clamp(17px, 1.35vw, 20px);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  max-width: 720px;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 24px;
}
.hero-meta-item strong {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-meta-item span {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* =========================================================
   Section heads
   ========================================================= */

.section-head {
  max-width: 760px;
  margin-bottom: 72px;
}
.section-head .eyebrow { margin-bottom: 24px; }
.section-head h2 { margin-bottom: 20px; }

/* Two-column intro (title left, description right) */
.two-col-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 80px;
  align-items: end;
}
.two-col-head .eyebrow { margin-bottom: 18px; }
.two-col-head h2 { max-width: 14ch; }

/* =========================================================
   Service index — editorial list with full-width image on hover
   ========================================================= */

.services-list {
  border-top: 1px solid var(--rule);
}
.service-row {
  display: grid;
  grid-template-columns: 60px 1fr 1.2fr 140px;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  color: var(--text);
  transition: background 0.25s, padding 0.25s;
}
.service-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.service-row .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.05em;
  padding-top: 6px;
}
.service-row h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-family: var(--font-display);
  font-weight: 400;
}
.service-row p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 52ch;
}
.service-row .view {
  font-size: 13px;
  color: var(--text-dim);
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  transition: color 0.2s, gap 0.25s var(--ease);
  padding-top: 6px;
}
.service-row:hover .view { color: var(--text); gap: 14px; }

/* =========================================================
   Feature grid with imagery (secondary, for visual breaks)
   ========================================================= */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.feature-tile {
  background: var(--bg);
  padding: 36px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: background 0.3s;
}
.feature-tile:hover { background: var(--bg-2); }
.feature-tile .media {
  aspect-ratio: 5 / 3;
  overflow: hidden;
  margin: -36px -36px 0;
  border-bottom: 1px solid var(--rule);
}
.feature-tile .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18);
  transition: filter 0.5s, transform 0.8s var(--ease);
}
.feature-tile:hover .media img {
  filter: grayscale(0);
  transform: scale(1.03);
}
.feature-tile h3 {
  font-size: 22px;
}
.feature-tile p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}
.feature-tile .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   Split (about / copy + image)
   ========================================================= */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.split.reverse { grid-template-columns: 1fr 1fr; }
.split .copy h2 { margin: 16px 0 28px; }
.split .copy p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 18px;
  max-width: 56ch;
}

.split-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.1) contrast(1.02);
}

/* =========================================================
   Bullets / principles list
   ========================================================= */

.principles {
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}
.principles li {
  list-style: none;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.principles li .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}
.principles li strong {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}
.principles li span {
  color: var(--text-dim);
  font-size: 14px;
}

/* =========================================================
   Stats — editorial numerals, no gradient
   ========================================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 60px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--text);
}
.stat span {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* =========================================================
   Sectors — numbered editorial list, not icon boxes
   ========================================================= */

.sectors-list {
  border-top: 1px solid var(--rule);
}
.sector-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.4fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.sector-row .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}
.sector-row h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
}
.sector-row p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 60ch;
}

/* =========================================================
   Deep-dive service sections (services.html / sectors.html)
   ========================================================= */

.service-section {
  padding: clamp(70px, 9vw, 120px) 0;
  border-top: 1px solid var(--rule);
}
.service-section h2 { margin: 18px 0 28px; }
.service-section p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 18px;
  max-width: 60ch;
}

/* =========================================================
   CTA band — simple, full-width, no radial glow
   ========================================================= */

.cta {
  padding: clamp(70px, 9vw, 110px) clamp(30px, 6vw, 80px);
  border: 1px solid var(--rule);
  background: var(--bg-2);
  text-align: left;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.cta h2 { margin: 16px 0 18px; }
.cta p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 54ch;
}
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================================================
   Page header (inner pages)
   ========================================================= */

.page-header {
  position: relative;
  padding: 200px 0 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 13, 14, 0.65) 0%, rgba(12, 13, 14, 0.9) 100%),
    var(--skyline-image) center/cover;
  filter: grayscale(0.4) contrast(1.02);
  z-index: -1;
}
.page-header .eyebrow { margin-bottom: 32px; }
.page-header h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  margin-bottom: 24px;
  max-width: 18ch;
}
.page-header .lead {
  font-size: 18px;
  max-width: 64ch;
}

/* =========================================================
   Contact
   ========================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }

.contact-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-block h2 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  margin-bottom: 14px;
  font-weight: 500;
}
.contact-block a,
.contact-block p {
  display: block;
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
  padding: 4px 0;
  transition: color 0.2s;
}
.contact-block a:hover { color: var(--accent); }

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 0;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.2s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-mute); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--text);
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  padding: 14px 0;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 90px 0 36px;
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-col h2 {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  font-weight: 500;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-brand p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 18px 0 24px;
  max-width: 38ch;
}
.socials { display: flex; gap: 18px; }
.socials a {
  color: var(--text-dim);
  transition: color 0.2s;
}
.socials a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.footer-bottom .reg { display: flex; gap: 24px; flex-wrap: wrap; }

/* =========================================================
   Reveal (progressive, disabled for reduced motion)
   ========================================================= */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js [data-reveal].in {
  opacity: 1;
  transform: none;
}
html.js .hero [data-reveal],
html.js .page-header [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}
[data-reveal-delay="1"].in { transition-delay: 0.05s; }
[data-reveal-delay="2"].in { transition-delay: 0.1s; }
[data-reveal-delay="3"].in { transition-delay: 0.15s; }
[data-reveal-delay="4"].in { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    transition: none;
    transform: none;
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .split.reverse,
  .contact-grid,
  .two-col-head,
  .cta {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .cta-actions { justify-content: flex-start; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .sector-row { grid-template-columns: 40px 1fr; }
  .sector-row p { grid-column: 1 / -1; }
  .service-row { grid-template-columns: 40px 1fr 100px; }
  .service-row p { grid-column: 1 / -1; padding-top: 8px; }
  .nav-toggle { display: block; }
  .nav-links,
  .nav-cta { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 20px var(--gutter);
    background: rgba(12, 13, 14, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    gap: 0;
  }
  .nav-links.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open li:last-child a { border-bottom: none; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 140px; min-height: auto; }
  .page-header { padding-top: 150px; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* Focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--text); color: var(--bg); }
