/* ==========================================================================
   Hadarat — design tokens (dark, Thiqal-inspired)
   Layout uses logical properties only, so the page mirrors between RTL/LTR.
   ========================================================================== */
:root {
  --bg: #000;
  --surface: #101010;
  --card: #181717;
  --card-2: #1f1f1f;
  --border: #292929;
  --border-soft: #1f1f1f;
  --text: #fff;
  --text-2: #d6d6d6;
  --muted: #9c9c9c;
  --accent: #12b2c1;
  --accent-soft: #123a3e;
  --green: #6ab04c;
  --quotem-grad: linear-gradient(135deg, #51ae5c, #2d71aa);

  --font-heading: "Kufam", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 12px;
  --radius: 28px;
  --radius-lg: 40px;
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* The arrow glyph points "forward" in RTL; flip it for LTR. */
[dir="ltr"] .arrow {
  transform: scaleX(-1);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   Wordmark (placeholder logo until the real Hadarat logo exists)
   ========================================================================== */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 8px;
}

.wordmark-ar {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 1;
  background: linear-gradient(180deg, #fff 30%, #cfeff2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wordmark-en {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  margin-inline-end: -0.5em; /* compensate trailing letter-spacing */
  direction: ltr;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 70% at 22% 35%, rgba(58, 48, 190, 0.55), transparent 70%),
    radial-gradient(35% 45% at 35% 75%, rgba(255, 140, 50, 0.28), transparent 70%),
    radial-gradient(30% 40% at 60% 20%, rgba(18, 178, 193, 0.18), transparent 70%),
    #02010a;
}

[dir="ltr"] .hero-bg {
  transform: scaleX(-1);
}

.streaks {
  position: absolute;
  inset: -45% -25%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2.2vw;
  transform: rotate(-32deg);
}

.streak {
  width: var(--w);
  opacity: var(--o);
  border-radius: 999px;
  filter: blur(var(--b));
  background: linear-gradient(180deg, transparent 0%, var(--c) 50%, transparent 100%) 0 0 / 100% 45% no-repeat;
  mix-blend-mode: screen;
  animation: streak var(--d) linear infinite;
  animation-delay: var(--delay);
}

@keyframes streak {
  from {
    background-position: 0 -80%;
  }
  to {
    background-position: 0 180%;
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 30%, rgba(0, 0, 0, 0.35) 70%, #000 100%);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block-start: clamp(24px, 4vw, 40px);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.25s, border-color 0.25s;
}

.lang-toggle .icon {
  width: 18px;
  height: 18px;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-body {
  margin-block-start: auto;
  padding-block: 48px clamp(40px, 6vw, 72px);
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 5.8rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 14ch;
}

[dir="ltr"] .hero-title {
  max-width: none;
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  line-height: 1.12;
}

.hero-sub {
  max-width: 44ch;
  margin-block-start: 20px;
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-block-start: clamp(56px, 10vh, 120px);
}

.hero-card {
  display: block;
  padding: 28px 32px 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 22, 22, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), translate 0.35s var(--ease);
}

/* `translate` (not `transform`) so hover doesn't fight the entrance animation */
.hero-card:hover {
  background: rgba(40, 38, 38, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  translate: 0 -4px;
}

.hero-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.4;
  margin-block-end: 10px;
}

.hero-card p {
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-anim {
  animation: hero-fade-up 1s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 110ms + 150ms);
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Sticky pill navigation
   ========================================================================== */
.pillnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  height: 0; /* overlay the sections instead of pushing them down */
  overflow: visible;
}

.pillnav-list {
  position: relative;
  display: flex;
  gap: 4px;
  max-width: 100%;
  height: max-content;
  margin-block-start: 16px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid #2c2c2c;
  background: rgba(30, 30, 30, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  overflow-x: auto;
  scrollbar-width: none;
}

.pillnav-list::-webkit-scrollbar {
  display: none;
}

.pillnav-list a {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 12px 26px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.pillnav-list a:hover {
  color: var(--text);
}

.pillnav-list a.is-active {
  color: #0a0a0a;
}

/* Positioned with physical left + translateX because it tracks offsetLeft */
.pillnav-indicator {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #fff;
  opacity: 0;
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
}

.pillnav-indicator.is-visible {
  opacity: 1;
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */
.section {
  position: relative;
  /* generous top padding leaves room for the overlaid sticky nav */
  padding-block: clamp(128px, 12vw, 176px) clamp(80px, 9vw, 128px);
}

.section--black {
  background: var(--bg);
}

.section--surface {
  background: var(--surface);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  margin-block-end: clamp(48px, 6vw, 80px);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.4;
  margin-block-end: 12px;
}

.display {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Keep each headline line intact on wide screens (two-line headlines, like Thiqal) */
@media (min-width: 901px) {
  [dir="rtl"] .display span {
    white-space: nowrap;
  }
}

.lead {
  color: var(--text-2);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.9;
  padding-block-start: clamp(8px, 4.5vw, 72px);
}

.divider {
  border: 0;
  border-block-start: 1px solid var(--border);
  margin-block: 0 clamp(48px, 6vw, 88px);
}

.icon-disc {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-disc .icon {
  width: 30px;
  height: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.12);
}

.btn .icon {
  width: 22px;
  height: 22px;
  transition: translate 0.3s var(--ease);
}

.btn:hover .icon {
  translate: -4px 0;
}

[dir="ltr"] .btn:hover .icon {
  translate: 4px 0;
}

.section-cta {
  display: flex;
  justify-content: flex-start;
  margin-block-start: clamp(48px, 6vw, 72px);
}

/* ==========================================================================
   Quotem — big bordered card with orbit diagram + segmented toggle
   ========================================================================== */
.bigcard {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px);
}

.bigcard-head {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(8px, 2vw, 24px) clamp(8px, 3vw, 40px) clamp(32px, 4vw, 56px);
}

.bigcard-logo {
  width: clamp(130px, 14vw, 180px);
  height: auto;
  flex-shrink: 0;
}

.bigcard-head p {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.9;
}

.bigcard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  position: relative;
  border-radius: 36px;
  background: var(--card);
  overflow: hidden;
}

.panel--features {
  padding: clamp(24px, 3.5vw, 48px);
}

.panel-intro {
  text-align: center;
  color: var(--text-2);
  margin-block-end: 24px;
}

.segmented {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  margin-block-end: clamp(24px, 3vw, 40px);
  padding: 8px;
  border-radius: 999px;
  background: #242424;
}

.segmented-btn {
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.segmented-btn:hover {
  color: var(--text);
}

.segmented-btn[aria-selected="true"] {
  background: #fff;
  color: #0a0a0a;
}

.feature-list:not([hidden]) {
  animation: tab-fade-up 0.5s var(--ease) both;
}

@keyframes tab-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-block: 24px;
  border-block-end: 1px solid var(--border);
}

.feature:first-child {
  padding-block-start: 0;
}

.feature:last-child {
  border-block-end: 0;
  padding-block-end: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid #d9d9d9;
  color: #fff;
}

.feature h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.5;
  margin-block-end: 4px;
}

.feature p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Orbit diagram */
.panel--diagram {
  min-height: 420px;
}

.contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.contours use {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: var(--o);
}

.orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32%;
  height: auto;
  translate: -50% -50%;
}

.orbit-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--quotem-grad);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.25), 0 12px 40px rgba(45, 113, 170, 0.35);
  animation: float var(--f, 6s) ease-in-out infinite;
}

.orbit-node .icon {
  width: 40%;
  height: 40%;
  stroke-width: 1.6;
}

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

/* Quotem flow strip */
.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-block-start: 24px;
}

.flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--card);
  font-weight: 500;
  line-height: 1.5;
}

.flow-num {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Stats */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-block-start: clamp(56px, 7vw, 96px);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 6vw, 88px);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat dt {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat dd {
  margin-block-start: 12px;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  font-weight: 300;
}

/* ==========================================================================
   Hadarat AI — pillars list + circular diagram
   ========================================================================== */
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.pillar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-block: 36px;
  border-block-end: 1px solid var(--border);
}

.pillar:first-child {
  padding-block-start: 0;
}

.pillar:last-child {
  border-block-end: 0;
}

.pillar h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.4;
  margin-block-end: 8px;
}

.pillar-head p {
  color: var(--muted);
}

.pillar-text {
  color: var(--text-2);
  line-height: 1.9;
}

.ai-diagram {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 1;
}

.ai-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 1.5px dashed #3a3a3a;
  background: radial-gradient(circle, #151515 0%, #121212 60%, transparent 61%);
}

.ai-core {
  position: absolute;
  inset: 26%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  background: #161616;
  text-align: center;
}

.ai-core .icon {
  width: 30%;
  height: auto;
  aspect-ratio: 1;
  color: var(--accent);
  stroke-width: 1.4;
  margin-block-end: 6px;
}

.ai-core strong {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.3;
}

.ai-core span {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--muted);
  direction: ltr;
}

.ai-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  width: 19%;
}

.ai-node-circle {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 0 0 8px rgba(16, 16, 16, 0.9);
}

.ai-node-circle .icon {
  width: 36%;
  height: 36%;
}

.ai-node-label {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-block-start: clamp(56px, 7vw, 96px);
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--card);
}

.mini-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.5;
  margin-block-end: 4px;
}

.mini-card p {
  color: var(--muted);
}

/* ==========================================================================
   Solutions — four cards
   ========================================================================== */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 40px);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 28px 36px;
  border-radius: var(--radius);
  background: var(--card);
  transition: translate 0.35s var(--ease), background 0.35s var(--ease);
}

.card:hover {
  translate: 0 -4px;
  background: #1d1c1c;
}

.card .icon-disc {
  align-self: flex-end;
  margin-block-end: 28px;
}

.card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.5;
  margin-block-end: 12px;
}

.card p {
  color: var(--muted);
  line-height: 1.8;
}

/* ==========================================================================
   Approach — numbered steps + Venn
   ========================================================================== */
.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.step-num {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #141414;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.9rem;
}

.step h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.5;
  margin-block-end: 6px;
}

.step p {
  color: var(--muted);
}

.venn {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  overflow: visible;
}

.venn-c {
  fill: none;
  stroke-width: 4;
}

.venn-c--white {
  stroke: #fff;
}

.venn-c--teal {
  stroke: var(--accent);
}

.venn-c--green {
  stroke: var(--green);
}

.venn text {
  fill: #fff;
  text-anchor: middle;
}

.venn-label {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 500;
}

.venn-sub {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.35em;
  fill: var(--muted) !important;
}

.venn-center {
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact {
  padding-block-end: clamp(96px, 10vw, 140px);
}

.section--contact .section-head {
  margin-block-end: 0;
}

.contact-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-block-start: 1px solid var(--border-soft);
  background: var(--bg);
  padding-block: 64px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.footer-grid .wordmark {
  align-items: center;
}

.footer-col h3 {
  font-weight: 500;
  font-size: 1.15rem;
  margin-block-end: 6px;
}

.footer-col p,
.footer-col a {
  color: var(--muted);
}

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

.footer-bottom {
  margin-block-start: 56px;
  color: #7a7a7a;
  font-size: 0.9rem;
}

.footer-bottom p {
  padding-block-start: 24px;
  border-block-start: 1px solid var(--border-soft);
}

/* ==========================================================================
   Scroll reveal (only when JS is available)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
}

.js .reveal.in-view {
  animation: fade-up 0.9s var(--ease) forwards;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-cards,
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .section-head,
  .bigcard-grid,
  .ai-grid,
  .approach-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lead {
    padding-block-start: 0;
  }

  .bigcard-head {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: 0;
  }

  .panel--diagram {
    min-height: 0;
    aspect-ratio: 1;
  }

  .ai-diagram {
    order: -1;
    max-width: 420px;
  }

  .venn {
    max-width: 440px;
  }
}

@media (max-width: 640px) {
  .hero-cards,
  .cards-4,
  .mini-grid,
  .flow,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    padding: 22px 24px;
  }

  .bigcard {
    padding: 16px;
    border-radius: var(--radius);
  }

  .bigcard-head {
    padding: 8px 8px 24px;
  }

  .panel {
    border-radius: 24px;
  }

  .panel--features {
    padding: 24px 18px;
  }

  .pillnav-list a {
    padding: 10px 18px;
    font-size: 0.98rem;
  }

  .pillar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .segmented-btn {
    padding: 10px 18px;
    font-size: 1rem;
  }

  .feature {
    gap: 16px;
  }

  .feature-icon {
    width: 52px;
    height: 52px;
  }

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

  .step-num {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
  }

  .btn {
    padding: 16px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* The Latin sub-labels duplicate the English labels, so hide them in LTR */
[dir="ltr"] .venn-sub {
  display: none;
}
