:root {
  --bg: #0a0f1c;
  --bg-elev: #12182a;
  --ink: #eef1fb;
  --muted: #9aa6c7;
  --line: rgba(199, 211, 254, 0.14);
  --accent: #6174BA;
  --accent-2: #C7D3FE;
  --wa: #25d366;
  --shadow: 0 30px 80px rgba(8, 12, 28, 0.5);
  --radius: 22px;
  --font-ar: "IBM Plex Sans Arabic", sans-serif;
  --font-en: "Sora", sans-serif;
  --nav-h: 72px;
}

html[data-theme="light"] {
  --bg: #eef1fb;
  --bg-elev: #ffffff;
  --ink: #1a2240;
  --muted: #5a6488;
  --line: rgba(97, 116, 186, 0.16);
  --accent: #6174BA;
  --accent-2: #8a9ad4;
  --shadow: 0 24px 60px rgba(26, 34, 64, 0.12);
}

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

html {
  scroll-behavior: auto;
}

html,
body,
.protected-page {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.protected-page img,
.protected-page svg,
.protected-page video,
.protected-page canvas {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
  -webkit-touch-callout: none;
}

/* Allow typing/select inside the order form only */
.protected-page input,
.protected-page textarea,
.protected-page select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* Hide / neutralize browser/extension translation chrome */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-tooltip,
.goog-text-highlight,
#goog-gt-tt,
.skiptranslate,
font > font {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body {
  top: 0 !important;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(97, 116, 186, 0.22), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(199, 211, 254, 0.14), transparent 50%),
    var(--bg);
  font-family: var(--font-ar);
  line-height: 1.65;
  overflow-x: hidden;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orb {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  opacity: 0.35;
}

.orb-a {
  width: 340px;
  height: 340px;
  background: var(--accent);
  top: 12%;
  inset-inline-start: -80px;
  animation: floaty 12s ease-in-out infinite;
}

.orb-b {
  width: 280px;
  height: 280px;
  background: var(--accent-2);
  bottom: 10%;
  inset-inline-end: -60px;
  animation: floaty 15s ease-in-out infinite reverse;
}

@keyframes floaty {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 28px, 0);
  }
}

.nav,
main,
.footer,
.fab-wa {
  position: relative;
  z-index: 1;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-en);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
  margin-bottom: 1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.hero-brand-chip:hover,
.logo-to-contact:hover .brand-logo,
a.logo-float:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-1px);
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 700;
}

.hero-brand-chip img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-brand-chip strong {
  display: block;
  font-family: var(--font-en);
  line-height: 1.1;
}

.hero-brand-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.logo-float {
  position: absolute;
  inset-inline-end: 1rem;
  top: 1rem;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, white);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 2;
  background: #1c2a55;
  display: block;
  cursor: pointer;
}

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 12, 28, 0.72);
  backdrop-filter: blur(8px);
}

.welcome-modal[hidden] {
  display: none !important;
}

body.welcome-open {
  overflow: hidden;
}

.welcome-card {
  width: min(100%, 420px);
  padding: 1.6rem 1.4rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  text-align: center;
}

.welcome-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line));
}

.welcome-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.45rem;
}

.welcome-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-cta-band {
  padding-top: 1rem;
}

.contact-cta-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 45%),
    var(--bg-elev);
}

.contact-page {
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 3rem) 2rem;
}

.contact-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0;
}

.contact-hero-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.contact-hero-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.contact-actions.inline {
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.contact-form {
  box-shadow: var(--shadow);
}

a.contact-logo {
  display: inline-block;
  position: relative;
  text-decoration: none;
}

@media (max-width: 900px) {
  .contact-hero,
  .contact-cta-card {
    grid-template-columns: 1fr;
  }

  .contact-cta-card .btn {
    justify-self: start;
  }
}

.logo-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toast {
  position: fixed;
  top: calc(var(--nav-h) + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  min-width: min(92vw, 360px);
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 600;
}

.toast.success {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.toast.error {
  border-color: color-mix(in srgb, #ff6b6b 55%, var(--line));
  color: #ff8f8f;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

html[data-theme="dark"] .icon-sun,
html[data-theme="light"] .icon-moon {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #2f3d7a));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(97, 116, 186, 0.35);
}

html[data-theme="light"] .btn-primary {
  color: #fff;
  box-shadow: 0 10px 24px rgba(97, 116, 186, 0.25);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-wa {
  background: color-mix(in srgb, var(--wa) 18%, transparent);
  border-color: color-mix(in srgb, var(--wa) 45%, transparent);
  color: var(--ink);
}

.btn-lg {
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
}

.hero {
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) 2rem;
}

.hero-copy {
  order: 1;
  max-width: 52rem;
}

.hero-visual {
  order: 2;
  position: relative;
  width: 100%;
  max-width: 960px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin: 0 0 0.85rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-accent {
  display: block;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 1.25rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 2rem 0 0;
}

.hero-stats li {
  display: grid;
  gap: 0.15rem;
}

.hero-stats strong {
  font-size: 1.5rem;
  font-family: var(--font-en);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-frame {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 11;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, var(--bg), transparent);
}

.terminal {
  position: absolute;
  inset-inline-start: -4%;
  bottom: -8%;
  width: min(92%, 380px);
  background: color-mix(in srgb, var(--bg-elev) 92%, #000);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f57;
}

.terminal-bar span:nth-child(2) {
  background: #febc2e;
}

.terminal-bar span:nth-child(3) {
  background: #28c840;
}

.terminal-bar code {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.75rem;
}

.terminal pre {
  margin: 0;
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.t-k {
  color: #7dd3fc;
}

.t-s {
  color: var(--accent);
}

.t-c {
  color: var(--muted);
}

.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
  margin-top: 2rem;
  background: color-mix(in srgb, var(--bg-elev) 55%, transparent);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: slide 28s linear infinite;
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

html[dir="rtl"] .marquee-track {
  animation-name: slide-rtl;
}

@keyframes slide-rtl {
  to {
    transform: translateX(50%);
  }
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head h2,
.split-copy h2,
.contact-panel h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p:last-child,
.split-copy > p,
.contact-panel > div > p:last-child {
  color: var(--muted);
  margin: 0;
}

.project-grid,
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card,
.service-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

.project-card:hover,
.service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.project-card h3,
.service-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.project-card p,
.service-card p {
  margin: 0;
  color: var(--muted);
}

.project-card .open {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.project-card-main {
  display: grid;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}
.project-links a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}
.project-links a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.split-media {
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
}

.skill-list i {
  color: var(--accent);
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.process-list li {
  counter-increment: step;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elev) 85%, transparent);
  min-height: 180px;
}

.process-list li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.process-list h3 {
  margin: 0 0 0.5rem;
}

.process-list p {
  margin: 0;
  color: var(--muted);
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 40%),
    var(--bg-elev);
  box-shadow: var(--shadow);
}

.contact-logo {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
}

.contact-logo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--line));
}

.pulse-dot {
  position: absolute;
  inset-inline-end: 2px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, var(--bg-elev));
}

.order-form .full {
  grid-column: 1 / -1;
}

.form-head {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}

.form-head p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.order-badge {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.order-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, var(--bg-elev));
  color: var(--ink);
  padding: 0.85rem 1rem;
  resize: vertical;
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-color: transparent;
}

.order-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
}

.form-hint.ok {
  color: var(--accent);
}

.form-hint.err {
  color: #ff8f8f;
}

.service-card {
  cursor: pointer;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.fab-wa {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wa);
  color: #04140f;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
  z-index: 60;
  transition: transform 0.2s;
}

.fab-wa:hover {
  transform: scale(1.06);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer strong {
  color: var(--ink);
  margin-inline-end: 0.5rem;
}

/* ===== Tablet ===== */
@media (max-width: 1100px) {
  .hero {
    min-height: auto;
    padding-top: 1.25rem;
  }

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

@media (max-width: 980px) {
  :root {
    --nav-h: 64px;
  }

  .nav {
    padding-inline: 0.85rem;
    gap: 0.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-brand span {
    font-size: 1.05rem;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .hero,
  .split,
  .contact-panel,
  .project-grid,
  .service-grid,
  .order-form {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-stats {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .terminal {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 0.85rem;
  }

  .logo-float {
    width: 56px;
    height: 56px;
  }

  .section {
    padding-block: 3rem;
  }

  .btn {
    min-height: 44px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .fab-wa {
    width: 54px;
    height: 54px;
    inset-inline-end: 0.85rem;
    bottom: 0.85rem;
  }
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    justify-content: center;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .hero-stats strong {
    font-size: 1.15rem;
  }

  .hero-stats span {
    font-size: 0.75rem;
  }

  .process-list,
  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .process-list li {
    min-height: 0;
  }

  .contact-panel,
  .order-form {
    padding: 1rem;
  }

  .marquee-track {
    gap: 1.5rem;
    font-size: 0.85rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast {
    width: calc(100vw - 1.5rem);
    min-width: 0;
  }
}

/* ===== Large desktop ===== */
@media (min-width: 1280px) {
  .hero {
    padding-inline: clamp(2rem, 6vw, 5rem);
  }

  .section {
    padding-inline: clamp(2rem, 6vw, 5rem);
  }
}

/* ===== Error / closed pages (same URL) ===== */
.page-error .nav {
  position: relative;
  z-index: 2;
}

.error-stage {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 1.5rem) 1.25rem 3rem;
}

.error-panel {
  width: min(640px, 100%);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(160deg, rgba(97, 116, 186, 0.12), transparent 45%),
    color-mix(in srgb, var(--bg-elev) 92%, transparent);
  box-shadow: var(--shadow);
  text-align: start;
  animation: error-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.error-code {
  margin: 0;
  font-family: var(--font-en);
  font-size: clamp(4.5rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: color-mix(in srgb, var(--accent-2) 70%, transparent);
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: error-pulse 3.2s ease-in-out infinite;
}

.error-panel .eyebrow {
  margin: 1rem 0 0.35rem;
}

.error-panel h1 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.25;
  font-weight: 700;
}

.error-lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36ch;
}

.error-meta {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
}

.error-meta dt {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.error-meta dd {
  margin: 0.2rem 0 0;
}

.error-meta code {
  font-family: var(--font-en);
  font-size: 0.95rem;
  word-break: break-all;
  color: var(--ink);
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

body[data-error-kind="closed"] .error-code {
  background: linear-gradient(120deg, #f0c27a, #c47a3a);
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes error-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes error-pulse {
  0%,
  100% {
    filter: saturate(1);
    opacity: 0.92;
  }
  50% {
    filter: saturate(1.15);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .error-actions {
    flex-direction: column;
  }

  .error-actions .btn {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
