/* =============================================================
   David Pierre Vann - Portfolio
   Dark editorial technology layout on a warm ivory frame.
   ============================================================= */

/* ---------------------------- Tokens ---------------------------- */
:root {
  --ivory:        #F5F1E8;
  --ivory-deep:   #EBE5D6;
  --navy:         #07152B;
  --navy-raised:  #0C1E3A;
  --navy-line:    #1B3055;
  --blue:         #4D8DFF;
  --blue-ink:     #2A5FCC;   /* accessible blue for ivory backgrounds */
  --amber:        #D8A84D;
  --white:        #F7F8FC;
  --muted:        #A9BCD6;   /* supporting text on navy */
  --muted-ink:    #4A5568;   /* supporting text on ivory */

  --font-display: "Bricolage Grotesque", "Segoe UI", Georgia, serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --page-pad: clamp(1rem, 4vw, 3rem);
  --shell: 1220px;

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

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

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Focus ring needs to stay visible against navy panels too. */
.panel :focus-visible { outline-color: var(--amber); }
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--blue-ink); }
.legal :focus-visible { outline-color: var(--blue-ink); }

.skip-link {
  position: absolute;
  left: var(--page-pad);
  top: -100px;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* --------------------------- Shell ------------------------------ */
.panel,
.band {
  max-width: var(--shell);
  margin: 0 auto var(--page-pad);
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 4vw, 4rem);
}

.panel {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

/* Thin connector detail along the top edge of every dark panel. */
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--navy-line) 18%, var(--blue) 50%, var(--navy-line) 82%, transparent);
  opacity: 0.55;
}

.band { color: var(--navy); }

/* ------------------------- Site header -------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(7, 21, 43, 0.1);
}

.site-header__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.9rem var(--page-pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.wordmark__mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--navy);
  box-shadow: 5px 5px 0 -1px var(--amber);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav__list {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav__list a {
  position: relative;
  padding-block: 0.35rem;
  color: var(--navy);
  transition: color 0.2s var(--ease);
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--blue-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="true"] { color: var(--blue-ink); }

.site-nav__list a:hover::after,
.site-nav__list a[aria-current="true"]::after { transform: scaleX(1); }

/* ------------------------- Nav toggle --------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid rgba(7, 21, 43, 0.25);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              color 0.2s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s var(--ease);
}

.btn--primary {
  background: var(--blue);
  color: #04101F;
  box-shadow: 0 10px 30px -12px rgba(77, 141, 255, 0.9);
}
.btn--primary:hover {
  background: #6EA2FF;
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -14px rgba(77, 141, 255, 1);
}

.btn--ghost {
  border: 1px solid rgba(169, 188, 214, 0.45);
  color: var(--white);
}
.btn--ghost:hover {
  border-color: var(--blue);
  background: rgba(77, 141, 255, 0.12);
  transform: translateY(-2px);
}

.btn--nav {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  background: var(--navy);
  color: var(--white);
}
.btn--nav:hover { background: var(--blue-ink); }

/* ---------------------------- Hero ------------------------------ */
.hero {
  margin-top: var(--page-pad);
  padding-block: clamp(3rem, 8vw, 6.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin-bottom: 1.75rem;
}

.availability__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(216, 168, 77, 0.18);
}

.hero__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--amber);
  margin-bottom: 1rem;
}

.hero__headline {
  font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.1rem);
  font-weight: 800;
  max-width: 21ch;
  margin-bottom: 1.5rem;
}

.hero__support {
  color: var(--muted);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ------------------------- Node system -------------------------- */
.node-map {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 460px);
  margin-inline: auto;
  isolation: isolate;
}

.node-map__glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 141, 255, 0.28), transparent 68%);
  filter: blur(14px);
  z-index: -1;
}

.node-map__lines { position: absolute; inset: 0; }

.node-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, rgba(77, 141, 255, 0.75), rgba(169, 188, 214, 0.12));
  transform-origin: 0 50%;
}
.node-line--tl { transform: rotate(213deg); }
.node-line--tr { transform: rotate(-33deg); }
.node-line--bl { transform: rotate(147deg); }
.node-line--br { transform: rotate(33deg); }

.node-map__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  gap: 0.15rem;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  background: radial-gradient(circle at 50% 35%, rgba(77, 141, 255, 0.16), rgba(12, 30, 58, 0.9));
  text-align: center;
  padding: 0.5rem;
}

.node-map__hub-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.node-map__hub-sub {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--muted);
  max-width: 14ch;
}

.node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--white);
  background: rgba(12, 30, 58, 0.92);
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.node:hover {
  border-color: var(--blue);
  box-shadow: 0 0 24px -6px rgba(77, 141, 255, 0.75);
  transform: translateY(-2px);
}

.node__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.node--bl .node__dot,
.node--br .node__dot { background: var(--amber); }

.node--tl { top: 6%;  left: 0; }
.node--tr { top: 6%;  right: 0; }
.node--bl { bottom: 6%; left: 0; }
.node--br { bottom: 6%; right: 0; }

/* ------------------------- Credibility -------------------------- */
.credibility { padding-block: clamp(1.5rem, 3vw, 2.75rem); }

.credibility__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(7, 21, 43, 0.14);
  border-block: 1px solid rgba(7, 21, 43, 0.14);
}

.credibility__item {
  background: var(--ivory);
  padding: 1.35rem 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 0.9rem + 0.35vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
}

.credibility__item::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 0;
  width: 26px;
  height: 2px;
  background: var(--amber);
}

/* ----------------------- Section headings ----------------------- */
.section-head { max-width: 62ch; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 0.9rem;
}
.eyebrow--ink { color: var(--blue-ink); }

.section-title {
  font-size: clamp(1.8rem, 1.15rem + 2.4vw, 2.9rem);
  margin-bottom: 1rem;
}

.section-lede {
  color: var(--muted);
  max-width: 58ch;
}
.band .section-lede { color: var(--muted-ink); }

/* --------------------------- Projects --------------------------- */
.project-list {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 3.25rem);
  border-top: 1px solid var(--navy-line);
}

.project:first-child { border-top: 0; padding-top: 0; }

.project:nth-child(even) .project__visual { order: 2; }

.project__index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.project__category {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.project__title {
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem);
  margin-bottom: 0.9rem;
}

.project__text {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 1.4rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag-list li {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.project__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--white);
}

.project__status::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--blue);
}
.project__status--private::before { background: var(--amber); }

/* Future state: an anchor can replace .project__status without layout changes. */
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--blue);
  border-bottom: 1px solid rgba(77, 141, 255, 0.4);
  padding-bottom: 2px;
}
.project__link:hover { border-bottom-color: var(--blue); }

.project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* ------------------- Project visual placeholders ---------------- */
.project__visual { min-width: 0; }

.project__screenshot {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.project__screenshot-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  position: relative;
  cursor: zoom-in;
}

.project__screenshot-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(7, 21, 43, 0.82);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.project__screenshot-trigger:hover .project__screenshot-hint,
.project__screenshot-trigger:focus-visible .project__screenshot-hint {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------ Lightbox -------------------------------- */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
}

.lightbox::backdrop {
  background: rgba(7, 21, 43, 0.82);
}

.lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  border-radius: var(--radius-md);
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  background: var(--navy);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lightbox__close:hover { background: var(--blue-ink); }

.canvas {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px solid var(--navy-line);
  background:
    linear-gradient(rgba(169, 188, 214, 0.05) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(169, 188, 214, 0.05) 1px, transparent 1px) 0 0 / 34px 100%,
    linear-gradient(160deg, var(--navy-raised), #061224);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}

.project:hover .canvas {
  border-color: rgba(77, 141, 255, 0.55);
  box-shadow: 0 24px 60px -34px rgba(77, 141, 255, 0.9);
}

.canvas__glow {
  position: absolute;
  inset: auto -20% -45% -20%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 100%, rgba(77, 141, 255, 0.32), transparent 70%);
  filter: blur(10px);
}

.art { position: absolute; inset: 12%; }

/* 01 - masonry gallery */
.art--gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 8px;
}
.art--gallery span {
  border-radius: 6px;
  background: linear-gradient(150deg, rgba(169, 188, 214, 0.22), rgba(169, 188, 214, 0.07));
  border: 1px solid rgba(169, 188, 214, 0.16);
}
.art--gallery span:nth-child(1) { grid-row: span 2; }
.art--gallery span:nth-child(5) { grid-row: span 2; background: linear-gradient(150deg, rgba(77, 141, 255, 0.35), rgba(77, 141, 255, 0.08)); }
.art--gallery span:nth-child(3) { background: linear-gradient(150deg, rgba(216, 168, 77, 0.3), rgba(216, 168, 77, 0.06)); }

/* 02 - map route and markers */
.art--map { border-radius: 10px; border: 1px solid rgba(169, 188, 214, 0.16); }
.art__route {
  position: absolute;
  left: 8%;
  top: 20%;
  width: 78%;
  height: 55%;
  border-left: 2px dashed rgba(77, 141, 255, 0.55);
  border-bottom: 2px dashed rgba(77, 141, 255, 0.55);
  border-radius: 0 0 0 60px;
}
.art__pin {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--blue);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 18px -2px rgba(77, 141, 255, 0.8);
}
.art__pin--a { left: 6%;  top: 14%; }
.art__pin--b { left: 46%; top: 62%; background: var(--amber); box-shadow: 0 0 18px -2px rgba(216, 168, 77, 0.7); }
.art__pin--c { left: 80%; top: 30%; }

/* 03 - audio player */
.art--audio { display: flex; align-items: center; gap: 10%; }
.art__ring {
  flex: none;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(77, 141, 255, 0.6);
  position: relative;
  box-shadow: 0 0 30px -8px rgba(77, 141, 255, 0.9);
}
.art__ring::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-left: 12px solid var(--amber);
  border-block: 8px solid transparent;
}
.art__bars {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
}
.art__bars i {
  flex: 1;
  border-radius: 3px;
  background: rgba(169, 188, 214, 0.35);
}
.art__bars i:nth-child(1)  { height: 22%; }
.art__bars i:nth-child(2)  { height: 48%; }
.art__bars i:nth-child(3)  { height: 74%; background: rgba(77, 141, 255, 0.75); }
.art__bars i:nth-child(4)  { height: 36%; }
.art__bars i:nth-child(5)  { height: 88%; background: rgba(77, 141, 255, 0.75); }
.art__bars i:nth-child(6)  { height: 54%; }
.art__bars i:nth-child(7)  { height: 30%; }
.art__bars i:nth-child(8)  { height: 66%; background: rgba(216, 168, 77, 0.8); }
.art__bars i:nth-child(9)  { height: 42%; }
.art__bars i:nth-child(10) { height: 80%; }
.art__bars i:nth-child(11) { height: 26%; }
.art__bars i:nth-child(12) { height: 58%; background: rgba(77, 141, 255, 0.6); }
.art__bars i:nth-child(13) { height: 38%; }
.art__bars i:nth-child(14) { height: 20%; }

/* 04 - merchandise and cart */
.art--shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.art__tile {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid rgba(169, 188, 214, 0.18);
  background: linear-gradient(160deg, rgba(169, 188, 214, 0.2), rgba(169, 188, 214, 0.05));
}
.art__tile:nth-child(2) { background: linear-gradient(160deg, rgba(77, 141, 255, 0.35), rgba(77, 141, 255, 0.07)); }
.art__bar {
  grid-column: 1 / -1;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(216, 168, 77, 0.85) 34%, rgba(169, 188, 214, 0.14) 34%);
}

/* 05 - conversation prototype */
.art--chat { display: flex; flex-direction: column; gap: 12px; }
.art__bubble {
  height: 20%;
  min-height: 26px;
  border-radius: 14px;
  border: 1px solid rgba(169, 188, 214, 0.18);
  background: rgba(169, 188, 214, 0.12);
}
.art__bubble--in  { width: 72%; border-bottom-left-radius: 4px; }
.art__bubble--out {
  width: 62%;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: linear-gradient(120deg, rgba(77, 141, 255, 0.4), rgba(77, 141, 255, 0.14));
  border-color: rgba(77, 141, 255, 0.4);
}
.art__bubble--short { width: 46%; }
.art__caret {
  width: 10px;
  height: 18px;
  border-radius: 2px;
  background: var(--amber);
  margin-top: auto;
}

/* --------------------------- Services --------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--ivory-deep);
  border: 1px solid rgba(7, 21, 43, 0.12);
  border-radius: var(--radius-md);
  padding: clamp(1.4rem, 3vw, 2rem);
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}

.service-card::before {
  content: "";
  position: absolute;
  left: clamp(1.4rem, 3vw, 2rem);
  top: 0;
  width: 30px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--blue-ink);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 95, 204, 0.5);
  box-shadow: 0 22px 45px -32px rgba(7, 21, 43, 0.85);
}

.service-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.7rem;
}

.service-card p { color: var(--muted-ink); font-size: 0.97rem; }

/* --------------------------- Process ---------------------------- */
.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.process-step {
  border-top: 1px solid var(--navy-line);
  padding-top: 1.5rem;
}

.process-step__num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.process-step h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.process-step p { color: var(--muted); font-size: 0.97rem; }

/* ---------------------------- About ----------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__body {
  display: grid;
  gap: 1.15rem;
  color: var(--muted-ink);
  font-size: clamp(1rem, 0.97rem + 0.25vw, 1.1rem);
  border-left: 1px solid rgba(7, 21, 43, 0.15);
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}

/* ----------------------- Client feedback ------------------------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  padding: clamp(1.75rem, 4vw, 2.25rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--navy-line);
  background: linear-gradient(160deg, var(--navy-raised), #061224);
  color: var(--white);
}

.review-card__rating {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.review-card__stars {
  color: var(--amber);
  font-size: 1.05rem;
  letter-spacing: 0.15em;
}

.review-card__score {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.review-card__title {
  font-size: 1.1rem;
}

.review-card__quote {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--blue);
  color: var(--muted);
  font-size: 0.97rem;
}

.review-card__quote p { margin: 0; }

.review-card__attribution {
  margin-top: auto;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

.feedback-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--navy-line);
  background: linear-gradient(160deg, var(--navy-raised), #061224);
  color: var(--white);
  text-align: center;
}

.feedback-cta__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.feedback-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.9rem);
  font-weight: 700;
  max-width: 30ch;
}

.feedback-cta__text {
  max-width: 52ch;
  font-size: 0.97rem;
  color: var(--muted);
}

.feedback-cta__button {
  margin-top: 0.5rem;
  background: var(--amber);
  color: var(--navy);
  box-shadow: 0 10px 30px -12px rgba(216, 168, 77, 0.9);
}

.feedback-cta__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -14px rgba(216, 168, 77, 1);
}

/* --------------------------- Contact ---------------------------- */
.contact { text-align: center; }

.contact__inner {
  max-width: 56rem;
  margin-inline: auto;
  display: grid;
  justify-items: center;
}

.contact__title { max-width: 22ch; }

.contact .section-lede { margin-bottom: 2.25rem; }

.contact__form {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
}

.contact__form iframe {
  display: block;
  width: 100%;
}

.contact__fallback {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.contact__fallback-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.contact__fallback-link {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact__fallback-link:hover { color: var(--blue); border-bottom-color: var(--blue); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.contact__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.contact__link:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* Keeps the hidden attribute authoritative against the flex display above. */
[hidden] { display: none !important; }

/* ---------------------------- Footer ---------------------------- */
.site-footer {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--page-pad) 2rem;
  border-top: 1px solid rgba(7, 21, 43, 0.14);
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 2.5rem);
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.site-footer__role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-ink);
  margin-bottom: 0.75rem;
}

.site-footer__text {
  color: var(--muted-ink);
  font-size: 0.92rem;
  max-width: 42ch;
}

.site-footer__heading {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 1rem;
}

.site-footer__links {
  display: grid;
  gap: 0.6rem;
}

.site-footer__links a {
  color: var(--muted-ink);
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}
.site-footer__links a:hover { color: var(--blue-ink); }

.site-footer__actions {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  justify-items: start;
}

.site-footer__email {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted-ink);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.site-footer__email:hover { color: var(--blue-ink); border-color: var(--blue-ink); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(7, 21, 43, 0.14);
  font-size: 0.85rem;
  color: var(--muted-ink);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__legal a {
  color: var(--muted-ink);
  transition: color 0.2s var(--ease);
}
.site-footer__legal a:hover { color: var(--blue-ink); }

.site-footer__top {
  font-weight: 500;
  color: var(--muted-ink);
  transition: color 0.2s var(--ease);
}
.site-footer__top:hover { color: var(--blue-ink); }

/* ------------------------- Legal pages --------------------------- */
.legal-header__nav { display: flex; align-items: center; }

.legal {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--page-pad) clamp(3rem, 8vw, 5rem);
}

.legal__doc {
  max-width: 68ch;
  margin-inline: auto;
}

.legal__title {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 2.75rem);
  margin-bottom: 1rem;
}

.legal__dates {
  color: var(--muted-ink);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.legal__doc section { margin-top: 2.5rem; }

.legal__doc h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.55rem);
  margin-bottom: 0.85rem;
}

.legal__doc p {
  color: var(--muted-ink);
  margin-bottom: 1rem;
}
.legal__doc p:last-child { margin-bottom: 0; }

.legal__doc a {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__doc ul,
.legal__doc ol {
  color: var(--muted-ink);
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}
.legal__doc ul { list-style: disc; }
.legal__doc ol { list-style: decimal; }

.legal-footer { padding-top: 2rem; }

.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.92rem;
}

.legal-footer__links a {
  color: var(--muted-ink);
  transition: color 0.2s var(--ease);
}
.legal-footer__links a:hover { color: var(--blue-ink); }

.legal-footer__copyright {
  font-size: 0.85rem;
  color: var(--muted-ink);
}

/* --------------------------- Reveals ---------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* --------------------------- Responsive ------------------------- */
@media (max-width: 900px) {
  .hero__grid,
  .project,
  .about__grid,
  .service-grid,
  .review-grid,
  .site-footer__main { grid-template-columns: minmax(0, 1fr); }

  .project:nth-child(even) .project__visual { order: 0; }

  .about__body {
    border-left: 0;
    border-top: 1px solid rgba(7, 21, 43, 0.15);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .credibility__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .js .nav-toggle { display: inline-flex; }

  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.5rem 0 1rem;
  }

  .js .site-nav { display: none; }
  .js .site-nav[data-open="true"] { display: flex; }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(7, 21, 43, 0.1);
  }
  .site-nav__list a::after { display: none; }

  .btn--nav { margin-top: 0.75rem; align-self: flex-start; }

  /* The connector diagram collapses to a readable stack on small screens. */
  .node-map { aspect-ratio: auto; }
  .node-map__lines { display: none; }

  .node-map__hub {
    position: static;
    transform: none;
    width: min(200px, 60%);
    margin: 0 auto 1.25rem;
  }

  .node-map__nodes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
  }

  .node { position: static; }
}

/* ------------------------ Reduced motion ------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
