:root {
  --header-h: 72px;
  --container: 1320px;
  --section-space: clamp(7rem, 12vw, 11rem);
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-soft: #475569;
  --line: rgba(15, 23, 42, 0.08);
  --brand-primary: #0F172A;
  --brand-secondary: #37a9ae;
  --brand-deep: #020617;
  --dark: #020617;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

@media (pointer: fine) {
  html, body { cursor: none; }
  a, button, [data-cursor-magnetic] { cursor: none; }
}

h1, h2, h3 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

main {
  padding-bottom: 0;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 1.6rem);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 1.1rem;
  left: 0;
  right: 0;
  z-index: 30;
  background: transparent;
}

.nav-wrap {
  min-height: var(--header-h);
  max-width: 980px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  isolation: isolate;
  padding-inline: clamp(1.2rem, 3vw, 2rem);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.12);
}

.nav-wrap::before {
  content: none;
}

.nav-wrap::after {
  content: none;
}

.brand {
  width: 170px;
  filter: brightness(0) invert(1);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.main-nav a {
  color: #f8fafc;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.main-nav a:hover {
  color: var(--brand-secondary);
}

.btn-inline {
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.btn-inline:hover {
  background: #fff;
  color: var(--brand-primary) !important;
  border-color: #fff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #9ddae2;
  outline-offset: 2px;
}

.nav-toggle,
.nav-trigger {
  display: none;
}

.hero {
  --hero-progress: 0;
  position: relative;
  min-height: 91vh;
  display: grid;
  place-items: center;
  overflow: visible;
  margin-bottom: 0;
}

.hero-slides-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-slides,
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-slides {
  transform-origin: center;
  transform: scale(calc(1 + var(--hero-progress) * 0.12));
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: transform, opacity;
  animation: heroCycle 18s infinite;
}

.slide-1 {
  background-image: url("images/nissin/macgroupbr_1551538077_1990768137779802475_4375497037.jpg");
}

.slide-2 {
  background-image: url("images/linea/macgroupbr_1591097407_2322615851201943607_4375497037.jpg");
  animation-delay: 6s;
}

.slide-3 {
  background-image: url("images/speed_break/macgroupbr_1550492280_1981995362512413801_4375497037.jpg");
  animation-delay: 12s;
}

@keyframes heroCycle {
  0%,
  30% {
    opacity: 1;
    transform: scale(1.02);
  }

  33%,
  97% {
    opacity: 0;
    transform: scale(1.08);
  }

  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.hero-overlay {
  opacity: calc(1 - (var(--hero-progress) * 0.38));
  background:
    radial-gradient(ellipse at 50% 60%, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.0) 70%),
    radial-gradient(circle at 70% 30%, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.75) 80%),
    linear-gradient(to top, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.12) 100%);
}

/* Bottom fade — bleeds hero into the next section */
.hero::after {
  content: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 5rem;
  transform: translate3d(0, calc(var(--hero-progress) * -52px), 0);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 6.5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.38rem;
  color: #37a9ae;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.scroll-cue-arrow {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid #37a9ae;
  border-bottom: 1.5px solid #37a9ae;
  transform: rotate(45deg);
  animation: scrollBounce 1.6s ease-in-out infinite;
}

.scroll-cue-arrow:nth-child(2) {
  margin-top: -12px;
  animation-delay: 0.18s;
  opacity: 0.5;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1;  transform: rotate(45deg) translateY(0);   }
  50%       { opacity: 0.3; transform: rotate(45deg) translateY(5px); }
}

.tag {
  margin: 0;
  display: inline-block;
  color: #37a9ae;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(55, 169, 174, 0.07);
  border: 1px solid rgba(55, 169, 174, 0.25);
}

/* Hero is on a dark photo — use the teal accent */
.hero .tag {
  color: #37a9ae;
  background: rgba(55, 169, 174, 0.12);
  border-color: rgba(55, 169, 174, 0.3);
}

.hero h1 {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  max-width: 20ch;
  margin: 1.5rem 0 1.25rem;
  font-size: clamp(3.8rem, 8vw, 7rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 32px rgba(2, 6, 23, 0.55),
    0 1px 4px rgba(2, 6, 23, 0.35);
}

.hero p {
  margin: 0;
  max-width: 54ch;
  color: rgba(248, 250, 252, 0.92);
  line-height: 1.8;
  font-size: 1.15rem;
  text-shadow: 0 1px 16px rgba(2, 6, 23, 0.5);
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.hero-note {
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: rgba(248, 250, 252, 0.6);
}

.hero-proof {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
}

.hero-proof li {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  will-change: transform;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
  background: var(--brand-secondary);
  box-shadow: 0 12px 24px rgba(55, 169, 174, 0.35);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-primary);
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: transparent;
  will-change: transform;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost-dark:hover {
  background: rgba(15, 23, 42, 0.04);
}

.btn-light {
  background: #fff !important;
  color: var(--brand-primary) !important;
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.15) !important;
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.25) !important;
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-ghost-dark:hover {
  transform: translateY(-2px);
}

.trust-strip {
  margin-top: 0;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-grid article {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1rem;
  position: relative;
}

.trust-grid article:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -1rem;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--line);
}

.trust-grid strong {
  display: block;
  color: var(--brand-primary);
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
}

.trust-grid p {
  margin: 0.6rem auto 0;
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  max-width: 22ch;
}

.section {
  position: relative;
  padding: var(--section-space) 0;
}

/* Separator: only between adjacent light sections */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 2rem, 980px);
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.1), transparent);
}

.portfolio::before,
.conversion-cta::before {
  display: none;
}

.section-head {
  margin-bottom: 3.5rem;
}

.section-head.centered {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 4rem;
}

.section-head h2 {
  margin: 0.75rem auto 0;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}

.section-head p,
.section-head + p {
  max-width: 62ch;
  margin-inline: auto;
}

.expertise {
  margin-top: 0;
  padding-top: clamp(3.5rem, 6vw, 5rem);
}

.expertise .container {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  padding: clamp(3rem, 5vw, 4.5rem);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.05);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: rgba(55, 169, 174, 0.4);
  border-left: 3px solid #37a9ae;
  box-shadow: 0 16px 32px -8px rgba(55, 169, 174, 0.12);
}

.service-card h3 {
  margin: 0 0 1rem;
  color: var(--brand-primary);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.service-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

.portfolio {
  background: var(--dark);
  color: #f8fafc;
  overflow: hidden;
  padding: 0;
}

.portfolio-header {
  padding-top: var(--section-space);
  padding-bottom: 3rem;
}

.portfolio-track-wrap {
  overflow: hidden;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.portfolio .section-head .tag {
  color: #37a9ae;
  background: rgba(55, 169, 174, 0.12);
  border-color: rgba(55, 169, 174, 0.3);
}

.portfolio .section-head h2 {
  color: #fff;
}

.portfolio .section-head p {
  color: rgba(248, 250, 252, 0.7);
}

.portfolio-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  width: max-content;
  padding-left: max(2rem, calc((100vw - var(--container)) / 2));
  padding-right: max(2rem, calc((100vw - var(--container)) / 2));
  will-change: transform;
}

.project-card {
  flex: 0 0 auto;
  width: clamp(260px, 26vw, 380px);
  height: clamp(340px, 52vh, 520px);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
}

.project-card img,
.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.8) 0%, rgba(2, 6, 23, 0) 60%);
  pointer-events: none;
}

.project-card h3 {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  margin: 0;
  color: #fff;
  z-index: 2;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.project-card:hover img,
.project-card:hover video {
  transform: scale(1.08);
}

.project-card:hover {
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.8);
}

.clients {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.clients .container {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.clients-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 4rem;
  align-items: center;
}

.clients h2 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}

.clients p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 1.1rem;
}

.clients-actions {
  margin-top: 2rem;
}

.clients-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
}

.clients-carousel::before,
.clients-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.clients-carousel::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.clients-carousel::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.clients-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  animation: clientsMarquee 35s linear infinite;
}

.client-logo {
  flex: 0 0 auto;
  width: 180px;
  height: 80px;
  display: grid;
  place-items: center;
  padding: 0.5rem 1rem;
  transition: opacity 0.3s ease;
}

.client-logo:hover {
  opacity: 1;
}

.client-logo img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 80px;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(1);
  transition: all 0.3s ease;
}

.client-logo:hover img {
  opacity: 1;
  filter: grayscale(0);
}

@keyframes clientsMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ─── Custom cursor ─── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: absolute;
  top: -22px;
  left: -22px;
  width: 44px;
  height: 44px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  will-change: transform;
  transition:
    width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    background 0.3s ease;
}

.cursor-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease, background 0.3s ease;
}

body.cursor-magnetic .cursor-ring {
  width: 64px;
  height: 64px;
  top: -32px;
  left: -32px;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body.cursor-expand .cursor-ring {
  width: 88px;
  height: 88px;
  top: -44px;
  left: -44px;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body.cursor-expand .cursor-dot {
  background: #fff;
  transform: scale(1.6);
}

@media (pointer: coarse) {
  .cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-scroll-section] {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-cue-arrow {
    animation: none;
  }

  .hero-slides,
  .hero-content {
    transform: none;
  }

  .hero-overlay {
    opacity: 1;
  }

  .clients-track {
    transform: none;
  }
}

.conversion-cta {
  background: var(--dark);
  border-top: none;
}

.conversion-cta .tag {
  color: #37a9ae;
  background: rgba(55, 169, 174, 0.12);
  border-color: rgba(55, 169, 174, 0.3);
}

.conversion-box {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 4vw, 3.5rem);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.5) 0%, rgba(2, 6, 23, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.conversion-box h2 {
  margin: 1.2rem 0 0;
  color: #f8fafc;
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.conversion-box p {
  margin: 1.5rem auto 0;
  max-width: 50ch;
  color: rgba(248, 250, 252, 0.7);
  line-height: 1.8;
  font-size: 1.15rem;
}

.conversion-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.conversion-cta .btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.conversion-cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-footer {
  background: #020617;
  color: #f8fafc;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.footer-brand {
  width: auto;
  max-width: 220px;
}

.footer-brand img {
  filter: brightness(0) invert(1);
}

.social-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--brand-secondary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: #a5f3fc;
}

.footer-main h4 {
  margin: 0 0 1rem;
  color: #f8fafc;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.footer-main p,
.footer-main a {
  margin: 0;
  line-height: 1.8;
  color: rgba(248, 250, 252, 0.6);
  transition: color 0.2s ease;
}

.footer-main a:hover {
  color: #f8fafc;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-legal p {
  margin: 0;
  color: rgba(248, 250, 252, 0.5);
  line-height: 1.7;
  font-size: 0.9rem;
}

/* ─── Smooth anchor scrolling accounting for fixed header ─── */
[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* ─── Portfolio swipe hint (hidden on desktop) ─── */
.portfolio-swipe-hint {
  display: none;
}

@media (max-width: 980px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }
  
  .trust-grid article:not(:last-child)::after {
    display: none;
  }

  .portfolio-grid {
    gap: 1rem;
  }

  .clients-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: clamp(4rem, 8vw, 6rem) 0;
  }
}

@media (max-width: 860px) {
  .site-header {
    top: 0.75rem;
  }

  .nav-wrap {
    border-radius: 999px;
  }

  .nav-trigger {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
  }

  .nav-trigger span {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
  }

  .main-nav {
    position: absolute;
    top: calc(var(--header-h) + 0.5rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav a {
    color: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .btn-inline {
    border-radius: 0;
    background: rgba(255, 255, 255, 0.05);
    justify-content: flex-start;
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
  }

  .hero {
    min-height: 76vh;
  }

  .hero h1 {
    max-width: 18ch;
  }

  /* Hamburger → X animation */
  .nav-trigger span {
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-toggle:checked ~ .nav-trigger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-trigger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .nav-toggle:checked ~ .nav-trigger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Hero CTA buttons — stack on tablet */
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(2.5rem, 8vw, 3rem);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .project-card {
    width: 76vw;
    height: clamp(240px, 50vw, 320px);
  }

  .client-logo {
    width: 156px;
    height: 78px;
  }

  .hero-proof {
    gap: 0.45rem;
  }

  .hero-proof li {
    font-size: 0.72rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
  }

  /* Full-width stacked CTA buttons */
  .hero-actions {
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    text-align: center;
    justify-content: center;
    min-height: 52px;
  }

  /* Conversion section — stack buttons */
  .conversion-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .conversion-actions .btn-primary,
  .conversion-actions .btn-ghost {
    text-align: center;
    justify-content: center;
    min-height: 52px;
  }

  .conversion-box {
    padding: 3rem 1.5rem;
    border-radius: 16px;
  }

  /* Service cards — tighter on phone */
  .service-card {
    padding: 1.75rem 1.5rem;
  }

  /* Portfolio swipe hint */
  .portfolio-swipe-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(248, 250, 252, 0.45);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: "Inter", sans-serif;
    padding: 0.6rem max(1.25rem, calc((100vw - var(--container)) / 2)) 0;
  }

  .portfolio-swipe-hint svg {
    flex-shrink: 0;
    animation: swipe-nudge 1.8s ease-in-out infinite;
  }

  @keyframes swipe-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
  }

  /* Clients grid — better stacking */
  .clients-grid > div:first-child {
    text-align: center;
  }

  .clients-actions {
    justify-content: center;
    display: flex;
  }

  /* Trust numbers — larger on phone */
  .trust-grid article .number {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  /* Tighter section spacing on small screens */
  .section {
    padding: clamp(3rem, 8vw, 5rem) 0;
  }
}
