/* Asaas Berlin — shared styles for the homepages (AR / EN / DE) */

:root {
  --ink: #0E1A33;
  --ink-2: #16244A;
  --ink-deep: #050B18;
  --paper: #F6F5F1;
  --white: #FFFFFF;
  --accent: #2F6BFF;
  --accent-hover: #1F56E0;
  --accent-soft: #8FB0FF;
  --text: #0E1A33;
  --muted: #5B6478;
  --muted-light: #A7B0C4;
  --line: rgba(14, 26, 51, 0.12);
  --line-light: rgba(255, 255, 255, 0.12);
  --radius: 8px;
  --font-display: 'Archivo', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1200px;

  /* Direction helpers so one stylesheet serves LTR and RTL */
  --dir: 1;
  --start: left;
  --end: right;
  --glow-x: 78%;
  --grid-x: 70%;

  interpolate-size: allow-keywords;
}

[dir="rtl"] {
  --font-display: 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;
  --font-mono: 'IBM Plex Sans Arabic', sans-serif;
  --dir: -1;
  --start: right;
  --end: left;
  --glow-x: 22%;
  --grid-x: 30%;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 600;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  font-stretch: normal;
  letter-spacing: 0;
  line-height: 1.35;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 120px 0; }
section[id] { scroll-margin-top: 72px; }
.bg-white { background: var(--white); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

[dir="rtl"] .eyebrow { font-size: 14px; letter-spacing: 0; font-weight: 600; text-transform: none; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 64px;
}

.section-head h2 { font-size: clamp(34px, 4.4vw, 52px); }
.section-head p { color: var(--muted); margin: 0; max-width: 480px; }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .3s, border-color .3s, color .3s, transform .35s var(--ease);
}

.btn i { font-size: 14px; transition: transform .35s var(--ease); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-light); color: var(--white); }
.btn-outline { border-color: var(--line); color: var(--ink); }

/* Light sweep on primary, fill on outline/ghost */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .28) 50%, transparent 75%);
  transform: translateX(calc(-110% * var(--dir)));
  transition: transform .7s var(--ease);
}

.btn-outline::before,
.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .4s var(--ease);
}

.btn-outline::before { background: var(--ink); }
.btn-ghost::before { background: var(--white); }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}

.nav.scrolled,
.nav.open {
  background: rgba(14, 26, 51, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line-light);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.logo img { height: 34px; width: auto; border-radius: 6px; transition: transform .5s var(--ease); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover { color: var(--white); }
.nav-links .btn { color: var(--white); padding: 10px 18px; font-size: 15px; }

.lang { display: flex; gap: 2px; font-size: 13px; font-weight: 600; }
.lang a { padding: 4px 6px; }
.lang a.active { color: var(--white); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--white);
  padding: 160px 0 0;
  position: relative;
  overflow: hidden;
}

/* Grid is faint by default; a brighter patch follows the cursor */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 64px 64px;
  --grid-mask:
    radial-gradient(circle 360px at var(--mx, var(--grid-x)) var(--my, 40%), #000, transparent),
    radial-gradient(ellipse at var(--grid-x) 40%, rgba(0, 0, 0, .45), transparent 70%);
  mask-image: var(--grid-mask);
  -webkit-mask-image: var(--grid-mask);
  opacity: .7;
}

.hero::after {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  left: var(--gx, var(--glow-x));
  top: var(--gy, 35%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(47, 107, 255, .32), transparent 65%);
  pointer-events: none;
  transition: left 1.2s var(--ease), top 1.2s var(--ease);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  margin-bottom: 28px;
}

.hero h1 .eyebrow { margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-lead {
  font-size: 19px;
  color: var(--muted-light);
  max-width: 520px;
  margin: 0 0 40px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-phones { position: relative; height: 560px; }

.phone {
  position: absolute;
  width: 250px;
  border-radius: 34px;
  padding: 8px;
  background: var(--ink-deep);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .8s var(--ease), scale .5s var(--ease), box-shadow .5s;
}

.phone img { border-radius: 27px; width: 100%; }

.phone-1 {
  left: 8%;
  top: 40px;
  z-index: 2;
  transform: translate(calc(var(--px, 0) * -28px), calc(var(--py, 0) * -20px)) rotate(-6deg);
}

.phone-2 {
  right: 4%;
  top: 0;
  transform: translate(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 12px)) rotate(5deg);
}

.proof {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  border-top: 1px solid var(--line-light);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof div {
  position: relative;
  padding-block: 32px 36px;
  padding-inline: 0 24px;
}

.proof strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color .3s;
}

[dir="rtl"] .proof strong { letter-spacing: 0; }
.proof span { color: var(--muted-light); font-size: 14px; }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  padding-block: 36px 8px;
  padding-inline: 0 28px;
  border-inline-end: 1px solid var(--line);
  margin-inline-end: 28px;
}

.service:last-child { border-inline-end: 0; margin-inline-end: 0; }

.service .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 48px;
  display: block;
}

.service h3 { font-size: 22px; margin-bottom: 16px; }

.service ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.service li { padding: 4px 0; }

.services-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.service .lead { color: var(--ink); font-size: 16px; margin: 0 0 16px; }

/* ---------- Bridge (Germany ⇄ Arab world) ---------- */

.bridge { background: var(--ink); color: var(--white); overflow: hidden; }
.bridge .section-head p { color: var(--muted-light); }

.bridge-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: stretch;
}

.bridge-card {
  border: 1px solid var(--line-light);
  border-radius: 16px;
  padding: 40px;
  background: rgba(255, 255, 255, .02);
  display: flex;
  flex-direction: column;
  transition: border-color .4s, background-color .4s, transform .45s var(--ease);
}

.bridge-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

[dir="rtl"] .bridge-label { font-size: 14px; letter-spacing: 0; text-transform: none; }

.bridge-card h3 { font-size: clamp(24px, 2.4vw, 30px); margin: 14px 0 28px; }

.bridge-card ul { list-style: none; padding: 0; margin: 0 0 auto; }

.bridge-card li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line-light);
  color: rgba(255, 255, 255, .85);
  transition: transform .35s var(--ease), color .3s;
}

.bridge-card li i { color: var(--accent); font-size: 13px; }
.bridge-card .btn { margin-top: 32px; align-self: flex-start; }

.bridge-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-light);
}

.bridge-link::before,
.bridge-link::after {
  content: "";
  width: 1px;
  flex: 1;
  background: linear-gradient(transparent, var(--line-light), transparent);
}

.bridge-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 0 0 10px rgba(47, 107, 255, .12);
  transition: transform .8s var(--ease);
}

/* ---------- Products ---------- */

.product {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 72px;
}

.product-body { padding: 56px; }
.product h3 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 16px; }
.product-body > p { color: var(--muted); margin: 0 0 28px; }

.product ul { list-style: none; padding: 0; margin: 0 0 36px; }

.product li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  transition: transform .35s var(--ease);
}

.product li i { color: var(--accent); font-size: 13px; }

.product-media {
  background: var(--ink);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 56px;
  overflow: hidden;
  min-height: 420px;
}

.product-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(47, 107, 255, .45), transparent 60%);
}

.product-media img {
  position: relative;
  width: 52%;
  max-width: 270px;
  border-radius: 30px 30px 0 0;
  border: 8px solid var(--ink-deep);
  border-bottom: 0;
  transition: transform .6s var(--ease);
}

.subhead {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.subhead .eyebrow { margin: 0; white-space: nowrap; }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.concept-link {
  margin-top: 24px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}

.concept-link i { font-size: 13px; transition: transform .35s var(--ease); }

/* ---------- Start small (offers) ---------- */

.offers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.offer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: color .4s, border-color .4s, transform .45s var(--ease);
}

.offer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease);
}

.offer-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 40px;
  transition: background-color .4s, border-color .4s, color .4s;
}

.offer h3 { font-size: 21px; margin-bottom: 12px; }
.offer p { color: var(--muted); font-size: 15px; margin: 0 0 28px; flex-grow: 1; transition: color .4s; }

.offer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .4s;
}

.offer-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .4s;
}

[dir="rtl"] .offer-tag { font-size: 13px; letter-spacing: 0; text-transform: none; }
.offer-foot i { color: var(--accent); transition: transform .35s var(--ease), color .4s; }

/* ---------- Case studies ---------- */

.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px;
  border-radius: 16px;
  margin-bottom: 32px;
}

.case:last-child { margin-bottom: 0; }
.case-dark { background: var(--ink); color: var(--white); }
.case-light { background: var(--paper); }
.case-light .case-media { order: -1; }

.case-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.case h3 { font-size: clamp(32px, 3.6vw, 44px); margin-bottom: 20px; }
.case p { margin: 0 0 28px; color: var(--muted); }
.case-dark p { color: var(--muted-light); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.chips span {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  transition: border-color .3s, color .3s, background-color .3s;
}

.case-dark .chips span { border-color: var(--line-light); color: rgba(255, 255, 255, .85); }

.case-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.case-actions .btn { padding: 12px 18px; font-size: 15px; }

.case-media {
  display: flex;
  justify-content: center;
  gap: 24px;
  transition: transform .6s var(--ease);
}

.case-media .shot {
  width: 46%;
  max-width: 230px;
  border-radius: 30px;
  padding: 7px;
  background: var(--ink-deep);
  box-shadow: 0 30px 60px rgba(14, 26, 51, .25);
  transition: translate .6s var(--ease), rotate .6s var(--ease), box-shadow .6s;
}

.case-media:has(.shot:nth-child(3)) .shot { width: 31%; }
.case-media:has(.shot:nth-child(3)) { gap: 16px; }
.case-media .shot:nth-child(2) { margin-top: 48px; }
.case-media .shot img { border-radius: 24px; }

/* ---------- Concepts (example apps) ---------- */

.concepts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.concept {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--ease), box-shadow .45s, border-color .45s;
}

.concept-media {
  background: var(--ink);
  height: 280px;
  display: flex;
  justify-content: center;
  padding-top: 36px;
  overflow: hidden;
  position: relative;
}

.concept-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(47, 107, 255, .35), transparent 60%);
}

.concept-media img {
  position: relative;
  width: 54%;
  height: max-content;
  border-radius: 24px 24px 0 0;
  border: 6px solid var(--ink-deep);
  border-bottom: 0;
  transition: transform .6s var(--ease);
}

.concept-body { padding: 28px; display: flex; flex-direction: column; flex-grow: 1; }
.concept h3 { font-size: 22px; margin-bottom: 8px; }
.concept-sub { font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
.concept p { color: var(--muted); font-size: 15px; margin: 0 0 24px; flex-grow: 1; }
.concept .chips { margin-bottom: 0; }

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step { position: relative; padding-top: 56px; }

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  z-index: 1;
  transition: background-color .35s, transform .45s var(--ease);
}

/* Connector line; the accent layer "charges" on hover */
.step::after {
  content: "";
  position: absolute;
  top: 18px;
  inset-inline: 36px -24px;
  height: 1px;
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-position: var(--start) center, 0 0;
  background-size: 0% 100%, 100% 100%;
  transition: background-size .6s var(--ease);
}

.step:last-child::after { display: none; }
.step h3 { font-size: 19px; margin-bottom: 8px; transition: color .3s, transform .45s var(--ease); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.plan {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  border-inline-end: 1px solid var(--line);
  transition: transform .45s var(--ease), box-shadow .45s, background-color .45s;
}

.plan:last-child { border-inline-end: 0; }

.plan.featured {
  background: var(--ink);
  color: var(--white);
  border-radius: 16px;
  margin: -16px 0;
  padding-top: 64px;
  padding-bottom: 64px;
  box-shadow: 0 30px 60px rgba(14, 26, 51, .2);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--white);
}

.plan h3 { font-size: 20px; margin-bottom: 24px; padding-inline-end: 90px; }
.plan-from { font-size: 14px; color: var(--muted); }
.plan.featured .plan-from { color: var(--muted-light); }

.plan-price {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 6px 0 32px;
  transition: color .3s;
}

.plan-price.text { font-size: 36px; }
[dir="rtl"] .plan-price { letter-spacing: 0; }

.plan ul {
  list-style: none;
  padding: 32px 0 0;
  margin: 0 0 40px;
  border-top: 1px solid var(--line);
  flex-grow: 1;
}

.plan.featured ul { border-top-color: var(--line-light); }

.plan li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 15px;
  transition: transform .35s var(--ease);
}

.plan li i { color: var(--accent); font-size: 13px; }
.plan .btn { justify-content: center; }

/* ---------- Testimonial ---------- */

.quote { max-width: 920px; margin: 0; }

.quote-mark {
  display: block;
  font-family: Georgia, serif;
  font-size: 140px;
  line-height: .8;
  height: 64px;
  color: var(--accent);
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.5;
  font-weight: 500;
}

.quote-author {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.quote-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.quote-author strong { display: block; }
.quote-author div span { color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.faq-grid .section-head { display: block; margin: 0; position: sticky; top: 112px; }
.faq-grid .section-head h2 { margin-bottom: 20px; }

.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  transition: color .3s;
}

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

.faq-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: background-color .3s, border-color .3s, transform .45s var(--ease);
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ink);
  translate: -50% -50%;
  transition: background-color .3s;
}

.faq-icon::after { rotate: 90deg; }

.faq-list details[open] .faq-icon { background: var(--ink); border-color: var(--ink); transform: rotate(45deg); }
.faq-list details[open] .faq-icon::before,
.faq-list details[open] .faq-icon::after { background: var(--white); }

.faq-list details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .4s var(--ease), content-visibility .4s allow-discrete;
}

.faq-list details[open]::details-content { block-size: auto; }

.faq-answer { padding-bottom: 28px; color: var(--muted); max-width: 640px; }
.faq-answer p { margin: 0; }

/* ---------- Articles ---------- */

.articles-list { border-top: 1px solid var(--line); }

.article {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.article::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  z-index: -1;
  background: var(--white);
  border-radius: 12px;
  transform: scaleY(.6);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .3s;
}

.bg-white .article::before { background: var(--paper); }

.article .cat { font-size: 14px; color: var(--muted); font-weight: 500; transition: color .3s; }
.article h3 { font-size: 24px; font-weight: 500; transition: transform .45s var(--ease); }
.article .meta { font-size: 14px; color: var(--muted); display: flex; gap: 16px; align-items: center; white-space: nowrap; }

.article .meta i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  transition: background-color .3s, border-color .3s, color .3s, transform .45s var(--ease);
}

/* ---------- Contact ---------- */

.contact { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }

.contact::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  inset-inline-start: -200px;
  bottom: -300px;
  background: radial-gradient(circle, rgba(47, 107, 255, .3), transparent 65%);
}

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact h2 { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 24px; }
.contact-lead { color: var(--muted-light); margin: 0 0 48px; max-width: 440px; }

.contact-direct a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line-light);
  text-decoration: none;
  font-weight: 500;
  transition: padding .4s var(--ease), color .3s;
}

.contact-direct a:last-child { border-bottom: 1px solid var(--line-light); }
.contact-direct i { color: var(--accent); width: 18px; }

.form {
  background: var(--white);
  color: var(--text);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--paper);
  color: var(--text);
  width: 100%;
  transition: border-color .2s, background-color .2s;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: var(--end) 16px center;
  background-size: 16px;
  padding-inline-end: 44px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--white);
}

.field textarea { min-height: 130px; resize: vertical; }
.form .btn { justify-content: center; margin-top: 4px; }

/* ---------- Footer ---------- */

footer {
  background: #091226;
  color: var(--muted-light);
  padding: 80px 0 40px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line-light);
}

.footer-grid p { max-width: 300px; margin: 20px 0 0; }

.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 20px;
}

.footer-col a {
  display: block;
  width: fit-content;
  text-decoration: none;
  padding: 5px 0;
  transition: color .3s, transform .35s var(--ease);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  font-size: 14px;
}

.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Spotlight: soft glow that follows the cursor ---------- */

.spot { position: relative; }
.spot > :not(.plan-badge) { position: relative; z-index: 1; }
.plan-badge { z-index: 2; }

.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 255, .09), transparent 70%);
}

.case-dark.spot::after,
.plan.featured.spot::after,
.contact.spot::after {
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 255, .22), transparent 70%);
}

/* ---------- Hover interactions (skipped on touch devices) ---------- */

@media (hover: hover) {
  .btn-primary:hover::after { transform: translateX(calc(110% * var(--dir))); }
  .btn:hover .fa-arrow-right { transform: translateX(5px); }
  .btn:hover .fa-arrow-left { transform: translateX(-5px); }
  .btn-outline:hover { color: var(--white); border-color: var(--ink); }
  .btn-ghost:hover { color: var(--ink); border-color: var(--white); }
  .btn-outline:hover::before,
  .btn-ghost:hover::before { transform: scaleY(1); }

  .spot:hover::after { opacity: 1; }

  /* Nav underline draws in from the reading start */
  .nav-links > a:not(.btn) { position: relative; }

  .nav-links > a:not(.btn)::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -6px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: var(--end);
    transition: transform .4s var(--ease);
  }

  .nav-links > a:not(.btn):hover::after {
    transform: scaleX(1);
    transform-origin: var(--start);
  }

  .logo:hover img { transform: rotate(-8deg) scale(1.06); }

  .phone:hover {
    scale: 1.04;
    z-index: 3;
    box-shadow: 0 50px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(47, 107, 255, .5);
  }

  /* Proof strip and services: accent line grows along the top */
  .proof div::before,
  .service::before {
    content: "";
    position: absolute;
    top: -1px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: var(--start);
    transition: transform .5s var(--ease);
  }

  .proof div::before { inset-inline: 0 24px; }
  .service::before { inset-inline: 0 28px; }
  .service:last-child::before { inset-inline-end: 0; }

  .proof div:hover::before,
  .service:hover::before { transform: scaleX(1); }
  .proof div:hover strong { color: var(--accent-soft); }

  .service .num,
  .service h3,
  .service li { transition: color .3s, transform .45s var(--ease); }
  .service:hover .num { color: var(--accent); transform: translateY(-6px); }
  .service:hover h3,
  .service:hover li { transform: translateX(calc(6px * var(--dir))); }
  .service:hover li { color: var(--ink); }
  .service:hover li:nth-child(1) { transition-delay: .03s; }
  .service:hover li:nth-child(2) { transition-delay: .06s; }
  .service:hover li:nth-child(3) { transition-delay: .09s; }

  /* Case studies: screenshots fan out (panel tilt is in main.js) */
  .case:hover .shot:first-child { translate: calc(-10px * var(--dir)) -6px; rotate: calc(-3deg * var(--dir)); }
  .case:hover .shot:last-child { translate: calc(10px * var(--dir)) 6px; rotate: calc(3deg * var(--dir)); }
  .case:hover .shot:nth-child(2):not(:last-child) { translate: 0 -10px; }
  .case:hover .shot { box-shadow: 0 40px 80px rgba(14, 26, 51, .32); }

  .chips span:hover { border-color: var(--accent); color: var(--accent); }
  .case-dark .chips span:hover { color: var(--white); background: rgba(47, 107, 255, .2); }

  /* Concepts: card lifts, phone rises out of its frame */
  .concept:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(14, 26, 51, .12); border-color: transparent; }
  .concept:hover .concept-media img { transform: translateY(-14px); }

  /* Process: circle fills and the connector charges */
  .step:hover::before { background: var(--accent); transform: scale(1.15); }
  .step:hover::after { background-size: 100% 100%, 100% 100%; }
  .step:hover h3 { color: var(--accent); transform: translateX(calc(4px * var(--dir))); }

  /* Pricing */
  .plan:not(.featured):hover { background: var(--paper); transform: translateY(-6px); border-radius: 16px; }
  .plan:not(.featured):hover .plan-price { color: var(--accent); }
  .plan.featured:hover { transform: translateY(-6px); box-shadow: 0 40px 80px rgba(14, 26, 51, .3); }
  .plan li:hover { transform: translateX(calc(4px * var(--dir))); }

  /* Bridge: cards light up, the link icon flips */
  .bridge-card:hover { border-color: rgba(47, 107, 255, .6); background: rgba(47, 107, 255, .06); transform: translateY(-4px); }
  .bridge-card li:hover { transform: translateX(calc(6px * var(--dir))); color: var(--white); }
  .bridge-grid:hover .bridge-icon { transform: rotate(180deg); }

  /* Products */
  .product:hover .product-media img { transform: translateY(-14px); }
  .product li:hover { transform: translateX(calc(4px * var(--dir))); }
  .concept-link:hover .fa-arrow-right { transform: translateX(5px); }
  .concept-link:hover .fa-arrow-left { transform: translateX(-5px); }

  /* Offers: card fills with ink from the bottom */
  .offer:hover { color: var(--white); border-color: var(--ink); transform: translateY(-6px); }
  .offer:hover::before { transform: scaleY(1); }
  .offer:hover p,
  .offer:hover .offer-tag { color: var(--muted-light); }
  .offer:hover .offer-icon { background: var(--accent); border-color: var(--accent); color: var(--white); }
  .offer:hover .offer-foot { border-color: var(--line-light); }
  .offer:hover .offer-foot i { color: var(--accent-soft); }
  .offer:hover .fa-arrow-right { transform: translateX(5px); }
  .offer:hover .fa-arrow-left { transform: translateX(-5px); }

  /* FAQ */
  .faq-list summary:hover { color: var(--accent); }
  .faq-list summary:hover .faq-icon { border-color: var(--accent); }

  /* Articles: row fills, title slides, arrow becomes a button */
  .article:hover::before { transform: scaleY(1); opacity: 1; }
  .article:hover h3 { transform: translateX(calc(10px * var(--dir))); }
  .article:hover .cat { color: var(--accent); }
  .article:hover .meta i { background: var(--accent); border-color: var(--accent); color: var(--white); transform: rotate(calc(-45deg * var(--dir))); }

  /* Contact & footer */
  .contact-direct a:hover { padding-inline-start: 10px; color: var(--accent-soft); }
  .field input:hover,
  .field select:hover,
  .field textarea:hover { border-color: rgba(14, 26, 51, .3); }
  .footer-col a:hover { transform: translateX(calc(4px * var(--dir))); }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--ink);
    border-bottom: 1px solid var(--line-light);
  }

  .nav.open .nav-links { display: flex; }
}

@media (max-width: 1000px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service:nth-child(2) { border-inline-end: 0; margin-inline-end: 0; }
  .concepts { grid-template-columns: 1fr 1fr; }
  .offers { grid-template-columns: 1fr 1fr; }
  .services-grid.cols-3 { grid-template-columns: 1fr; }
  .cols-3 .service { border-inline-end: 0; margin-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
  .cols-3 .service .num { margin-bottom: 20px; }

  .bridge-grid { grid-template-columns: 1fr; gap: 16px; }
  .bridge-link { flex-direction: row; }
  .bridge-link::before,
  .bridge-link::after { width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--line-light), transparent); }

  .product { grid-template-columns: 1fr; }
  .product-media { min-height: 360px; }
  .process-grid { grid-template-columns: 1fr; gap: 32px; }
  .step { padding: 0; padding-inline-start: 60px; }

  .step::after {
    top: 36px;
    inset-inline: 18px auto;
    width: 1px;
    height: calc(100% - 4px);
    background-position: top, 0 0;
    background-size: 100% 0%, 100% 100%;
  }

  .plans { grid-template-columns: 1fr; }
  .plan { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .plan.featured { margin: 0; }
  .case { grid-template-columns: 1fr; padding: 40px; gap: 48px; }
  .case-light .case-media { order: 0; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .faq-grid .section-head { position: static; }
}

@media (max-width: 860px) {
  section { padding: 88px 0; }
  .hero { padding-top: 120px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phones { height: 440px; }
  .phone { width: 190px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 48px; }
  .article { grid-template-columns: 1fr; gap: 10px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .services-grid,
  .concepts,
  .offers { grid-template-columns: 1fr; }
  .bridge-card,
  .product-body { padding: 28px 20px; }
  .service { border-inline-end: 0; margin-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
  .service .num { margin-bottom: 20px; }
  .case { padding: 28px 20px; }
  .plan { padding: 40px 24px; }
  .form { padding: 28px 20px; }
  .phone { width: 160px; }
  .hero-phones { height: 380px; }
  .proof strong { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
