/* FlowAgentPro - marketing site
   Dark, purple/blue, system fonts only (no webfont request, no third-party
   font host, nothing to consent to). */

:root {
  --bg: #08080b;
  --bg-alt: #0b0b10;
  --surface: #111118;
  --surface-2: #16161f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f2f2f6;
  --text-dim: #a9a9b8;
  --text-dimmer: #78788c;

  --violet: #7e42fa;
  --violet-2: #9b6bff;
  --violet-soft: rgba(126, 66, 250, 0.12);
  --blue: #4570ff;
  --orange: #ff900f;
  --green: #2fcf78;

  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 40px);
  --header-h: 68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    Inter, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*,
*::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);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

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

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

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--violet);
  color: #fff;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ----------------------------------------------------------------- brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.wordmark {
  font-size: 1.06rem;
  white-space: nowrap;
}
.wm-a {
  color: var(--violet-2);
}
.wm-p {
  color: var(--orange);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 11, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.nav-main {
  display: flex;
  gap: 26px;
  margin-inline: auto;
  font-size: 0.925rem;
  color: var(--text-dim);
}
.nav-main a {
  position: relative;
  padding: 6px 0;
  transition: color 0.15s;
}
.nav-main a:hover,
.nav-main a.is-active {
  color: var(--text);
}
.nav-main a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--violet-2));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}
.lang-switch a {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  transition: color 0.15s, background 0.15s;
}
.lang-switch a:hover {
  color: var(--text);
}
.lang-switch a[aria-current] {
  background: var(--violet-soft);
  color: var(--violet-2);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.3px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px var(--pad) 20px;
  border-top: 1px solid var(--line);
}
.nav-mobile a {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
}
.nav-mobile a:last-child {
  border-bottom: 0;
}
.nav-mobile-cta {
  margin-top: 14px;
  text-align: center;
  padding: 12px 0;
  border-radius: 10px;
  background: var(--violet);
  color: #fff !important;
  font-weight: 600;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, #6b3ae0 100%);
  color: #fff;
  box-shadow: 0 6px 22px -8px rgba(126, 66, 250, 0.85);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--violet-2) 0%, var(--violet) 100%);
  box-shadow: 0 10px 30px -10px rgba(126, 66, 250, 0.95);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}
.btn-sm {
  padding: 9px 16px;
  font-size: 0.875rem;
  border-radius: 9px;
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding-block: clamp(52px, 8vw, 92px) clamp(44px, 6vw, 68px);
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  top: -320px;
  left: 50%;
  width: min(1100px, 130vw);
  height: 700px;
  transform: translateX(-52%);
  background: radial-gradient(
    ellipse at center,
    rgba(126, 66, 250, 0.3) 0%,
    rgba(69, 112, 255, 0.12) 42%,
    transparent 68%
  );
  filter: blur(18px);
}
.hero::after {
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
}

.hero-title {
  max-width: min(100%, 20em);
  font-size: clamp(2.2rem, 5.6vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.grad {
  background: linear-gradient(96deg, #a97dff 0%, var(--violet) 44%, var(--orange) 138%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 62ch;
  margin-top: 22px;
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--text-dim);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* --------------------------------------------------------------- section */

.section {
  padding-block: clamp(64px, 8vw, 104px);
  border-top: 1px solid var(--line);
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 68ch;
  margin-bottom: clamp(38px, 5vw, 60px);
}
.section-head h2,
.contact-intro h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  letter-spacing: -0.03em;
}
.section-intro {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 1.06rem;
  color: var(--text-dim);
}

/* ----------------------------------------------------------- case studies */

.cases {
  display: grid;
  gap: clamp(56px, 7vw, 92px);
}
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.case + .case {
  padding-top: clamp(56px, 7vw, 92px);
  border-top: 1px solid var(--line);
}
.case-alt .case-media {
  order: 2;
}
.case-body h3 {
  margin-top: 10px;
  font-size: clamp(1.3rem, 2.4vw, 1.72rem);
}
.case-summary {
  margin-top: 14px;
  font-size: 1.06rem;
  color: var(--text);
}
.case-body p {
  color: var(--text-dim);
  font-size: 0.97rem;
}
.case-highlight {
  padding: 14px 18px;
  border-left: 2px solid var(--violet);
  border-radius: 0 10px 10px 0;
  background: var(--violet-soft);
  color: var(--text) !important;
  font-size: 0.97rem !important;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 207, 120, 0.16);
}
.status-building .dot {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 144, 15, 0.16);
}

.tech {
  margin-top: 24px;
}
.tech-label {
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.tech ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tech li {
  padding: 5px 11px;
  border: 1px solid rgba(126, 66, 250, 0.3);
  border-radius: 999px;
  background: var(--violet-soft);
  color: #c6b0ff;
  font-size: 0.78rem;
  line-height: 1.45;
}

/* screenshot frame */
.shot {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 26px 60px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
}
.shot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.shot img {
  width: 100%;
  height: auto;
}
.shot figcaption {
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  color: var(--text-dimmer);
  font-size: 0.76rem;
}
.shot-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  color: var(--text-dimmer);
  font-size: 0.85rem;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.018) 0 12px,
    transparent 12px 24px
  );
}

/* ------------------------------------------------------------ grids/cards */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature {
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 17, 24, 0.5) 100%);
  transition: border-color 0.2s, transform 0.2s;
}
.feature:hover {
  border-color: rgba(126, 66, 250, 0.4);
  transform: translateY(-2px);
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 1px solid rgba(126, 66, 250, 0.3);
  border-radius: 12px;
  background: var(--violet-soft);
  color: var(--violet-2);
}
.icon {
  width: 21px;
  height: 21px;
}
.feature h3 {
  font-size: 1.075rem;
}
.feature p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.reasons {
  gap: 10px;
}
.reason {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.014);
}
.reason h3 {
  position: relative;
  padding-left: 16px;
  font-size: 1.075rem;
}
.reason h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--violet-2), var(--blue));
}
.reason p {
  margin: 10px 0 0 16px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--violet), #5b3ad6);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}
.step h3 {
  font-size: 1.12rem;
}
.step p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- contact */

.section-contact {
  background: var(--bg-alt);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-direct {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.contact-direct h3 {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.contact-details {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.contact-details li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.detail-label {
  min-width: 58px;
  color: var(--text-dimmer);
  font-size: 0.85rem;
}
.contact-details a {
  color: var(--violet-2);
  font-size: 1.02rem;
  border-bottom: 1px solid rgba(155, 107, 255, 0.3);
}
.contact-details a:hover {
  border-bottom-color: var(--violet-2);
}
.note {
  margin: 18px 0 0;
  color: var(--text-dimmer);
  font-size: 0.88rem;
}

.contact-form {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--text-dim);
}
.opt {
  color: var(--text-dimmer);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0c0c11;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #55556a;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(126, 66, 250, 0.18);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #d9534f;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.is-ok {
  color: var(--green);
}
.form-status.is-error {
  color: #ff8a85;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 42px;
}
.footer-brand p {
  margin: 14px 0 0;
  max-width: 34ch;
  color: var(--text-dimmer);
  font-size: 0.92rem;
}
.footer-head {
  margin-bottom: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
.site-footer li {
  margin-bottom: 9px;
}
.site-footer li a {
  color: var(--text-dim);
  font-size: 0.92rem;
}
.site-footer li a:hover {
  color: var(--text);
}
.footer-bottom {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.footer-bottom p {
  margin: 0;
  color: var(--text-dimmer);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------- thanks page */

.section-thanks {
  border-top: 0;
  padding-block: clamp(70px, 12vw, 140px);
  text-align: center;
}
.section-thanks h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
}
.section-thanks .section-intro {
  margin-inline: auto;
  max-width: 52ch;
  margin-bottom: 30px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 780px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .nav-main,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .header-actions {
    margin-left: auto;
  }
  .nav-mobile:not([hidden]) {
    display: flex;
  }
  .case,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .case-alt .case-media {
    order: 0;
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .hero-actions .btn {
    width: 100%;
  }
  .reason,
  .feature,
  .step {
    padding-inline: 20px;
  }
}

/* ------------------------------------------------------------- animation */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

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