:root {
  --ink: #0b1f33;
  --ink-soft: #222222;
  --muted: #667085;
  --paper: #f8f9fa;
  --surface: #f4f6f8;
  --white: #ffffff;
  --sky: #0ea5e9;
  --sky-dark: #0369a1;
  --cyan: #06b6d4;
  --orange: #ff9900;
  --amber: #f59e0b;
  --line: rgba(255, 255, 255, 0.22);
  /* Alternating section bands, applied in document order. */
  --band-a: #F0FFFF;
  --band-b: #FEFEFE;
  --card-line: rgba(7, 89, 133, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-soft);
  background: var(--paper);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Flush to the top edge and pinned there for the whole page. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px max(14px, calc((100vw - 1180px) / 2));
  color: var(--white);
  background: rgba(11, 31, 51, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

/* Anchor jumps must clear the fixed bar instead of landing under it. */
main section[id] {
  scroll-margin-top: 104px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* The logo is a circular badge on a transparent field, so it needs no
   plate behind it — let it sit at its natural proportions. */
/* 69.6px — 20% up from 58px. */
.brand img {
  width: auto;
  height: 69.6px;
}

/* 225px — 75% of the artwork's natural 300px. The global img max-width
   keeps it inside the column on narrow screens. */
.footer-logo img {
  width: 225px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  /* Tighter than before because each link now carries its own padding. */
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links a,
.nav-cta,
.button {
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a {
  padding: 7px 11px;
  border-radius: 6px;
}

.nav-links a:hover {
  color: var(--cyan);
}

/* Selected menu item: the section currently in view, and the pressed and
   keyboard-focused states. Amber is light, so the label flips to dark. */
.nav-links a.is-active,
.nav-links a:active,
.nav-links a:focus-visible {
  color: var(--ink);
  background: #ffd380;
}

.nav-links a.is-active:hover,
.nav-links a:focus-visible:hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--white);
  background: var(--orange);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-cta:hover {
  background: var(--amber);
}

/* Hamburger. Hidden on desktop, where the links sit in the bar already. */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle:focus-visible {
  outline: 3px solid #ffd380;
  outline-offset: 2px;
}

/* Three bars from one element: the span is the middle, and its two
   pseudo-elements are the outer bars. */
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 150ms ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
}

.nav-toggle-bars::before {
  transform: translateY(-7px);
}

.nav-toggle-bars::after {
  transform: translateY(7px);
}

/* Open state: bars fold into an X. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 25svh;
  padding-top: 100px;
  padding-bottom: 100px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #08111b;
}

/* <picture> is inline by default; give it the media layer's height so the
   image's percentage height still resolves. */
.hero-media picture {
  display: block;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  opacity: 0.7;
  transform: scale(1.08);
  animation: cinematicDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}

/* Scrim in the gradient's own hues: keeps the copy legible on the left
   without flattening the blue-to-slate sweep. */
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    /* #24456D overlay at 40%, sitting above the scrim and below the copy. */
    linear-gradient(rgba(36, 69, 109, 0.4), rgba(36, 69, 109, 0.4)),
    linear-gradient(90deg, rgba(21, 41, 66, 0.78) 0%, rgba(21, 41, 66, 0.34) 46%, rgba(184, 204, 228, 0) 100%),
    linear-gradient(180deg, rgba(21, 41, 66, 0) 40%, rgba(21, 41, 66, 0.34) 100%);
}

.hero-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 126px 0 74px;
}

.eyebrow,
.chapter {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 0.936rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Poppins", Arial, sans-serif;
  line-height: 0.98;
  letter-spacing: 0;
}

/* Section titles. Nova Square ships a single 400 weight, so keep the
   weight at 400 rather than letting the browser synthesize a bold. */
h1,
h2 {
  font-family: "Nova Square", "Poppins", Arial, sans-serif;
  font-weight: 400;
}

h1 {
  max-width: 1050px;
  font-size: clamp(2rem, 4.4vw, 4.8rem);
}

h2 {
  max-width: 980px;
  font-size: clamp(1.9rem, 3.5vw, 4.2rem);
  line-height: 1.04;
}

h3 {
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.15;
}

.hero-copy {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.96rem, 1.35vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  text-align: center;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--orange);
  box-shadow: 0 18px 45px rgba(255, 153, 0, 0.28);
}

.button.primary:hover {
  background: var(--amber);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover {
  border-color: var(--cyan);
}

.signal-panel {
  position: absolute;
  right: 32px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.signal-panel span {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(3, 9, 15, 0.42);
}

.section-pad {
  padding: clamp(76px, 11vw, 150px) 0;
}

.section-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.wide-copy,
.method-copy p:not(.chapter) {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
}

.about {
  background: var(--band-a);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  align-items: start;
  gap: clamp(30px, 6vw, 76px);
}

.about-copy p:not(.chapter) {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
}

.about-badges {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 26px;
  padding: 30px;
  border: 1px solid rgba(7, 89, 133, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
}

.about-badges img {
  width: 100%;
  max-width: 190px;
  height: auto;
  object-fit: contain;
}

.about-badges img:first-child {
  max-width: 120px;
}

.about-why {
  margin-top: clamp(54px, 8vw, 96px);
}

.about-why h2 {
  margin-bottom: 40px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.why-card {
  padding: 26px;
  border: 1px solid rgba(7, 89, 133, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.why-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 28px 80px rgba(8, 47, 73, 0.14);
}

.why-card h3 {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.why-card p {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.about-connect {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(40px, 6vw, 68px);
  padding: 30px;
  border: 1px solid rgba(7, 89, 133, 0.16);
  border-radius: 8px;
  background: var(--white);
}

.about-connect p {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  font-weight: 700;
}

.services {
  background: var(--band-b);
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  min-height: 290px;
  padding: 26px;
  border: 1px solid rgba(7, 89, 133, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 28px 80px rgba(8, 47, 73, 0.14);
}

.service-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin-bottom: 34px;
}

.service-card p {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.method {
  color: var(--ink-soft);
  background: var(--band-a);
}

.method-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(30px, 5vw, 56px);
  align-items: start;
}

.method-copy {
  max-width: 860px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  counter-reset: flow;
}

.timeline-item {
  position: relative;
  overflow: visible;
  display: grid;
  align-content: start;
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.14), #ffffff 62%);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
}

.timeline-item:nth-child(2) {
  background: linear-gradient(145deg, rgba(255, 153, 0, 0.16), #ffffff 62%);
}

.timeline-item:nth-child(3) {
  background: linear-gradient(145deg, rgba(103, 232, 249, 0.18), #ffffff 62%);
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -23px;
  width: 18px;
  height: 18px;
  border-top: 3px solid var(--sky-dark);
  border-right: 3px solid var(--sky-dark);
  transform: translateY(-50%) rotate(45deg);
}

.timeline-item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  color: var(--white);
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
}

.timeline-item span {
  display: block;
  margin-bottom: 10px;
  color: var(--sky-dark);
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-item p {
  margin: 0;
  color: var(--ink-soft);
}

.proof {
  background: var(--band-b);
}

.proof-block {
  max-width: 760px;
  margin-bottom: 38px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.testimonial-card {
  display: grid;
  align-content: space-between;
  min-height: 330px;
  padding: 28px;
  border: 1px solid rgba(7, 89, 133, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #effaff 100%);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
}

.testimonial-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.testimonial-card div {
  display: grid;
  gap: 4px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(6, 16, 24, 0.12);
}

.testimonial-card strong {
  color: var(--ink);
  font-weight: 800;
}

.testimonial-card span {
  color: var(--sky-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.case-studies {
  background: var(--band-a);
}

/* One case study per row: the write-ups carry enough detail that three
   narrow columns would run unreadably tall. */
.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.case-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.44);
  box-shadow: 0 28px 80px rgba(8, 47, 73, 0.14);
}

.case-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.case-body {
  padding: 32px;
}

.case-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--sky-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-card p {
  margin: 14px 0 0;
  color: var(--ink-soft);
}

.case-line {
  max-width: 72ch;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ink);
}

.case-detail {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-line);
}

.case-detail h4 {
  margin: 0;
  color: var(--sky-dark);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-detail p {
  max-width: 78ch;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.case-tags li {
  padding: 5px 12px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--band-a);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.contact {
  color: var(--ink-soft);
  background: var(--band-b);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 0.65fr);
  gap: clamp(30px, 7vw, 86px);
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(1.9rem, 3vw, 3.6rem);
}

.contact-copy p:not(.chapter) {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.contact-details a {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 800;
  overflow-wrap: anywhere;
  transition: border-color 180ms ease, background 180ms ease;
}

.contact-details svg {
  width: 28px;
  height: 28px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--sky-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-details a:hover {
  border-color: rgba(14, 165, 233, 0.45);
  background: var(--white);
}

.contact-details span {
  display: block;
  color: var(--sky-dark);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-details strong {
  color: var(--ink);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(8, 47, 73, 0.08);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(7, 89, 133, 0.24);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-soft);
  font: inherit;
  min-height: 48px;
  padding: 12px 14px;
}

.contact-form textarea {
  resize: vertical;
}

.required-mark {
  color: #d92d20;
  font-weight: 900;
}

.form-legend {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.word-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.word-count[data-state="over"] {
  color: #b91c1c;
}

/* Honeypot field: off-screen rather than display:none, since some bots
   skip hidden inputs. */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status[data-state="pending"] {
  color: var(--sky-dark);
}

.form-status[data-state="success"] {
  color: #15803d;
}

.form-status[data-state="error"] {
  color: #b91c1c;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(103, 232, 249, 0.36);
  border-color: var(--cyan);
}

.site-footer {
  padding: 64px max(20px, calc((100vw - 1180px) / 2)) 28px;
  color: rgba(255, 255, 255, 0.72);
  background: #1c374b;
}

.footer-inner {
  display: grid;
  /* Last track is widened so info@karimiconsulting.com sits on one line. */
  grid-template-columns:
    minmax(240px, 1.1fr)
    repeat(2, minmax(130px, 0.5fr))
    minmax(212px, 0.72fr);
  gap: clamp(26px, 5vw, 72px);
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  display: grid;
  gap: 18px;
  max-width: 430px;
}

.footer-logo {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.footer-brand p,
.footer-bottom p {
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(103, 232, 249, 0.14);
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.94rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.footer-column a:hover {
  color: var(--cyan);
}

/* The column is sized to hold the address, so let it wrap only at real
   word boundaries rather than splitting the domain mid-token. */
.footer-contact a {
  overflow-wrap: normal;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 24px;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cinematicDrift {
  from {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
  to {
    transform: scale(1.16) translate3d(1.5%, 1%, 0);
  }
}

@media (max-width: 1180px) {
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  /* The portrait artwork already fits a phone hero. The desktop overscan
     and drift only zoom in and crop it further, so drop both. */
  .hero-media img {
    height: 100%;
    transform: none;
    animation: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* The links become a panel that drops out of the fixed bar. */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    max-height: 70svh;
    overflow-y: auto;
    /* Fully opaque on purpose. A translucent panel inside the header's
       backdrop-filter composites against the unblurred page behind it, so
       the hero bleeds through the menu. */
    background: #0b1f33;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 26px 50px rgba(0, 0, 0, 0.36);
  }

  .site-header.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 13px 14px;
    font-size: 0.9rem;
  }

  /* Four footer columns need ~712px of minimums, which does not fit here.
     Two up until the 560px rule takes it to one. */
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Footer links are 24px tall on desktop; pad them out to a comfortable
     touch target on phones. */
  .footer-column {
    gap: 0;
  }

  .footer-column a {
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }

  .hero-content {
    padding-top: 134px;
    padding-bottom: 162px;
  }

  .signal-panel {
    left: 20px;
    right: 20px;
    bottom: 24px;
    grid-template-columns: 1fr;
  }

  .signal-panel span {
    text-align: center;
  }

  .about-layout,
  .why-grid,
  .service-grid,
  .method-layout,
  .timeline,
  .case-card,
  .testimonial-grid,
  .contact-layout,
  .contact-details {
    grid-template-columns: 1fr;
  }

  .case-card img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .case-body {
    padding: 24px;
  }

  .timeline-item:not(:last-child)::after {
    top: auto;
    right: auto;
    left: 28px;
    bottom: -23px;
    transform: rotate(135deg);
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px;
  }

  .brand span {
    display: none;
  }

  .nav-cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.74rem;
  }

  .hero-content,
  .section-inner {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 4rem);
  }

  .button {
    width: 100%;
    min-height: 56px;
  }

  .service-card {
    min-height: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
