/*
  The homepage hero: the telephone's speech bubbles and the layout that puts them in the
  first viewport. The telephone drawing and all motion live in home-phone.css.
  Colours come from the tokens. The final state (handset lifted, both bubbles shown) is
  the plain CSS; the motion is layered on and stops under reduced motion.
  Names: hp- = hero phone (hp-stage, hp-say, hp-phone), p- = a part of the telephone
  drawing, .w = one word of a bubble, .w.c = one word of the caller bubble.
  .f-hero1 and .f-hero2 are the floating stickers; their positions here override
  home-beats.css because this file loads after it.
*/

/* floating stickers behind the copy */
.floats .f-hero1 {
  right: 16px;
  top: 14px;
  --s: 40px;
}
.floats .f-hero2 {
  right: 76px;
  top: 8px;
  --s: 44px;
}

/* ---------- small screens: kicker, headline, telephone, then the rest ----------
   Breakpoints, widest rule last (at equal specificity the later rule wins):
   - 700: home-beats.css's tablet step (beat padding, sticker sizes); bubble text grows
   - 799/800: the time sticker leaves the flow below 800; from 800 the hero has two
     columns (copy 1fr, telephone 320 to 440 px), which needs about 800 px
   - 900 to 1099: home-beats.css switches to its side timeline, which does not fit beside
     two columns, so this file keeps the stacked timeline until 1100
   - 1100: the full timeline returns, with the big time sticker
   - 1280: the zigzag sticker fits beside the headline */
.hero .time {
  gap: 0;
}
.hero .time small {
  display: none;
}
.hero .time > span:first-child {
  font-size: 1.375rem;
  padding: 4px 12px 2px;
  box-shadow: 4px 4px 0 var(--text);
}
.hero .time .num {
  font-size: 1.75rem;
}
.hero h1 {
  font-size: clamp(2rem, 0.5rem + 6vw, 3.5rem);
}
/* phones and small tablets: the time sticker moves up beside the kicker so the telephone
   stays in view */
@media (max-width: 799px) {
  .hero {
    --pad: 20px;
  }
  .hero .time {
    position: absolute;
    top: 18px;
    right: 6px;
    z-index: 2;
  }
  .hp-body > .kicker {
    max-width: 58%;
    font-size: 0.875rem;
  }
  .floats .f-hero1,
  .floats .f-hero2 {
    display: none;
  }
}
.hp-body {
  display: grid;
  gap: 16px;
}
/* reserve two lines for the longest phrase so the hero never jumps */
.hero .cycle {
  display: inline-flex;
  align-items: center;
  min-height: 2.2em;
}
.hp-copy {
  gap: 0;
}
.hp-copy .lead {
  font-size: 1.125rem;
}
.hp-copy .action {
  margin-top: 20px;
}
.hp-copy .fine {
  margin-top: 12px;
}
.hp-copy .action-link {
  margin-top: 4px;
}

/* the telephone box: .hp-phone sizes itself in cqw, a percentage of this box's width */
.hp-stage {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  margin: 0 auto;
  padding-right: 8px;
  container-type: inline-size;
}

/* speech bubbles */
.hp-say {
  position: relative;
  z-index: 2;
  padding: 10px 14px 12px;
  border: 3px solid var(--text);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--text);
}
.hp-say::after {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  background: inherit;
  transform: rotate(45deg);
}
.hp-ai {
  transform-origin: 22% 100%;
}
.hp-ai::after {
  left: 26%;
}
.hp-caller {
  width: 44%;
  margin: 12px 0 0 auto;
  background: var(--accent-pink);
  transform-origin: 90% 0;
}
.hp-caller::after {
  right: 22px;
}
.hp-top {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.hp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 2px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--accent-mint);
  font: 400 0.9375rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hp-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}
.hp-wave i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--text);
  transform: scaleY(0.6);
}
.hp-wave i:nth-child(2) {
  transform: scaleY(1);
}
.hp-wave i:nth-child(3) {
  transform: scaleY(0.45);
}
.hp-wave i:nth-child(4) {
  transform: scaleY(0.85);
}
.hp-wave i:nth-child(5) {
  transform: scaleY(0.5);
}
.hp-who {
  font: 700 0.75rem/1.2 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hp-line {
  font-weight: 600;
  line-height: 1.4;
}
.hp-caller .hp-line {
  font-size: 0.875rem;
  font-weight: 700;
}
.hp-ai .hp-line {
  font-size: 0.875rem;
}

/* ---------- wider screens ---------- */
@media (min-width: 700px) {
  .hero {
    --pad: 40px;
  }
  .hp-ai .hp-line {
    font-size: 1rem;
  }
  .hp-caller .hp-line {
    font-size: 0.9375rem;
  }
  .floats .f-hero1 {
    --s: 56px;
  }
  .floats .f-hero2 {
    --s: 60px;
    right: 100px;
  }
}
/* two columns: copy left, telephone right, both inside the first viewport */
@media (min-width: 800px) {
  .hero {
    --sw: clamp(320px, 38vw, 440px);
  }

  .hp-body {
    grid-template-columns: minmax(0, 1fr) var(--sw);
    column-gap: 32px;
    align-items: start;
  }
  .hp-body > .kicker,
  .hp-body > h1,
  .hp-body > .hp-copy {
    grid-column: 1;
  }
  .hp-stage {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: 100%;
    margin: 0;
  }
  .hp-body > h1 {
    font-size: clamp(2.5rem, 0.9rem + 3.2vw, 3.5rem);
  }
  .hp-copy .lead {
    font-size: 1.25rem;
  }
}
/* the live site's own timeline layout starts at 900 px; under 1100 px there is not enough
   room for it beside two columns, so the small-screen timeline (spine left, time above)
   stays until 1100 px. */
@media (min-width: 900px) and (max-width: 1099px) {
  .hero .beat-in {
    grid-template-columns: none;
    padding-left: 44px;
  }
  .hero .spine {
    left: 5px;
    width: 18px;
  }
  .hero .dot {
    left: 0;
    top: calc(var(--pad) + 10px);
    width: 28px;
    height: 28px;
  }
  .hero .dot::before {
    inset: 4px;
  }
  .hero .time {
    position: static;
  }
  .hero .time > span:first-child {
    font-size: 1.375rem;
  }
  .hero .time .num {
    font-size: 1.75rem;
  }
  .hero .body {
    grid-column: auto;
  }
}
@media (min-width: 1100px) {
  .hero .time small {
    display: block;
    margin-top: 18px;
  }
  .hero .time > span:first-child {
    font-size: 2.25rem;
    padding: 6px 14px 4px;
    box-shadow: 5px 5px 0 var(--text);
  }
  .hero .time .num {
    font-size: 3.25rem;
  }
  .floats .f-hero1 {
    display: none;
  }
  .floats .f-hero2 {
    right: 3%;
    top: auto;
    bottom: 36px;
    --s: 84px;
  }
}
/* the zigzag only has room beside the headline from 1280 px */
@media (min-width: 1280px) {
  .floats .f-hero1 {
    display: block;
    left: calc(max(24px, (100% - 1240px) / 2) + 650px);
    right: auto;
    top: 170px;
    --s: 72px;
  }
}
