/* "How it works" (third version, 2026-11-29). Five cards, one step each, in the style George liked
   from both references: Tilt's product cards (one idea per card, the next card peeking in blurred,
   arrows and a progress pill, a two-tone headline) with MAKE by KBank's warmth (pastel cards, a
   tilted phone whose screen does things: typing, a finger tap, a second screen, confetti).
   Scrolling moves through the cards (the section sticks); the arrows do the same. */
.flow { background: #fffdf8; color: #141216; padding: 72px 0; overflow: clip; }
.flow-inner { --gap: 20px; --card-w: min(100%, 940px); width: min(100% - 40px, 1080px); margin: 0 auto; }
.flow h2 { margin: 0; font-family: var(--display, var(--font-display, inherit)); font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.04; letter-spacing: -0.035em; }
.flow h2 span { display: block; color: #a39c8c; }
.flow-viewport { margin-top: 28px; }
.flow-track { --i: 0; display: flex; gap: var(--gap); margin: 0; padding: 0; list-style: none; transform: translateX(calc(var(--i) * -1 * (var(--card-w) + var(--gap)))); transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1); }
.flow-card { position: relative; flex: 0 0 var(--card-w); box-sizing: border-box; display: grid; gap: 14px; border-radius: 32px; padding: 24px 22px 0; overflow: hidden; opacity: 0.4; filter: blur(3px); transform: scale(0.95); transition: opacity 0.5s ease, filter 0.5s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1); cursor: pointer; }
.flow-card.is-on { opacity: 1; filter: none; transform: none; cursor: default; }
.flow-card:nth-child(1) { background: #fff3c4; }
.flow-card:nth-child(2) { background: #e3f4ec; }
.flow-card:nth-child(3) { background: #efe6ff; }
.flow-card:nth-child(4) { background: #ffe6d3; }
.flow-card:nth-child(5) { background: #fff3c4; }
.flow-step { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14.5px; font-weight: 700; color: #6b665c; }
.flow-step .n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #141216; color: #fff9ec; font-size: 15px; font-weight: 800; }
.flow-step .t { border-radius: 999px; background: #fff; padding: 3px 10px; font-size: 12.5px; font-style: normal; color: #141216; }
.flow-card h3 { margin: 10px 0 0; font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.flow-ticks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.flow-ticks li { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.flow-ticks li::before { content: '✓'; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #141216; color: #fff; font-size: 12px; font-weight: 800; transform: translateY(-1px); }
/* The ticks pop in one by one when their card becomes the current one. */
.flow-ready .flow-ticks li { opacity: 0; transform: translateX(-14px); transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.flow-ready .flow-card.is-on .flow-ticks li { opacity: 1; transform: none; transition-delay: 0.35s; }
.flow-ready .flow-card.is-on .flow-ticks li:nth-child(2) { transition-delay: 0.5s; }
.flow-ready .flow-card.is-on .flow-ticks li:nth-child(3) { transition-delay: 0.65s; }
.flow-stage { position: relative; display: grid; justify-items: center; }
.flow-phone { position: relative; container-type: inline-size; margin: 0 0 -70px; width: min(50vw, 200px); aspect-ratio: 9 / 18.5; overflow: hidden; border: 9px solid #fff; border-radius: 34px; background: #fff; box-shadow: 0 26px 50px rgb(43 26 82 / 0.2), 0 0 0 1.5px rgb(20 18 22 / 0.08); transform: rotate(4deg); transition: transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1); }
.flow-card:not(.is-on) .flow-phone { transform: rotate(-3deg) translateY(30px); }
.flow-phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: translateY(18px); transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.flow-phone img.is-on { opacity: 1; transform: none; }
/* The reason being typed into the form (positions are a share of the phone screen). */
.flow-type { position: absolute; z-index: 1; left: 5%; top: 61.2%; width: 88%; height: 8.6%; display: flex; align-items: flex-start; box-sizing: border-box; background: #fcfcfd; padding: 1.2% 3% 0; font-size: clamp(8px, 4.3cqw, 13px); line-height: 1.3; text-align: left; color: #141216; }
.flow-type span::after { content: ''; display: inline-block; width: 1.5px; height: 1em; margin-left: 1px; background: #5b21d6; vertical-align: -0.15em; animation: flow-caret 0.8s steps(1) infinite; }
@keyframes flow-caret { 50% { opacity: 0; } }
.flow-phone.is-switched .flow-type { display: none; }
/* The finger: a soft dot that presses the button on the screen before the next thing happens. */
.flow-tap { position: absolute; z-index: 2; left: 50%; top: 80%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgb(20 18 22 / 0.28); border: 2px solid rgb(255 255 255 / 0.9); opacity: 0; pointer-events: none; }
.flow-tap.is-tap { animation: flow-tap 0.75s ease-out; }
@keyframes flow-tap {
   0% { opacity: 0; transform: translate(30px, 40px) scale(1.25); }
   35% { opacity: 1; transform: none; }
   50% { opacity: 1; transform: scale(0.72); box-shadow: 0 0 0 0 rgb(20 18 22 / 0.3); }
   100% { opacity: 0; transform: scale(1); box-shadow: 0 0 0 24px rgb(20 18 22 / 0); }
}
/* Confetti inside the phone on the happy screens. */
.flow-confetti { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.flow-confetti i { position: absolute; top: -6%; width: 7px; height: 11px; border-radius: 2px; animation: flow-confetti 1.7s cubic-bezier(0.2, 0.6, 0.4, 1) forwards; }
@keyframes flow-confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(var(--sway), 620px) rotate(var(--spin)); opacity: 0; } }
/* Arrows and the progress pill. */
.flow-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.flow-nav button { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #141216; color: #fff9ec; font-size: 20px; cursor: pointer; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease; }
.flow-nav button:hover { transform: scale(1.1); }
.flow-nav button:disabled { opacity: 0.25; cursor: default; transform: none; }
.flow-nav button:focus-visible { outline: 2px solid #141216; outline-offset: 3px; }
.flow-dots { display: flex; align-items: center; gap: 7px; border-radius: 999px; background: #f1ebdc; padding: 13px 16px; }
.flow-dots i { width: 8px; height: 8px; border-radius: 999px; background: #c9c1ae; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease; }
.flow-dots i.is-on { width: 30px; background: #141216; }
.flow-cta { display: none; }
@media (min-width: 900px) {
   .flow-inner { --card-w: min(100% - 150px, 900px); }
   /* The card and its phone grow with the height of the window, so a tall screen is filled. */
   .flow-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 30px; padding: 40px 48px 0; min-height: clamp(440px, 60vh, 860px); }
   .flow-copy { padding-bottom: 40px; }
   .flow-ticks li { font-size: 17.5px; }
   .flow-phone { width: clamp(232px, 29vh, 400px); margin-bottom: -84px; }
   .flow-card h3 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
   @media (min-height: 1000px) { .flow-inner { width: min(100% - 40px, 1320px); --card-w: min(100% - 170px, 1160px); } .flow h2 { font-size: 3.8rem; } .flow-card h3 { font-size: 2.8rem; } .flow-ticks li { font-size: 20px; } .flow-step { font-size: 16px; } }
      .flow-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; min-height: 50px; padding: 0 22px; border-radius: 999px; background: #141216; color: #fff9ec; font-size: 15.5px; font-weight: 700; text-decoration: none; }
}
@media (max-width: 899px) {
   .flow { padding: 30px 0; }
   .flow-inner { --card-w: calc(100% - 26px); --gap: 12px; }
   .flow-viewport { margin-top: 16px; }
   .flow-card { padding: 18px 18px 0; border-radius: 26px; }
   .flow-card h3 { margin-top: 8px; }
   .flow-ticks { margin-top: 10px; gap: 6px; }
   .flow-ticks li { font-size: 14.5px; }
   .flow-phone { width: min(44vw, 180px); margin-bottom: -150px; }
      .flow-nav { margin-top: 12px; }
}
@media (max-width: 899px) and (min-height: 780px) { .flow-phone { margin-bottom: -84px; } }
/* Scroll-driven: flow-section.js makes the section taller and its content sticks, so scrolling
   down moves through the cards before the page carries on. */
.flow.flow-scroll .flow-inner { position: sticky; top: var(--flow-top, 84px); }
/* These animations play even when the device asks for reduced motion (George, 2026-11-29: his
   Mac had Reduce Motion on and the page looked frozen; MAKE by KBank does the same). */
