/* ===================================================================
   Keystone Capital — stylesheet
   Brand: crimson #B11226 · charcoal #161616 · off-white #F6F4F0
   Headings: Playfair Display (serif) · Body: Inter (sans-serif)
   =================================================================== */

:root {
  --crimson: #b11226;
  --crimson-dark: #8e0e1f;
  --charcoal: #161616;
  --ink: #1c1c1c;
  --offwhite: #f6f4f0;
  --paper: #fffdfb;
  --grey: #6b6b6b;
  --line: #e4e0d9;
  --maxw: 1180px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--offwhite);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* The brand's signature red full-stop */
.dot { color: var(--crimson); }

/* ----------------------------- Emblem ---------------------------- */
.emblem { width: 34px; height: auto; color: var(--crimson); fill: currentColor; flex: none; }

/* ----------------------------- Buttons --------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 34px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.btn--light {
  background: var(--crimson);
  color: #fff;
}
.btn--light:hover { background: #fff; color: var(--charcoal); }
.btn--solid {
  background: var(--crimson);
  color: #fff;
  border-color: var(--crimson);
}
.btn--solid:hover { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }

/* ----------------------------- Navbar ---------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: rgba(255,253,251,0.94);
  backdrop-filter: blur(8px);
  padding: 12px 32px;
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand { display: flex; align-items: center; transition: transform 0.3s ease; }
.nav__brand:hover { transform: scale(1.03); }
.nav__logo { height: 58px; width: auto; display: block; transition: height 0.3s ease; }
.nav.scrolled .nav__logo { height: 46px; }
/* Show the white-text logo over the hero; swap to the charcoal one once scrolled. */
.nav__logo--dark { display: none; }
.nav.scrolled .nav__logo--light { display: none; }
.nav.scrolled .nav__logo--dark { display: block; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.88);
  transition: color 0.25s ease;
}
.nav__links a:hover { color: #fff; }
.nav.scrolled .nav__links a { color: var(--grey); }
.nav.scrolled .nav__links a:hover { color: var(--crimson); }
.nav__cta {
  border: 1px solid rgba(255,255,255,0.4);
  padding: 9px 20px;
  border-radius: 2px;
}
.nav.scrolled .nav__cta { border-color: var(--crimson); color: var(--crimson) !important; }
.nav.scrolled .nav__cta:hover { background: var(--crimson); color: #fff !important; }

/* ------------------------------ Hero ----------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #1b1b1d 0%, #232326 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: url("img/hero.jpg") center 28% / cover no-repeat;
  opacity: 0.32;
  filter: grayscale(0.2);
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(177,18,38,0.20) 0%, rgba(22,22,22,0) 55%),
    linear-gradient(180deg, rgba(18,18,20,0.55) 0%, rgba(18,18,20,0.78) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 120px 28px 80px;
}
.hero__emblem { width: 64px; color: #fff; margin: 0 auto 30px; opacity: 0.96; }
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.02;
  margin: 0 0 6px;
  letter-spacing: 0.005em;
}
.hero__title span { font-style: italic; font-weight: 500; }
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  margin: 0 0 22px;
}
.hero__value {
  font-size: 1.02rem;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin: 0 auto 38px;
}
.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.7);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------------------------- Sections --------------------------- */
.section { padding: 110px 0; }
.section--alt { background: var(--paper); }
.section--dark { background: var(--charcoal); color: #fff; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 18px;
}
.eyebrow--light { color: #fff; }
.eyebrow--light .dot { color: var(--crimson); }

.section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 26px;
  max-width: 16ch;
}
.section__title--light { color: #fff; }
.section__intro {
  font-size: 1.08rem;
  font-weight: 300;
  color: var(--grey);
  max-width: 60ch;
  margin: 0 0 56px;
}
.section--dark .section__intro { color: rgba(255,255,255,0.7); }

/* --------------------------- Why grid ---------------------------- */
.why__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  margin-top: 40px;
}
.why__lead p { font-size: 1.06rem; margin: 0 0 20px; color: #34322f; }
.why__close {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem !important;
  color: var(--charcoal) !important;
  border-left: 2px solid var(--crimson);
  padding-left: 22px;
  margin-top: 28px !important;
}
.why__points {
  background: var(--charcoal);
  color: #fff;
  padding: 44px 40px;
  border-radius: 3px;
}
.why__points-label {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 24px;
}
.why__points ul { list-style: none; margin: 0; padding: 0; }
.why__points li {
  position: relative;
  padding: 16px 0 16px 26px;
  font-size: 0.98rem;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.why__points li:last-child { border-bottom: none; }
.why__points li::before {
  content: "";
  position: absolute; left: 0; top: 24px;
  width: 7px; height: 7px;
  background: var(--crimson);
  border-radius: 50%;
}

/* ---------------------------- Services --------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 50px;
}
.service {
  padding: 40px 32px;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-top: 3px solid var(--crimson);
  border-radius: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(22,22,22,0.08); }
.service__num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--crimson);
  font-weight: 600;
}
.service h3 {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  margin: 14px 0 14px;
  line-height: 1.25;
}
.service p { font-size: 0.97rem; color: var(--grey); margin: 0; }

/* --------------------------- Approach ---------------------------- */
.approach {
  list-style: none;
  margin: 50px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.approach li {
  padding: 36px 24px 36px 0;
  border-right: 1px solid var(--line);
}
.approach li:last-child { border-right: none; padding-right: 0; }
.approach li span {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--crimson);
  display: block;
  margin-bottom: 16px;
}
.approach li p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.4;
}
.approach__note {
  margin-top: 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--grey);
  max-width: 52ch;
}

/* --------------------- Vision / Mission / Values ----------------- */
.section--dark .section__title { color: #fff; }
.vm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 30px 0 80px;
}
.vm__block h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 18px;
}
.vm__block p {
  font-size: 1.04rem;
  font-weight: 300;
  color: rgba(255,255,255,0.78);
  margin: 0;
}
.values__label {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 0 0 30px;
}
.values {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}
.value {
  padding: 28px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid var(--crimson);
  border-radius: 2px;
}
.value h4 {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
}
.value p { font-size: 0.9rem; font-weight: 300; color: rgba(255,255,255,0.7); margin: 0; }

/* --------------------------- Projects ---------------------------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.project {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.project:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(22,22,22,0.14); }
.project__img { overflow: hidden; aspect-ratio: 4 / 3; background: #ddd; }
.project__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.project:hover .project__img img { transform: scale(1.06); }
.project__body { padding: 26px 26px 30px; flex: 1; }
.project__body h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.25;
}
.project__loc {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 600;
  margin: 0 0 14px;
}
.project__body p:last-child { font-size: 0.95rem; color: var(--grey); margin: 0; }

/* ---------------------------- Contact ---------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  margin-top: 30px;
}
.contact__details h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 24px;
  line-height: 1.3;
}
.contact__line {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  margin: 0 0 22px;
  line-height: 1.7;
}
.contact__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crimson);
  font-weight: 600;
  margin-bottom: 4px;
}
.contact__line a:hover { color: #fff; text-decoration: underline; }
.contact__placeholder { color: rgba(255,255,255,0.5); font-style: italic; }

.contact__form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.field input, .field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: #fff;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 2px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--crimson);
  background: rgba(255,255,255,0.08);
}
.field textarea { resize: vertical; }
.form__status { font-size: 0.92rem; margin: 4px 0 0; min-height: 1.2em; }
.hp-field { position: absolute; left: -9999px; } /* honeypot, hidden from humans */
.form__status.ok { color: #7fd18b; }
.form__status.err { color: #ff9a9a; }

/* ----------------------------- Footer ---------------------------- */
.footer { background: #0f0f0f; color: rgba(255,255,255,0.6); padding: 34px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer__logo { height: 46px; width: auto; display: block; }
.footer__copy { font-size: 0.82rem; }
.footer__top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  transition: all 0.3s ease;
  flex: none;
}
.footer__top:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
  transform: translateY(-3px);
}

/* ===================================================================
   Creative layer — motion, texture, and interaction
   (Everything below degrades gracefully and respects reduced motion.)
   =================================================================== */

/* Fine film grain over the whole page for a printed, tactile feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Crimson reading-progress hairline along the very top */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  width: 100%;
  height: 3px;
  background: var(--crimson);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Trailing cursor — the brand emblem's oval (fine pointers only) */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  width: 30px; height: 37px;
  margin: -18px 0 0 -15px;
  pointer-events: none;
  opacity: 0;
  transition: width 0.28s ease, height 0.28s ease, margin 0.28s ease,
              opacity 0.3s ease;
}
.cursor-ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cursor-ring ellipse {
  fill: rgba(177, 18, 38, 0);
  stroke: rgba(177, 18, 38, 0.8);
  stroke-width: 5;
  transition: fill 0.28s ease;
}
.cursor-ring.hovering {
  width: 52px; height: 64px;
  margin: -32px 0 0 -26px;
}
.cursor-ring.hovering ellipse { fill: rgba(177, 18, 38, 0.08); }
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }

/* ------------------------ Hero choreography ---------------------- */
.hero::before {
  transform: translateY(var(--parallax, 0px)) scale(1.08);
  will-change: transform;
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(34px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes emblemFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@keyframes overlayBreathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.82; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__emblem  { animation: heroRise 0.9s 0.10s cubic-bezier(0.2,0.7,0.2,1) both,
                              emblemFloat 7s 1.2s ease-in-out infinite; }
  .hero__title   { animation: heroRise 0.9s 0.25s cubic-bezier(0.2,0.7,0.2,1) both; }
  .hero__tagline { animation: heroRise 0.9s 0.40s cubic-bezier(0.2,0.7,0.2,1) both; }
  .hero__value   { animation: heroRise 0.9s 0.55s cubic-bezier(0.2,0.7,0.2,1) both; }
  .hero .btn     { animation: heroRise 0.9s 0.70s cubic-bezier(0.2,0.7,0.2,1) both; }
  .hero__overlay { animation: overlayBreathe 9s ease-in-out infinite; }
}

/* ------------------- The Keystone scroll story -------------------- */
.assembly {
  /* Tall wrapper: the extra height is the scroll "timeline" */
  height: 340vh;
  position: relative;
  background: #131314;
}
.assembly--static { height: 100vh; } /* reduced-motion fallback */
.assembly__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.assembly__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Corner HUD — small technical monospace labels */
.assembly__hud-item {
  position: absolute;
  z-index: 3;
  font-family: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}
.assembly__hud-tl { top: 86px; left: 34px; }
.assembly__hud-tr { top: 86px; right: 34px; text-align: right; }
.assembly__hud-bl { bottom: 30px; left: 34px; }
.assembly__hud-br { bottom: 30px; right: 34px; text-align: right; }
.assembly__hint { transition: opacity 0.6s ease; color: rgba(255,255,255,0.66); }
.assembly__hint.gone { opacity: 0; }

/* Captions */
.assembly__captions {
  position: absolute;
  z-index: 3;
  left: 34px;
  right: 34px;
  bottom: 12vh;
  pointer-events: none;
}
.assembly__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 480px;
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.9vw, 2.35rem);
  line-height: 1.25;
  color: #f2efe9;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.assembly__caption.active { opacity: 1; transform: none; }
.assembly__caption em {
  font-style: italic;
  color: var(--crimson);
  font-size: 0.72em;
}

/* Vertical progress track on the right */
.assembly__track {
  position: absolute;
  z-index: 3;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 120px;
  background: rgba(255, 255, 255, 0.14);
}
.assembly__track i {
  position: absolute;
  inset: 0;
  background: var(--crimson);
  transform-origin: 0 0;
  transform: scaleY(0);
}

@media (max-width: 760px) {
  .assembly { height: 300vh; }
  .assembly__hud-tl, .assembly__hud-tr { top: 72px; }
  .assembly__hud-tl, .assembly__hud-bl { left: 20px; }
  .assembly__hud-tr, .assembly__hud-br { right: 20px; }
  .assembly__hud-tr { display: none; }
  .assembly__captions { left: 20px; right: 20px; bottom: 14vh; }
  .assembly__track { right: 16px; }
}

/* ------------------------------ Marquee -------------------------- */
.marquee {
  overflow: hidden;
  background: var(--charcoal);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 26px 0;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 38px;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
}
.marquee__track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.marquee:hover .marquee__track span { color: rgba(255,255,255,0.85); }
.marquee__track i {
  font-style: normal;
  color: var(--crimson);
  font-size: 0.8rem;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ------------------------ "& much more" card ---------------------- */
.project--more {
  grid-column: 1 / -1; /* full-width banner row at the end of the grid */
  background: var(--charcoal);
  border-color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.project--more::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 90% at 50% 110%, rgba(177,18,38,0.35) 0%, rgba(177,18,38,0) 60%);
  opacity: 0.7;
  transition: opacity 0.4s ease;
}
.project--more:hover::before { opacity: 1; }
.project__more-inner { position: relative; padding: 48px 30px; }
.project__more-amp {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 3.6rem;
  line-height: 1;
  color: var(--crimson);
  margin: 0 0 10px;
}
.project--more h3 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
}
.project__more-sub {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(255,255,255,0.6);
  margin: 0 0 22px;
}
.project__more-cta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid var(--crimson);
  padding-bottom: 4px;
  transition: color 0.3s ease;
}
.project--more:hover .project__more-cta { color: var(--crimson); }

/* ------------------------ Reveal on scroll ------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* Magnetic buttons (transform driven by JS) */
.btn { will-change: transform; }

/* ------------------------- Final polish --------------------------- */

/* Brand-crimson text selection */
::selection { background: var(--crimson); color: #fff; }

/* Slim branded scrollbar */
html { scrollbar-width: thin; scrollbar-color: var(--crimson) #1c1c1e; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #1c1c1e; }
::-webkit-scrollbar-thumb { background: var(--crimson); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #d41a33; }

/* Visible keyboard focus in brand colour */
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

/* Nav links: animated underline sweeping in from the left */
.nav__links a:not(.nav__cta) { position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s ease;
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }

/* Project renders: a whisper of crimson rises on hover */
.project__img { position: relative; }
.project__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(177,18,38,0.28), rgba(177,18,38,0) 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project:hover .project__img::after { opacity: 1; }

/* The hero tagline's red full-stop quietly breathes */
.hero__tagline .dot { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero__tagline .dot { animation: dotBreathe 3.2s ease-in-out 1.6s infinite; }
}
@keyframes dotBreathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.88); }
}

/* --------------------------- Responsive -------------------------- */
@media (max-width: 980px) {
  .why__grid, .vm, .contact { grid-template-columns: 1fr; gap: 40px; }
  .services { grid-template-columns: 1fr; gap: 22px; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .approach { grid-template-columns: repeat(2, 1fr); }
  .approach li { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 0; }
  .values { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  /* On phones: hide the text links but keep the "Get in touch" button */
  .nav__links { gap: 0; }
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__cta,
  .nav.scrolled .nav__cta {
    background: var(--crimson);
    border-color: var(--crimson);
    color: #fff !important;
    padding: 9px 16px;
    font-size: 0.78rem;
  }
  .nav__logo { height: 44px; }
  .nav.scrolled .nav__logo { height: 40px; }
  .section { padding: 76px 0; }
  .hero__inner { padding: 110px 24px 70px; }
  /* Projects sit two beside each other on phones; the "& much more"
     card joins the grid as a normal card so there's no empty gap */
  .projects { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .project--more { grid-column: auto; min-height: 0; }
  .project__body { padding: 14px 14px 18px; }
  .project__body h3 { font-size: 0.98rem; }
  .project__loc { font-size: 0.6rem; margin: 0 0 8px; }
  .project__body p:last-child { font-size: 0.8rem; }
  .project__more-inner { padding: 34px 20px; }
  .project__more-amp { font-size: 2.6rem; }
  .project--more h3 { font-size: 1.2rem; }
  .project__more-sub { font-size: 0.78rem; }
  .values { grid-template-columns: 1fr; }
  .approach { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}
