/* DAVID INTEGRATED SERVICES — shared stylesheet */
:root {
  --navy: #0b1f33;
  --navy-deep: #071522;
  --ink: #142433;
  --muted: #4d5f72;
  --accent: #1aa6a0;
  --accent-dark: #12887f;
  --accent-soft: #e6f6f5;
  --bg: #f3f6f9;
  --surface: #ffffff;
  --border: #d5dee8;
  --border-strong: #b8c5d4;
  --success: #1a7a52;
  --error: #b42318;
  --shadow: 0 12px 40px rgba(11, 31, 51, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1120px;
  --header-h: 72px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--navy);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

p:last-child {
  margin-bottom: 0;
}

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--surface);
}

.section-dark {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #e8eef4;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark p {
  color: #b7c5d4;
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.section-dark .section-label {
  color: var(--accent);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 246, 249, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(11, 31, 51, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--navy);
}

.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--navy);
  background: rgba(11, 31, 51, 0.04);
}

.nav-cta {
  margin-left: 0.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

.btn-light:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--navy);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--navy-deep);
  background-image: url("hero_back.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 21, 34, 0.88) 0%, rgba(7, 21, 34, 0.68) 48%, rgba(7, 21, 34, 0.4) 100%),
    linear-gradient(to top, rgba(7, 21, 34, 0.7) 0%, transparent 45%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 9vw, 6rem);
  max-width: 38rem;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  margin-right: auto;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: #c5d2df;
  max-width: 34rem;
}

.hero .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.hero .btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Service / industry grids */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

/* Services — editorial rail */
.section-services {
  background:
    linear-gradient(180deg, #eef3f7 0%, var(--bg) 40%, var(--bg) 100%);
  overflow: hidden;
}

.services-layout {
  display: grid;
  gap: 2.5rem;
}

.services-aside h2 {
  margin-bottom: 1rem;
}

.services-aside > p {
  max-width: 28rem;
}

.services-aside-cta {
  margin-top: 1.5rem;
}

.services-rail {
  position: relative;
  display: grid;
  gap: 1.75rem;
}

.services-rail::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(26, 166, 160, 0.15));
  border-radius: 2px;
}

.service-band {
  position: relative;
  display: grid;
  gap: 1.15rem;
  padding-left: 2.75rem;
}

.service-band::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  z-index: 1;
}

.service-band-media {
  position: relative;
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
  isolation: isolate;
}

.service-band-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 31, 51, 0.18), transparent 55%);
  pointer-events: none;
}

.service-band-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.service-band:hover .service-band-media img {
  transform: scale(1.04);
}

.service-band-copy {
  position: relative;
}

.service-index {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(26, 166, 160, 0.45);
  margin-bottom: 0.65rem;
}

.service-band-copy h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  margin-bottom: 0.55rem;
}

.service-points {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}

.service-points li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.975rem;
}

.service-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

.industries-grid {
  grid-template-columns: 1fr;
}

.industry-card {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.industry-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.industry-card h3 {
  margin-bottom: 0.4rem;
}

.icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Process */
.process-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.process-step {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.process-num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

/* Case studies — metric dossiers */
.section-cases {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(26, 166, 160, 0.12), transparent 55%),
    linear-gradient(180deg, #0b1f33 0%, #0a1a2b 55%, #071522 100%);
  color: #c5d2df;
}

.section-cases .section-label {
  color: var(--accent);
}

.section-cases h2,
.section-cases h3,
.section-cases h4 {
  color: #fff;
}

.section-cases p {
  color: #a8b8c8;
}

.cases-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cases-header-note {
  max-width: 34rem;
  margin: 0;
  font-size: 0.975rem;
}

.cases-stack {
  display: grid;
  gap: 1.25rem;
}

.case-panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem 0 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.case-panel:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.case-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.15rem 1.25rem;
  background: rgba(26, 166, 160, 0.12);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.case-metric-value {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 4.25rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.case-metric-label {
  margin-top: 0.55rem;
  font-size: 0.925rem;
  font-weight: 500;
  line-height: 1.4;
  color: #d5e2ee;
  max-width: 14rem;
}

.case-meta {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.case-story h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin-bottom: 1rem;
}

.case-flow {
  display: grid;
  gap: 1rem;
}

.case-flow h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fd4cf;
  margin-bottom: 0.35rem;
}

.case-flow p {
  margin: 0;
  font-size: 0.975rem;
}

.case-visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}

.case-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(7, 21, 34, 0.15), transparent 50%);
  pointer-events: none;
}

.case-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.case-panel:hover .case-visual img {
  transform: scale(1.04);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.testimonial {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.testimonial blockquote {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #e4ecf4;
}

.testimonial cite {
  display: block;
  font-style: normal;
}

.testimonial .name {
  font-weight: 600;
  color: #fff;
}

.testimonial .role {
  font-size: 0.9rem;
  color: #9eb0c2;
}

/* About */
.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.about-grid img {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
}

.mission-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.mission-box strong {
  display: block;
  font-family: var(--font-display);
  color: var(--navy);
  margin-bottom: 0.35rem;
}

/* Achievements */
.achievements-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
}

.achievement {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.achievement .icon-wrap {
  margin-inline: auto;
}

.achievement-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.achievement-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.blog-body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

.blog-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.blog-body p {
  font-size: 0.975rem;
  flex: 1;
}

/* FAQ */
.faq-list {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: fit-content;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.2s;
  margin-top: -4px;
}

.faq-item[open] summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}

.faq-item .faq-a {
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item .icon-wrap {
  margin-bottom: 0;
  flex-shrink: 0;
}

.contact-item a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-item span,
.contact-item address {
  font-style: normal;
  color: #9eb0c2;
  display: block;
  margin-top: 0.15rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 166, 160, 0.2);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin: 0;
  font-size: 0.925rem;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

.final-cta {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.final-cta h2 {
  color: #fff;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #a8b8c8;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  color: #8fa1b3;
  font-size: 0.95rem;
  max-width: 18rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col a {
  color: #a8b8c8;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: #a8b8c8;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem;
  transform: translateY(110%);
  transition: transform 0.35s var(--ease);
  pointer-events: none;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-inner {
  width: min(100%, 720px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--navy);
  color: #dce5ee;
  border-radius: var(--radius);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
}

.cookie-inner p {
  flex: 1 1 240px;
  margin: 0;
  font-size: 0.925rem;
  color: #c5d2df;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-actions .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
}

/* Terms page */
.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: #b7c5d4;
  max-width: 36rem;
  margin: 0;
}

.page-hero-updated {
  margin-top: 1rem !important;
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent) !important;
}

.legal-content {
  background: var(--surface);
}

.legal-content .container {
  max-width: 740px;
}

.legal-content h2 {
  margin-top: 2.25rem;
  font-size: 1.35rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.legal-content li {
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.legal-meta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.925rem;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: rise 0.8s var(--ease) both;
  }

  .service-band,
  .process-step,
  .case-panel,
  .achievement,
  .blog-card,
  .testimonial {
    animation: rise 0.6s var(--ease) both;
  }

  .service-band:nth-child(2),
  .process-grid .process-step:nth-child(2),
  .case-panel:nth-child(2),
  .achievements-grid .achievement:nth-child(2),
  .blog-grid .blog-card:nth-child(2),
  .testimonials-grid .testimonial:nth-child(2) {
    animation-delay: 0.08s;
  }

  .service-band:nth-child(3),
  .process-grid .process-step:nth-child(3),
  .case-panel:nth-child(3),
  .achievements-grid .achievement:nth-child(3),
  .blog-grid .blog-card:nth-child(3),
  .testimonials-grid .testimonial:nth-child(3) {
    animation-delay: 0.16s;
  }

  .process-grid .process-step:nth-child(4),
  .achievements-grid .achievement:nth-child(4),
  .blog-grid .blog-card:nth-child(4) {
    animation-delay: 0.24s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet ~768–1024 */
@media (min-width: 768px) {
  .services-layout {
    gap: 3rem;
  }

  .services-rail {
    gap: 2.25rem;
  }

  .services-rail::before {
    left: 1.35rem;
  }

  .service-band {
    grid-template-columns: 1.05fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding-left: 3.25rem;
  }

  .service-band::before {
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .service-band--reverse .service-band-media {
    order: 2;
  }

  .service-band--reverse .service-band-copy {
    order: 1;
  }

  .service-band-media {
    border-radius: var(--radius);
  }

  .service-band-media img {
    aspect-ratio: 5 / 4;
  }

  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }

  .faq-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 1rem;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-header {
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: end;
  }

  .case-panel {
    grid-template-columns: 0.7fr 1.2fr;
    gap: 1.35rem 1.5rem;
    align-items: stretch;
  }

  .case-visual {
    grid-column: 1 / -1;
  }

  .case-visual img {
    aspect-ratio: 21 / 9;
  }

  .case-flow {
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 2.5rem;
    align-items: center;
  }

  .about-grid img {
    max-width: none;
    height: 100%;
    max-height: 560px;
  }

  .achievements-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .hero-content {
    max-width: 42rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .services-layout {
    grid-template-columns: minmax(240px, 0.85fr) 1.4fr;
    gap: 3.5rem;
    align-items: start;
  }

  .services-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    padding-right: 0.5rem;
  }

  .services-rail {
    gap: 2.75rem;
  }

  .service-band {
    gap: 1.75rem;
  }

  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .faq-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 1.15rem;
  }

  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .case-panel {
    grid-template-columns: 0.55fr 1.15fr 0.9fr;
    gap: 1.75rem;
    align-items: center;
    padding: 1.75rem 0 2rem;
  }

  .case-visual {
    grid-column: auto;
  }

  .case-panel--invert .case-metric {
    order: 3;
  }

  .case-panel--invert .case-story {
    order: 2;
  }

  .case-panel--invert .case-visual {
    order: 1;
  }

  .case-visual img {
    aspect-ratio: 4 / 5;
    min-height: 280px;
  }

  .case-flow {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    align-items: center;
  }

  .hero-content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Mobile nav */
@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav a {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .nav-cta {
    margin: 1rem 0 0;
  }

  .nav-cta .btn {
    width: 100%;
  }
}

/* Small mobile refinements */
@media (max-width: 427px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1;
  }
}

@media (min-width: 428px) and (max-width: 767px) {
  .achievements-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}
