/* ==========================================================================
   CoreTechX — site styles
   Breakpoints follow the original design: desktop ≥1200, tablet 810–1199,
   phone <810.
   ========================================================================== */

:root {
  --bg: #0c1f0d;
  --bg-deep: #122d13;
  --surface: #141414;
  --surface-2: #1e1e1e;
  --surface-3: #262626;
  --surface-4: #424242;
  --glass: rgba(20, 20, 20, 0.7);
  --white: #fff;
  --white-40: rgba(255, 255, 255, 0.4);
  --gray-300: #a5a5a5;
  --gray-500: #5e5e5e;
  --brand: #005430;
  --brand-2: #006840;
  --accent: #2f8d68;
  --lime: #dcff78;

  --font: "Figtree", system-ui, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
  --font-display: "Poppins", var(--font);

  --container: 1200px;
  --gutter: 40px;
  --radius-card: 20px;

  /* spring-like ease used for every reveal (matches Framer's bounce 0.2 spring) */
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
hr { border: 0; height: 1px; background: var(--white); opacity: 0.1; margin: 0; width: 100%; }

/* clip (not hidden) so position: sticky keeps working inside */
.page { position: relative; overflow: clip; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

/* Film-grain overlay over the whole viewport */
.noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.2;
  background: url("../assets/img/noise.png") center / cover;
}

/* Large blurred glows behind the page (parallax driven by JS via --parallax) */
.bg-glows {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.bg-glows > [data-name="Illustrations"] { left: 0; top: 0; width: 100% !important; }
.bg-glows [data-name="Illustration"] { transform: translate3d(0, var(--parallax, 0px), 0) !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  white-space: nowrap;
  transition: transform 0.3s var(--ease-out), filter 0.3s, box-shadow 0.3s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--white { background: var(--white); color: #000; box-shadow: 0 8px 24px rgba(38, 38, 38, 0.5); }
.btn--green { background: var(--brand); color: var(--white); box-shadow: 0 20px 35px #122d13; }
.btn--gray { background: var(--surface-4); color: var(--white); box-shadow: 0 8px 24px rgba(38, 38, 38, 0.5); }
.btn--dark {
  background: var(--surface-3);
  color: var(--white);
  box-shadow:
    0 0.71px 0.71px -0.63px rgba(0, 0, 0, 0.15),
    0 1.81px 1.81px -1.25px rgba(0, 0, 0, 0.14),
    0 3.62px 3.62px -1.88px rgba(0, 0, 0, 0.14),
    0 6.87px 6.87px -2.5px rgba(0, 0, 0, 0.13),
    0 13.65px 13.65px -3.13px rgba(0, 0, 0, 0.1),
    0 30px 30px -3.75px rgba(0, 0, 0, 0.05);
}
.btn--block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav__bar {
  max-width: var(--container);
  height: 64px;
  margin-inline: auto;
  padding-inline: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__bar > * {
  pointer-events: auto;
  transition: transform 0.6s var(--ease-spring), opacity 0.4s;
}
.nav.is-hidden .nav__bar > * { transform: translateY(-80px); opacity: 0; }
.nav__logo img { width: 40px; height: 40px; }
.nav__links {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  padding: 16px 32px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__links ul { display: flex; gap: 32px; padding: 4px 0; }
.nav__links a {
  display: block;
  font-size: 16px;
  line-height: 24px;
  opacity: 1;
  transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 0.7; }
.nav__toggle, .nav__mobile { display: none; }

/* ---------- Typography helpers ---------- */
.tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}
.section__copy { display: flex; flex-direction: column; gap: 24px; width: 100%; }
.section__title {
  font-size: 64px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -3.2px;
}
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  overflow: hidden;
}
.card__title { font-size: 24px; font-weight: 400; line-height: 1.3; letter-spacing: -0.48px; }
.card__text { color: var(--gray-300); font-size: 16px; line-height: 24px; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 112px;
  min-height: 1068px;
  padding-top: 144px;
  padding-bottom: 40px;
}
.hero__illu {
  position: absolute;
  top: 1px;
  left: 0;
  width: 100%;
  height: 590px;
  pointer-events: none;
  z-index: -1;
}
.hero__illu > div { position: absolute !important; inset: 0; width: 100% !important; }
.hero__content { display: flex; flex-direction: column; align-items: center; gap: 48px; width: 100%; }
.hero__copy { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 986px; }
.hero__title {
  text-align: center;
  font-size: 96px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -4.8px;
}
.hero__title span {
  display: inline-block;
  padding: 4.8px;
  margin: -4.8px;
  background: linear-gradient(313deg, rgba(219, 255, 120, 0.45) 0%, #fff 45%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__desc {
  max-width: 887px;
  color: var(--gray-300);
  text-align: center;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.6px;
}
.hero__desc .word {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(6px);
  transition: opacity 0.6s var(--ease-out), filter 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--w) * 45ms + 250ms);
}
.is-in .hero__desc .word,
.hero__desc.is-in .word { opacity: 1; filter: blur(0); transform: none; }
.hero__ctas { display: flex; gap: 16px; }

.clients { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.clients__title {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
  letter-spacing: -0.3px;
}
.clients__title span {
  background: linear-gradient(90deg, #fff 0%, var(--gray-300) 101%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.clients__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 33px;
  width: 100%;
}
.clients__grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 24px 0;
}
.clients__grid img {
  object-fit: cover;
  opacity: 0.49;
  transform: scale(0.85);
  transition: opacity 1s var(--ease-spring), transform 1s var(--ease-spring);
}
.clients.is-in .clients__grid img { transform: none; }
.clients__grid li:nth-child(n+5) img { transition-delay: 0.1s; }
.clients__ticker { display: none; }

/* ---------- Marquee (logo ticker + footer) ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: var(--marquee-gap, 10px);
  animation: marquee var(--marquee-duration, 30s) linear infinite;
}
@keyframes marquee { to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); } }

/* ---------- Generic sections ---------- */
.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding-top: 112px;
  padding-bottom: 112px;
}

/* ---------- How it works ---------- */
.how__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  height: 656px;
}
.step__content { display: flex; flex-direction: column; gap: 24px; width: 100%; position: relative; z-index: 2; }
.step__no { width: 56px; height: 56px; fill: var(--white); }
.step__copy { display: flex; flex-direction: column; gap: 8px; }
.step [data-name="Background Glow"] { z-index: 0; }

/* Step 1 — upload button breathes */
.step--1 [data-name="CSV"] { animation: breathe 2.4s ease-in-out infinite alternate; }
/* Step 2 — file icons scroll up endlessly, arrow keeps spinning */
.step--2 [data-name="Illustration"] ul { animation: files-up 3.1s linear infinite; }
.step--2 [data-name="Illustration"] > [data-name="Icon"] { animation: spin-arrow 3s linear infinite; }
/* Step 3 — results panel slides to reveal the result, pill breathes */
.step--3 [data-name="Search / Document search"] > [data-name="Search"] { animation: search-slide 5s var(--ease-out) infinite; }
.step--3 [data-name="Illustration"] > [data-name="Search"] { animation: breathe 2.4s ease-in-out infinite alternate; }

@keyframes breathe { from { transform: scale(1); } to { transform: scale(0.96); } }
@keyframes files-up { from { transform: translateY(0); } to { transform: translateY(-124px); } }
@keyframes files-left { from { transform: translateX(0); } to { transform: translateX(-124px); } }
@keyframes spin-arrow {
  from { transform: rotate(31.7deg) scale(1); }
  to { transform: rotate(391.7deg) scale(1); }
}
@keyframes search-slide {
  0%, 12% { transform: translate(0, -119px); }
  30%, 70% { transform: translate(var(--search-shift, -136px), -119px); }
  88%, 100% { transform: translate(0, -119px); }
}

/* ---------- Manual vs AI ---------- */
.compare { gap: 40px; padding-bottom: 0; }
.compare__cols {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 35px;
  width: calc(100% + 30px);
  padding: 20px 20px 0;
}
.process {
  /* where the bar and the first card stick, measured from the top of the viewport */
  --stick-head: 45px;
  --stick-card: 180px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 30px 0 784px;
  min-width: 0;
}
.process--ai { padding-bottom: 705px; }
.process__head {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  transform: translateY(var(--stick-head));
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(63, 66, 71, 0.18);
}
.process__bar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.process__bar--fill {
  background: var(--surface);
  -webkit-mask-image: linear-gradient(90deg, #000 var(--fill, 0%), transparent var(--fill, 0%));
  mask-image: linear-gradient(90deg, #000 var(--fill, 0%), transparent var(--fill, 0%));
}
.process--ai .process__bar--fill { background: var(--accent); }
.process__name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.process__name h3 { font-size: 20px; font-weight: 700; line-height: 28px; letter-spacing: -0.4px; white-space: nowrap; }
.process__name .sm { display: none; }
.process__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  margin-top: 2px;
  padding: 3px 20px;
  border-radius: 30px;
  background: var(--white);
  color: #000;
  font-family: "Instrument Sans", var(--font);
  font-size: 12.8px;
  font-weight: 700;
  line-height: 20.48px;
  letter-spacing: -0.256px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s, transform 0.5s var(--ease-spring);
}
.process__badge svg { width: 14px; height: 14px; fill: currentColor; }
.process--ai .process__badge { background: var(--lime); }
.process.is-done .process__badge { opacity: 1; transform: none; }
.process__counter {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Instrument Sans", var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 16.8px;
  color: var(--white-40);
}
.process__pill {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 43px;
  border-radius: 50px;
  background: #f4f8ff;
}
.process__pill::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(120, 144, 207, 0.25);
}
.process__pill b {
  position: relative;
  color: #000;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: -0.64px;
}
.process__item {
  position: sticky;
  top: 0;
  height: 125px;
  flex-shrink: 0;
  transform: translateY(calc(var(--stick-card) + var(--i) * 45px));
  z-index: calc(var(--i) + 1);
}
.process__spacer { height: 125px; flex-shrink: 0; }
.process--ai .process__spacer { height: 113px; }
.pcard {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 20px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 9px 12px rgba(64, 70, 79, 0.18);
}
.pcard__row { display: flex; align-items: flex-start; gap: 12px; }
.pcard h4 { flex: 1; font-size: 20px; font-weight: 400; line-height: 28px; letter-spacing: -0.6px; }
.pcard p { padding-left: 32px; color: var(--gray-300); font-size: 16px; line-height: 24px; }
.pcard__icon {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--gray-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.process--ai .pcard__icon { stroke: var(--accent); fill: rgba(47, 141, 104, 0.4); }
.process--ai .pcard__icon path + path { fill: none; }
.pcard__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 5px 1px 0 2px;
  flex-shrink: 0;
  border-radius: 25px;
  background: var(--surface-3);
  transition: background-color 0.3s;
}
.pcard__check svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.35s var(--ease-out);
}
.process__item.is-checked .pcard__check svg { stroke-dashoffset: 0; }
.process--ai .process__item.is-checked .pcard__check { background: var(--accent); }

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  width: 100%;
}
.svc {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 40px;
  height: 500px;
  grid-column: span 4;
}
.svc--4 { grid-column: span 7; }
.svc--5 { grid-column: span 5; }
.svc--2 { align-items: flex-end; }
.svc--5 { justify-content: flex-start; }
.svc__copy { display: flex; flex-direction: column; gap: 8px; width: 100%; position: relative; z-index: 2; }
.svc [data-name="Background Glow"] { z-index: 0; }
.svc > div:not(.svc__copy),
.svc > figure { flex-shrink: 0; }

/* OCR grid tiles flicker */
.svc--2 .tile-glow { animation: tile-flicker 6s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -0.53s); }
@keyframes tile-flicker {
  0%, 30%, 100% { opacity: 0; filter: blur(12px); }
  45% { opacity: 0.6; filter: blur(12px); }
  55% { opacity: 1; filter: none; }
  70% { opacity: 0.6; filter: blur(12px); }
}
/* Orbiting deployment icons (icons counter-rotate to stay upright) */
.svc--5 [data-name="Circular Animation"] { animation: orbit 36s linear infinite; }
.svc--5 [data-name^="Icon0"] { animation: orbit 36s linear infinite reverse; }
@keyframes orbit { from { rotate: 0deg; } to { rotate: 360deg; } }
/* Gentle breathing for the other illustrations */
.svc--1 [data-name="Group"],
.svc--3 [data-name="Main"],
.svc--4 [data-name="Group"] { animation: breathe 3s ease-in-out infinite alternate; }

/* ---------- Pricing ---------- */
.pricing__plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}
.plan {
  position: relative;
  padding: 24px 24px 40px;
  border-radius: var(--radius-card);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.plan:last-child { box-shadow: 0 2px 12px rgba(20, 19, 42, 0.08); }
.plan--popular { background: var(--surface-3); backdrop-filter: blur(8px); }
.plan__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface-4);
  font-size: 16px;
  line-height: 24px;
}
.plan__spheres { position: absolute; top: 24px; left: 24px; width: 110px; height: 110px; z-index: 1; }
.plan__spheres--3 { top: 14px; left: 16px; }
.plan__spheres img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  object-fit: cover;
  animation: float 4s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
@keyframes float { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
.plan__body { display: flex; flex-direction: column; align-items: flex-start; gap: 40px; padding-top: 120px; }
.plan__head { display: flex; flex-direction: column; gap: 12px; }
.plan__name { font-size: 24px; font-weight: 400; line-height: 1.3; letter-spacing: -0.48px; }
.plan__desc, .plan__note { color: var(--gray-300); font-size: 16px; line-height: 24px; }
.plan__price { font-size: 48px; line-height: 48px; letter-spacing: -2.4px; }
.plan__price small {
  margin-left: 12px;
  color: var(--gray-300);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
}
.plan__features { display: flex; flex-direction: column; gap: 24px; }
.plan__features li {
  position: relative;
  padding-left: 28px;
  color: var(--gray-300);
  font-size: 16px;
  line-height: 24px;
}
.plan__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M229.66 77.66l-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- FAQ ---------- */
.faq { flex-direction: row; align-items: flex-start; gap: 64px; }
.faq .section__copy { flex: 1 1 0; }
.faq__list { flex: 1 1 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.faq-item { border-radius: 16px; background: var(--surface); overflow: hidden; }
.faq-item__q {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 24px;
  text-align: left;
}
.faq-item__q span {
  flex: 1;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.6px;
  text-wrap: balance;
}
.faq-item__cross { position: relative; width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.4s var(--ease-spring); }
.faq-item__cross::before,
.faq-item__cross::after {
  content: "";
  position: absolute;
  inset: 7px 0;
  border-radius: 10px;
  background: var(--white);
}
.faq-item__cross::after { inset: 0 7px; }
.faq-item.is-open .faq-item__cross { transform: rotate(45deg); }
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}
.faq-item__a p {
  min-height: 0;
  overflow: hidden;
  padding: 0 64px 0 24px;
  color: var(--gray-300);
  font-size: 16px;
  line-height: 24px;
  opacity: 0;
  transition: opacity 0.3s, padding 0.45s var(--ease-out);
}
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-item__a p { padding-bottom: 24px; opacity: 1; }

/* ---------- Contact ---------- */
.contact { flex-direction: row; align-items: center; gap: 40px; padding-bottom: 160px; }
.contact__info, .contact__form-wrap { flex: 1 1 0; min-width: 0; }
.contact__info { display: flex; flex-direction: column; justify-content: flex-end; gap: 64px; }
.contact__cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  height: 144px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  transition: background-color 0.3s;
}
.contact-card:hover { background: #181818; }
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface-2);
}
.contact-card__icon svg, .contact-card__link { width: 24px; height: 24px; fill: var(--gray-300); }
.contact-card__title { margin-bottom: -8px; font-size: 16px; line-height: 24px; }
.contact-card__detail { color: var(--gray-300); font-size: 16px; line-height: 24px; }
.contact-card__link {
  position: absolute;
  top: 16px;
  right: 16px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.contact-card:hover .contact-card__link { opacity: 1; transform: none; }
.contact__form-wrap { padding-top: 40px; }
.contact__form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
}
.field { display: flex; flex-direction: column; gap: 8px; width: 100%; font-size: 16px; line-height: 24px; }
.field input,
.field textarea {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: var(--surface-2);
  color: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 19.2px;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.35); }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.contact__form .btn { height: 52px; }
.contact__status:empty { display: none; }
.contact__status { width: 100%; color: var(--gray-300); text-align: center; font-size: 14px; }

/* Form states */
.field__error {
  display: none;
  color: #ff8a80;
  font-size: 13px;
  line-height: 18px;
}
.field.is-invalid .field__error { display: block; }
.field.is-invalid input,
.field.is-invalid textarea { box-shadow: inset 0 0 0 1px #ff8a80; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__form { position: relative; }
.contact__form .btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.contact__form.is-sending [data-submit-label]::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact__status.is-error { color: #ff8a80; }
.contact__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 420px;
  padding: 40px 24px;
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}
.contact__success[hidden] { display: none; }
.contact__success h3 { font-size: 32px; font-weight: 400; line-height: 1.3; letter-spacing: -1.28px; }
.contact__success p { max-width: 360px; color: var(--gray-300); }
.contact__success .btn { margin-top: 8px; }
.contact__success-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
}
.contact__success-icon svg { width: 28px; height: 28px; fill: var(--white); }

/* ---------- Inner pages (contact, legal, 404) ---------- */
body.page-dark { background: #000; }
.page-dark .noise { display: none; }
.nav__links a[aria-current="page"] { color: var(--gray-300); }
.nav__mobile a[aria-current="page"] { color: var(--gray-300); }

/* Large blurred sphere in the top-right corner, drifting with the scroll */
.sphere-deco {
  position: absolute;
  top: -260px;
  right: -100px;
  width: 604px;
  height: 604px;
  z-index: 1;
  opacity: 0.6;
  filter: blur(10px);
  pointer-events: none;
  transform: translate3d(0, var(--parallax, 0px), 0);
}
.sphere-deco img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.page-title {
  font-size: 96px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -4.8px;
}

.contact-hero {
  display: grid;
  grid-template-columns: 524fr 556fr;
  align-items: start;
  gap: 40px;
  padding-top: 176px;
  padding-bottom: 112px;
}
.contact-hero__info { display: flex; flex-direction: column; gap: 64px; min-width: 0; }
.contact-hero__heading { display: flex; flex-direction: column; gap: 16px; }
.contact-hero__lead { color: var(--gray-300); font-size: 20px; line-height: 28px; letter-spacing: -0.6px; }
.contact-hero__form { min-width: 0; }
.contact__form--tall textarea { min-height: 266px; }
.faq--wide { gap: 112px; padding-top: 112px; padding-bottom: 112px; }

.legal {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  padding: 176px 40px 160px;
}
.legal__header { display: flex; flex-direction: column; gap: 16px; }
.legal__date { color: var(--accent); font-size: 18px; font-weight: 500; line-height: 27px; letter-spacing: -0.3px; }
.legal__body { color: var(--gray-300); font-size: 16px; line-height: 24px; }
.legal__body h5 {
  margin: 80px 0 0;
  color: var(--white);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -1.28px;
}
.legal__body p { margin-top: 16px; }
.legal__body ul { margin-top: 32px; }
.legal__body > :first-child { margin-top: 0; }
.legal__body li { position: relative; padding-left: 20px; }
.legal__body li::before { content: "•"; position: absolute; left: 6px; }
.legal__body a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.legal__body a:hover { color: var(--lime); }

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 267px;
  padding-bottom: 112px;
}
.not-found__copy { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.not-found__copy p { color: var(--gray-300); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  min-height: 840px;
  padding: 40px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}
.footer__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.footer__ticker { width: 100%; height: 135px; padding: 10px; display: flex; align-items: center; }
.footer__ticker .marquee { width: 100%; }
.footer__ticker li {
  padding-right: 10px;
  color: #d6d6d6;
  font-family: var(--font-display);
  font-size: 112px;
  font-weight: 500;
  line-height: 168px;
  letter-spacing: -5.6px;
  white-space: pre;
  background: linear-gradient(180deg, #fff 0%, #d6d6d6 45%, #9aa597 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 112px 0;
  text-align: center;
}
.footer__cta h2 {
  max-width: 600px;
  color: var(--lime);
  font-size: 40px;
  font-weight: 400;
  line-height: 48px;
  letter-spacing: -1.6px;
  text-wrap: balance;
}
.footer__cta p { max-width: 600px; margin-top: -16px; color: var(--gray-300); font-size: 16px; line-height: 24px; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  padding-top: 48px;
  border-top: 1px solid rgba(220, 255, 120, 0.06);
}
.footer__brand { display: flex; align-items: center; gap: 12px; font-size: 24px; line-height: 31.2px; letter-spacing: -0.48px; }
.footer__brand img { width: 32px; height: 32px; }
.footer__bottom p { color: var(--white-40); font-size: 14px; line-height: 21px; }

/* ---------- Scroll reveal ---------- */
[data-appear] {
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.1s var(--ease-spring);
  transition-delay: var(--delay, 0ms);
}
/* hidden only while main.js runs (the head script sets .js and removes it if main.js never arrives) */
.js [data-appear]:not(.is-in) { opacity: 0; transform: translateY(100px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  [data-appear] { opacity: 1; transform: none; }
  .hero__desc .word { opacity: 1; filter: none; transform: none; }
}

/* ==========================================================================
   Tablet (810–1199)
   ========================================================================== */
@media (max-width: 1199.98px) {
  :root { --gutter: 32px; }

  /* The whole nav is one glass panel; opening the menu grows it to full screen (as in the original) */
  .nav {
    top: 0;
    height: 72px;
    overflow: hidden;
    pointer-events: auto;
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: height 0.7s var(--ease-spring);
  }
  .nav.is-open { height: 100vh; height: 100dvh; }
  .nav__bar { height: 72px; padding: 20px 32px; max-width: none; }
  .nav__bar > * { transition: none; }
  .nav.is-hidden .nav__bar > * { transform: none; opacity: 1; }
  .nav__logo img { width: 32px; height: 32px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 20px;
    height: 20px;
  }
  .nav__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--white);
    transition: transform 0.35s var(--ease-out);
  }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__mobile { display: block; padding: 28px 32px 0; }
  .nav__mobile ul { display: flex; flex-direction: column; gap: 16px; }
  .nav__mobile li {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.3s, transform 0.5s var(--ease-out);
  }
  .nav.is-open .nav__mobile li { opacity: 1; transform: none; transition-delay: calc(var(--k, 0) * 50ms + 150ms); }
  .nav__mobile a {
    display: inline-block;
    font-size: 28px;
    line-height: 33.6px;
    letter-spacing: -1.12px;
    transition: color 0.2s;
  }
  .nav__mobile a:hover,
  .nav__mobile a[aria-current="page"] { color: var(--gray-300); }
  html.menu-open { overflow: hidden; }

  .hero { padding-top: 160px; min-height: 0; gap: 112px; }
  .hero__title { font-size: 72px; letter-spacing: -3.6px; }
  .clients__grid { display: none; }
  .clients__ticker { display: block; width: 100%; padding: 24px 0; }
  .clients__ticker .marquee__track { --marquee-gap: 64px; }
  .clients__ticker li { height: 80px; display: flex; align-items: center; }
  .clients__ticker img { object-fit: cover; opacity: 0.49; }

  .how__steps { grid-template-columns: 1fr; }

  /* The bar sticks below the 72px menu bar instead of sliding under it */
  .process { --stick-head: 88px; --stick-card: 212px; }
  .compare__cols { width: 100%; padding-inline: 0; gap: 35px; }
  .process__name .lg { display: none; }
  .process__name .sm { display: inline; }
  .process__name { gap: 8px; }
  .process__badge { padding: 3px 10px; }
  /* the "Min" label makes room for the Done badge once the process finishes */
  .process.is-done .process__counter { gap: 0; }
  .process.is-done .process__counter > span:last-child { display: none; }
  .process__pill { width: 56px; height: 40px; }

  .services__grid { grid-template-columns: 1fr; }
  .svc, .svc--4, .svc--5 { grid-column: auto; }
  .svc--5 { height: 471px; }

  .pricing__plans { grid-template-columns: 1fr; }

  .faq { flex-direction: column; }
  .faq .section__copy, .faq__list { width: 100%; flex: none; }

  .contact { flex-direction: column; align-items: stretch; }
  .contact__form-wrap { padding-top: 0; }
  .contact-card__link { opacity: 1; transform: none; }

  .page-title { font-size: 72px; letter-spacing: -3.6px; }
  .contact-hero { grid-template-columns: 1fr; padding-top: 144px; padding-bottom: 88px; }
  .faq--wide { gap: 64px; }
  .legal { max-width: 800px; padding-top: 144px; }
  .sphere-deco { width: 480px; height: 480px; top: -220px; right: -160px; }

  .footer__cta h2 { font-size: 36px; line-height: 1.2; }
}

/* ==========================================================================
   Tablet only (810–1199)
   ========================================================================== */
@media (min-width: 810px) and (max-width: 1199.98px) {
  .section { padding-top: 88px; padding-bottom: 88px; }
  .compare { padding-top: 112px; padding-bottom: 0; }
  .section__title { font-size: 56px; letter-spacing: -2.8px; }

  /* Hero illustration was laid out for 1200px; scale it to the tablet width */
  .hero__illu > div {
    width: 1200px !important;
    inset: 0 auto auto 50% !important;
    transform: translateX(-50%) scale(0.7);
    transform-origin: top center;
  }

  /* Services card 2: title on top, OCR grid centred below (tablet layout of the original) */
  .svc--2 { align-items: center; justify-content: flex-start; }
  .svc--2 > .svc__copy { order: -1; }

  /* Step cards: full width, number beside the title */
  .step { height: 597px; padding: 40px; }
  .step--3 { padding: 24px; }
  .step__content { flex-direction: row; gap: 24px; }
  .step__copy { flex: 1; min-width: 0; }
  .card__title { font-size: 20px; line-height: 26px; letter-spacing: -0.4px; }
  .pcard h4 { font-size: 18px; line-height: 25.2px; letter-spacing: -0.54px; }

  /* Step 2: file icons run in a horizontal strip, the arrow sits below */
  .step--2 [data-name="Illustration"] {
    width: 100% !important;
    height: 344px !important;
    flex-direction: column-reverse !important;
    justify-content: space-between !important;
  }
  .step--2 [data-name="Illustration"] > div:not([data-name]) {
    width: 100% !important;
    height: 218px !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .step--2 [data-name="Illustration"] > div:not([data-name]) > div {
    width: 100% !important;
    height: 218px !important;
    display: flex !important;
    align-items: center !important;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0%, #000 12.5%, #000 87.5%, transparent 100%) !important;
  }
  .step--2 [data-name="Illustration"] ul {
    flex-direction: row !important;
    width: max-content !important;
    height: auto !important;
    animation-name: files-left;
  }

  /* Step 3: search window centred in the wider card */
  .step--3 [data-name="Illustration"] { width: 100% !important; height: 446px !important; }
  .step--3 { --search-shift: -30px; }
  /* centre the search window itself (it sits 41px into its 308px holder and is 657px wide) */
  .step--3 [data-name="Search / Document search"] { left: calc(50% - 370px) !important; right: auto !important; }
}

/* ==========================================================================
   Phone (<810)
   ========================================================================== */
@media (max-width: 809.98px) {
  :root { --gutter: 24px; }
  .nav__bar { padding: 20px 24px; }
  .nav__mobile { padding-inline: 24px; }

  .hero { padding-top: 112px; padding-bottom: 24px; gap: 112px; }
  .hero__title { font-size: 48px; letter-spacing: -2.4px; }
  .hero__desc { font-size: 16px; line-height: 22.4px; letter-spacing: -0.48px; }
  .hero__ctas { flex-direction: column; width: 100%; gap: 16px; }
  .hero__ctas .btn { width: 100%; }
  .clients__title { font-size: 14px; line-height: 21px; }

  .section { padding-top: 64px; padding-bottom: 64px; }
  .section__title { font-size: 40px; line-height: 48px; letter-spacing: -2px; }
  .card__title { font-size: 20px; line-height: 26px; letter-spacing: -0.4px; }
  .card__text { font-size: 14px; line-height: 21px; }

  .how__steps { max-width: none; }
  .step { min-height: 0; height: 656px; }
  .step > :not(.step__content) { max-width: 100%; }
  .step--3 { --search-shift: -30px; }

  .compare { gap: 24px; padding-bottom: 88px; }
  .compare__cols { flex-direction: column; align-items: stretch; gap: 35px; padding-top: 20px; }
  .pcard h4 { font-size: 16px; line-height: 22.4px; letter-spacing: -0.48px; }
  .pcard p { font-size: 14px; line-height: 21px; }
  .pcard__icon { margin-top: 2px; }
  .pcard__check { margin-top: 3px; }

  .services__grid { grid-template-columns: 1fr; }
  .svc, .svc--4, .svc--5 { grid-column: auto; }
  .svc { overflow: hidden; }
  /* the three Arabic words span ~430px; shrink and nudge them so all of them fit the 342px card */
  .svc--1 > [data-name="Illustration"] { transform: translateX(-24px) scale(0.66); }
  .svc > :not(.svc__copy) { max-width: none; }
  /* the wide archive-search illustration is scaled to fit the phone card */
  .svc--4 [data-name="Illustration 1"] { zoom: 0.58; }

  .pricing__plans { max-width: none; }
  .plan__body { gap: 32px; }
  .plan__name { font-size: 20px; line-height: 26px; letter-spacing: -0.4px; }
  .plan__price { font-size: 40px; line-height: 40px; letter-spacing: -2px; }
  .plan__features li, .plan__desc, .plan__note { font-size: 14px; line-height: 21px; }

  .faq { gap: 64px; }
  .faq-item__q { padding: 16px; }
  .faq-item__q span { font-size: 16px; line-height: 24px; letter-spacing: -0.3px; }
  .faq-item__a p { padding: 0 48px 0 16px; font-size: 14px; line-height: 21px; }
  .faq-item.is-open .faq-item__a p { padding-bottom: 16px; }

  .contact { gap: 24px; padding-bottom: 88px; }
  .contact-card__title, .contact-card__detail { font-size: 14px; line-height: 21px; }

  .tag { font-size: 12px; line-height: 18px; letter-spacing: 2.4px; }

  .page-title { font-size: 48px; line-height: 57.6px; letter-spacing: -2.4px; }
  .contact-hero { gap: 24px; padding-top: 144px; padding-bottom: 64px; }
  .contact-hero__info { gap: 48px; }
  .contact-hero__lead { font-size: 16px; line-height: 22.4px; letter-spacing: -0.48px; }
  .contact__form--tall textarea { min-height: 160px; }
  .faq--wide { gap: 48px; padding-top: 64px; padding-bottom: 88px; }
  .legal { gap: 64px; padding: 144px 24px 88px; }
  .legal__date { font-size: 14px; line-height: 16.8px; }
  .legal__body { font-size: 14px; line-height: 21px; }
  .legal__body h5 { margin-top: 64px; font-size: 24px; line-height: 31.2px; letter-spacing: -0.96px; }
  .legal__body ul { margin-top: 24px; }
  .not-found { padding-top: 224px; gap: 40px; }
  .not-found__copy p { font-size: 14px; line-height: 21px; }
  .sphere-deco { width: 320px; height: 320px; top: -140px; right: -140px; }
  .contact__success { min-height: 360px; }
  .contact__success h3 { font-size: 24px; letter-spacing: -0.96px; }

  .footer { min-height: 0; padding: 40px 24px 24px; gap: 48px; }
  .footer__ticker { height: 112px; }
  .footer__ticker li { font-size: 80px; line-height: 120px; letter-spacing: -4px; }
  .footer__cta { padding: 112px 0; gap: 32px; }
  .footer__cta h2 { font-size: 28px; line-height: 33.6px; letter-spacing: -1.12px; }
  .footer__cta p { margin-top: -8px; font-size: 14px; line-height: 21px; }
  .footer__cta .btn { width: 100%; }
  .footer__bottom { flex-direction: row; gap: 8px; margin-top: 0; padding-top: 48px; }
  .footer__brand { gap: 8px; font-size: 20px; line-height: 26px; letter-spacing: -0.4px; }
  .footer__brand img { width: 28px; height: 28px; }
  .footer__bottom p { font-size: 11px; line-height: 18px; white-space: nowrap; }
}
