@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Lalezar: the display face of the hero headline only. */
@font-face {
  font-family: "Lalezar";
  src: url("/fonts/Lalezar-arabic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "Lalezar";
  src: url("/fonts/Lalezar-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --ink: #120f2b;
  --ink-raised: #1f1c3f;
  --ink-line: #3f3c66;
  --paper: #f7f1e5;
  --paper-dim: #c4c5de;
  --violet: #6431c3;
  --violet-bright: #a981ff;
  --coral: #fd9c5d;
  --coral-deep: #d75a21;
  --ok: #5ee295;
  --bad: #ff918e;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(2.5rem, 4.5vw, 4rem);
  --radius: 1rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-fa: "Vazirmatn", "Bricolage Grotesque", system-ui, sans-serif;
  --font-en: "Bricolage Grotesque", "Vazirmatn", system-ui, sans-serif;
}

/* The real palette. The values above are its sRGB equivalents, for browsers without oklch (iOS before 15.4). */
@supports (color: oklch(0 0 0)) {
  :root {
    --ink: oklch(0.19 0.055 285);
    --ink-raised: oklch(0.25 0.065 285);
    --ink-line: oklch(0.38 0.07 285);
    --paper: oklch(0.96 0.018 85);
    --paper-dim: oklch(0.83 0.035 285);
    --violet: oklch(0.47 0.21 292);
    --violet-bright: oklch(0.7 0.19 295);
    --coral: oklch(0.78 0.14 52);
    --coral-deep: oklch(0.62 0.17 42);
    --ok: oklch(0.82 0.16 155);
    --bad: oklch(0.78 0.14 22);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
  scrollbar-color: var(--ink-line) var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-fa);
  font-size: 0.9rem;
  line-height: 1.75;
  caret-color: var(--coral);
}

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

::selection {
  background: var(--coral);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

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

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

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

html[lang="en"] :is(h1, h2, h3) {
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  max-inline-size: 18ch;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

img,
svg,
canvas {
  display: block;
}

.sprite {
  position: absolute;
  inline-size: 0;
  block-size: 0;
}

.icon {
  inline-size: 1.15em;
  block-size: 1.15em;
  flex: none;
}

[dir="rtl"] .flip {
  transform: scaleX(-1);
}

.skip {
  position: absolute;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  background: var(--coral);
  color: var(--ink);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 2.5rem;
  padding: 0.4rem 1.15rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.3s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-solid {
  background: var(--coral);
  color: var(--ink);
}

.btn-solid:hover {
  background: var(--paper);
}

.btn-outline {
  border-color: var(--ink-line);
  color: var(--paper);
}

.btn-outline:hover {
  border-color: var(--paper);
}

.btn-small {
  min-block-size: 2.25rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem var(--gutter);
  background: rgba(18, 15, 43, 0.82);
  background: color-mix(in oklch, var(--ink) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid rgba(63, 60, 102, 0.6);
  border-block-end: 1px solid color-mix(in oklch, var(--ink-line) 60%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-en);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.75rem;
  margin-inline: auto;
  font-size: 0.86rem;
}

.nav a,
.footer-nav a {
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.2s;
}

:is(.nav, .footer-nav) a[lang="en"] {
  font-family: var(--font-en);
}

.nav a:hover,
.footer-nav a:hover {
  color: var(--paper);
}

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

.lang {
  display: flex;
  padding: 0.2rem;
  border: 1.5px solid var(--ink-line);
  border-radius: 999px;
}

.lang button {
  min-block-size: 1.8rem;
  padding: 0.1rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--paper-dim);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

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

.lang button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}

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

.hero {
  position: relative;
  display: grid;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(0.75rem, 1.5vw, 1.25rem) var(--gutter) 0.5rem;
}

.hero-waves {
  position: absolute;
  inset: 0;
  z-index: -1;
  inline-size: 100%;
  block-size: 100%;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "title run"
    "copy run";
  align-items: start;
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
}

.hero-copy {
  grid-area: copy;
  align-self: start;
}

/* The headline sits right under the top bar, in its own display face. */
.hero h1 {
  grid-area: title;
  max-inline-size: 48ch;
  font-family: "Lalezar", var(--font-fa);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 400;
  line-height: 1.6;
}

html[lang="en"] .hero h1 {
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-tagline {
  max-inline-size: 15ch;
  color: var(--coral);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.4;
}

.hero-actions .btn {
  min-block-size: 3.1rem;
  padding: 0.6rem 1.8rem;
  font-size: 1.08rem;
}

/* The logo that rides beside the word Agento in running text. */
.brand-word {
  white-space: nowrap;
}

.brand-mark {
  display: inline-block;
  inline-size: 0.95em;
  block-size: 0.95em;
  margin-inline-end: 0.3em;
  vertical-align: -0.12em;
}

.lead {
  max-inline-size: 52ch;
  color: var(--paper-dim);
  font-size: 0.95rem;
}

.hero .btn-outline {
  background: rgba(18, 15, 43, 0.8);
  background: color-mix(in oklch, var(--ink) 80%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 2.25rem;
}

/* The agent: a robot that pulls work in from three channels. It stands beside the services heading. */

.agent {
  flex: none;
  inline-size: clamp(8.5rem, 12vw, 11.5rem);
  margin-inline-end: clamp(0.5rem, 4vw, 4rem);
}

/* On a wide screen the robot is taller than the row it stands in. It rises into the empty middle of the
   hero above instead of pushing the heading and the cards down, so the row stays on the first screen. */
@media (min-width: 62.01rem) {
  .services-title .agent {
    position: relative;
    margin-block-start: -6rem;
  }
}

.agent-logo {
  inline-size: 3rem;
  block-size: 3rem;
  margin-inline: auto;
  margin-block-end: 0.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.75rem 1.5rem -0.5rem rgba(2, 0, 14, 0.8);
}

.agent svg {
  inline-size: 100%;
  block-size: auto;
  overflow: visible;
}

.agent-orbit {
  fill: none;
  stroke: var(--ink-line);
  stroke-width: 1.5;
  stroke-dasharray: 3 9;
  animation: agent-flow 9s linear infinite;
}

.agent-link {
  stroke: var(--violet-bright);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 4 8;
  animation: agent-flow 1.8s linear infinite;
}

.agent-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: agent-ping 4.2s ease-in-out infinite;
}

.agent-node-2 {
  animation-delay: 1.4s;
}

.agent-node-3 {
  animation-delay: 2.8s;
}

.agent-node circle {
  fill: var(--ink-raised);
  stroke: var(--ink-line);
  stroke-width: 1.5;
}

.agent-node path {
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agent-shadow {
  fill: rgba(2, 0, 14, 0.6);
  fill: oklch(0.08 0.05 285 / 0.6);
  transform-box: fill-box;
  transform-origin: center;
  animation: agent-shadow 4s ease-in-out infinite;
}

.agent-bot {
  animation: agent-bob 4s ease-in-out infinite;
}

.agent-shell {
  fill: var(--ink-raised);
  stroke: var(--violet-bright);
  stroke-width: 2.5;
}

.agent-line {
  stroke: var(--violet-bright);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.agent-visor {
  fill: var(--ink);
}

.agent-neck {
  fill: var(--ink-line);
}

.agent-eye {
  fill: var(--coral);
  transform-box: fill-box;
  transform-origin: center;
  animation: agent-blink 4.6s infinite;
}

.agent-beacon {
  fill: var(--coral);
  animation: agent-glow 1.6s ease-in-out infinite;
}

.agent-core {
  fill: var(--violet-bright);
  animation: agent-glow 2.4s ease-in-out infinite;
}

.agent-arm {
  transform-box: fill-box;
  transform-origin: 50% 12%;
  animation: agent-wave 4s ease-in-out infinite;
}

@keyframes agent-flow {
  to {
    stroke-dashoffset: -48;
  }
}

@keyframes agent-ping {
  0%,
  30%,
  100% {
    transform: none;
  }

  12% {
    transform: scale(1.2);
  }
}

@keyframes agent-bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes agent-shadow {
  50% {
    transform: scaleX(0.78);
    opacity: 0.6;
  }
}

@keyframes agent-blink {
  0%,
  92%,
  100% {
    transform: none;
  }

  96% {
    transform: scaleY(0.1);
  }
}

@keyframes agent-glow {
  50% {
    opacity: 0.35;
  }
}

@keyframes agent-wave {
  50% {
    transform: rotate(16deg);
  }
}

.run-column {
  grid-area: run;
}

.run-note {
  margin-block-end: 0.6rem;
  padding-inline: 0.5rem;
  color: var(--paper-dim);
  font-size: 0.8rem;
}

.run {
  padding: 1.1rem;
  background: rgba(18, 15, 43, 0.78);
  background: color-mix(in oklch, var(--ink) 78%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  box-shadow: 0 2rem 4rem -1.5rem rgba(2, 0, 14, 0.8);
  box-shadow: 0 2rem 4rem -1.5rem oklch(0.08 0.05 285 / 0.8);
}

.run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-end: 0.75rem;
  border-block-end: 1px solid var(--ink-line);
}

.run-head .run-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
}

.tag {
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--paper-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}

.run-steps {
  display: grid;
  gap: 0.2rem;
  margin-block-start: 0.75rem;
}

.run-steps li {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  color: var(--paper-dim);
  font-size: 0.84rem;
  line-height: 1.5;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

.run-dot {
  display: grid;
  place-items: center;
  inline-size: 1.35rem;
  block-size: 1.35rem;
  border: 1.5px solid var(--ink-line);
  border-radius: 50%;
  color: transparent;
  transition: background-color 0.4s, border-color 0.4s, color 0.4s;
}

.run-dot .icon {
  inline-size: 0.8rem;
  block-size: 0.8rem;
}

.run-steps li[data-state="running"] {
  background: rgba(100, 49, 195, 0.45);
  background: color-mix(in oklch, var(--violet) 45%, transparent);
  color: var(--paper);
}

.run-steps li[data-state="running"] .run-dot {
  border-color: var(--coral);
  animation: pulse 1.1s ease-in-out infinite;
}

.run-steps li[data-state="done"] {
  color: var(--paper);
}

.run-steps li[data-state="done"] .run-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--ink);
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 0.4rem rgba(253, 156, 93, 0.25);
    box-shadow: 0 0 0 0.4rem color-mix(in oklch, var(--coral) 25%, transparent);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: var(--section-y) var(--gutter);
}

.section > h2 {
  margin-block-end: clamp(1.25rem, 2.5vw, 2rem);
}

/* Services: each card owns a full colour field. The section sits close under the hero. */

.services {
  padding-block-start: 0.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.service {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.9rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border-radius: calc(var(--radius) * 1.4);
  background: var(--violet);
  color: var(--paper);
}

.service:nth-child(3n + 2) {
  background: var(--coral);
  color: var(--ink);
}

.service:nth-child(3n + 3) {
  background: var(--paper);
  color: var(--ink);
}

.service h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}

.service p {
  max-inline-size: 52ch;
  font-size: 0.92rem;
}

.features {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding-block-start: 1rem;
  font-size: 0.88rem;
  border-block-start: 1.5px solid rgba(128, 128, 128, 0.45);
  border-block-start: 1.5px solid color-mix(in oklch, currentColor 30%, transparent);
}

.features li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}

.features .icon {
  position: relative;
  inset-block-start: 0.2em;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  font-weight: 700;
}

/* Deva: the product. A raised field keeps it apart from the services above it. */

.deva {
  background: var(--ink-raised);
  border-block: 1px solid var(--ink-line);
}

.deva-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 1.5rem clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

.deva-side {
  display: grid;
  gap: 1.25rem;
}

/* The product name stands out from the text around it. */
.deva-word {
  font-family: var(--font-en);
  font-size: 1.2em;
  font-weight: 800;
  color: var(--paper);
}

.deva h2 .deva-word {
  font-size: 1.5em;
  color: var(--coral);
}

.deva .btn .deva-word {
  color: inherit;
}

.deva-shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  box-shadow: 0 2rem 4rem -1.5rem rgba(2, 0, 14, 0.8);
  box-shadow: 0 2rem 4rem -1.5rem oklch(0.08 0.05 285 / 0.8);
}

.deva-shot img {
  inline-size: 100%;
  block-size: auto;
}

.deva-copy {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
}

.deva .tag {
  border-color: var(--coral);
  color: var(--coral);
}

.deva h2 {
  max-inline-size: 24ch;
}

.deva-note {
  color: var(--paper-dim);
  font-size: 0.82rem;
}

.deva-rules {
  padding: 0.75rem 0.9rem 0.2rem;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.deva-rules h3 {
  margin-block-end: 0.4rem;
  font-size: 0.84rem;
}

.deva-rules .points li {
  gap: 0.55rem;
  padding-block: 0.4rem;
  border-block-start-width: 1px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.6;
}

.deva-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
}

.deva-grid li {
  padding: 1rem 1.1rem;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.deva-grid li:nth-child(3n + 2) {
  transition-delay: 60ms;
}

.deva-grid li:nth-child(3n + 3) {
  transition-delay: 120ms;
}

.deva-grid h3 {
  margin-block-end: 0.35rem;
  color: var(--coral);
  font-size: 0.98rem;
  line-height: 1.5;
}

.deva-grid p {
  color: var(--paper-dim);
  font-size: 0.86rem;
}

/* Office: four agents at their desks, each doing one job, on the same line as the services heading.
   Runs only while on screen (.is-live). */

/* The same two columns as the service cards below, so the four agents sit exactly over the second card. */
.services-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: end;
  gap: 1rem;
  margin-block-end: clamp(1rem, 2vw, 1.5rem);
}

.services-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

/* The two main buttons stand level with the robot; the heading sits under them, on the cards' line. */
.services-lead {
  display: grid;
  align-content: space-between;
  align-self: stretch;
  gap: 1.25rem;
}

.services-lead .hero-actions {
  margin-block-start: 0;
}

/* The heading stays on one line beside the agents. */
.services-head h2 {
  max-inline-size: none;
  white-space: nowrap;
}

.office-floor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.5vw, 1.25rem);
}

.office-floor li {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}

.office-desk {
  inline-size: 100%;
  block-size: auto;
  overflow: visible;
}

.office-job {
  color: var(--paper-dim);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.office-shell {
  fill: var(--ink-raised);
  stroke: var(--violet-bright);
  stroke-width: 2.5;
}

.office-antenna {
  stroke: var(--violet-bright);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.office-visor,
.office-monitor {
  fill: var(--ink);
}

.office-monitor {
  stroke: var(--ink-line);
  stroke-width: 2;
}

.office-eye,
.office-beacon {
  fill: var(--coral);
}

.office-stand,
.office-leg {
  fill: var(--ink-line);
}

.office-top {
  fill: #67658a;
  fill: color-mix(in oklch, var(--ink-line) 70%, var(--paper-dim));
}

.office-light {
  fill: var(--ok);
}

.office-screen rect {
  fill: var(--violet-bright);
}

.office-screen .office-warm {
  fill: var(--coral);
}

.office-screen .office-box {
  fill: none;
  stroke: var(--paper-dim);
  stroke-width: 1.5;
}

.office-screen .office-task {
  fill: var(--ink-line);
}

.office-tick {
  fill: none;
  stroke: var(--ok);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Everything that moves scales or shifts about its own box. */
.office-desk :is(.office-eye, .office-arm, .office-pop, .office-line, .office-bar, .office-tick) {
  transform-box: fill-box;
}

.is-live .office-bot {
  animation: office-bob 3.6s ease-in-out infinite;
}

.is-live .office-eye {
  transform-origin: center;
  animation: agent-blink 4.6s infinite;
}

.is-live .office-beacon,
.is-live .office-light {
  animation: agent-glow 1.8s ease-in-out infinite;
}

.is-live .office-arm {
  transform-origin: 50% 0;
  animation: office-type 0.42s ease-in-out infinite alternate;
}

.is-live .office-arm-2 {
  animation-delay: 0.21s;
}

.office-pop,
.office-tick {
  transform-origin: center;
}

.office-line {
  transform-origin: 0 50%;
}

.office-bar {
  transform-origin: 50% 100%;
}

.is-live .office-pop {
  animation: office-pop 4.8s var(--ease-out) infinite both;
}

.is-live .office-line {
  animation: office-write 4.8s var(--ease-out) infinite both;
}

.is-live .office-bar {
  animation: office-rise 4.8s var(--ease-out) infinite both;
}

.is-live .office-tick {
  animation: office-pop 4.8s var(--ease-out) infinite both;
}

/* Each agent moves a little out of step with its neighbours; the parts of a screen arrive in order. */
.office-floor li:nth-child(2) :is(.office-bot, .office-arm) {
  animation-delay: -1.2s;
}

.office-floor li:nth-child(3) :is(.office-bot, .office-arm) {
  animation-delay: -2.4s;
}

.office-floor li:nth-child(4) :is(.office-bot, .office-arm) {
  animation-delay: -3.6s;
}

.office-floor li .office-screen .office-b {
  animation-delay: 0.5s;
}

.office-floor li .office-screen .office-c {
  animation-delay: 1s;
}

.office-floor li .office-screen .office-d {
  animation-delay: 1.5s;
}

.office-floor li .office-screen .office-e {
  animation-delay: 2s;
}

@keyframes office-bob {
  50% {
    transform: translateY(-3px);
  }
}

@keyframes office-type {
  to {
    transform: translateY(3px);
  }
}

@keyframes office-pop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(3px);
  }

  10%,
  82% {
    opacity: 1;
    transform: none;
  }

  92%,
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes office-write {
  0% {
    opacity: 1;
    transform: scaleX(0);
  }

  16%,
  82% {
    opacity: 1;
    transform: none;
  }

  92%,
  100% {
    opacity: 0;
    transform: none;
  }
}

@keyframes office-rise {
  0% {
    opacity: 1;
    transform: scaleY(0);
  }

  16%,
  82% {
    opacity: 1;
    transform: none;
  }

  92%,
  100% {
    opacity: 0;
    transform: none;
  }
}

/* Process */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1.5rem 1.25rem;
  counter-reset: none;
}

.steps li {
  padding-block-start: 0.9rem;
  border-block-start: 2px solid var(--ink-line);
}

.steps li:first-child {
  border-block-start-color: var(--coral);
}

.step-number {
  display: block;
  color: var(--coral);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin-block: 0.45rem 0.3rem;
  font-size: 1rem;
}

.steps p {
  color: var(--paper-dim);
}

/* FAQ */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block-start: 0;
}

.faq > h2 {
  margin-block-end: 0;
}

.faq-list details {
  border-block-end: 1px solid var(--ink-line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary .icon {
  color: var(--coral);
  transition: transform 0.35s var(--ease-out);
}

.faq-list details[open] summary .icon {
  transform: rotate(45deg);
}

.faq-list details p {
  max-inline-size: 65ch;
  padding-block-end: 1.1rem;
  color: var(--paper-dim);
}

/* About: a deep violet field that sets the section apart without leaving the dark theme. */

.about {
  background: #321868;
  background: oklch(0.3 0.13 292);
  color: var(--paper);
}

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.about h2 {
  margin-block-end: 1.25rem;
}

.prose {
  display: grid;
  gap: 0.85rem;
  max-inline-size: 65ch;
  font-size: 0.94rem;
}

.points {
  display: grid;
  gap: 0;
}

.points li {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  padding-block: 0.7rem;
  border-block-start: 1.5px solid rgba(247, 241, 229, 0.22);
  border-block-start: 1.5px solid color-mix(in oklch, var(--paper) 22%, transparent);
  font-weight: 700;
}

.points .icon {
  position: relative;
  inset-block-start: 0.2em;
  color: var(--coral);
}

/* Contact */

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.contact h2 {
  margin-block-end: 0.9rem;
}

.contact-details {
  display: grid;
  gap: 0.75rem;
  margin-block-start: 1.75rem;
}

.contact-details dt {
  color: var(--paper-dim);
  font-size: 0.9rem;
}

.contact-details dd {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Compact enough to sit inside one screen: short fields pair up, the message spans both columns. */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
  padding: clamp(1.1rem, 1.8vw, 1.4rem);
  background: var(--ink-raised);
  border-radius: calc(var(--radius) * 1.2);
}

.field {
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.field-wide,
.form .btn,
.form-status {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
}

input,
select,
textarea {
  inline-size: 100%;
  min-block-size: 2.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink-line);
  border-radius: 0.75rem;
  font: inherit;
  transition: border-color 0.2s;
}

/* Below 16px, iOS zooms the page when a field takes focus. */
@media (pointer: coarse) {
  input,
  select,
  textarea {
    min-block-size: 2.75rem;
    font-size: 1rem;
  }

  /* A finger needs about 44 px. */
  .lang button {
    min-block-size: 2.5rem;
  }

  .btn-small {
    min-block-size: 2.75rem;
  }

  .brand,
  .service-link,
  .footer-nav a {
    padding-block: 0.6rem;
  }
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--paper-dim);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--coral);
  border-radius: 0.75rem;
}

[aria-invalid="true"] {
  border-color: var(--bad);
}

.trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form .btn {
  justify-self: start;
}

.form-status {
  min-block-size: 1.85em;
  font-weight: 600;
}

.form-status[data-kind="ok"] {
  color: var(--ok);
}

.form-status[data-kind="error"] {
  color: var(--bad);
}

/* Footer */

.footer {
  padding: 1.75rem var(--gutter);
  border-block-start: 1px solid var(--ink-line);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 2rem;
  color: var(--paper-dim);
  font-size: 0.86rem;
}

.footer .brand {
  color: var(--paper);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright {
  grid-column: 1 / -1;
  font-family: var(--font-en);
  font-size: 0.8rem;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

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

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

  .run-steps li[data-state="running"] .run-dot,
  .agent *,
  .office-floor * {
    animation: none;
  }
}

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

@media (max-width: 62rem) {
  .nav {
    display: none;
  }

  .topbar-actions {
    margin-inline-start: auto;
  }

  .hero-inner,
  .deva-head,
  .faq,
  .about-inner,
  .contact-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-inner {
    grid-template-areas:
      "title"
      "copy"
      "run";
    align-items: start;
  }

  .hero-tagline {
    max-inline-size: none;
  }

  .deva-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  }

  .services-head h2 {
    white-space: normal;
  }

  .office-job {
    font-size: 0.78rem;
  }

  /* On a narrow screen the buttons and the heading take the full width; the robot stands under them. */
  .services-title {
    flex-wrap: wrap;
    justify-content: center;
  }

  .services-lead {
    flex: 1 1 100%;
  }

  .agent {
    inline-size: 8rem;
    margin-inline-end: 0;
  }

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

@media (max-width: 30rem) {
  .topbar {
    gap: 0.75rem;
  }

  .brand span {
    display: none;
  }

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

  .btn-small span {
    display: none;
  }

  .btn-small {
    padding-inline: 0.7rem;
  }
}

/* ---------- Rendering speed ---------- */

/* Sections far down the page are laid out only when they come near the screen. */
.process,
.faq,
.about,
.contact {
  content-visibility: auto;
  contain-intrinsic-size: auto 700px;
}
