:root {
  --bg-base: #070b14;
  --bg-secondary: #0d1321;
  --surface-deep: #111a2e;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --accent-blue: #4da6ff;
  --accent-cyan: #6ee7ff;
  --glow-violet: #8b7cff;
  --text: #f5f7fa;
  --text-muted: #a7b4c8;
  --shadow-lg: 0 30px 72px rgba(2, 6, 16, 0.62);
  --shadow-md: 0 18px 38px rgba(3, 8, 21, 0.5);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --radius: 20px;
  --radius-sm: 14px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #070b14;
  background-color: #070b14;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% 6%, rgba(77, 166, 255, 0.16), transparent 34%),
    radial-gradient(circle at 84% 2%, rgba(110, 231, 255, 0.1), transparent 30%),
    radial-gradient(circle at 50% 86%, rgba(139, 124, 255, 0.12), transparent 42%),
    linear-gradient(165deg, var(--bg-base), #0a1221 44%, var(--surface-deep) 100%);
  background-color: #070b14;
  /* Safari/macOS: background-attachment: fixed + overscroll up causes a bright blue
     band at the top (fixed bg repaints wrong during rubber-band). Default scroll
     attachment matches .fx-layer fixed aurora without triggering that bug. */
  overflow-x: hidden;
  isolation: isolate;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(167, 180, 200, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 180, 200, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 96%);
  opacity: 0.2;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.modal {
  width: min(820px, 100%);
  max-height: min(90vh, 920px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(17, 26, 46, 0.72);
  box-shadow: 0 34px 90px rgba(2, 6, 18, 0.7);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-overlay.is-open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-body {
  padding: 1.35rem 1.35rem 1.5rem;
  display: grid;
  gap: 0.8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3d424d transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: #3d424d;
  border-radius: 999px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-media {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  touch-action: pan-y;
  cursor: grab;
}

.modal-media.is-dragging {
  cursor: grabbing;
}

.modal-carousel {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.modal-media .project-mock-viewport {
  aspect-ratio: auto;
  height: clamp(240px, 44vh, 420px);
  background: #060a13;
}

.modal-track {
  height: 100%;
  display: flex;
  will-change: transform;
}

.modal-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 4px;
}

.modal-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.modal-media .project-mock-viewport img.modal-image {
  object-fit: fill;
  object-position: center;
}

.modal-gallery {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 1.35rem 0;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: #3d424d transparent;
}

.modal-gallery::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.modal-gallery::-webkit-scrollbar-thumb {
  background-color: #3d424d;
  border-radius: 999px;
}

.modal-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.modal-gallery-thumb {
  width: 62px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.modal-gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.modal-gallery-thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.modal-gallery-thumb.active {
  opacity: 1;
  border-color: rgba(110, 231, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.28);
}

.modal-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #c8d8f3;
  opacity: 0.92;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
}

.modal-title-link {
  color: #dce8fa;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.modal-title-link:hover {
  color: #a7e7ff;
  border-color: rgba(110, 231, 255, 0.4);
  text-shadow: 0 0 14px rgba(110, 231, 255, 0.22);
}

.modal-title-link.is-disabled {
  pointer-events: none;
  border-bottom-color: transparent;
}

.modal-visit-hint {
  margin: -0.3rem 0 0.1rem;
  color: #95a9c6;
  font-size: 0.78rem;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.modal-desc {
  margin: 0;
  color: var(--text-muted);
}

.modal-list {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0;
  display: grid;
  gap: 0.45rem;
  color: #c9d6ea;
}

.modal-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  line-height: 1.45;
}

.modal-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 0.5rem;
  flex: 0 0 auto;
  background: rgba(110, 231, 255, 0.7);
  box-shadow: 0 0 14px rgba(110, 231, 255, 0.22);
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #eaf2ff;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 231, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.project[role="button"] {
  cursor: pointer;
}

.project[role="button"]:focus-visible {
  outline: 3px solid rgba(77, 166, 255, 0.45);
  outline-offset: 4px;
}

body > *:not(.fx-layer):not(.scroll-progress):not(.modal-overlay):not(.mobile-nav-overlay):not(.mobile-nav-drawer) {
  position: relative;
  z-index: 1;
}

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora-bg,
.grain-bg,
.vignette-bg {
  position: absolute;
  inset: 0;
}

.aurora-bg {
  background:
    radial-gradient(circle at 22% 20%, rgba(77, 166, 255, 0.14), transparent 42%),
    radial-gradient(circle at 76% 18%, rgba(110, 231, 255, 0.12), transparent 38%),
    radial-gradient(circle at 46% 80%, rgba(139, 124, 255, 0.1), transparent 42%);
  filter: blur(52px);
  opacity: 0.92;
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

.grain-bg {
  background-image: radial-gradient(rgba(255, 255, 255, 0.42) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.06;
}

.vignette-bg {
  background: radial-gradient(circle at center, transparent 42%, rgba(2, 6, 16, 0.72) 100%);
}

.scroll-progress {
  --scroll-progress: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  width: 100%;
  height: 3px;
  box-sizing: border-box;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
  /* Stable fixed layer for Safari desktop (avoids repaint trails vs. descendants). */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Real node + clip-path (no transform on the gradient): Safari/macOS often leaves
   blue “shadow” smears when a pseudo or layer uses scaleX + gradient every frame. */
.scroll-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  clip-path: inset(0 calc((1 - var(--scroll-progress, 0)) * 100%) 0 0);
  -webkit-clip-path: inset(0 calc((1 - var(--scroll-progress, 0)) * 100%) 0 0);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(13, 19, 33, 0.66);
  backdrop-filter: blur(22px) saturate(130%);
  box-shadow: 0 10px 34px rgba(2, 6, 18, 0.45);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1.2rem;
  width: 100%;
  max-width: none;
  padding-inline: clamp(1rem, 2.4vw, 2.6rem);
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.logo img {
  height: clamp(26px, 6.5vw, 40px);
  width: auto;
  max-width: min(220px, 72vw);
  object-fit: contain;
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.24s ease, filter 0.24s ease;
}

.site-header .logo:hover img {
  transform: translateY(-2px) scale(1.05);
  filter:
    drop-shadow(0 0 10px rgba(77, 166, 255, 0.32))
    drop-shadow(0 0 22px rgba(110, 231, 255, 0.2));
}

.site-footer .logo:hover img {
  transform: translateY(-2px) scale(1.05);
  filter:
    drop-shadow(0 0 10px rgba(77, 166, 255, 0.32))
    drop-shadow(0 0 22px rgba(110, 231, 255, 0.2));
}

.site-footer .logo img {
  height: clamp(22px, 5.5vw, 34px);
  max-width: min(190px, 68vw);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0 auto;
}

.nav-links a {
  color: #c3d0e6;
  padding: 0.56rem 0.96rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  border-color: rgba(110, 231, 255, 0.28);
  background: linear-gradient(
    120deg,
    rgba(77, 166, 255, 0.36),
    rgba(110, 231, 255, 0.24)
  );
  box-shadow:
    0 10px 22px rgba(77, 166, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.28rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transform: translate3d(var(--btn-x, 0), var(--btn-y, 0), 0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translate3d(var(--btn-x, 0), calc(var(--btn-y, 0) - 3px), 0) scale(1.02);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent-blue), var(--accent-cyan));
  box-shadow:
    0 14px 30px rgba(77, 166, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  box-shadow:
    0 18px 36px rgba(77, 166, 255, 0.48),
    0 0 24px rgba(110, 231, 255, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-ghost {
  color: #eaf2ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  border-color: rgba(110, 231, 255, 0.34);
  box-shadow:
    0 14px 28px rgba(4, 10, 26, 0.4),
    0 0 18px rgba(77, 166, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.page-hero {
  padding: 5rem 0 3rem;
}

[data-page="home"] .page-hero {
  padding: clamp(5.8rem, 11vh, 7.4rem) 0 clamp(4.2rem, 9vh, 6.4rem);
  min-height: calc(100svh - 88px);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-proof {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-proof span {
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  color: #d5e5ff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #d2dff3;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.4rem 0.74rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  margin-top: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3.8vw, 2.5rem);
}

h3 {
  font-size: 1.12rem;
}

.lead {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 72ch;
}

.hero-actions {
  margin-top: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-panel,
.card,
.project,
form,
.cta,
.contact-side-panel {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    rgba(17, 26, 46, 0.5);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow-lg);
  box-shadow: var(--shadow-lg), var(--inner-light);
  overflow: hidden;
}

.hero-panel::before,
.card::before,
.project::before,
form::before,
.cta::before,
.contact-side-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.02) 36%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
}

.hero-panel {
  padding: 1.35rem;
  transform: translate3d(0, var(--parallax-y, 0), 0);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hero-panel:hover {
  border-color: rgba(110, 231, 255, 0.32);
  box-shadow:
    0 30px 64px rgba(2, 8, 20, 0.62),
    0 0 24px rgba(110, 231, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-insight {
  padding: 1.5rem;
  display: grid;
  gap: 0.62rem;
}

.hero-panel-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0;
}

.hero-panel-kicker {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c8d8f3;
}

.hero-insight h3 {
  margin: 0;
}

.hero-insight .lead {
  margin: 0;
}

.hero-metrics {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.metric {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  padding: 0.95rem 0.9rem;
  transform: translate3d(0, var(--parallax-y, 0), 0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric:hover {
  border-color: rgba(110, 231, 255, 0.34);
  box-shadow:
    0 14px 26px rgba(4, 10, 26, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translate3d(0, -2px, 0);
}

.metric .num {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
  color: #dff1ff;
}

.metric .label {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.metric-note {
  margin: 0.75rem 0 0;
  color: #b9c9e2;
  font-size: 0.8rem;
  letter-spacing: 0.25px;
}

section {
  padding: 3.2rem 0;
}

.section-title {
  margin-bottom: 1.5rem;
  max-width: 84ch;
}

.section-title p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.05rem;
}

.card {
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow-md);
  transform: translate3d(0, var(--parallax-y, 0), 0)
    perspective(900px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(110, 231, 255, 0.34);
  box-shadow:
    0 24px 44px rgba(4, 10, 28, 0.54),
    0 0 22px rgba(110, 231, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card h3 {
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.4rem;
  color: #c9d6ea;
  font-size: 0.92rem;
}

.card-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  line-height: 1.45;
}

.card-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-top: 0.5rem;
  flex: 0 0 auto;
  background: rgba(110, 231, 255, 0.7);
  box-shadow: 0 0 14px rgba(110, 231, 255, 0.22);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.tag {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d9e7ff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.portfolio-actions {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
}

.project {
  grid-column: span 4;
  transform: translate3d(0, var(--parallax-y, 0), 0)
    perspective(1000px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project:hover {
  border-color: rgba(110, 231, 255, 0.34);
  box-shadow:
    0 26px 48px rgba(3, 9, 26, 0.56),
    0 0 22px rgba(77, 166, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.project-media {
  position: relative;
  padding: 0.65rem;
  min-height: 0;
  background: linear-gradient(165deg, rgba(13, 19, 33, 0.98) 0%, #080d16 55%, #0a101c 100%);
  overflow: hidden;
}

.project-mock {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #070b14;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 14px 36px rgba(2, 6, 16, 0.42);
}

.project-mock-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: linear-gradient(180deg, #161f32 0%, #10182a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.project-mock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-mock-dot--r {
  background: rgba(255, 95, 87, 0.78);
}

.project-mock-dot--y {
  background: rgba(245, 200, 90, 0.78);
}

.project-mock-dot--g {
  background: rgba(82, 196, 120, 0.72);
}

.project-mock-url {
  flex: 1;
  min-width: 0;
  height: 14px;
  margin-left: 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-mock-viewport {
  position: relative;
  aspect-ratio: 400 / 250;
  background: #070b14;
}

.project-mock-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 22%,
    transparent 78%,
    rgba(2, 6, 16, 0.35) 100%
  );
}

.project-mock-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}

.project-body {
  padding: 1rem;
}

.project-body p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  z-index: 2;
  font-size: 0.78rem;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #b9c9e2;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project:hover .project-hint,
.project:focus-visible .project-hint {
  opacity: 0.95;
  transform: translateY(0);
}

body.modal-open .project-hint {
  opacity: 0 !important;
  transform: translateY(6px) !important;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

[data-page="about"] .about-hero-copy {
  max-width: 72ch;
}

[data-page="about"] .hero-grid {
  grid-template-columns: 0.94fr 1.06fr;
  align-items: center;
  gap: 2.2rem;
}

[data-page="about"] .about-showcase {
  display: grid;
  gap: 0.7rem;
  align-self: start;
}

[data-page="about"] .about-showcase .project-mock {
  border-radius: 16px;
}

[data-page="about"] .about-showcase .project-mock-viewport {
  aspect-ratio: auto;
  height: clamp(250px, 40vh, 360px);
}

[data-page="about"] .about-showcase-image {
  object-fit: fill;
  object-position: center;
}

[data-page="about"] .about-columns {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.35rem;
  align-items: stretch;
}

[data-page="about"] .about-stack {
  display: grid;
  gap: 1.2rem;
  align-content: start;
}

[data-page="about"] .about-stack--right {
  grid-template-rows: 1fr 1fr;
  min-height: 100%;
}

[data-page="about"] .about-stack--right .card {
  height: 100%;
}

[data-page="about"] .about-stack .card h3,
[data-page="about"] .about-process .card h3 {
  margin-bottom: 0.4rem;
}

[data-page="about"] .about-stack .card,
[data-page="about"] .about-process .card {
  display: grid;
  align-content: start;
  padding: 1.08rem;
}

[data-page="about"] .about-stack .card p,
[data-page="about"] .about-process .card p {
  margin-top: 0;
  line-height: 1.62;
}

[data-page="about"] .about-process {
  gap: 1.15rem;
}

[data-page="services"] .services-info-row {
  padding: 1.4rem 0;
}

[data-page="services"] .services-hero-copy {
  max-width: 72ch;
  margin-bottom: 0;
}

[data-page="services"] .hero-grid {
  grid-template-columns: 0.94fr 1.06fr;
  align-items: start;
  gap: 2.2rem;
}

[data-page="services"] .services-showcase {
  display: grid;
  align-self: start;
  margin-top: 0.35rem;
}

[data-page="services"] .services-showcase .project-mock {
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(2, 6, 16, 0.44);
}

[data-page="services"] .services-showcase .project-mock-viewport {
  aspect-ratio: auto;
  height: clamp(250px, 40vh, 360px);
}

[data-page="services"] .services-showcase-image {
  object-fit: fill;
  object-position: center;
}

[data-page="services"] .services-info-row + .services-info-row {
  padding-top: 0.45rem;
}

[data-page="services"] .card p {
  line-height: 1.64;
}

[data-page="services"] .cards {
  gap: 1.15rem;
  grid-auto-rows: 1fr;
}

[data-page="services"] .cards > .card,
[data-page="services"] .services-info-row .split > .card {
  display: grid;
  align-content: start;
}

[data-page="services"] .card-list {
  margin-top: 0.82rem;
}

.cta {
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  align-items: center;
  justify-content: space-between;
  transform: translate3d(0, var(--parallax-y, 0), 0);
  box-shadow: var(--shadow-lg), var(--inner-light);
}

.cta p {
  color: var(--text-muted);
  margin: 0.55rem 0 0;
}

.cta h2 {
  font-size: clamp(1.42rem, 2.35vw, 2rem);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  align-items: stretch;
}

[data-page="contact"] .page-hero {
  min-height: auto;
  padding: 3.6rem 0 1.2rem;
}

[data-page="contact"] main > section + section {
  padding-top: 1.35rem;
}

form {
  padding: 1.15rem;
}

/* Desktop: scrollport ends just under Project details; “Design references”+ need a short scroll inside the form */
[data-page="contact"] #contact-form {
  max-height: min(37rem, calc(100svh - 13rem));
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 196, 240, 0.26) rgba(10, 16, 30, 0.48);
  background: rgba(14, 23, 40, 0.92);
}

[data-page="contact"] #contact-form::before {
  content: none;
}

[data-page="contact"] #contact-form::-webkit-scrollbar {
  width: 10px;
}

[data-page="contact"] #contact-form::-webkit-scrollbar-thumb {
  background: rgba(160, 196, 240, 0.26);
  border-radius: 999px;
  border: 2px solid rgba(12, 20, 36, 0.6);
}

[data-page="contact"] #contact-form::-webkit-scrollbar-track {
  background: rgba(10, 16, 30, 0.48);
  border-radius: 999px;
}

.field {
  margin-bottom: 0.86rem;
}

.field.has-error label {
  color: #ffb9c0;
}

.field.has-error input:not([type="checkbox"]),
.field.has-error select,
.field.has-error textarea {
  border-color: rgba(255, 126, 143, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 126, 143, 0.16);
}

.field.has-error .checkbox-label {
  color: #ffb9c0;
}

.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.45;
  max-width: max-content;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.22rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

[data-page="contact"] #contact-form .field > label:not(.checkbox-label) {
  pointer-events: none;
  cursor: default;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(17, 26, 46, 0.6);
  color: var(--text);
  padding: 0.74rem 0.86rem;
  font: inherit;
}

.iti {
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 3;
}

/* Tabular figures keep spaced digit groups from looking uneven; min-width:0 avoids grid squeeze. */
.iti__tel-input {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.iti--separate-dial-code .iti__tel-input {
  padding-left: var(--phone-input-offset, 8.6rem);
}

.iti__country-container .iti__selected-country {
  background: rgba(13, 22, 40, 0.7);
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px 0 0 11px;
  min-width: 6.2rem;
  transition: background-color 0.18s ease;
}

.iti__country-container .iti__selected-country:hover {
  background: rgba(20, 33, 58, 0.85);
}

.iti__selected-dial-code,
.iti__arrow {
  color: var(--text);
}

.iti__country-list {
  width: 100%;
  max-height: 8.8rem;
  overflow-x: hidden;
  background: rgba(10, 16, 30, 0.97);
  border: 0;
  border-radius: 12px;
  color: var(--text);
}

.iti__country:hover,
.iti__country.iti__highlight {
  background-color: rgba(110, 231, 255, 0.14);
}

.iti__dropdown-content {
  top: calc(100% + 0.45rem);
  left: 0;
  right: auto;
  width: min(12.5rem, calc(100vw - 2.5rem)) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 30px rgba(1, 6, 18, 0.5);
  background: rgba(10, 16, 30, 0.97);
}

/* Kept for compatibility if country search is re-enabled; with countrySearch:false the nodes are absent. */
.iti__search-input-wrapper,
.iti__search-input {
  display: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(110, 231, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.2);
}

textarea {
  min-height: 130px;
  resize: none;
  overflow-y: hidden;
}

.status {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.status.error {
  color: #ffb9c0;
}

.status.success {
  color: #97f6ca;
}

/* Contact HTML only — hidden on desktop; shown as fixed band under @media (max-width: 980px) */
.contact-safe-matte {
  display: none;
}

/*
 * Contact-only: was position:fixed + full-screen + backdrop-filter + opacity:0 when “closed”.
 * iOS Safari still composites that layer and it can leave a transparent band by the Dynamic Island.
 * display:none removes it from the tree until the toast is shown.
 */
.inquiry-toast-overlay {
  position: fixed !important;
  inset: 0 !important;
  display: none;
  place-items: center;
  padding: 0;
  background: rgba(2, 8, 18, 0.32);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.inquiry-toast {
  position: relative;
  width: min(460px, calc(100vw - 2rem));
  border: 1px solid rgba(151, 246, 202, 0.4);
  border-radius: 14px;
  background:
    linear-gradient(140deg, rgba(151, 246, 202, 0.16), rgba(151, 246, 202, 0.07)),
    rgba(9, 20, 32, 0.96);
  color: #d5ffe9;
  padding: 1rem 1.08rem;
  text-align: center;
  line-height: 1.5;
  box-shadow:
    0 24px 46px rgba(3, 8, 20, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.inquiry-toast-overlay.is-visible {
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

.inquiry-toast-overlay.is-visible .inquiry-toast {
  transform: translateY(0) scale(1);
}

.contact-side-panel {
  padding: 0;
  display: grid;
  gap: 0.95rem;
  height: min(37rem, calc(100svh - 13rem));
  max-height: min(37rem, calc(100svh - 13rem));
  min-height: 0;
  align-content: start;
  align-items: start;
  grid-template-rows: max-content minmax(0, 1fr);
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.contact-side-panel::before {
  content: none;
}

.contact-direct-card {
  min-height: 0;
  height: auto;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.02rem 1.08rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.contact-direct-card h3 {
  margin-bottom: 0.78rem;
  font-size: 1.25rem;
}

.contact-direct-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.contact-direct-row + .contact-direct-row {
  margin-top: 0.85rem;
}

.contact-direct-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #aecdff;
}

.contact-direct-link {
  color: #dceaff;
  word-break: break-word;
}

.contact-direct-link:hover {
  color: #ffffff;
}

.contact-map-canvas {
  min-height: 0;
  height: 100%;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 20, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(4, 10, 26, 0.32);
}

.contact-map-canvas > iframe,
.contact-map-canvas > div {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.contact-map-fallback {
  margin: 0;
  height: 100%;
  min-height: 390px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 2.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 19, 33, 0.5);
  backdrop-filter: blur(12px);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-inner p {
  margin: 0;
  color: var(--text-muted);
}

.footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.1px;
}

.footer-email,
.footer-phone {
  color: #d9e7ff;
  padding: 0;
  border-radius: 0;
  border: 0;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.24s ease,
    filter 0.24s ease;
}

.footer-email:hover,
.footer-phone:hover {
  color: #ffffff;
  transform: translateY(-1px) scale(1.02);
  filter:
    drop-shadow(0 0 8px rgba(77, 166, 255, 0.26))
    drop-shadow(0 0 16px rgba(110, 231, 255, 0.15));
}

.footer-divider {
  opacity: 0.55;
}

.footer-copy {
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.scrub-text {
  will-change: transform, opacity;
}

/* Mobile nav: only exists on small screens — never show on desktop */
@media (min-width: 981px) {
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -18px, 0) scale(1.03);
  }
}

@media (max-width: 980px) {
  body.nav-open {
    overflow: auto;
  }

  /*
   * Contact page only: maps API + intl-tel + inquiry overlay are unique to this route.
   * viewport-fit=cover is set only on contact/index.html so env() applies; other pages stay unchanged.
   */
  body[data-page="contact"] {
    padding-top: env(safe-area-inset-top, 0px);
    background-attachment: scroll;
  }

  body[data-page="contact"] .contact-safe-matte {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: env(safe-area-inset-top, 0px);
    background-color: var(--bg-base);
    z-index: 9998;
    pointer-events: none;
  }

  /* No top bar: header is only a centered logo at the start of the page */
  .site-header {
    position: static;
    z-index: 1;
    overflow: visible;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .nav-wrap {
    position: relative;
    z-index: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    max-width: none;
    padding: 1.35rem 1rem 0.65rem;
    gap: 0;
  }

  .site-header .logo {
    margin-inline: auto;
  }

  .site-header .logo img {
    height: clamp(42px, 12vw, 62px);
    max-width: min(340px, 92vw);
  }

  .site-header .logo:hover img {
    transform: none;
    filter: none;
  }

  [data-page="home"] .page-hero {
    min-height: auto;
    padding: 2.25rem 0 3.6rem;
  }

  body:not([data-page="home"]) .page-hero {
    padding-top: 2rem;
  }

  body[data-page="contact"] .page-hero {
    padding-top: 2rem;
    padding-bottom: 1.2rem;
  }

  .hero-grid,
  .cards,
  .split,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

  /* Services hero: two-column rule is more specific than `.hero-grid` above — stack title, then mock */
  [data-page="services"] .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  [data-page="services"] .services-showcase {
    margin-top: 0;
    width: 100%;
    max-width: none;
  }

  [data-page="services"] .services-showcase .project-mock-viewport {
    aspect-ratio: 400 / 250;
    height: auto;
  }

  [data-page="services"] .services-showcase-image {
    object-fit: contain;
    background: #070b14;
  }

  [data-page="contact"] #contact-form {
    max-height: none;
    /* Inline intl-tel-input dropdown is position:absolute; parent overflow-y:auto clips it on small screens. */
    overflow: visible;
  }

  .contact-side-panel {
    height: auto;
    max-height: none;
    grid-template-rows: max-content auto;
  }

  /* Map: explicit aspect from width — fixes collapsed % heights when panel is height:auto */
  .contact-map-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    min-height: 0;
    max-height: none;
    /* Own stacking context — reduces iOS glitches with Maps/iframe vs fixed body background */
    isolation: isolate;
  }

  .contact-map-fallback {
    min-height: 0;
    height: 100%;
  }

  [data-page="about"] .about-columns {
    grid-template-columns: 1fr;
  }

  .project {
    grid-column: span 6;
  }

  .modal-overlay {
    padding: max(1.75rem, calc(env(safe-area-inset-top, 0px) + 1.25rem)) 0.75rem
      max(2.25rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem));
  }

  .modal {
    width: 100%;
    max-height: min(66dvh, calc(100dvh - 8.5rem));
    border-radius: 16px;
    min-height: 0;
  }

  .modal-media {
    flex-shrink: 0;
  }

  .modal-media .project-mock-viewport {
    height: clamp(188px, 28vh, 280px);
  }

  .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.65rem 0.85rem 0.95rem;
    gap: 0.5rem;
  }

  .modal-gallery {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.55rem 1rem 0.1rem;
  }

  .modal-gallery-thumb {
    flex: 0 0 auto;
  }

  .modal-close {
    top: 0.65rem;
    right: 0.65rem;
    padding: 0.52rem 0.74rem;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1.3rem, var(--max));
  }

  /* About hero (phone): two-column `.hero-grid` rule is more specific — stack copy, then mock */
  [data-page="about"] .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    align-items: start;
  }

  [data-page="about"] .about-showcase {
    width: 100%;
    max-width: none;
    margin-top: 0;
  }

  [data-page="about"] .about-showcase .project-mock-viewport {
    aspect-ratio: 400 / 250;
    height: auto;
  }

  [data-page="about"] .about-showcase-image {
    object-fit: contain;
    background: #070b14;
  }

  /* About — process: steps 1–2 side by side, step 3 full width below */
  [data-page="about"] .about-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  [data-page="about"] .about-process .card:nth-child(3) {
    grid-column: 1 / -1;
  }

  [data-page="about"] .about-process .card {
    padding: 0.82rem 0.7rem;
  }

  [data-page="about"] .about-process .card h3 {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.32rem;
  }

  [data-page="about"] .about-process .card p {
    font-size: 0.74rem;
    line-height: 1.4;
  }

  /* About — top cards: 2 | 2, then full-width, then 2 | 2 (DOM: L1,L2,L3,R1,R2) */
  [data-page="about"] .about-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: stretch;
  }

  [data-page="about"] .about-stack {
    display: contents;
  }

  [data-page="about"] .about-stack--left > .card:nth-child(3) {
    grid-column: 1 / -1;
  }

  [data-page="about"] .about-stack--right .card {
    height: auto;
    min-height: 0;
  }

  [data-page="about"] .about-columns .card {
    padding: 0.82rem 0.7rem;
  }

  [data-page="about"] .about-columns .card h3 {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.32rem;
  }

  [data-page="about"] .about-columns .card p {
    font-size: 0.74rem;
    line-height: 1.4;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.55rem;
  }

  .hero-actions .btn {
    width: auto;
    max-width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.86rem;
  }

  /* Home — “Websites for businesses…” cards: 2×2 on phone */
  [data-page="home"] .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  [data-page="home"] .cards .card {
    padding: 0.82rem 0.7rem;
  }

  [data-page="home"] .cards .card h3 {
    font-size: 0.92rem;
    line-height: 1.2;
    margin-bottom: 0.4rem;
  }

  [data-page="home"] .cards .card p {
    font-size: 0.76rem;
    line-height: 1.38;
  }

  /* Services — website type cards: 2×2 on phone (includes bullet lists) */
  [data-page="services"] .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  [data-page="services"] .cards .card {
    padding: 0.75rem 0.58rem;
  }

  [data-page="services"] .cards .card h3 {
    font-size: 0.88rem;
    line-height: 1.2;
    margin-bottom: 0.32rem;
    text-align: center;
  }

  [data-page="services"] .cards .card p {
    font-size: 0.7rem;
    line-height: 1.34;
  }

  [data-page="services"] .cards .card-list {
    margin-top: 0.45rem;
    gap: 0.26rem;
    font-size: 0.65rem;
  }

  [data-page="services"] .cards .card-list li {
    gap: 0.32rem;
    line-height: 1.32;
  }

  [data-page="services"] .cards .card-list li::before {
    width: 5px;
    height: 5px;
    margin-top: 0.4rem;
  }

  .project {
    grid-column: span 12;
  }

  .cta {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.15rem 1rem;
    gap: 0.65rem;
  }

  .cta > div:first-of-type {
    text-align: left;
    width: 100%;
  }

  .cta h2 {
    font-size: 1.18rem;
    line-height: 1.22;
  }

  .cta p {
    margin-top: 0.38rem;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .cta .btn {
    width: auto;
    max-width: 100%;
    align-self: center;
    padding: 0.55rem 1rem;
    font-size: 0.86rem;
  }

  .footer-meta {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .footer-divider {
    display: none;
  }

  section {
    padding: 2.8rem 0;
  }
}

@media (max-width: 560px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .contact-map-canvas {
    aspect-ratio: 5 / 4;
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none !important;
  }

  .menu-toggle {
    display: none !important;
  }

  /* Flush to the right bezel: no gap, no right border/radius — reads as growing from the edge */
  .mobile-nav-drawer {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed !important;
    top: 96px;
    right: env(safe-area-inset-right, 0px) !important;
    left: auto !important;
    bottom: auto;
    width: 2.55rem;
    max-width: calc(100vw - env(safe-area-inset-left, 0px) - 0.5rem);
    margin: 0;
    transform: none !important;
    z-index: 2147483647 !important;
    background: rgba(14, 20, 34, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    border-radius: 11px 0 0 11px;
    box-shadow:
      -8px 6px 24px rgba(2, 8, 22, 0.48),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition:
      width 0.24s ease,
      box-shadow 0.2s ease,
      opacity 0.22s ease,
      filter 0.22s ease;
  }

  .mobile-nav-drawer.open {
    width: min(54vw, 178px);
    border-radius: 12px 0 0 12px;
    max-height: min(52vh, 320px);
  }

  .mobile-nav-tab {
    flex: 0 0 auto;
    width: 100%;
    height: 2.55rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #e6f0ff;
    font: inherit;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition:
      filter 0.2s ease,
      border-color 0.2s ease;
    border-bottom: 1px solid transparent;
  }

  .mobile-nav-drawer.open .mobile-nav-tab {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-tab:hover {
    filter: brightness(1.08);
  }

  .mobile-nav-overlay {
    position: fixed !important;
    inset: 0;
    z-index: 2147483645;
    background: rgba(5, 10, 18, 0.42);
    display: none;
    pointer-events: auto;
  }

  .mobile-nav-overlay.open {
    display: block;
  }

  .mobile-nav-panel {
    position: relative !important;
    top: auto;
    right: auto;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 0.4rem;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: auto;
    pointer-events: none;
    display: grid !important;
    gap: 0.28rem;
    align-content: start;
    visibility: hidden;
    box-sizing: border-box;
    transition:
      max-height 0.24s ease,
      opacity 0.2s ease,
      padding-top 0.24s ease,
      padding-bottom 0.24s ease,
      visibility 0.24s ease;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav-drawer.open .mobile-nav-panel {
    max-height: 260px;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0.35rem 0.4rem 0.45rem;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
  }

  .mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
  }

  .mobile-nav-list li {
    margin: 0;
    padding: 0;
  }

  .mobile-nav-list a {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 0.48rem 0.58rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    color: #e6f0ff;
    text-decoration: none;
    box-sizing: border-box;
    min-height: 2.35rem;
  }

  .mobile-nav-list a:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #f2f6ff;
  }

  .mobile-nav-list a.active {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    color: #f2f6ff;
    font-weight: 600;
  }

  /* Calmer motion on small screens only (desktop unchanged): no scroll parallax/scrub in JS; subtle press */
  .scrub-text {
    will-change: auto;
  }

  .btn {
    transform: none !important;
    transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  }

  .btn:hover {
    transform: scale(1.02) !important;
  }

  .btn:active {
    transform: scale(1.045) !important;
  }

  .btn-primary:hover {
    box-shadow:
      0 14px 30px rgba(77, 166, 255, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .hero-panel,
  .metric,
  .cta {
    transform: none !important;
  }

  .card,
  .project {
    transform: none !important;
    transform-style: flat !important;
  }

  .hero-panel:hover {
    border-color: var(--glass-border);
    box-shadow: var(--shadow-lg), var(--inner-light);
  }

  .metric:hover {
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  .card:hover {
    border-color: var(--glass-border);
    box-shadow: var(--shadow-lg), var(--inner-light);
  }

  .project:hover {
    border-color: var(--glass-border);
    box-shadow: var(--shadow-lg), var(--inner-light);
  }

  .site-footer {
    margin-top: 2rem;
    padding: 1.2rem 0 1.4rem;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem clamp(1.1rem, 5vw, 2rem);
    text-align: center;
  }

  .footer-inner p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .site-footer .logo {
    margin: 0;
    line-height: 0;
    flex-shrink: 0;
    align-self: center;
  }

  .footer-meta {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    line-height: 1.5;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(100%, 16.5rem);
    text-align: center;
    overflow-wrap: anywhere;
  }

  .footer-meta .footer-phone {
    order: 1;
  }

  .footer-meta .footer-email {
    order: 2;
  }

  .footer-meta .footer-copy {
    order: 3;
  }

  .footer-divider {
    display: none;
  }

  .site-footer .logo img {
    height: clamp(22px, 5.2vw, 30px);
    max-width: min(132px, 38vw);
  }

  .site-footer .logo:hover img {
    transform: none;
    filter: none;
  }

  .footer-email:hover,
  .footer-phone:hover {
    transform: none;
    filter: none;
  }

  /* Home hero — Client Feedback metrics: three compact tiles in one row on phone */
  .hero-insight .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
    margin-top: 0.5rem;
    align-items: stretch;
  }

  .hero-insight .hero-metrics .metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.32rem;
    text-align: center;
    min-height: 0;
  }

  .hero-insight .hero-metrics .metric .num {
    font-size: clamp(0.88rem, 2.8vw, 1.05rem);
    line-height: 1.15;
  }

  .hero-insight .hero-metrics .metric .label {
    font-size: 0.6rem;
    line-height: 1.2;
    margin-top: 0.2rem;
  }

  /* Below project modal (z-index 9999): no taps, reads as background */
  body.modal-open .mobile-nav-overlay,
  body.modal-open .mobile-nav-drawer {
    z-index: 9980 !important;
    pointer-events: none !important;
  }

  body.modal-open .mobile-nav-drawer {
    opacity: 0.45;
    filter: saturate(0.72) brightness(0.84);
  }
}
