/* ==========================================================================
   The landing's scroll story: from a site's address to new customers, in six
   beats. Each beat is what is said (its copy) and what is shown (its scene).

   As written here, with no script or with motion off, the six beats stand one
   under the other, every scene in its end state. landing-story.js turns the
   story live (.is-live): the story is pinned while the page scrolls through
   it, one beat is on at a time (.is-on), and the scene of the beat that is on
   plays from where its things come from to where they stand.
   Loaded after landing.css, whose tokens and faces it uses.
   ========================================================================== */

.story { padding-top: clamp(44px, 7vw, 100px); }
.story__head { display: grid; justify-items: center; gap: 10px; margin-bottom: clamp(26px, 4vw, 52px); text-align: center; }
.story__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(30px, 5vw, 64px); }
.story__meter, .stage { display: none; }
.story__note { margin-top: clamp(18px, 3vw, 30px); color: var(--text-4); font-size: 12.5px; line-height: 1.8; text-align: center; text-wrap: balance; }

.beat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

.beat__copy {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 2px 12px;
}

.beat__n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 0 var(--brand-deep);
}

.beat__copy h3 { font-size: clamp(19px, 2.5vw, 30px); font-weight: 900; line-height: 1.5; letter-spacing: -0.02em; text-wrap: balance; }
.beat__copy p { grid-column: 2; color: var(--text-3); font-size: clamp(13.5px, 1.4vw, 16.5px); line-height: 1.8; }

/* A scene's frame is a card; inside it everything is measured in the scene's
   own em, which follows the frame's width. */
.beat__scene {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--edge-lg);
}

.scene {
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0.9em;
  min-height: 25em;
  padding: 1.5em 1.3em;
  font-size: 14px;
  font-size: clamp(13.5px, min(3.4cqi, 2.7vh), 18px);
  line-height: 1.7;
}

.scene > * { width: min(100%, 31em); }

@media (min-width: 900px) {
  .beat { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(36px, 5vw, 72px); }
}

/* ---- Live: pinned, one beat at a time ---------------------------------------------- */

/* The page scrolls a beat's length for each beat while the story stays put. */
.story.is-live .story__track { height: calc(100vh - var(--bar-h) + var(--beats, 6) * 68vh); }

.story.is-live .story__pin {
  position: sticky;
  top: var(--bar-h);
  height: calc(100vh - var(--bar-h));
  overflow: hidden;
}

/* A phone's own bars come and go: the small viewport is the one that holds still. */
@supports (height: 100svh) {
  .story.is-live .story__track { height: calc(100svh - var(--bar-h) + var(--beats, 6) * 68svh); }
  .story.is-live .story__pin { height: calc(100svh - var(--bar-h)); }
}

/* A phone: the beat's words, and under them the screen; on a tall phone the
   two stand in the middle of the frame instead of stretching to fill it. */
.story.is-live .story__grid {
  height: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 500px);
  align-content: center;
  gap: 10px;
  padding-block: 10px 16px;
}

.story.is-live .story__meter { grid-area: 1 / 1; display: flex; gap: 5px; }

.story__meter i {
  position: relative;
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.story__meter i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 480ms var(--out);
}

.story__meter i.is-on::after { transform: scaleX(1); }

.story.is-live .beat { display: contents; }

.story.is-live .beat__copy {
  grid-area: 2 / 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 320ms var(--out);
}

.story.is-live .beat.is-on .beat__copy { opacity: 1; transform: none; transition: opacity 320ms ease 80ms, transform 420ms var(--out) 80ms; }
.story.is-live .beat__n { width: 30px; height: 30px; font-size: 15px; }

/* The screen the scenes are shown on. */
.story.is-live .stage {
  position: relative;
  grid-area: 3 / 1;
  display: block;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 26px;
  background:
    radial-gradient(70% 46% at 50% 108%, rgba(254, 204, 2, 0.16), transparent 72%),
    var(--surface);
  box-shadow: var(--edge-lg), 0 40px 80px -46px #000;
}

.stage__brand,
.stage__sample { position: absolute; top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1.6; }
.stage__brand { inset-inline-start: 15px; color: var(--text-2); font-weight: 900; }
.stage__brand svg { width: 18px; height: 18px; overflow: visible; }
.stage__sample { inset-inline-end: 13px; padding: 0 9px; border: 1px dashed var(--line-strong); border-radius: 999px; color: var(--text-3); font-size: 11.5px; font-weight: 700; }

.story.is-live .beat__scene {
  grid-area: 3 / 1;
  z-index: 1;
  min-height: 0;
  border-color: transparent;
  background: none;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 0s 180ms;
}

.story.is-live .beat.is-on .beat__scene { opacity: 1; visibility: visible; transition: opacity 300ms ease 100ms, visibility 0s; }
.story.is-live .scene { height: 100%; min-height: 0; padding-top: calc(1.2em + 34px); }

/* A wide screen: the six beats in a rail on one side, the screen on the other. */
@media (min-width: 960px) {
  .story.is-live .story__grid {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
    grid-template-rows: none;
    align-content: center;
    gap: 0;
    padding-block: 20px;
  }

  .story.is-live .story__meter { display: none; }

  .story.is-live .beat__copy {
    grid-area: auto / 1;
    height: 58px;
    padding-top: 10px;
    overflow: hidden;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 16px;
    opacity: 0.46;
    transform: none;
    cursor: pointer;
    transition: height 480ms var(--out), opacity 300ms ease;
  }

  .story.is-live .beat__copy:hover { opacity: 0.8; }
  .story.is-live .beat.is-on .beat__copy { height: 168px; opacity: 1; cursor: default; transition: height 480ms var(--out), opacity 300ms ease; }
  .story.is-live .beat__copy h3 { font-size: 19px; line-height: 1.9; white-space: nowrap; transition: font-size 380ms var(--out), line-height 380ms var(--out); }
  .story.is-live .beat.is-on .beat__copy h3 { font-size: clamp(25px, 2.5vw, 33px); line-height: 1.42; text-wrap: balance; white-space: normal; }
  .story.is-live .beat__copy p { opacity: 0; transition: opacity 200ms ease; }
  .story.is-live .beat.is-on .beat__copy p { opacity: 1; transition: opacity 360ms ease 180ms; }

  .story.is-live .beat__n {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--line-strong);
    background: var(--bg);
    color: var(--text-3);
    box-shadow: none;
    transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
  }

  .story.is-live .beat.is-past .beat__n { border-color: var(--brand-line); background: var(--brand-ink); color: var(--brand); }
  .story.is-live .beat.is-on .beat__n { border-color: transparent; background: var(--brand); color: var(--on-brand); box-shadow: 0 3px 0 var(--brand-deep); }

  /* The line that joins the six: lit as far as the story has come. */
  .story.is-live .beat__copy::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 17px;
    width: 2px;
    background: rgba(255, 255, 255, 0.12);
  }

  .story.is-live .beat:first-of-type .beat__copy::before { top: 28px; }
  .story.is-live .beat:last-of-type .beat__copy::before { bottom: auto; height: 28px; }
  .story.is-live .beat.is-past .beat__copy::before { background: var(--brand); }
  .story.is-live .beat.is-on .beat__copy::before { background: linear-gradient(var(--brand) 0 28px, rgba(255, 255, 255, 0.12) 28px); }
  .story.is-live .beat.is-on:first-of-type .beat__copy::before { background: rgba(255, 255, 255, 0.12); }

  /* Out of the rail's rows: the screen stands beside all six. */
  .story.is-live .stage,
  .story.is-live .beat__scene {
    position: absolute;
    grid-area: auto;
    inset-block: 20px;
    inset-inline-end: var(--gutter);
    width: calc((100% - 2 * var(--gutter)) * 0.54);
    max-height: 610px;
    margin-block: auto;
  }

  .story.is-live .stage__brand, .story.is-live .stage__sample { top: 16px; font-size: 13.5px; }
  .story.is-live .stage__brand { inset-inline-start: 20px; }
  .story.is-live .stage__sample { inset-inline-end: 18px; font-size: 12.5px; }
  .story.is-live .scene { padding-top: calc(1.2em + 40px); }
}

/* A wide screen that is not tall (a laptop, a window with a toolbar under it):
   the rail is drawn tighter, so all six rows stay in the frame. */
@media (min-width: 960px) and (max-height: 680px) {
  .story.is-live .story__grid { padding-block: 12px; }
  .story.is-live .beat__copy { height: 46px; padding-top: 6px; }
  .story.is-live .beat.is-on .beat__copy { height: 132px; }
  .story.is-live .beat__copy h3 { font-size: 17px; }
  .story.is-live .beat.is-on .beat__copy h3 { font-size: clamp(22px, 2.1vw, 26px); }
  .story.is-live .beat__copy p { font-size: 14px; }
  .story.is-live .beat__n { width: 32px; height: 32px; font-size: 14.5px; }
  .story.is-live .beat__copy { grid-template-columns: 32px minmax(0, 1fr); }
  .story.is-live .beat__copy::before { inset-inline-start: 15px; }
  .story.is-live .beat:first-of-type .beat__copy::before { top: 22px; }
  .story.is-live .beat:last-of-type .beat__copy::before { height: 22px; }
  .story.is-live .beat.is-on .beat__copy::before { background: linear-gradient(var(--brand) 0 22px, rgba(255, 255, 255, 0.12) 22px); }
  .story.is-live .stage, .story.is-live .beat__scene { inset-block: 12px; }
  .story.is-live .scene { padding-top: calc(1em + 36px); padding-bottom: 1em; }
}

/* ---- Things the scenes share --------------------------------------------------------- */

@keyframes pop { from { opacity: 0; transform: scale(0.72); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-26px); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes blink { 50% { opacity: 0; } }

/* The business's own mark: its logo on the yellow, as the tour draws it once one is found. */
.sitetile {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.3em;
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 900;
  line-height: 1;
}

.sitetile .ic { width: 60%; height: 60%; stroke-width: 2; }

/* The tour's medal: the first place, hung from a card's corner by two ribbons. */
.medal {
  position: absolute;
  top: -0.95em;
  inset-inline-end: 0.8em;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border: 2.5px solid #b8860b;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #fecc02 55%, #e0a800);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  color: #5a4300;
  font-size: 1em;
  font-weight: 900;
  line-height: 1;
}

.medal::before,
.medal::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -0.7em;
  width: 0.5em;
  height: 1em;
  border-radius: 2px;
}

.medal::before { inset-inline-start: 0.2em; background: #4f7bff; transform: rotate(24deg); }
.medal::after { inset-inline-end: 0.2em; background: #ff5a4f; transform: rotate(-24deg); }

@keyframes medal { from { opacity: 0; transform: translateY(-1.6em) rotate(-30deg) scale(0.5); } }

.caret { display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -0.18em; background: var(--brand); opacity: 0; }
.beat.is-on .caret { opacity: 1; animation: blink 700ms steps(1) infinite; }

/* A card of a scene: a dark sheet on the screen, with the hard lower edge. */
.know, .post, .serp, .ai, .grow {
  position: relative;
  border: 1px solid var(--hairline);
  background: var(--bg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
  text-align: start;
}

/* A row of a scene: a lighter strip that pops in. */
.facts li, .topics li, .habits li, .wins li {
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
  text-align: start;
}

/* ---- 1. The address ----------------------------------------------------------------- */

.sc-address { gap: 1.5em; }

/* Pinned, the orbit stands in the middle of the room above the address, the address at the foot. */
.story.is-live .sc-address { grid-template-rows: 1fr auto; align-content: stretch; }
.story.is-live .sc-address .orbit { align-self: center; }

.orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: min(15em, 64%);
  aspect-ratio: 1;
  margin-block: 1em;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.orbit::after { inset: 20%; border-style: solid; border-color: rgba(254, 204, 2, 0.18); }
.orbit__ring { position: absolute; inset: 0; animation: spin 46s linear infinite; }
.orbit__job { position: absolute; inset: 0; transform: rotate(calc(var(--i) * 72deg)); }

/* Each job rides the ring and turns against it, so its word stays upright. */
.orbit__chip {
  position: absolute;
  top: 0;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.2em 0.75em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  font-size: 0.82em;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * -72deg));
  animation: orbit-upright 46s linear infinite;
}

.orbit__chip .ic { width: 1.15em; height: 1.15em; color: var(--brand); }

@keyframes orbit-upright {
  from { transform: translate(-50%, -50%) rotate(calc(var(--i) * -72deg)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--i) * -72deg - 360deg)); }
}

.orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  /* Its depth stays inside the disc, so it is a true circle in the middle of its rings. */
  box-shadow: inset 0 -0.3em 0 rgba(0, 0, 0, 0.14), 0 0 60px rgba(254, 204, 2, 0.35);
}

/* The globe gives way to the site's own mark once the address is in. */
.orb__globe, .orb__tile { grid-area: 1 / 1; }
.orb__globe { width: 50%; height: 50%; opacity: 0; }
.orb__tile { width: 54%; height: 54%; stroke-width: 1.8; }

.orb i {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  opacity: 0;
  animation: orb-ring 2800ms ease-out infinite;
}

.orb i:nth-of-type(2) { animation-delay: 930ms; }
.orb i:nth-of-type(3) { animation-delay: 1860ms; }

@keyframes orb-ring {
  from { opacity: 0.6; transform: scale(1); }
  to { opacity: 0; transform: scale(1.9); }
}

.addr {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 0.7em;
  min-height: 3.7em;
  padding: 0 0.5em 0 0.95em;
  border: 1.5px solid var(--brand);
  border-radius: 1.05em;
  background: var(--bg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5), 0 0 0 5px var(--brand-soft);
}

.addr__mark { display: grid; color: var(--text-3); }
.addr__mark .ic { width: 1.4em; height: 1.4em; }
.addr__text { flex: 1; min-width: 0; font-size: 1.15em; font-weight: 600; letter-spacing: 0.01em; text-align: left; white-space: nowrap; }

.addr__go {
  direction: ltr;
  display: grid;
  place-items: center;
  min-height: 2.7em;
  margin-bottom: 3px;
  padding: 0 1.15em;
  border-radius: 0.8em;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 900;
  box-shadow: 0 3px 0 var(--brand-deep);
}

.beat.is-on .orbit { animation: pop 640ms var(--spring) both; }
.beat.is-on .orb__globe { animation: orb-globe 1700ms linear both; }
.beat.is-on .orb__tile { animation: pop 520ms var(--spring) 1700ms both; }
.beat.is-on .addr { animation: rise-in 520ms var(--out) 120ms both; }
.beat.is-on .addr__go { animation: press 460ms ease 1450ms both; }

@keyframes orb-globe { from, 94% { opacity: 1; } to { opacity: 0; } }
@keyframes press { 45% { transform: translateY(3px); box-shadow: 0 0 0 var(--brand-deep); } }

/* ---- 2. The site read, the business known --------------------------------------------- */

.know { display: grid; gap: 0.8em; padding: 1em; border-radius: 1.25em; }
.know__top { display: flex; align-items: center; gap: 0.75em; min-width: 0; }

/* The mark sits in a ring that turns while the reading goes on. */
.know__mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 3.4em;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.1em;
  background: rgba(255, 255, 255, 0.12);
}

.know__mark::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(var(--brand), transparent 28%, transparent 72%, var(--brand));
  opacity: 0;
}

.know__mark .sitetile { position: relative; width: 2.3em; border-radius: 0.72em; font-size: 1.3em; }
.know__id { flex: 1; min-width: 0; display: grid; line-height: 1.45; }
.know__id b { font-size: 1.15em; font-weight: 800; }
.know__id small { color: var(--text-3); font-size: 0.8em; text-align: right; }
.know__kind { flex: none; padding: 0.15em 0.8em; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 0.78em; font-weight: 800; white-space: nowrap; }
.know__scan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.35em 0.6em; }
.know__line { overflow: hidden; color: var(--text-2); font-size: 0.84em; text-overflow: ellipsis; white-space: nowrap; }
.know__count { color: var(--text-3); font-size: 0.78em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.know__bar { grid-column: 1 / -1; height: 0.34em; overflow: hidden; border-radius: 0.2em; background: rgba(255, 255, 255, 0.1); }
.know__bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transform-origin: right center; }
.know__pages { display: flex; gap: 0.5em; }

.know__pages li {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 0.24em;
  aspect-ratio: 1 / 0.94;
  padding: 0.4em;
  border-radius: 0.6em;
  background: var(--surface-2);
}

.know__pages li i { height: 0.22em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.16); }
.know__pages li i:first-child { height: 1.5em; border-radius: 0.3em; background: rgba(254, 204, 2, 0.3); }
.know__pages li i:last-child { width: 60%; }
.know__sum { padding-inline-start: 0.75em; border-inline-start: 3px solid var(--brand); color: #ececf1; font-size: 0.86em; line-height: 1.85; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5em; }
.facts li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 0.6em; padding: 0.5em 0.7em; border-radius: 0.9em; }
.facts .ic { grid-row: span 2; width: 2em; height: 2em; padding: 0.42em; border-radius: 0.62em; background: var(--brand-soft); color: var(--brand); }
.facts span { color: var(--text-3); font-size: 0.74em; font-weight: 700; line-height: 1.5; }
.facts b { overflow: hidden; font-size: 0.9em; font-weight: 800; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }

.beat.is-on .know { animation: rise-in 520ms var(--out) both; }
.beat.is-on .know__mark::before { animation: ring-live 1900ms linear both; }
.beat.is-on .know__kind { animation: pop 520ms var(--spring) 1500ms both; }
.beat.is-on .know__bar i { animation: bar-fill 1700ms var(--out) 150ms both; }
.beat.is-on .know__pages li { animation: pop 460ms var(--spring) both; animation-delay: calc(var(--i) * 190ms + 350ms); }
.beat.is-on .know__sum { animation: rise-in 520ms var(--out) 1650ms both; }
.beat.is-on .facts li { animation: pop 520ms var(--spring) both; animation-delay: calc(var(--i) * 110ms + 1900ms); }

@keyframes ring-live { from { opacity: 1; transform: rotate(0); } 86% { opacity: 1; } to { opacity: 0; transform: rotate(1.8turn); } }
@keyframes bar-fill { from { background: var(--brand); transform: scaleX(0.04); } 92% { background: var(--brand); } }

/* ---- 3. The content calendar ------------------------------------------------------------ */

.plan__focus {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 0;
  padding: 0.5em 0.85em;
  border-radius: 0.9em;
  background: var(--brand-soft);
  font-size: 0.86em;
  text-align: start;
}

.plan__focus .ic { width: 1.5em; height: 1.5em; color: var(--brand); }
.plan__focus span { flex: none; color: var(--text-2); font-weight: 600; }
.plan__focus b { min-width: 0; overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4em; }

.day {
  display: grid;
  justify-items: center;
  gap: 0.05em;
  padding: 0.5em 0 0.6em;
  border: 1px solid var(--hairline);
  border-radius: 0.85em;
  background: var(--bg);
}

.day b { font-size: 1.2em; font-weight: 900; line-height: 1.3; }
.day span { color: var(--text-3); font-size: 0.7em; font-weight: 700; line-height: 1.3; }
.day.is-today { border-color: var(--brand); background: var(--brand-ink); }

/* The day's article: a sheet on the yellow; a tick once it is out. */
.day i {
  position: relative;
  width: 1.6em;
  aspect-ratio: 1;
  margin-top: 0.34em;
  border-radius: 30%;
  background: var(--brand);
  box-shadow: 0 2px 0 var(--brand-deep);
}

.day i::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: #0b1119;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h7l4 4v13H7z'/%3E%3Cpath d='M9.5 12h6M9.5 15.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h7l4 4v13H7z'/%3E%3Cpath d='M9.5 12h6M9.5 15.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.day.is-done i { background: var(--ok-tint); box-shadow: none; }

.day.is-done i::after {
  background: var(--ok);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8'/%3E%3C/svg%3E");
}

.topics { display: grid; gap: 0.42em; }
.topics li { display: flex; align-items: center; gap: 0.6em; min-width: 0; padding: 0.42em 0.6em; border-radius: 0.9em; }
.topics__day { flex: none; min-width: 4.6em; padding: 0.1em 0.5em; border-radius: 999px; background: rgba(255, 255, 255, 0.09); color: var(--text-2); font-size: 0.72em; font-weight: 800; text-align: center; }
.topics li:first-child .topics__day { background: var(--brand); color: var(--on-brand); }
.topics__t { flex: 1; min-width: 0; overflow: hidden; font-size: 0.87em; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topics__why { flex: none; display: inline-flex; align-items: center; gap: 0.3em; color: var(--ok); font-size: 0.7em; font-weight: 800; white-space: nowrap; }
.topics__why .ic { width: 1.15em; height: 1.15em; stroke-width: 2.2; }

.beat.is-on .plan__focus { animation: rise-in 480ms var(--out) both; }
.beat.is-on .day { animation: rise-in 460ms var(--out) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
.beat.is-on .day i { animation: pop 480ms var(--spring) both; animation-delay: calc(var(--i) * 120ms + 620ms); }
.beat.is-on .topics li { animation: slide-in 520ms var(--out) both; animation-delay: calc(var(--i) * 150ms + 1450ms); }

/* ---- 4. Written, published, kept fresh ----------------------------------------------------- */

.relay { display: flex; }
.relay li { position: relative; flex: 1; display: grid; justify-items: center; gap: 0.2em; min-width: 0; }

/* The line the article travels: from each of the team to the next. */
.relay li + li::before {
  content: "";
  position: absolute;
  top: 1.1em;
  inset-inline: calc(-50% + 1.35em) calc(50% + 1.35em);
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
  transform-origin: right center;
}

.relay .face { width: 2.25em; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--brand-line); }
.relay em { color: var(--text-3); font-size: 0.7em; font-style: normal; font-weight: 700; white-space: nowrap; }
.post { display: grid; grid-template-columns: 33% minmax(0, 1fr); border-radius: 1.15em; }
.post__cover { overflow: hidden; border-start-start-radius: 1.1em; border-end-start-radius: 1.1em; background: var(--surface-2); }
.post__cover svg { width: 100%; height: 100%; }
.post__body { display: grid; align-content: center; gap: 0.45em; min-width: 0; padding: 0.8em 0.9em; }
.post__url { color: var(--text-3); font-size: 0.7em; line-height: 1.4; text-align: right; }
.post__title { font-size: 0.98em; font-weight: 800; line-height: 1.6; }
.post__lines { display: grid; gap: 0.38em; }
.post__lines i { width: var(--w); height: 0.36em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.14); transform-origin: right center; }
.post__seo { display: flex; flex-wrap: wrap; gap: 0.3em; }
.post__seo li { display: inline-flex; align-items: center; gap: 0.25em; padding: 0.05em 0.6em 0.05em 0.5em; border-radius: 999px; background: var(--ok-tint); color: var(--ok); font-size: 0.7em; font-weight: 800; white-space: nowrap; }
.post__seo .ic { width: 1em; height: 1em; stroke-width: 3; }

.stamp {
  position: absolute;
  top: -0.8em;
  inset-inline-end: -0.4em;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.85em 0.2em 0.7em;
  border-radius: 999px;
  background: var(--ok);
  color: #06260f;
  font-size: 0.82em;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
  transform: rotate(-5deg);
}

.stamp .ic { width: 1.1em; height: 1.1em; stroke-width: 3; }
.habits { display: grid; gap: 0.42em; }
.habits li { display: flex; align-items: center; gap: 0.65em; padding: 0.42em 0.8em; border-radius: 0.9em; font-size: 0.86em; font-weight: 700; }
.habits .ic { width: 1.3em; height: 1.3em; color: var(--brand); }
.habits__dots { flex: none; display: inline-flex; gap: 3px; }
.habits__dots i { width: 0.56em; height: 0.56em; border-radius: 50%; background: var(--brand); }

.beat.is-on .relay .face { animation: relay-on 520ms var(--out) both; animation-delay: calc(var(--i) * 400ms + 150ms); }
.beat.is-on .relay li + li::before { animation: grow-x 400ms linear both; animation-delay: calc(var(--i) * 400ms - 150ms); }
.beat.is-on .post { animation: rise-in 520ms var(--out) 100ms both; }
.beat.is-on .post__title { animation: rise-in 420ms var(--out) 560ms both; }
.beat.is-on .post__lines i { animation: grow-x 480ms var(--out) both; animation-delay: calc(var(--i) * 130ms + 700ms); }
.beat.is-on .post__seo li { animation: pop 420ms var(--spring) both; animation-delay: calc(var(--i) * 110ms + 1000ms); }
.beat.is-on .post__cover svg { animation: paint 760ms var(--out) 1350ms both; }
.beat.is-on .stamp { animation: stamp 540ms var(--spring) 1950ms both; }
.beat.is-on .habits li { animation: rise-in 480ms var(--out) both; animation-delay: calc(var(--i) * 150ms + 2250ms); }

@keyframes relay-on { from { opacity: 0.35; transform: scale(0.8); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px transparent; } }
@keyframes paint { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-18deg) scale(1.9); } }

/* ---- 5. Seen: on Google, and in an AI's answer ----------------------------------------------- */

.sc-seen { gap: 1.5em; }
.serp, .ai { display: grid; gap: 0.5em; padding: 1.05em 0.8em 0.8em; border-color: var(--border); border-radius: 1.15em; background: var(--surface-2); }

/* Where: a label on the card's upper edge. */
.where {
  position: absolute;
  top: -0.95em;
  inset-inline-start: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.1em 0.75em;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-2);
  font-size: 0.76em;
  font-weight: 800;
  line-height: 1.6;
}

.where .ic { width: 1.05em; height: 1.05em; color: #8ab4f8; stroke-width: 2.2; }
.ai .where .ic { color: var(--ok); }
.serp__q { display: flex; align-items: center; gap: 0.5em; min-height: 2.4em; padding: 0 0.9em; border: 1px solid var(--hairline); border-radius: 999px; background: var(--bg); font-size: 0.9em; font-weight: 700; }
.serp__q .ic { width: 1.15em; height: 1.15em; color: var(--text-3); }
.serp__list { display: grid; gap: 0.4em; }
.serp__list li { position: relative; display: flex; align-items: center; gap: 0.6em; height: 3.1em; padding: 0 0.6em; border: 1.5px solid transparent; border-radius: 0.85em; }
.serp__us { border-color: var(--brand) !important; background: var(--brand-ink); }
.serp__us .sitetile { width: 2.1em; font-size: 0.9em; }
.serp__txt { flex: 1; min-width: 0; display: grid; line-height: 1.45; }
.serp__txt small { color: var(--text-3); font-size: 0.7em; text-align: right; }
.serp__txt b { overflow: hidden; font-size: 0.87em; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.serp__us .medal { position: static; flex: none; margin-inline-start: 0.2em; }
.serp__us .medal::before, .serp__us .medal::after { content: none; }
.serp__them { opacity: 0.6; }
.serp__them > i { flex: none; width: 1.9em; aspect-ratio: 1; border-radius: 28%; background: rgba(255, 255, 255, 0.1); }
.serp__them span { flex: 1; display: grid; gap: 0.36em; }
.serp__them span i { height: 0.36em; border-radius: 0.2em; background: rgba(255, 255, 255, 0.14); }
.serp__them span i:first-child { width: 34%; }
.serp__them span i:last-child { width: 76%; }
.ai__q { justify-self: start; max-width: 82%; padding: 0.35em 0.85em; border-radius: 0.95em; border-end-start-radius: 0.3em; background: rgba(255, 255, 255, 0.1); font-size: 0.87em; font-weight: 700; transform-origin: right bottom; }
.ai__a { display: grid; gap: 0.45em; padding: 0.6em 0.8em 0.7em; border: 1px solid var(--hairline); border-radius: 0.95em; background: var(--bg); font-size: 0.87em; line-height: 1.8; }
.ai__cite { justify-self: start; display: inline-flex; align-items: center; gap: 0.45em; padding: 0.12em 0.7em 0.12em 0.22em; border: 1.5px solid var(--brand); border-radius: 999px; background: var(--brand-ink); font-size: 0.9em; font-weight: 800; line-height: 1.5; }
.ai__cite .sitetile { width: 1.55em; font-size: 0.82em; }

.beat.is-on .serp { animation: rise-in 520ms var(--out) both; }
.beat.is-on .serp__us { animation: climb 1000ms var(--out) 500ms both; }
.beat.is-on .serp__them { animation: sink 1000ms var(--out) 500ms both; }
.beat.is-on .serp__us .medal { animation: pop 560ms var(--spring) 1350ms both; }
.beat.is-on .ai { animation: rise-in 520ms var(--out) 1500ms both; }
.beat.is-on .ai__q { animation: pop 460ms var(--spring) 1750ms both; }
.beat.is-on .ai__a { animation: rise-in 520ms var(--out) 2050ms both; }
.beat.is-on .ai__cite { animation: pop 480ms var(--spring) 2450ms both; }
.beat.is-on .ai > .medal { animation: medal 700ms var(--spring) 2750ms both; }

/* The site's own result starts in the last place, and takes the first. */
@keyframes climb { from { transform: translateY(calc(200% + 0.8em)); } }
@keyframes sink { from { transform: translateY(calc(-100% - 0.4em)); } }

/* ---- 6. More customers: the charts go up ------------------------------------------------------ */

.grow { display: grid; gap: 0.25em; padding: 0.9em 1em 0.65em; border-radius: 1.25em; }
.grow__top { display: flex; align-items: baseline; gap: 0.6em; }
.grow__top b { font-size: 2.5em; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.grow__top span { color: var(--text-3); font-size: 0.86em; font-weight: 600; }

/* A chart reads left to right, whatever way the page reads. */
.grow__plot { position: relative; height: clamp(5.4em, 24cqi, 9em); margin-top: 0.5em; border-bottom: 1px solid var(--border); }
.grow__plot svg { width: 100%; height: 100%; overflow: visible; }
.grow__tag, .grow__start { position: absolute; padding: 0.05em 0.65em; border-radius: 0.5em; font-size: 0.74em; font-weight: 800; white-space: nowrap; }
.grow__tag { top: -0.6em; right: 0; background: var(--brand); color: var(--on-brand); }
.grow__start { bottom: 1.5em; left: 0; background: #fff; color: #0b1119; }
.grow__axis { direction: ltr; display: flex; justify-content: space-between; color: var(--text-3); font-size: 0.72em; }
.grow__axis span { direction: ltr; }
.wins { display: grid; gap: 0.42em; }
.wins li { display: flex; align-items: center; gap: 0.7em; min-width: 0; padding: 0.42em 0.7em; border-radius: 0.95em; }
.wins__ic { flex: none; display: grid; place-items: center; width: 2.1em; aspect-ratio: 1; border-radius: 50%; background: var(--ok-tint); color: var(--ok); }
.wins__ic .ic { width: 1.15em; height: 1.15em; }
.wins__txt { min-width: 0; display: grid; line-height: 1.5; }
.wins__txt b { font-size: 0.9em; font-weight: 800; }
.wins__txt small { overflow: hidden; color: var(--text-3); font-size: 0.76em; text-overflow: ellipsis; white-space: nowrap; }

.beat.is-on .grow { animation: rise-in 520ms var(--out) both; }
.beat.is-on .grow__plot svg { animation: draw 1500ms var(--out) 300ms both; }
.beat.is-on .grow__start { animation: pop 520ms var(--spring) 450ms both; }
.beat.is-on .grow__tag { animation: pop 520ms var(--spring) 1500ms both; }
.beat.is-on .wins li { animation: toast 560ms var(--spring) both; animation-delay: calc(var(--i) * 380ms + 1250ms); }

@keyframes draw { from { clip-path: inset(-10px 100% -10px 0); } to { clip-path: inset(-10px 0 -10px 0); } }
@keyframes toast { from { opacity: 0; transform: translateX(-34px) scale(0.92); } }

/* ---- A screen that is not tall: each scene keeps what it cannot do without ------------------- */

@media (max-height: 700px) {
  .story.is-live .know__pages,
  .story.is-live .serp__them:last-child,
  .story.is-live .habits li:last-child,
  .story.is-live .topics li:nth-child(n + 3) { display: none; }
  .story.is-live .beat.is-on .serp__us { animation-name: climb-short; }
  .story.is-live .orbit { width: min(12.5em, 54%); }
  .story.is-live .scene { gap: 0.75em; }
  .story.is-live .sc-seen { gap: 1.4em; }
}

@keyframes climb-short { from { transform: translateY(calc(100% + 0.4em)); } }

@media (max-width: 959px) {
  .story.is-live .know__pages,
  .story.is-live .topics__why,
  .story.is-live .topics li:nth-child(n + 4) { display: none; }
  .story.is-live .scene { padding-inline: 1.1em; padding-bottom: 1.1em; }
}

@media (max-width: 959px) and (max-height: 620px) {
  .story.is-live .wins li:last-child,
  .story.is-live .facts li:nth-child(n + 3),
  .story.is-live .habits,
  .story.is-live .stage__brand,
  .story.is-live .stage__sample { display: none; }
  .story.is-live .scene { padding-top: 1.3em; }
  .story.is-live .orbit { width: min(12em, 58%); margin-block: 0.6em; }
}
