/* ---------- Automations page ----------
   Shared building blocks (statement, rows, panel, closing, call to action, buttons) come from websites.css.
   This file only holds what is specific to the automations page. */

/* ================= Title section ================= */
.ahero {
  /* everything in the floating cards scales with the screen width */
  --u: max(0.56vw, 8px);
  --accent: #ff4a12;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 2.4rem 3.4rem;
  overflow: hidden;
}
.ahero__visual { position: absolute; inset: 0; }
.ahero__bottom { position: relative; z-index: 5; margin-top: auto; }
@media (min-width: 1024px) {
  .ahero .whero__bottom { grid-template-columns: minmax(0, 1fr) 25vw; }
}
.ahero .whero__title { font-size: clamp(5rem, min(8.9vw, 24svh), 30rem); margin-left: -0.05em; margin-bottom: -0.11em; }   /* the bottom of the letters sits on the same line as the bottom of the buttons */

/* the tall picture in the middle: many messy sources run into one clean result */
.apic {
  position: absolute; z-index: 1;
  left: 32.5%; width: 35.5%; top: 0; bottom: 0;
  overflow: hidden;
  background:
    radial-gradient(80% 42% at 50% 108%, #ff4a12 0%, rgba(255, 74, 18, 0) 74%),
    radial-gradient(70% 40% at 50% 30%, rgba(255, 176, 130, 0.42), rgba(255, 176, 130, 0) 72%),
    linear-gradient(180deg, #4a3c36 0%, #272220 55%, #121110 100%);
  animation: wrise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.apic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.apic::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* floating cards */
.acard {
  position: absolute; z-index: 3; overflow: hidden;
  font-size: var(--u); color: #fff;
  background: #141418; border: 1px solid #26262e; border-radius: 1.3em;
  box-shadow: 0 2.4em 6em rgba(0, 0, 0, 0.45);
}
.acard--list { left: 25.4%; top: 17%; width: 36em; animation: wrise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both; }
.acard--set  { left: 60.3%; top: 25%; width: 29.5em; padding: 2em 2.2em 0.6em; animation: wrise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both; }
.acard--hist { left: 51.3%; top: 62%; width: 33em; padding: 2em 0 0.6em; animation: wrise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both; }

/* left: the list of workflows */
.al__head { display: flex; align-items: center; gap: 1.4em; padding: 1.8em 2em; }
.al__ico { flex: none; display: grid; place-items: center; width: 5em; height: 5em; border-radius: 1em; background: linear-gradient(140deg, #ff6a2f, #a83a10); }
.al__ico svg { width: 2.6em; height: 2.6em; }
.al__head b { display: block; font-size: 1.55em; font-weight: 600; letter-spacing: -0.01em; }
.al__head small { display: block; margin-top: 0.15em; font-size: 1.4em; color: #9a9aa8; }
.al__head em { font-style: normal; font-weight: 600; color: #fff; }
.acard__k { margin: 0; padding: 0.4em 2em 1.2em; border-bottom: 1px solid #26262e; font-size: 1.1em; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #9a9aa8; }
.al__rows { padding: 0.6em 0 0.8em; }
.al__rows button { display: flex; align-items: center; gap: 1.4em; width: 100%; padding: 0.95em 2em; text-align: left; transition: background 0.25s ease; }
.al__rows button:hover { background: #1b1b22; }
.al__rows button.on { background: #22222b; }
.al__rows button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.al__t { flex: none; display: grid; place-items: center; width: 4.4em; height: 4.4em; border-radius: 0.8em; }
.al__t svg { width: 2.3em; height: 2.3em; }
.al__t--o { background: linear-gradient(140deg, #ff6a2f, #a83a10); }
.al__t--b { background: linear-gradient(140deg, #4a7bff, #1d3a9a); }
.al__t--g { background: linear-gradient(140deg, #34c257, #146b2a); }
.al__x b { display: block; font-size: 1.5em; font-weight: 600; letter-spacing: -0.01em; }
.al__x small { display: block; font-size: 1.4em; color: #9a9aa8; }

/* right, top: settings of the selected workflow */
.as__h { display: block; margin-bottom: 1.1em; font-size: 1.5em; font-weight: 600; }
.as__tabs { display: flex; align-items: center; gap: 0.8em; margin-bottom: 1.8em; }
.as__tabs span { padding: 0.5em 1em; border-radius: 0.5em; font-size: 1.4em; color: #c9c9d2; }
.as__tabs span.on { background: #252530; color: #fff; }
.as__tabs .as__plus { padding: 0.35em 0.5em; font-size: 1.8em; line-height: 1; color: #9a9aa8; }
.as__f { margin-bottom: 1.5em; }
.as__l { display: block; margin-bottom: 0.55em; font-size: 1.35em; color: #9a9aa8; }
.as__box { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 0.8em 1em; border: 1px solid #33333d; border-radius: 0.5em; background: #101015; font-size: 1.4em; font-weight: 500; white-space: nowrap; overflow: hidden; transition: opacity 0.18s ease; }
.as__box--sel::after { content: ""; flex: none; width: 0.42em; height: 0.42em; margin-right: 0.15em; border-right: 2px solid #9a9aa8; border-bottom: 2px solid #9a9aa8; transform: translateY(-0.12em) rotate(45deg); }

/* right, bottom: run history */
.ah__h { display: block; padding: 0 2em; margin-bottom: 1em; font-size: 1.45em; font-weight: 600; }
.ah__rows li { display: flex; align-items: center; gap: 1.3em; padding: 1em 2em; transition: opacity 0.18s ease; }
.ah__rows li.on { background: #20202a; }
.ah__r { flex: none; width: 1.2em; height: 1.2em; border: 0.16em solid #4a4a56; border-radius: 50%; }
.ah__rows li.on .ah__r { border-color: #7aa2ff; }
.ah__rows li > span { flex: 1; min-width: 0; }
.ah__rows b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.45em; font-weight: 500; }
.ah__rows small { display: block; margin-top: 0.1em; font-size: 1.3em; color: #9a9aa8; }
.ah__s { flex: none; padding: 0.35em 0.9em; border-radius: 3em; background: #10301a; color: #5fdc7c; font-style: normal; font-size: 1.2em; font-weight: 600; }
.ah__s.live { background: #14224a; color: #7aa2ff; animation: apulse 1.1s ease-in-out infinite; }
@keyframes apulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.is-swap .as__box, .is-swap .ah__rows li { opacity: 0; }

/* tablet: the settings card goes, the picture widens */
@media (max-width: 1023px) {
  .ahero { --u: max(1.05vw, 8px); }
  .apic { left: 15%; width: 70%; }
  .acard--set { display: none; }
  .apic__done { display: none; }
  .acard--list { left: 3%; top: 17%; }
  .acard--hist { left: auto; right: 3%; top: 42%; }
  .ahero .whero__bottom { grid-template-columns: minmax(0, 1fr); }
  .ahero .whero__title { font-size: clamp(5rem, 13vw, 14rem); }
}
/* phone: the pictures become a block above the title */
@media (max-width: 820px) {
  .ahero { --u: max(2.05vw, 7px); padding: calc(var(--header-h, 7rem) + 1.6rem) 1rem 2.4rem; }
  .ahero__visual { position: relative; inset: auto; flex: none; height: 58svh; min-height: 46rem; max-height: 56rem; }
  .apic { left: 0; width: 100%; }
  .acard--list { left: 3%; top: 5%; }
  .acard--hist { right: 3%; top: auto; bottom: 4%; }
  .ahero .whero__bottom { margin-top: 2.4rem; }
  .ahero .whero__title { font-size: clamp(4rem, 15vw, 12rem); margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .apic, .acard { animation: none; }
  .ah__s.live { animation: none; }
}

/* statement: wider than on the other pages (80% of the screen) */
@media (min-width: 821px) {
  .wstate__text { max-width: 80vw; }
  .wstate__text p { text-wrap: pretty; }   /* lines fill the full width instead of being balanced narrower */
}

/* ================= Rows: pictures ================= */
.fpic--a { background:
  radial-gradient(55% 55% at 88% 96%, #ff4a12 0%, rgba(255, 74, 18, 0) 70%),
  radial-gradient(50% 60% at 8% 6%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
  linear-gradient(140deg, #9c9c9c 0%, #e6e6e6 42%, #7d7d7d 100%); }

.aseg { display: inline-flex; margin-bottom: 1.4em; padding: 0.35em; border: 1px solid #2a2a2a; border-radius: 3em; background: #161616; }
.aseg button { padding: 0.55em 1.3em; border-radius: 3em; font-size: 1.4em; font-weight: 500; color: #a9a9a9; transition: background 0.2s, color 0.2s; }
.aseg button:hover { color: #fff; }
.aseg button.on { background: #fff; color: #0a0a0a; }
.aseg button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Row 1: the same customer journey, by hand and automated */
.fc--jr { left: 4%; top: 8%; width: 62%; height: 84%; z-index: 1; padding: 1.8em 2.4em; background: #0b0b0b; border: 1px solid #2e2e2e; color: #fff; }
.jr__t { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7em; }
.jr__t b { font-size: 2.2em; font-weight: 600; letter-spacing: -0.03em; }
.jr__chip { padding: 0.35em 1em; border-radius: 3em; background: #3a1410; color: #ff8a78; font-style: normal; font-size: 1.3em; font-weight: 500; transition: background 0.3s, color 0.3s; }
.is-own .jr__chip { background: #10301a; color: #5fdc7c; }
.jr li { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 1em; row-gap: 0.15em; padding: 0.75em 0; border-bottom: 1px solid #1e1e1e; }
.jr__d { grid-row: 1 / span 2; width: 0.9em; height: 0.9em; border-radius: 50%; background: #ff5a4a; transition: background 0.3s; }
.is-own .jr__d { background: #3fd15c; }
.jr__l { font-size: 1.35em; font-weight: 500; letter-spacing: -0.01em; color: #ececec; }
.jr__v { font-size: 1.15em; color: #ff9d8f; transition: opacity 0.18s ease, color 0.3s; }
.is-own .jr__v { color: #5fdc7c; }
.is-swap .jr__v, .is-swap .fc--hrs { opacity: 0.25; }

.fc--hrs { left: 58%; top: 30%; width: 38%; z-index: 2; padding: 1.8em 2em; background: #f7f6f3; color: #111; border-radius: 1em; box-shadow: 0 2em 5em rgba(0, 0, 0, 0.4); transition: opacity 0.18s ease; }
.hrs__k { display: block; font: 500 1.2em/1 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: #777; }
.hrs__n { display: block; margin: 0.25em 0 0.15em; font-size: 5.4em; font-weight: 700; line-height: 1; letter-spacing: -0.05em; }
.hrs__s { display: inline-block; padding: 0.35em 1em; border-radius: 3em; background: #ffe0dc; color: #c0341f; font-size: 1.3em; font-weight: 600; transition: background 0.3s, color 0.3s; }
.is-own .hrs__s { background: #d6f2dc; color: #1f8a37; }
.fc--hrs small { display: block; margin-top: 0.9em; font-size: 1.3em; line-height: 1.4; color: #666; }

/* Row 2: pick a problem, see what it calls for */
.fc--pick { left: 4%; top: 8%; width: 58%; height: 84%; z-index: 1; padding: 1.8em 2.4em; background: #0b0b0b; border: 1px solid #2e2e2e; color: #fff; }
.pk__h { display: block; margin-bottom: 0.9em; font-size: 2.2em; font-weight: 600; letter-spacing: -0.03em; }
.pk button { display: flex; align-items: center; gap: 1em; width: 100%; margin-bottom: 0.9em; padding: 1.15em 1.2em; border: 1px solid #2a2a2a; border-radius: 0.7em; text-align: left; font-size: 1.4em; font-weight: 500; letter-spacing: -0.01em; color: #a9a9a9; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.pk button:hover { color: #fff; border-color: #444; }
@media (max-width: 820px) { .pk button { padding: 0.85em 1em; margin-bottom: 0.65em; } .pk__h { margin-bottom: 0.7em; } }
.pk button.on { background: #1a1a1a; border-color: #fff; color: #fff; }
.pk button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pk button i { flex: none; width: 0.9em; height: 0.9em; border: 0.14em solid #555; border-radius: 50%; transition: background 0.2s, border-color 0.2s; }
.pk button.on i { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 0.16em #1a1a1a; }

.fc--dx { left: 56%; top: 30%; width: 40%; z-index: 2; padding: 1.8em 2em; background: #f7f6f3; color: #111; border-radius: 1em; box-shadow: 0 2em 5em rgba(0, 0, 0, 0.4); }
.dx__k { display: block; font: 500 1.2em/1 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; color: #777; }
.dx__t { display: block; margin: 0.6em 0 0.9em; font-size: 2.2em; font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.dx__m > span { display: block; margin-bottom: 0.5em; font-size: 1.25em; color: #666; }
.dx__bar { display: block; height: 0.8em; border-radius: 1em; background: #e0ddd6; overflow: hidden; }
.dx__bar b { display: block; height: 100%; width: var(--v); border-radius: 1em; background: #2fbf4a; transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s; }
.is-big .dx__bar b { background: var(--accent); }
.fc--dx small { display: block; margin-top: 1em; font-size: 1.3em; line-height: 1.4; color: #666; }
.dx__t, .fc--dx small { transition: opacity 0.18s ease; }
.is-swap .dx__t, .is-swap .fc--dx small { opacity: 0; }

/* ================= Three automation screens ================= */
.flow { display: grid; gap: 0.9em; }
.flow__n { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1em; padding: 0.85em 1em; border: 1px solid #e5e2db; border-radius: 0.8em; background: #fff; }
.flow__n + .flow__n::before { content: ""; position: absolute; left: 1.95em; top: -0.95em; width: 2px; height: 0.95em; background: #c9c6bd; }
.flow__n i { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: #111; color: #fff; font-style: normal; font-size: 1.3em; font-weight: 600; }
.flow__n:first-child i { background: var(--accent); }
.flow__n b { display: block; font-size: 1.45em; font-weight: 600; letter-spacing: -0.02em; }
.flow__n small { display: block; font-size: 1.2em; color: #777; }
.flow__n em { padding: 0.3em 0.9em; border-radius: 3em; background: #e9e7e2; color: #555; font-style: normal; font-size: 1.1em; font-weight: 600; }
.flow__n:first-child em { background: #ffe0d2; color: #c2410c; }

.tl { display: grid; gap: 0.9em; }
.tl__r { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1em; padding: 0.85em 1em; border: 1px solid #e5e2db; border-radius: 0.8em; background: #fff; }
.tl__d { width: 1em; height: 1em; border: 0.18em solid #c9c6bd; border-radius: 50%; }
.tl__d--done { border-color: #2fbf4a; background: #2fbf4a; }
.tl__r b { display: block; font-size: 1.45em; font-weight: 600; letter-spacing: -0.02em; }
.tl__r small { display: block; font-size: 1.2em; color: #777; }
.tl__r em, .rc__r em { padding: 0.3em 0.9em; border-radius: 3em; font-style: normal; font-size: 1.1em; font-weight: 600; text-align: center; }
.tl__r em.ok, .rc__r em.ok { background: #d6f2dc; color: #1f8a37; }
.tl__r em.wait { background: #e9e7e2; color: #666; }
.rc__r em.fix { background: #ffe0d2; color: #c2410c; }
.kpi, .dash--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9em; margin-top: 1.2em; }
.dash--2 div { padding: 0.9em 1em; border-radius: 0.7em; background: #e9e7e2; }
.dash--2 small { display: block; font-size: 1.2em; color: #666; }
.dash--2 b { font-size: 2em; letter-spacing: -0.03em; }

.rc__r { display: grid; grid-template-columns: 1fr 1fr 6.2em; align-items: center; gap: 1em; padding: 0.7em 0; border-bottom: 1px solid #dcd9d1; font-size: 1.5em; font-weight: 500; }
.rc__r--h { padding-top: 0; font-size: 1.2em; color: #777; }
.rc__r em { justify-self: end; min-width: 0; padding: 0.3em 0.8em; font-size: 0.75em; }
.rc__sum { margin-top: 1em; font-size: 1.3em; line-height: 1.35; color: #555; }
.rc__sum b { color: #111; }
