/* =====================================================================
   Tech Plots
   Layout concept: a quiet, typographic page on a neutral ground. Large
   serif headlines, generous whitespace and hairline rules.
   Color: oxblood (warm accent) and slate (cool structure) set at the same
   lightness so they weigh equally; every neutral is mixed from both hues.
   Roughly 60% neutral ground, 30% slate structure and sector blocks,
   10% oxblood accent. Single light look by design.
   ===================================================================== */
:root {
  color-scheme: light;
  /* Color */
  --paper: #f3f2f2;          /* neutral ground, mixed from both hues */
  --white: #ffffff;
  --surface: #fbfbfb;        /* cards and form fields */
  --ink: #1c1c21;
  --ink-2: #474550;
  --ink-3: #6a6772;
  --charcoal: #1e262e;       /* footer: deepest slate */
  --accent: #722535;         /* oxblood: warm accent, public sector */
  --accent-2: #8a3142;
  --accent-soft: #f3e4e7;
  --accent-light: #e7b9c1;
  --brand: #722535;          /* logo mark: always oxblood, on every page */
  --slate: #2f4a63;          /* slate: cool structure, private sector (blue-slate, same lightness as oxblood) */
  --slate-2: #3d5c78;
  --slate-soft: #e3eaf1;
  --slate-light: #b9c8d7;
  --band: #e5e8eb;           /* testimonials band: lightest slate */
  --page-accent: var(--accent);
  --page-accent-2: var(--accent-2);
  --on-dark: #f3f2f2;
  --on-dark-2: #a9b2bb;
  --line: rgba(28, 28, 33, 0.12);
  --line-2: rgba(28, 28, 33, 0.22);
  --line-dark: rgba(255, 255, 255, 0.13);
  /* Type */
  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 1px rgba(28, 28, 33, 0.04), 0 28px 56px -30px rgba(28, 28, 33, 0.34);
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 72px); }
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Faint contour texture, fixed behind the page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("contours.svg") center / cover no-repeat, var(--paper);
}

::selection { background: var(--accent); color: var(--white); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.04;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
p { text-wrap: pretty; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 12px 18px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

/* Reading progress (scroll-driven where supported) */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    position: fixed; inset: 0 0 auto; height: 2px; z-index: 70;
    background: var(--accent);
    transform-origin: 0 50%;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ============================ Header ============================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header.scrolled {
  background-color: rgba(243, 242, 242, 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--line);
}
html.menu-open .site-header {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background-color: transparent; border-bottom-color: transparent;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; color: var(--accent); }
.brand svg .mark-needle { transform-box: view-box; transform-origin: 17px 17px; }
.brand:hover svg .mark-needle { animation: needle-settle 1.1s var(--ease) both; }
@keyframes needle-settle {
  0% { transform: rotate(0); }
  30% { transform: rotate(-16deg); }
  60% { transform: rotate(8deg); }
  82% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}
.brand-name { font: 500 25px/1 var(--display); letter-spacing: -0.015em; }

.nav-toggle {
  display: none;
  position: relative; z-index: 2;
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; width: 20px; height: 1.5px;
  background: var(--ink); transform: translateX(-50%);
  transition: transform 0.35s var(--ease);
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translate(-50%, 6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translate(-50%, -6px) rotate(-45deg); }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-nav > ul > li { position: relative; display: flex; align-items: center; }
.main-nav > ul > li + li::before { content: ""; width: 1px; height: 14px; background: var(--line-2); }
.nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font: 500 15.5px/1 var(--body);
  letter-spacing: 0.005em;
  color: var(--ink-2);
  text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: color 0.25s;
}
.nav-link::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 3px; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"], .nav-link.is-current, .has-dropdown:hover > .nav-link { color: var(--ink); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after, .nav-link.is-current::after,
.has-dropdown:hover > .nav-link::after { transform: scaleX(1); }
.nav-link svg { width: 9px; height: 9px; transition: transform 0.3s var(--ease); }

.dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%;
  min-width: 220px; margin: 0; padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* hover bridge */
.dropdown a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 14px;
  font: 500 15.5px/1.2 var(--body);
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.2s, color 0.2s;
}
.dropdown a::after {
  content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-4px, 4px); opacity: 0; transition: opacity 0.2s, transform 0.25s var(--ease);
}
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.dropdown a:hover::after, .dropdown a[aria-current="page"]::after { opacity: 1; transform: rotate(45deg); }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown, .has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.has-dropdown:hover .nav-link svg, .has-dropdown.open .nav-link svg { transform: rotate(180deg); }

/* ============================ Buttons ============================ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px;
  font: 600 15.5px/1 var(--body);
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

main { flex: 1; display: flex; flex-direction: column; }

/* ============================ Home hero ============================ */
.hero { padding-block: calc(var(--header-h) + clamp(88px, 14vh, 170px)) clamp(80px, 11vh, 130px); }
.hero h1 {
  max-width: 13em;
  font-size: clamp(48px, 7.8vw, 118px);
  font-weight: 350;
  line-height: 0.98;
  letter-spacing: -0.034em;
  animation: rise 1s var(--ease) 0.1s both;
}
.hero h1 em { font-style: italic; font-weight: 300; color: var(--accent); }
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 32px 64px;
  margin-top: clamp(44px, 6vw, 80px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line-2);
  animation: rise 1s var(--ease) 0.3s both;
}
.hero .lead {
  flex: 1 1 26em; min-width: 0;
  max-width: 34em;
  margin: 0;
  font-size: clamp(19px, 1.65vw, 23px);
  line-height: 1.55;
  color: var(--ink-2);
}

/* ============================ Sectors ============================ */
.sectors { padding-block: clamp(20px, 3vw, 40px) clamp(90px, 11vw, 160px); }
.sector-list { display: grid; gap: clamp(18px, 2vw, 28px); }
.sector-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(30px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s, transform 0.5s var(--ease);
}
.sector-card > div:first-of-type { min-width: 0; }
.sector-card::before { /* soft light that follows the pointer */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px circle at var(--mx, 75%) var(--my, 50%), rgba(43, 93, 79, 0.07), transparent 62%);
  opacity: 0; transition: opacity 0.5s;
}
.sector-card::after { /* rule draws across the top */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.sector-card:hover, .sector-card:focus-within {
  background-color: var(--white);
  border-color: rgba(19, 21, 24, 0.05);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.sector-card:hover::before, .sector-card:focus-within::before { opacity: 1; }
.sector-card:hover::after, .sector-card:focus-within::after { transform: scaleX(1); }

.sector-card h2 { font-size: clamp(36px, 4.4vw, 60px); }
.sector-card p { max-width: 60ch; margin: clamp(18px, 2vw, 26px) 0 clamp(28px, 3vw, 38px); color: var(--ink-2); font-size: clamp(17px, 1.3vw, 18.5px); }
.sector-card .stretched-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.sector-card .stretched-link:focus-visible { outline-offset: -6px; }
.sector-card .btn { z-index: 2; }

.learn-more {
  display: flex; align-items: center; gap: 20px;
  font: 600 16px/1 var(--body);
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
  pointer-events: none;
}
.learn-more .arrow {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--white);
}
.learn-more svg { width: 24px; height: 24px; transition: transform 0.5s var(--ease); }
.sector-card:hover .learn-more, .sector-card:focus-within .learn-more { opacity: 1; transform: none; }
.sector-card:hover .learn-more svg { transform: translateX(3px); }

/* ============================ Testimonials ============================ */
.testimonials { background: transparent; color: var(--ink); padding-block: clamp(90px, 11vw, 150px); }
.section-title { font-size: clamp(40px, 5vw, 68px); font-weight: 350; color: var(--ink); margin-bottom: clamp(36px, 4.5vw, 64px); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.testimonial {
  margin: 0;
  display: flex; flex-direction: column; gap: 28px;
  padding: clamp(28px, 3vw, 40px);
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: border-color 0.4s, transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.testimonial:hover { border-color: rgba(114, 37, 53, 0.25); box-shadow: var(--shadow); transform: translateY(-4px); }
.testimonial .quote { width: 30px; height: 23px; color: var(--accent); }
.testimonial blockquote { margin: 0; flex: 1; font: italic 300 clamp(21px, 1.8vw, 25px)/1.45 var(--display); color: var(--ink); }
.testimonial figcaption { padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.testimonial figcaption strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* ============================ Interior openers ============================ */
.page-head { padding-block: calc(var(--header-h) + clamp(72px, 12vh, 140px)) clamp(48px, 7vh, 80px); }
.page-head h1, .contact h1 {
  font-size: clamp(58px, 9.5vw, 140px);
  font-weight: 350;
  line-height: 0.94;
  letter-spacing: -0.04em;
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line-2);
  animation: rise 1s var(--ease) 0.1s both;
}

/* Sticky section index (sector pages) */
.subnav {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 40;
  background: rgba(243, 242, 242, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.subnav-track { position: relative; display: flex; gap: clamp(24px, 4vw, 52px); overflow-x: auto; scrollbar-width: none; }
.subnav-track::-webkit-scrollbar { display: none; }
.subnav a {
  position: relative; flex: none;
  padding: 22px 0 20px;
  font: 600 15px/1 var(--body);
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.25s;
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--page-accent); }

/* Service groups */
.services { padding-block: clamp(10px, 2vw, 24px) clamp(80px, 9vw, 130px); }
.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 7vw, 110px);
  padding-block: clamp(60px, 8vw, 110px);
  border-bottom: 1px solid var(--line);
}
.service:last-child { border-bottom: 0; }
.service h2 {
  position: sticky; top: calc(var(--header-h) + 120px);
  align-self: start;
  font-size: clamp(38px, 4.4vw, 62px);
}
.service ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.service li {
  position: relative;
  padding: 28px 24px 28px 64px;
  border-bottom: 1px solid var(--line-2);
  font-size: clamp(18px, 1.45vw, 20.5px);
  line-height: 1.55;
  transition: background-color 0.35s var(--ease);
}
.service li::before {
  content: ""; position: absolute; left: 22px; top: calc(28px + 0.78em); width: 20px; height: 1.5px;
  background: color-mix(in srgb, var(--page-accent) 45%, transparent);
  transform-origin: left;
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.service li:hover { background: rgba(255, 255, 255, 0.75); }
.service li:hover::before { background: var(--page-accent); transform: scaleX(1.5); }

/* ============================ Team ============================ */
.team { padding-block: clamp(56px, 7vw, 100px) clamp(90px, 11vw, 150px); }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 96px); }
.member { min-width: 0; }
.portrait { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #e6e6e3; max-width: 100%; border-radius: 2px; }
.portrait img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.4s var(--ease);
}
.member:hover .portrait img { transform: scale(1.04); }
.member h2 { margin-top: clamp(28px, 3vw, 40px); font-size: clamp(30px, 3vw, 44px); }
.member h2 .role { font-style: italic; font-weight: 300; color: var(--accent); }
.member p { margin: 16px 0 0; color: var(--ink-2); max-width: 36em; }
.team-cta { display: flex; justify-content: center; padding-top: clamp(64px, 8vw, 110px); }

/* ============================ Contact ============================ */
.contact { flex: 1; padding-block: calc(var(--header-h) + clamp(72px, 12vh, 140px)) clamp(110px, 16vh, 190px); }

/* ============================ Footer ============================ */
.site-footer { background: var(--charcoal); color: var(--on-dark-2); font-size: 15px; }
.site-footer .brand { color: var(--on-dark); }
.site-footer .brand svg { color: var(--on-dark); }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 28px 40px; padding-block: 56px 40px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 34px; }
.footer-links a, .footer-contact a { color: var(--on-dark-2); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--on-dark); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 32px;
  padding-block: 24px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
}
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ============================ Responsive ============================ */
@media (hover: none) { .learn-more { opacity: 1; transform: none; } }
@media (max-width: 1024px) {
  .service { grid-template-columns: 1fr; gap: 28px; }
  .service h2 { position: static; }
  .testimonial-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .brand svg { width: 30px; height: 30px; }
  .brand-name { font-size: 23px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0; z-index: 1;
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px) max(var(--gutter), env(safe-area-inset-right, 0px)) 40px max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--paper);
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .main-nav.open { opacity: 1; visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav > ul > li { flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--line); }
  .main-nav > ul > li + li::before { display: none; }
  .main-nav.open > ul > li { animation: rise 0.55s var(--ease) both; }
  .main-nav.open > ul > li:nth-child(2) { animation-delay: 0.05s; }
  .main-nav.open > ul > li:nth-child(3) { animation-delay: 0.1s; }
  .main-nav.open > ul > li:nth-child(4) { animation-delay: 0.15s; }
  .nav-link { justify-content: space-between; width: 100%; padding: 22px 0; font: 400 34px/1 var(--display); color: var(--ink); }
  .nav-link::after { display: none; }
  .nav-link svg { width: 14px; height: 14px; }
  .dropdown {
    position: static; display: none;
    min-width: 0; padding: 0 0 18px; margin: 0;
    background: none; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .dropdown::before { display: none; }
  .has-dropdown:hover .dropdown { transform: none; }
  .has-dropdown.open .dropdown { display: block; transform: none; }
  .dropdown a { padding: 14px 0 14px 18px; font-size: 18px; border-left: 1px solid var(--line-2); border-radius: 0; }
  .dropdown a:hover { background: none; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .sector-card { grid-template-columns: 1fr; }
  .learn-more { opacity: 1; transform: none; font-size: 15px; }
  .learn-more .arrow { width: 50px; height: 50px; }
  .learn-more svg { width: 20px; height: 20px; }
  .service li { padding: 24px 12px 24px 48px; }
  .service li::before { left: 12px; top: calc(24px + 0.78em); width: 18px; }
  .team-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 440px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .progress { display: none; }
}
.brand { --logo-cut: var(--paper); }
.site-footer .brand { --logo-cut: var(--charcoal); }

/* Sector page call to action */
.sector-cta { display: flex; justify-content: center; padding-top: clamp(56px, 7vw, 96px); border-top: 1px solid var(--line); }

/* ---------- Accent buttons ---------- */
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-2); }

/* Home: call to action closing the testimonials band */
.home-cta { display: flex; justify-content: center; margin-top: clamp(56px, 7vw, 96px); }

/* Sector pages: title with intro line */
.page-title { display: grid; gap: clamp(16px, 2vw, 24px); }
.page-title h1 { border-bottom: 0; padding-bottom: 0; }
.page-lead {
  margin: 0;
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line-2);
  max-width: none;
  text-wrap: balance;
  font: italic 300 clamp(22px, 2.4vw, 32px)/1.35 var(--display);
  color: var(--page-accent);
  animation: rise 1s var(--ease) 0.25s both;
}

/* Section index: one indicator that slides to the section in view */
.subnav { transition: box-shadow 0.3s; }
.subnav.stuck { box-shadow: 0 10px 24px -18px rgba(28, 28, 33, 0.35); }
.subnav-indicator {
  position: absolute; left: 0; bottom: 0; height: 2px;
  width: var(--iw, 0px);
  background: var(--page-accent);
  transform: translateX(var(--ix, 0px));
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
  pointer-events: none;
}
.service h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 26px; background: var(--page-accent); }

/* ---------- Oxblood & Slate: page accents and sector blocks ---------- */
.page-private { --page-accent: var(--slate); --page-accent-2: var(--slate-2); }
.sector-cta .btn-accent { background: var(--page-accent); }
.sector-cta .btn-accent:hover { background: var(--page-accent-2); }

/* Home: each sector block takes its own color at matched lightness.
   At rest it is see-through over the page; on hover it turns fully opaque. */
.sector-list .sector-card:nth-child(1) { --c: var(--accent); --ci2: #f6eef0; }
.sector-list .sector-card:nth-child(2) { --c: var(--slate); --ci2: #e8eef4; }
.sector-card {
  background: var(--c); /* solid, so the block shows the exact sector color */
  color: var(--white);
  border-color: transparent;
}
.sector-card:hover, .sector-card:focus-within { background-color: var(--c); border-color: transparent; }
.sector-card h2 { color: var(--white); }
.sector-card p { color: var(--ci2); }
.sector-card::before { background: radial-gradient(600px circle at var(--mx, 75%) var(--my, 50%), rgba(255, 255, 255, 0.1), transparent 62%); }
.sector-card::after { background: var(--white); }
/* "Learn more" is always shown; hover gives the arrow a nudge */
.learn-more, .sector-card:hover .learn-more { opacity: 1; transform: none; color: var(--white); }
.learn-more .arrow { background: var(--white); color: var(--c); transition: transform 0.45s var(--ease); }
.sector-card:hover .learn-more .arrow { transform: scale(1.08); }
.sector-card .btn-line { color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.sector-card .btn-line:hover { background: var(--white); color: var(--c); border-color: var(--white); }

/* ---------- Contact page ---------- */
.contact .page-title { margin-bottom: clamp(40px, 5vw, 72px); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
.contact-form {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow);
  animation: rise 1s var(--ease) 0.4s both;
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font: 600 14.5px/1.3 var(--body); color: var(--ink); }
.field .optional { font-weight: 400; color: var(--ink-3); }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  font: 400 16px/1.5 var(--body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 168px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(28, 28, 33, 0.38); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(58, 72, 86, 0.16); }
.field [aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(114, 37, 53, 0.12); }
.field-error { margin: 0; font-size: 14px; color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.form-actions .btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; flex: 1 1 16em; font-size: 15px; color: var(--ink-2); }
.form-status.is-error { color: var(--accent); }
.form-done { display: grid; gap: 10px; padding-block: 12px; }
.form-done h2 { font-size: clamp(28px, 3vw, 38px); }
.form-done p { margin: 0; color: var(--ink-2); }
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; }
}
.field [aria-invalid="true"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(114, 37, 53, 0.18); }

/* Contact page: phone and email */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; animation: rise 1s var(--ease) 0.3s both; }
.contact-list li:first-child { padding-top: 6px; }
.contact-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 18px;
  row-gap: 4px;
  align-items: center;
  padding-block: 26px;
  border-bottom: 1px solid var(--line-2);
}
.contact-icon {
  grid-row: 1 / 3;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--band);
  color: var(--slate);
}
.contact-icon svg { width: 21px; height: 21px; }
.contact-label { font: 600 12.5px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.contact-value {
  justify-self: start;
  font: 400 clamp(22px, 2.2vw, 30px)/1.25 var(--display);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.45s var(--ease), color 0.25s;
}
.contact-value:hover { color: var(--accent); background-size: 100% 1.5px; }

/* Testimonials sit directly on the contour background; cards are lightly see-through */
.testimonial {
  background: rgba(251, 251, 251, 0.82);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-color: var(--line);
}

/* =====================================================================
   Sector color system
   Each sector page takes its color end to end: the header band, the
   section index, list marks, buttons, the nav underline, the progress
   bar, selection and focus. The logo always stays oxblood.
   ===================================================================== */
.brand svg { color: var(--brand); }
.site-footer .brand svg { color: var(--on-dark); }

/* Public uses oxblood (the default); Private swaps every accent to slate */
.page-public  { --page-accent-soft: var(--accent-soft); --page-accent-light: var(--accent-light); }
.page-private {
  --accent: var(--slate);
  --accent-2: var(--slate-2);
  --accent-soft: var(--slate-soft);
  --accent-light: var(--slate-light);
  --page-accent: var(--slate);
  --page-accent-2: var(--slate-2);
  --page-accent-soft: var(--slate-soft);
  --page-accent-light: var(--slate-light);
}

/* Header band in the sector color, echoing the home page block */
.page-public .page-head, .page-private .page-head {
  margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-block: clamp(64px, 10vh, 120px) clamp(56px, 8vh, 96px);
  background:
    radial-gradient(900px circle at 88% 0%, rgba(255, 255, 255, 0.09), transparent 62%),
    var(--page-accent);
  color: var(--white);
}
.page-public .page-head h1, .page-private .page-head h1 { color: var(--white); }
.page-public .page-lead, .page-private .page-lead {
  color: var(--page-accent-light);
  border-bottom: 0;
  padding-bottom: 0;
}
.page-public ::selection, .page-private ::selection { background: var(--page-accent); color: var(--white); }

/* Section lists: full-strength marks, a faint tint of the page color on hover */
.service li::before { background: var(--page-accent); height: 2px; }
.service li:hover { background: color-mix(in srgb, var(--page-accent-soft) 70%, transparent); }

/* Sector pages: numbered sections in the page color */
.service-num {
  display: block;
  margin-bottom: 14px;
  font: italic 300 clamp(26px, 2.4vw, 34px)/1 var(--display);
  letter-spacing: 0;
  color: var(--page-accent);
}

/* Sector pages: closing block in the page color, echoing the home page block */
.services { padding-bottom: clamp(40px, 5vw, 64px); }
.closing { padding-block: 0 clamp(80px, 9vw, 130px); }
.closing-band {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 28px 48px;
  padding: clamp(36px, 5vw, 72px);
  border-radius: 3px;
  color: var(--white);
  background:
    radial-gradient(700px circle at 92% 0%, rgba(255, 255, 255, 0.09), transparent 62%),
    var(--page-accent);
}
.closing-band h2 { flex: 1 1 14em; max-width: 18em; font-size: clamp(32px, 3.6vw, 50px); color: var(--white); }
.btn-light { background: var(--white); color: var(--page-accent); }
.btn-light:hover { background: var(--page-accent-soft); }

/* Sector pages: bold section breaks in the page color; list rules tinted to match */
.service { border-bottom: 2px solid var(--page-accent); }
.service:last-child { border-bottom: 0; }
.service ul, .service li { border-color: color-mix(in srgb, var(--page-accent) 24%, transparent); }

/* =====================================================================
   Firm pages (Team, Contact): the same header band as the sector pages,
   in the house charcoal-slate, with oxblood as the accent.
   ===================================================================== */
.page-team .page-head, .page-contact .page-head {
  margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-block: clamp(64px, 10vh, 120px) clamp(56px, 8vh, 96px);
  background:
    radial-gradient(900px circle at 88% 0%, rgba(255, 255, 255, 0.07), transparent 62%),
    var(--charcoal);
  color: var(--white);
}
.page-team .page-head h1, .page-contact .page-head h1 {
  color: var(--white); border-bottom: 0; padding-bottom: 0;
}
.page-contact .page-lead { color: var(--accent-light); border-bottom: 0; padding-bottom: 0; }
/* a short oxblood rule under the title ties the band to the brand */
.page-team .page-head h1::after, .page-contact .page-head h1::after {
  content: ""; display: block; width: 56px; height: 3px; margin-top: clamp(22px, 2.6vw, 34px); background: var(--accent);
}
.page-contact .page-title { gap: clamp(22px, 2.6vw, 34px); }
.page-contact .page-head h1::after { margin-top: clamp(22px, 2.6vw, 34px); }

/* Contact body now sits below the band */
.contact { padding-block: clamp(56px, 7vw, 100px) clamp(90px, 11vw, 150px); }
.contact .page-title { margin-bottom: 0; }
.contact-icon { background: var(--slate-soft); color: var(--slate); }

/* Team: closing block spacing */
.team { padding-bottom: clamp(56px, 7vw, 96px); }

/* Home: without testimonials, the sector blocks close the page */
.sectors { padding-bottom: clamp(90px, 11vw, 150px); }

/* Home: closing line, echoing the hero headline */
.sectors { padding-bottom: clamp(20px, 3vw, 40px); }
.home-close { padding-block: clamp(72px, 9vw, 130px) clamp(100px, 12vw, 170px); }
.home-close .container { display: grid; justify-items: start; gap: clamp(32px, 4vw, 52px); }
.home-close .container::before { content: ""; justify-self: stretch; border-top: 1px solid var(--line-2); margin-bottom: clamp(8px, 1vw, 12px); }
.home-close h2 {
  max-width: 14em;
  font-size: clamp(40px, 5.6vw, 84px);
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.home-close h2 em { font-style: italic; font-weight: 300; color: var(--accent); }

/* Home sector blocks: no inline button, so the text closes the block */
.sector-card p { margin-bottom: 0; }

/* =====================================================================
   Team page: founders' note and founders scroll story
   ===================================================================== */
.founders-note { padding-block: clamp(64px, 9vw, 130px) clamp(48px, 7vw, 100px); }
.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 7vw, 110px);
}
.note-grid h2 { font-size: clamp(38px, 4.4vw, 62px); }
.note-grid h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 26px; background: var(--accent); }
.note-body p {
  margin: 0 0 1.1em;
  max-width: 34em;
  font: 400 clamp(21px, 1.85vw, 27px)/1.5 var(--display);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.note-body .note-sign { display: grid; gap: 10px; margin: clamp(28px, 3vw, 40px) 0 0; }
.sig { font: italic 300 clamp(38px, 3.6vw, 52px)/1 var(--display); color: var(--accent); }
.sig-role { font: 600 12.5px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

/* Founders: stacked by default (phones, short screens, reduced motion) */
.founder--nick { --c: var(--accent); }
.founder--everett { --c: var(--slate); }
.founders { padding-block: clamp(16px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.founders-track { display: grid; gap: clamp(64px, 9vw, 120px); }
.founder {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}
.founder-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: #e6e6e3; }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-text { min-width: 0; }
.quote-mark { display: block; width: 40px; height: 31px; color: var(--c); margin-bottom: clamp(20px, 2.4vw, 32px); }
.founder blockquote { margin: 0; }
.founder blockquote p {
  margin: 0;
  max-width: 16em;
  font: 400 clamp(30px, 3.3vw, 52px)/1.16 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.quote-source { margin: clamp(16px, 1.8vw, 22px) 0 0; font: 500 15px/1.4 var(--body); color: var(--ink-2); }
.quote-source::before { content: "— "; }
.founder-name {
  margin-top: clamp(32px, 4.5vh, 56px);
  padding-top: clamp(18px, 2vw, 24px);
  border-top: 1px solid var(--line-2);
  font-size: clamp(24px, 2.1vw, 32px);
}
.founder-name .role { display: block; margin-top: 8px; font-style: italic; font-weight: 300; font-size: 0.78em; color: var(--c); }

@media (min-width: 861px) {
 /* alternate sides when stacked */
}
@media (max-width: 860px) {
  .founder { grid-template-columns: 1fr; }
  .founder-photo { max-width: 460px; }
  .note-grid { grid-template-columns: 1fr; }
}

/* Tablets: photo and quote side by side */
@media (min-width: 600px) and (max-width: 860px) {
  .founder { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; }
  .founder-photo { max-width: none; }
  .founder blockquote p { font-size: clamp(24px, 3.6vw, 30px); }
}

/* Founders: diagonal stagger. Nick sits photo-left, Everett is mirrored photo-right. */
@media (min-width: 600px) {
  .founder--everett { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .founder--everett .founder-photo { order: 2; justify-self: end; }
}

/* Phones: offset the two blocks so they still read as a diagonal */
@media (max-width: 599px) {
  .founder--nick { padding-right: 12%; }
  .founder--everett { padding-left: 12%; }
}

/* Contact band: tagline in soft white */
.page-contact .page-lead { color: var(--on-dark); }

/* Services dropdown: keep each item on one line on desktop */
@media (min-width: 861px) {
  .dropdown { min-width: 260px; }
  .dropdown a { white-space: nowrap; }
}

/* Founders: both on the page, revealed on scroll with a parallax drift.
   The photo eases in first, the quote follows a beat later; while scrolling,
   each photo glides inside its frame and the quote drifts at its own pace. */
.founders.has-motion .founder-photo { opacity: 0; transform: translateY(48px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.founders.has-motion .founder-text > * { opacity: 0; transform: translateY(32px); transition: opacity 0.8s var(--ease), transform 1s var(--ease); }
.founders.has-motion .founder.is-in .founder-photo,
.founders.has-motion .founder.is-in .founder-text > * { opacity: 1; transform: none; }
.founders.has-motion .founder.is-in .founder-text > :nth-child(1) { transition-delay: 0.25s; }
.founders.has-motion .founder.is-in .founder-text > :nth-child(2) { transition-delay: 0.35s; }
.founders.has-motion .founder.is-in .founder-text > :nth-child(3) { transition-delay: 0.45s; }
.founders.has-motion .founder.is-in .founder-text > :nth-child(4) { transition-delay: 0.55s; }
.founders.has-motion .founder-photo img { transform: translateY(calc(var(--drift, 0) * -7%)) scale(1.16); will-change: transform; }
.founders.has-motion .founder-text { transform: translateY(calc(var(--drift, 0) * var(--drift-text, 56px))); will-change: transform; }
@media (max-width: 599px) {
  .founders.has-motion .founder-text { --drift-text: 0px; }
}

/* 404 page: same dark band as Team and Contact */
.page-404 .page-head {
  margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-block: clamp(64px, 10vh, 120px) clamp(56px, 8vh, 96px);
  background: radial-gradient(900px circle at 88% 0%, rgba(255, 255, 255, 0.07), transparent 62%), var(--charcoal);
  color: var(--white);
}
.page-404 .page-head h1 { color: var(--white); border-bottom: 0; padding-bottom: 0; }
.page-404 .page-head h1::after { content: ""; display: block; width: 56px; height: 3px; margin-top: clamp(22px, 2.6vw, 34px); background: var(--accent); }
.page-404 .page-title { gap: clamp(22px, 2.6vw, 34px); }
.page-404 .page-lead { color: var(--on-dark); border-bottom: 0; padding-bottom: 0; }
.notfound { flex: 1; padding-block: clamp(56px, 7vw, 100px) clamp(90px, 11vw, 150px); }
