:root {
  --blue: #2f2bd6;
  --indigo: #3f2b96;
  --violet: #9d50bb;
  --magenta: #c084fc;
  --ink: #1a1528;
  --ink-soft: #4a4458;
  --muted: #6b6580;
  --line: rgba(63, 43, 150, 0.12);
  --surface: #ffffff;
  --bg: #f7f6fb;
  --bg-soft: #f0eef8;
  --grad: linear-gradient(160deg, var(--indigo) 0%, var(--violet) 55%, #b56cf0 100%);
  --grad-text: linear-gradient(135deg, var(--blue) 0%, var(--violet) 50%, #c026d3 100%);
  --shadow: 0 24px 60px rgba(63, 43, 150, 0.1);
  --radius: 18px;
  --header-h: 84px;
  --banner-h: 42px;
  --font-display: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  --font-body: "DM Sans", "Tajawal", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[dir="rtl"] {
  --font-display: "Tajawal", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Tajawal", "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  max-width: 100%;
  opacity: 0;
}

body.is-ready {
  opacity: 1;
  transition: opacity 0.45s var(--ease);
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35em;
}

p {
  margin: 0 0 1em;
}

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

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(157, 80, 187, 0.14), transparent 60%),
    radial-gradient(700px 420px at 92% 8%, rgba(47, 43, 214, 0.1), transparent 55%),
    radial-gradient(600px 400px at 70% 100%, rgba(192, 132, 252, 0.1), transparent 50%),
    var(--bg);
  pointer-events: none;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  max-width: 100%;
  margin-inline: auto;
}

.site-header {
  max-width: 100%;
}

main {
  max-width: 100%;
  overflow-x: clip;
}

.site-footer {
  max-width: 100%;
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Top banner */
.top-banner {
  position: relative;
  z-index: 130;
  min-height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  background: var(--grad);
  color: #fff;
  text-align: center;
}

.top-banner-text {
  margin: 0;
  font-family: "Playfair Display", "Amiri", Georgia, serif;
  font-size: clamp(0.88rem, 2.2vw, 1.05rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

html[dir="rtl"] .top-banner-text {
  font-family: "Amiri", "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-style: italic;
}

.top-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  height: var(--header-h);
  background: rgba(247, 246, 251, 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: visible;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  overflow: visible;
}

.brand-logo {
  width: 124px;
  height: 124px;
  object-fit: contain;
  display: block;
}

.site-footer .brand-logo {
  width: 56px;
  height: 56px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--indigo);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-close,
.nav-top,
.nav-foot,
.nav-tagline {
  display: none;
}

.nav-links {
  display: contents;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e5e5ea;
  background: #fff;
  color: #1a1528;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: #d0d0d8;
  background: #f5f5f7;
}

.lang-icon {
  display: block;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 140px;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #e8e8ec;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  z-index: 200;
}

.lang-menu[hidden] {
  display: none;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1a1528;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: #f5f5f7;
}

.lang-option.is-active {
  background: #f0f0f3;
}

/* Kill transitions while flipping LTR/RTL to avoid lag */
html.is-lang-switching,
html.is-lang-switching * {
  transition: none !important;
  animation: none !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--indigo);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

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

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}

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

.btn-sm {
  padding: 0.65rem 1.15rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(63, 43, 150, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 16px 36px rgba(63, 43, 150, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid rgba(63, 43, 150, 0.25);
}

.btn-ghost:hover {
  background: rgba(63, 43, 150, 0.05);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 3rem 0 4.5rem;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: float 10s ease-in-out infinite;
}

.hero-orb-a {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: -8%;
  inset-inline-end: -5%;
  background: radial-gradient(circle, rgba(157, 80, 187, 0.35), transparent 70%);
}

.hero-orb-b {
  width: min(360px, 50vw);
  height: min(360px, 50vw);
  bottom: 5%;
  inset-inline-start: -8%;
  background: radial-gradient(circle, rgba(47, 43, 214, 0.22), transparent 70%);
  animation-delay: -4s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(63, 43, 150, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 43, 150, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: 0.04em;
  animation: rise 0.9s var(--ease) both;
}

.hero-brand-mark {
  width: clamp(80px, 11vw, 110px);
  height: auto;
  animation: pulse-soft 3.5s ease-in-out infinite;
}

.hero-title {
  margin-bottom: 1rem;
  color: var(--ink);
  animation: rise 0.9s var(--ease) 0.1s both;
}

.hero-lead {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  animation: rise 0.9s var(--ease) 0.18s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s var(--ease) 0.26s both;
}

.hero-visual {
  animation: rise 1s var(--ease) 0.2s both;
}

.code-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem 1.5rem;
  overflow: hidden;
}

.code-panel-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.code-panel-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(63, 43, 150, 0.18);
}

.code-panel-bar span:nth-child(1) {
  background: #f0a0b0;
}

.code-panel-bar span:nth-child(2) {
  background: #e8c86a;
}

.code-panel-bar span:nth-child(3) {
  background: #8fd4a8;
}

.code-snippet {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: clamp(0.78rem, 1.6vw, 0.92rem);
  line-height: 1.7;
  color: var(--ink-soft);
  overflow-x: auto;
  white-space: pre;
}

.c-kw {
  color: var(--indigo);
  font-weight: 600;
}

.c-fn {
  color: var(--violet);
}

.c-str {
  color: #7c3aed;
}

.brace {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 5rem;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

.brace-l {
  top: 18%;
  inset-inline-start: -0.15em;
  animation: drift 6s ease-in-out infinite;
}

.brace-r {
  bottom: 8%;
  inset-inline-end: -0.1em;
  animation: drift 6s ease-in-out infinite reverse;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(63, 43, 150, 0.3);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-hint span {
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: var(--violet);
  animation: scroll-dot 1.6s ease-in-out infinite;
}

/* Sections */
.section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 3rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 0.85rem;
}

.section-lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Services — list rows, not card grid */
.services-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-inline-start 0.35s var(--ease);
}

.service-row:hover {
  padding-inline-start: 0.5rem;
}

.service-index {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-top: 0.15rem;
}

.service-body p {
  color: var(--ink-soft);
  max-width: 42rem;
}

/* About */
.about {
  background: linear-gradient(180deg, transparent, rgba(240, 238, 248, 0.7), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.about-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}

.about-logo {
  width: min(180px, 55%);
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 12px 28px rgba(63, 43, 150, 0.18));
}

.about-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.about-copy p {
  color: var(--ink-soft);
}

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

.process-step {
  position: relative;
  padding-top: 0.25rem;
}

.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.35rem;
  inset-inline-start: 3.25rem;
  width: calc(100% - 1.5rem);
  height: 2px;
  background: linear-gradient(90deg, rgba(157, 80, 187, 0.45), rgba(63, 43, 150, 0.08));
}

html[dir="rtl"] .process-step:not(:last-child)::after {
  background: linear-gradient(-90deg, rgba(157, 80, 187, 0.45), rgba(63, 43, 150, 0.08));
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 22px rgba(63, 43, 150, 0.25);
}

.process-step p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Contact */
.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  box-shadow: var(--shadow);
}

.contact-copy p {
  color: var(--ink-soft);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.15rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(157, 80, 187, 0.55);
  box-shadow: 0 0 0 4px rgba(157, 80, 187, 0.12);
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 1.4em;
}

.form-status.is-ok {
  color: #2f7a4a;
}

.form-status.is-err {
  color: #b42318;
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 2rem;
  padding: 3.5rem 0 2rem;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(157, 80, 187, 0.55), transparent 55%),
    radial-gradient(800px 480px at 100% 100%, rgba(47, 43, 214, 0.65), transparent 50%),
    linear-gradient(145deg, #2a1f6e 0%, #3f2b96 42%, #7c3aed 100%);
  color: #fff;
}

.footer-wrap {
  position: relative;
  z-index: 1;
}

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

.footer-logo-link {
  display: inline-flex;
  margin-bottom: 0.75rem;
}

.footer-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  margin: 0.25rem 0 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.footer-intro {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  opacity: 0.9;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.25rem;
}

.footer-col h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.footer-col a {
  display: block;
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.25s, transform 0.25s;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: #fff;
  transform: translateX(4px);
}

html[dir="rtl"] .footer-col a:hover,
html[dir="rtl"] .footer-col a:focus-visible {
  transform: translateX(-4px);
}

.footer-bottom {
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  text-align: center;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.88;
}

.scroll-top {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 250;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(63, 43, 150, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

html[dir="rtl"] .scroll-top {
  right: auto;
  left: 1.15rem;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

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

/* Page transitions */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(63, 43, 150, 0.08), rgba(157, 80, 187, 0.12)), #f7f6fb;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: opacity 0.28s var(--ease), transform 0.35s var(--ease);
}

.page-transition.is-active {
  opacity: 1;
  transform: scaleY(1);
  pointer-events: auto;
}

.nav a.is-active {
  color: var(--indigo);
}

.nav a.is-active::after {
  transform: scaleX(1);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  will-change: opacity, transform;
}

.reveal-left:not(.is-visible) {
  transform: translateX(-40px);
}

.reveal-right:not(.is-visible) {
  transform: translateX(40px);
}

html[dir="rtl"] .reveal-left:not(.is-visible) {
  transform: translateX(40px);
}

html[dir="rtl"] .reveal-right:not(.is-visible) {
  transform: translateX(-40px);
}

.reveal-scale:not(.is-visible) {
  transform: translateY(24px) scale(0.96);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.services-list .service-row.reveal:nth-child(1) { transition-delay: 0.05s; }
.services-list .service-row.reveal:nth-child(2) { transition-delay: 0.12s; }
.services-list .service-row.reveal:nth-child(3) { transition-delay: 0.19s; }
.services-list .service-row.reveal:nth-child(4) { transition-delay: 0.26s; }

.process-steps .process-step.reveal:nth-child(1) { transition-delay: 0.05s; }
.process-steps .process-step.reveal:nth-child(2) { transition-delay: 0.14s; }
.process-steps .process-step.reveal:nth-child(3) { transition-delay: 0.23s; }
.process-steps .process-step.reveal:nth-child(4) { transition-delay: 0.32s; }

.values-grid .value-card.reveal:nth-child(1) { transition-delay: 0.06s; }
.values-grid .value-card.reveal:nth-child(2) { transition-delay: 0.16s; }
.values-grid .value-card.reveal:nth-child(3) { transition-delay: 0.26s; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.service-card {
  padding: 1.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(63, 43, 150, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.85s var(--ease);
}

.service-card.is-visible:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(63, 43, 150, 0.12);
}

.service-card .service-index {
  display: inline-block;
  margin-bottom: 0.85rem;
}

.service-card h3 {
  margin-bottom: 0.45rem;
}

.service-card p {
  margin: 0;
  color: var(--ink-soft);
}

.services-more {
  margin: 2rem 0 0;
  text-align: center;
}

.code-panel.is-visible {
  transition:
    opacity 0.75s var(--ease),
    transform 0.5s var(--ease),
    filter 0.75s var(--ease),
    box-shadow 0.5s var(--ease);
}

.code-panel.is-visible:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 64px rgba(63, 43, 150, 0.16);
}

.btn {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

/* Inner pages */
.page-hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.75rem, 4vw, 3rem);
  overflow: hidden;
}

.page-hero-inner {
  position: relative;
  max-width: 40rem;
}

.page-hero h1 {
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}

.page-hero .section-lead {
  margin-bottom: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.value-card {
  padding: 1.5rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(63, 43, 150, 0.06);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.85s var(--ease);
}

.value-card.is-visible:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(63, 43, 150, 0.12);
}

.value-card h3 {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.value-card p {
  color: var(--ink-soft);
  margin: 0;
}

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

.story-block p {
  overflow-wrap: anywhere;
}

.story-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}

.story-visual .about-logo {
  width: min(180px, 55%);
  margin-inline: auto;
  margin-bottom: 1rem;
}

.story-visual.is-visible .about-logo {
  animation: float 6s ease-in-out infinite;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.info-item:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 80, 187, 0.35);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: #1ebe57;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.35);
}

.info-item strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 0.35rem;
}

.info-item p {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.contact-page-form {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}

.cta-band {
  text-align: center;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1rem, 3vw, 1.5rem);
  background:
    radial-gradient(500px 200px at 50% 0%, rgba(157, 80, 187, 0.12), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
}

.cta-band h2 {
  overflow-wrap: anywhere;
}

.cta-band .btn {
  margin-top: 0.5rem;
}

/* Animations */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(18px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes scroll-dot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner,
  .about-grid,
  .contact-panel,
  .story-block,
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .values-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-hero-inner,
  .about-copy,
  .contact-copy,
  .hero-copy,
  .story-block > div,
  .value-card,
  .service-card,
  .process-step,
  .cta-band,
  .footer-inner,
  .contact-info,
  .info-item {
    text-align: center;
  }

  .section-head,
  .page-hero-inner,
  .hero-copy,
  .about-copy,
  .contact-copy {
    margin-inline: auto;
  }

  .section-head .eyebrow,
  .page-hero .eyebrow,
  .hero-brand,
  .about-copy .eyebrow,
  .step-num {
    margin-inline: auto;
  }

  .hero-copy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
    width: 100%;
  }

  .services-more {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }

  .hero-lead,
  .section-lead,
  .about-copy p,
  .service-card p,
  .value-card p,
  .process-step p {
    margin-inline: auto;
    max-width: 36rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .page-hero-inner {
    max-width: none;
  }

  .story-block {
    gap: 1.5rem;
  }

  .story-visual {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .cta-band .section-lead {
    margin-inline: auto;
    max-width: 32rem;
  }

  .hero-visual {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .about-visual {
    margin-inline: auto;
  }

  .contact-info {
    align-items: center;
  }

  .info-item {
    width: 100%;
    max-width: 420px;
  }

  .contact-page-form,
  .contact-panel {
    text-align: start;
  }

  .contact-page-form .field label,
  .contact-panel .field label {
    text-align: start;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    text-align: start;
    gap: 1.75rem;
  }

  .header-actions .btn-sm {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 1;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(26, 21, 40, 0.4);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    z-index: 310;
    width: min(320px, 88vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
    background: #fff;
    border-left: 1px solid #e8e8ec;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow: hidden;
  }

  /* Keep drawer on the right in RTL too — avoids left-side overflow breaking the layout */
  html[dir="rtl"] .nav {
    left: auto;
    right: 0;
    border-left: 1px solid #e8e8ec;
    border-right: 0;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
    transform: translate3d(100%, 0, 0);
  }

  .nav.is-open,
  html[dir="rtl"] .nav.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav::before {
    display: none;
  }

  .nav-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    padding: 1rem 1rem 0.5rem;
    min-height: var(--header-h);
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-soft);
    color: var(--indigo);
    font-size: 1.85rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
  }

  .nav-close:hover,
  .nav-close:focus-visible {
    background: rgba(63, 43, 150, 0.1);
    border-color: rgba(63, 43, 150, 0.22);
    color: var(--blue);
    transform: scale(1.04);
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
    padding: 0.35rem 1.15rem 1.25rem;
    overflow-y: auto;
  }

  .nav-links a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    border: 0;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--bg-soft);
    transition: background 0.25s, color 0.25s, transform 0.25s;
  }

  .nav-links a::after,
  .nav-links a::before {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(63, 43, 150, 0.1);
    color: var(--indigo);
  }

  .nav-links a.is-active {
    background: rgba(63, 43, 150, 0.12);
    color: var(--indigo);
  }

  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
    padding: 1.15rem 1.25rem calc(1.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    background: var(--grad) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(63, 43, 150, 0.28) !important;
  }

  .nav-cta:hover {
    box-shadow: 0 16px 36px rgba(63, 43, 150, 0.35) !important;
  }

  .nav-tagline {
    display: block;
    margin: 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .service-row {
    grid-template-columns: 3.5rem 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1120px, calc(100% - 1.5rem));
  }

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

  .page-hero {
    padding-top: 1.75rem;
  }

  .page-hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.35rem);
  }

  .section {
    padding: 3.25rem 0;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }

  .value-card {
    padding: 1.25rem 1.1rem;
  }

  .cta-band {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding-top: 2rem;
    min-height: auto;
  }

  .process-steps,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .scroll-hint {
    display: none;
  }

  .brace {
    font-size: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body,
  body.is-ready {
    opacity: 1;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .page-transition {
    display: none;
  }
}
