/* The home page opening: one night that turns into day as you scroll.
   Loaded after site.css and reuses its tokens (.wrap, .btn, --green, --signal, --mono).
   The sky is painted step by step: each step runs from the colour the last one ended on to
   the colour the next one starts on, so the joins do not show and a step can be any height.
   (One tall gradient across the whole opening drifted as soon as one step grew.) No script. */

.karen-sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

.flow {
  position: relative; isolation: isolate; color: #F4F6FA; background: #070B1A;
  --text: #F4F6FA; --text-2: rgba(244, 246, 250, 0.76); --text-3: rgba(244, 246, 250, 0.56);
  --line: rgba(255, 255, 255, 0.14); --line-strong: rgba(255, 255, 255, 0.3);
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='520'%3E%3Cg fill='%23fff' opacity='.8'%3E%3Ccircle cx='50' cy='73' r='1.1'/%3E%3Ccircle cx='143' cy='322' r='.9'/%3E%3Ccircle cx='254' cy='146' r='1.2' fill='%23FFE9A8'/%3E%3Ccircle cx='360' cy='406' r='.9'/%3E%3Ccircle cx='446' cy='47' r='1.1'/%3E%3Ccircle cx='533' cy='244' r='.9'/%3E%3Ccircle cx='589' cy='458' r='.9' fill='%23BFE8D0'/%3E%3Ccircle cx='205' cy='478' r='.9'/%3E%3C/g%3E%3C/svg%3E");
}
/* night, with stars */
.flow > section:nth-of-type(1) { background: var(--stars) 0 0 / 620px 520px, linear-gradient(180deg, #070B1A, #0D1230); }
.flow > section:nth-of-type(2) { background: var(--stars) 0 0 / 620px 520px, linear-gradient(180deg, #0D1230, #12173F); }
.flow > section:nth-of-type(3) { background: var(--stars) 0 0 / 620px 520px, linear-gradient(180deg, #12173F, #3A2A68); }
/* the last of the night, then dawn, then day */
.flow > section:nth-of-type(4) { background: linear-gradient(180deg, #3A2A68 0%, #5E3577 62%, #B85C74 100%); }
.flow > section:nth-of-type(5) { background: linear-gradient(180deg, #B85C74 0%, #F1B47A 18%, #F6E3C6 40%, #F2F3F5 100%); }
.flow > section:nth-of-type(6) { background: #F2F3F5; }

/* Steps sit close together: each is only as tall as it needs, so the next hook is always in view. */
.flow-step { min-height: clamp(460px, 68svh, 640px); display: grid; align-items: center; padding-block: clamp(48px, 5vw, 76px); }
.flow-step--solo { min-height: 0; }
#proof.section { padding-block: clamp(56px, 7vw, 100px); }
.flow-step > .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 104px); align-items: center; }
.flow-step--flip .flow-copy { order: 2; }
.flow-step--solo > .wrap { grid-template-columns: minmax(0, 1fr); }
/* hero: the headline runs the full width; the pitch and the first message sit under it */
.flow-hero { min-height: min(100svh, 820px); align-items: center; padding-top: clamp(120px, 14vw, 180px); padding-bottom: clamp(56px, 6vw, 88px); }
.flow-hero > .wrap { align-items: end; row-gap: clamp(28px, 4vw, 56px); }
.flow-hero .flow-copy { display: contents; }
.flow-hero .h-hero { grid-column: 1 / -1; margin: 0; }
.flow-hero .flow-foot { margin-top: 0; }
.flow-hero .flow-card { justify-self: end; }
.flow-step--day {
  color: #0C0E12;
  --text: #0C0E12; --text-2: #454B57; --text-3: #6B7280; --line: rgba(12, 14, 18, 0.1); --line-strong: rgba(12, 14, 18, 0.22);
}

.flow-h { font-size: clamp(2.1rem, 4.7vw, 4.3rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; margin: 0 0 22px; }
.flow-copy .body { font-size: clamp(1.0625rem, 1.25vw, 1.2rem); max-width: 44ch; margin: 0; }
.flow-foot { display: grid; gap: 28px; margin-top: clamp(24px, 3vw, 40px); }
.flow-foot .lede { margin: 0; max-width: 40ch; }
.flow-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.flow .btn--line { background: rgba(255, 255, 255, 0.08); }
.flow .btn--line:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; }

/* the thing Karen stops at in each step */
.flow-card {
  justify-self: center; width: min(390px, 100%);
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 22px; padding: 20px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transform: translateY(26px); opacity: 0; transition: transform 1.1s var(--ease, cubic-bezier(.2,.8,.2,1)), opacity .9s ease;
}
.is-in .flow-card, html:not(.js) .flow-card { transform: none; opacity: 1; }
.flow-step--day .flow-card { background: #fff; box-shadow: 0 30px 60px -40px rgba(12, 14, 18, 0.35); }
.flow-card-head { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono, monospace); font-size: 0.75rem; color: var(--text-3); margin-bottom: 16px; }
.flow-note { font-family: var(--mono, monospace); font-size: 0.75rem; color: var(--text-3); margin: 14px 0 0; }

.bub { max-width: 86%; padding: 11px 14px; border-radius: 16px 16px 16px 5px; background: rgba(255, 255, 255, 0.12); font-size: 1rem; line-height: 1.4; margin: 0 0 10px; }
.bub--karen { margin-left: auto; border-radius: 16px 16px 5px 16px; background: var(--green, #1B7F4B); color: #fff; min-height: 2.8em; }
.tw { opacity: 0; transition: opacity .25s ease; }
.tw.is-on { opacity: 1; }
.typing { display: inline-flex; gap: 5px; align-items: center; font-family: var(--mono, monospace); font-size: 0.75rem; color: var(--text-3); }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--signal, #E3A21A); animation: typing 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cal-day { font-family: var(--mono, monospace); font-size: 0.75rem; color: var(--text-3); text-align: center; margin-bottom: 4px; }
.cal-slot { height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); margin-bottom: 6px; }
.cal-slot--busy { background: rgba(255, 255, 255, 0.2); }
.cal-slot--pick { background: rgba(227, 162, 26, 0.18); outline: 1px dashed var(--signal, #E3A21A); outline-offset: -1px; transition: background .7s ease .7s, outline-color .7s ease .7s; }
.is-in .cal-slot--pick { background: var(--green, #1B7F4B); outline-color: transparent; }
.cal-done { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 1rem; opacity: 0; transition: opacity .6s ease 1.3s; }
.is-in .cal-done, html:not(.js) .cal-done { opacity: 1; }
.cal-done::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green, #1B7F4B); box-shadow: 0 0 0 4px rgba(27, 127, 75, 0.25); }

.draft { margin: 0 0 16px; font-size: 1rem; line-height: 1.45; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px dashed rgba(227, 162, 26, 0.7); transition: border-color .4s ease; }
.draft-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.draft-actions button { height: 44px; padding: 0 18px; border-radius: var(--r-control, 12px); border: 1px solid var(--line-strong); background: transparent; color: inherit; font: inherit; font-size: 0.95rem; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.draft-actions button:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.draft-actions .is-go { background: var(--signal, #E3A21A); border-color: var(--signal, #E3A21A); color: #0C0E12; font-weight: 600; }
.draft-actions .is-go:hover { background: #F0B637; border-color: #F0B637; }
.is-sent .draft { border: 1px solid var(--green, #1B7F4B); }
.is-sent .draft-actions { display: none; }
.draft-out { margin: 0; font-size: 0.95rem; color: var(--text-2); min-height: 1.4em; }

.brief { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.brief li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.brief li:last-child { border-bottom: 0; }
.brief b { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.brief .is-you b { color: var(--red, #C8372D); }

/* the systems for one step: a short row of logo tiles under that step's text */
/* the logo wall: one tile per system, mark above name */
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.logos li { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 108px; padding: 16px 8px 14px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; font-size: 0.875rem; line-height: 1.25; transition: transform .3s var(--ease, ease), box-shadow .3s ease, border-color .3s ease; }
.logos li:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 30px -22px rgba(12, 14, 18, 0.4); }
.logos img { width: 36px; height: 36px; }
.logos .is-word { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; background: rgba(255, 255, 255, 0.55); }
@media (prefers-reduced-motion: reduce) { .logos li { transition: none; } .logos li:hover { transform: none; } }
/* a short strip of systems under one step's text: only the ones that step is about */
.strip-label { margin: 26px 0 10px; font-family: var(--mono, monospace); font-size: 0.75rem; color: var(--text-3); max-width: none; }
.logos--strip { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-width: 560px; }
.logos--strip li { min-height: 80px; padding: 11px 6px 9px; gap: 7px; border-radius: 14px; font-size: 0.75rem; color: #0C0E12; background: #fff; }
.logos--strip img { width: 28px; height: 28px; }
.logos--strip .is-word { font-size: 0.8125rem; background: rgba(255, 255, 255, 0.86); }
.flow-step--solo .logos--strip { max-width: 760px; }
/* the tiles arrive one after another when the step comes into view */
.js .flow-step .logos--strip li { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s var(--ease, ease), box-shadow .3s ease, border-color .3s ease; }
.js .flow-step.is-in .logos--strip li { opacity: 1; transform: none; }
.flow-step.is-in .logos--strip li:nth-child(2) { transition-delay: .06s; } .flow-step.is-in .logos--strip li:nth-child(3) { transition-delay: .12s; }
.flow-step.is-in .logos--strip li:nth-child(4) { transition-delay: .18s; } .flow-step.is-in .logos--strip li:nth-child(5) { transition-delay: .24s; }
.flow-step.is-in .logos--strip li:nth-child(6) { transition-delay: .3s; } .flow-step.is-in .logos--strip li:nth-child(7) { transition-delay: .36s; }
.flow-step.is-in .logos--strip li:nth-child(8) { transition-delay: .42s; } .flow-step.is-in .logos--strip li:nth-child(n + 9) { transition-delay: .48s; }
@media (prefers-reduced-motion: reduce) { .js .flow-step .logos--strip li { opacity: 1; transform: none; transition: none; } }
.works-note { margin: 22px 0 0; max-width: 62ch; color: var(--text-2); font-size: 1rem; }

/* Client row: eight cards, four across (two across below 1080px). --brand colours a card's outline on hover and focus. */
.work-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.work-card {
  --brand: #0C0E12;
  display: flex; flex-direction: column; min-height: 100%; padding: 0 clamp(18px, 1.8vw, 26px) clamp(18px, 1.8vw, 24px); border-radius: 20px;
  text-decoration: none; color: #0C0E12; background: #fff; border: 1px solid rgba(12, 14, 18, 0.1);
  transition: transform .35s var(--ease, ease), box-shadow .35s ease, border-color .25s ease;
}
.work-card--oshun { --brand: #0f172a; }
.work-card--joong { --brand: #2E0854; }
.work-card--chinawheels { --brand: #E31837; }
.work-card--amadeo { --brand: #2B7CB3; }
.work-card--pcp { --brand: #c8aa6e; }
.work-card--nexushub { --brand: #006fff; }
.work-card--maxusja, .work-card--maxuscaribbean { --brand: #1E5FAD; }
@media (max-width: 1080px) { .work-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work-card:hover, .work-card:focus-visible { transform: translateY(-5px); border-color: var(--brand); box-shadow: 0 26px 44px -30px rgba(12, 14, 18, 0.45); }
.work-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
/* every logo sits in the same band, centred, however wide or tall its file is */
.work-logo { display: grid; place-items: center; height: 132px; margin: 0 0 16px; border-bottom: 1px solid rgba(12, 14, 18, 0.08); }
.work-logo img { max-width: 78%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.work-logo--word { display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; column-gap: .45em; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; line-height: 1.3; color: #0a0a0f; }
.work-logo--word em { font-style: normal; color: #a8894a; }
.work-card h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.work-card .mono { margin: 0 0 12px; color: #6B7280; }
.work-card .body { margin: 0 0 18px; font-size: 0.9375rem; line-height: 1.5; color: #454B57; }
.work-visit { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--green-ink, #14613A); }
.work-card .arrow { transition: transform .3s ease; }
.work-card:hover .arrow { transform: translate(3px, -3px); }
@media (prefers-reduced-motion: reduce) { .work-card, .work-card .arrow { transition: none; } .work-card:hover, .work-card:focus-visible { transform: none; } }
.work-more { margin: 28px 0 0; }

/* Talk to Karen: the voice call panel. The vt-* names match widget/voice-compare.js, which runs the call. */
.call-ico { width: 18px; height: 18px; flex: none; }
.call-pill {
  position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: #0B1024; color: #F4F6FA; font: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer;
  box-shadow: 0 18px 36px -18px rgba(7, 11, 26, 0.8); transform: translateY(90px); opacity: 0; transition: transform .5s var(--ease, ease), opacity .4s ease;
}
.call-pill .call-ico { color: var(--signal, #E3A21A); }
.past-hero .call-pill { transform: none; opacity: 1; }
.call-open .call-pill, html:not(.js) .call-pill, html:not(.js) [data-call-open], html[data-voice="off"] [data-call-open] { display: none; }
.call {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto;
  background: #0B1024; color: #F4F6FA; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 22px; padding: 16px 18px 18px;
  box-shadow: 0 40px 80px -30px rgba(7, 11, 26, 0.85);
}
.call[hidden] { display: none; }
.call-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.call-x { width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.call-x:hover { background: rgba(255, 255, 255, 0.1); }
.call-note { margin: 12px 0 0; font-size: 0.875rem; line-height: 1.45; color: rgba(244, 246, 250, 0.72); }
.vt-stage { --k: 0; --u: 0; position: relative; display: grid; place-items: center; height: 200px; padding-bottom: 30px; }
.vt-ring { position: absolute; width: 96px; height: 96px; border-radius: 50%; pointer-events: none; transition: transform .09s linear, opacity .25s ease; opacity: 0; }
.vt-ring--k { background: radial-gradient(circle, rgba(74, 200, 128, 0.42) 0%, rgba(74, 200, 128, 0) 70%); transform: scale(calc(1 + var(--k) * 1.0)); }
.vt-ring--u { border: 2px solid var(--signal, #E3A21A); transform: scale(calc(1.06 + var(--u) * 0.4)); }
.vt-stage.is-live .vt-ring { opacity: 1; }
.vt-stage.is-live .vt-ring--u { opacity: calc(0.25 + var(--u) * 0.75); }
.vt-mic { position: relative; z-index: 1; width: 88px; height: 88px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--signal, #E3A21A); color: #0C0E12; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(227, 162, 26, 0.14); transition: background-color .25s ease, transform .2s ease; }
.vt-mic:hover { transform: scale(1.04); }
.vt-mic:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.vt-mic svg { width: 32px; height: 32px; }
.vt-mic.live { background: var(--red, #C8372D); color: #fff; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(200, 55, 45, 0.2); }
.vt-mic.busy { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08); }
.vt-tap { position: absolute; bottom: 6px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.75); font-size: 0.875rem; }
.vt-stage.is-live .vt-tap, .vt-stage.is-connecting .vt-tap { display: none; }
.vt-who { position: absolute; bottom: 2px; left: 0; right: 0; margin: 0; display: none; justify-content: center; gap: 10px; }
.vt-stage.is-live .vt-who { display: flex; }
.vt-who span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 0.8rem; background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.72); }
.vt-who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vt-stage.karen-on .vt-who .who-k { background: rgba(74, 200, 128, 0.2); color: #8FE3B4; }
.vt-stage.you-on .vt-who .who-u { background: rgba(227, 162, 26, 0.22); color: #F5CF7A; }
.vt-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 10px; }
.vt-status { min-height: 1.4em; font-weight: 600; font-size: 0.98rem; }
.vt-status.err { color: #FFB1A9; }
.vt-timer { font-family: var(--mono, monospace); font-size: 0.75rem; color: rgba(255, 255, 255, 0.74); white-space: nowrap; }
.vt-transcript { display: flex; flex-direction: column; gap: 8px; min-height: 96px; max-height: 220px; overflow: auto; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); font-size: 0.95rem; line-height: 1.45; }
.vt-transcript:empty::before { content: "What you and Karen say shows up here."; margin: auto; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.vt-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; }
.vt-msg.k { align-self: flex-start; background: rgba(255, 255, 255, 0.11); border-bottom-left-radius: 4px; }
.vt-msg.u { align-self: flex-end; background: var(--signal, #E3A21A); color: #0C0E12; border-bottom-right-radius: 4px; }
@media (max-width: 520px) { .call { right: 12px; bottom: 12px; } .call-pill { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .vt-ring, .call-pill { transition: none; } }

/* the nav over the night sky */
html:not(.is-day) .nav { --text: #F4F6FA; --text-2: rgba(244, 246, 250, 0.78); --text-3: rgba(244, 246, 250, 0.56); --line: rgba(255, 255, 255, 0.12); --line-strong: rgba(255, 255, 255, 0.3); }
html:not(.is-day) .nav.is-solid { background: rgba(7, 11, 26, 0.72); }
html:not(.is-day) .nav .sound-toggle, html:not(.is-day) .nav .nav-burger { background: rgba(255, 255, 255, 0.08); }
html:not(.js) .nav { position: absolute; }

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) { .work-row { margin-top: 40px; } }
/* room above each card for Karen to hover without covering it */
@media (min-width: 861px) { .flow-step:not(.flow-hero) .flow-card { margin-top: clamp(110px, 15vh, 150px); } }

@media (max-width: 860px) {
  .flow-step { padding-block: 96px; }
  .flow-step > .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .flow-step--flip .flow-copy { order: 0; }
  .flow-card, .flow-hero .flow-card { justify-self: start; margin-top: 170px; }
  .flow-hero .flow-foot { margin-top: 24px; }
  .work-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) { .work-row { margin-top: 150px; } }
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { .flow-card { margin-top: 40px; } }
@media (prefers-reduced-motion: reduce) {
  .flow-card { transform: none; opacity: 1; transition: none; }
  .typing i { animation: none; opacity: .7; }
  .cal-slot--pick, .cal-done { transition: none; }
}

/* Cards, the booked line and the logo tiles start hidden and appear as their step scrolls in.
   That is done by js/karen.js. Until it has marked the page (karen-on) they simply show, so a
   script that fails to load never leaves them invisible. */
html:not(.karen-on) .flow-card { transform: none; opacity: 1; }
html:not(.karen-on) .cal-done { opacity: 1; }
html:not(.karen-on) .flow-step .logos--strip li { opacity: 1; transform: none; }
/* the dawn step is lighter behind the small labels, so they are brighter there */
.flow > section:nth-of-type(4) .strip-label { color: rgba(255, 255, 255, 0.92); }
