/* =========================================================================
   Homepage, version B. Same visual language as home-lp.css (which it builds
   on); the section order and copy are inspired by corgi.insure: coverage that
   grows by stage, old way vs Boop, who it is for, two ways in, FAQ, closing.
   Everything is scoped to .lp.
   ========================================================================= */

.lp .lp-p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* secondary button: outline in ink */
.b-btn {
  display: inline-flex; align-items: center; gap: .5em; border-radius: 4px; padding: 17px 26px 18px;
  border: 1px solid var(--ink); color: var(--ink); font-size: 17px; line-height: 1; letter-spacing: -.005em;
  transition: background .3s ease, color .3s ease;
}
.b-btn span { transition: transform .35s var(--out); }
@media (hover: hover) { .lp .b-btn:hover { background: var(--ink); color: var(--paper); } .b-btn:hover span { transform: translateX(3px); } }
.b-btn:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---- 2. coverage that grows ---- */
.b-mod { display: grid; grid-template-columns: 1fr minmax(280px, 380px); gap: clamp(24px, 4vw, 64px); margin-top: clamp(48px, 6vw, 80px); align-items: start; }
.b-stages { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 6px; padding: 4px; gap: 4px; background: #f3f2ef; }
.b-stages button {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 4px; padding: 14px 16px 15px; border-radius: 4px;
  color: var(--grey); transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
.b-stages b { font-weight: 400; font-size: 18px; letter-spacing: -.02em; color: inherit; }
.b-stages span { font-size: 14px; line-height: 1.3; }
.b-stages button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,19,.08), 0 4px 12px -4px rgba(20,20,19,.12); }
.b-stages button[aria-selected="true"] span { color: var(--grey); }
@media (hover: hover) { .b-stages button:hover { color: var(--ink); } }
.b-stages button:focus-visible { outline: 1px solid var(--ink); outline-offset: -3px; }

.b-switches { list-style: none; margin: 8px 0 0; padding: 0; }
.b-switches li { border-bottom: 1px solid var(--line); }
.b-sw { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; row-gap: 2px; align-items: center; padding: 22px 4px; cursor: pointer; }
.b-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.b-sw__t {
  grid-row: 1 / span 2; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #dedbd5;
  transition: background .3s ease;
}
.b-sw__t::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(20,20,19,.2); transition: transform .4s var(--out);
}
.b-sw input:checked + .b-sw__t { background: var(--ink); }
.b-sw input:checked + .b-sw__t::after { transform: translateX(18px); }
.b-sw input:focus-visible + .b-sw__t { outline: 1px solid var(--ink); outline-offset: 3px; }
.b-sw b { font-weight: 400; font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.025em; display: flex; align-items: baseline; gap: 10px; }
.b-sw b small { font-size: 13px; letter-spacing: 0; color: var(--grey); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 4px; }
.b-sw > span:last-child { grid-column: 2; font-size: 16px; line-height: 1.35; color: var(--grey); }

.b-card {
  position: sticky; top: 96px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 28px;
  box-shadow: 0 1px 2px rgba(20,20,19,.04), 0 18px 40px -24px rgba(20,20,19,.25);
}
.b-card__k { font-size: 14px; color: var(--grey); }
.b-card__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 2px; }
.b-card__list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 20px; letter-spacing: -.02em; color: #c9c5be;
  text-decoration: line-through; text-decoration-color: #dedbd5; transition: color .35s ease;
}
.b-card__list li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #dedbd5; background: transparent;
  transition: background .35s ease, border-color .35s ease;
}
.b-card__list li.is-on { color: var(--ink); text-decoration: none; }
.b-card__list li.is-on::before {
  border-color: var(--ink);
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.2 9.3 2.5 2.5 5.1-5.4'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.b-card__note { margin: 18px 0 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; color: var(--grey); }
.b-card .lp-cta { width: 100%; }
@media (max-width: 900px) {
  .b-mod { grid-template-columns: 1fr; }
  .b-card { position: static; }
  .b-stages { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 3. old way vs Boop: three rows, the Boop column raised as a card ---- */
.b-vs { position: relative; display: grid; margin-top: clamp(48px, 6vw, 80px); }
.b-vs::before {                                   /* the Boop column's card, drawn behind its cells */
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: calc((100% - 160px) / 2);
  background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 18px 40px -28px rgba(20,20,19,.3);
}
.b-vs__row { position: relative; display: grid; grid-template-columns: 160px 1fr 1fr; align-items: baseline; }
.b-vs__row > span { padding: 22px clamp(20px, 2.6vw, 36px) 22px 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.35; letter-spacing: -.015em; }
.b-vs__row > .b-vs__boop { padding-left: clamp(20px, 2.6vw, 36px); color: var(--ink); }
.b-vs__row:not(.b-vs__row--head) > span { border-top: 1px solid var(--line); }
.b-vs__row:not(.b-vs__row--head) > .b-vs__boop { border-top-color: rgba(20,20,19,.07); }
.b-vs__k { font-size: 15px !important; color: var(--grey); }
.b-vs__old { color: var(--grey); }
.b-vs__row:not(.b-vs__row--head) .b-vs__old { text-decoration: line-through; text-decoration-color: rgba(138,137,132,.45); }
.b-vs__row--head > span { padding-top: 28px; padding-bottom: 18px; font-size: 15px; }
.b-vs__row--head img { width: 72px; height: auto; display: block; }
@media (max-width: 760px) {
  .b-vs::before { display: none; }
  .b-vs__row { grid-template-columns: 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
  .b-vs__row--head { display: none; }
  .b-vs__row > span, .b-vs__row > .b-vs__boop { padding: 2px 0; border-top: 0 !important; }
  .b-vs__row > .b-vs__boop::before { content: "Boop: "; color: var(--grey); }
}

/* ---- 4. who it's for ---- */
.b-who { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.b-who li { margin: 0; display: grid; gap: 6px; }
.b-who__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #ecebe8; margin-bottom: 14px; }
.b-who__img img { transition: transform 1.4s var(--out); }
@media (hover: hover) { .b-who li:hover .b-who__img img { transform: scale(1.03); } }
.b-who b { font-weight: 400; font-size: clamp(22px, 2vw, 26px); letter-spacing: -.025em; }
.b-who span { font-size: 17px; line-height: 1.35; color: var(--grey); }
@media (max-width: 760px) { .b-who { grid-template-columns: 1fr; row-gap: 40px; } }

/* ---- 5. two ways in ---- */
.b-paths { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(16px, 2vw, 24px); margin-top: clamp(48px, 6vw, 80px); align-items: stretch; }
.b-path { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: clamp(24px, 3vw, 40px); }
.b-path--talk { background: #f1f0ed; border-color: transparent; display: flex; flex-direction: column; align-items: flex-start; }
.b-path--talk .b-btn { margin-top: auto; }
.b-path__k { display: block; font-size: clamp(22px, 2vw, 26px); letter-spacing: -.025em; }
.b-path__p { margin: 10px 0 0; font-size: 17px; line-height: 1.4; color: var(--grey); max-width: 40ch; }
.b-path__best { margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink); display: flex; gap: 8px; }
.b-path__best::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--ink); }
.b-path--talk .b-path__best { margin-bottom: 40px; }
.b-path .lp-form { margin-top: 36px; }
@media (max-width: 900px) { .b-paths { grid-template-columns: 1fr; } }

/* ---- 6. FAQ ---- */
.b-faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.b-faq__list { border-top: 1px solid var(--line); }
.b-faq details { border-bottom: 1px solid var(--line); }
.b-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0; font-size: clamp(19px, 1.7vw, 22px); letter-spacing: -.02em; line-height: 1.3;
}
.b-faq summary::-webkit-details-marker { display: none; }
.b-faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px; transition: transform .4s var(--out);
  background: linear-gradient(var(--ink), var(--ink)) center / 14px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 14px no-repeat;
}
.b-faq details[open] summary::after { transform: rotate(45deg); }
.b-faq summary:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.b-faq details p { margin: -6px 0 0; padding: 0 40px 26px 0; font-size: 17px; line-height: 1.5; color: var(--grey); max-width: 60ch; }
@media (max-width: 900px) { .b-faq { grid-template-columns: 1fr; } }

/* ---- 7. closing ---- */
.b-close { padding-top: clamp(96px, 13vw, 184px); padding-bottom: clamp(96px, 13vw, 184px); }
.b-close__act { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 44px; }

@media (prefers-reduced-motion: reduce) {
  .b-sw__t, .b-sw__t::after, .b-card__list li, .b-card__list li::before, .b-faq summary::after { transition: none !important; }
}

/* phone: the switches already show what is on, so the card is just the button */
@media (max-width: 900px) {
  .b-card { padding: 20px; }
  .b-card__k, .b-card__list { display: none; }
  .b-card__note { margin-top: 0; padding-top: 0; border-top: 0; }
}
.b-paths { align-items: start; }
.b-path--talk .b-btn { margin-top: 0; }

/* ---- 1. what Boop protects: one sentence, one frame ---- */
.b-protect { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.b-protect__h { margin: 0; font-weight: 400; font-size: clamp(38px, 4.8vw, 68px); line-height: 1.06; letter-spacing: -.04em; }
.b-protect__lead, .b-protect__ln { display: block; }
.b-protect__lead { color: var(--ink); }
.b-protect__ln { color: #cdc9c2; cursor: pointer; transition: color .7s ease; }
.b-protect[data-step="1"] .b-protect__ln[data-step="1"],
.b-protect[data-step="2"] .b-protect__ln[data-step="2"],
.b-protect[data-step="3"] .b-protect__ln[data-step="3"] { color: var(--ink); }
@media (hover: hover) { .b-protect__ln:hover { color: #9d9992; } }

/* three small steps under the sentence; the current one fills while it plays */
.b-protect__dots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 5vw, 64px); max-width: 440px; }
.b-protect__dots button { all: unset; box-sizing: border-box; cursor: pointer; position: relative; padding-top: 14px; font-size: 14px; color: var(--grey); transition: color .4s ease; }
.b-protect__dots button::before, .b-protect__dots button span::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: var(--line); }
.b-protect__dots button span::before { background: var(--ink); transform: scaleX(0); transform-origin: left; }
.b-protect__dots button[aria-pressed="true"] { color: var(--ink); }
.b-protect__dots button[aria-pressed="true"] span::before { transform: scaleX(1); transition: transform .5s var(--out); }
.b-protect.is-playing .b-protect__dots button[aria-pressed="true"] span::before { animation: bProtectFill 3.6s linear both; }
@keyframes bProtectFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.b-protect__dots button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* the frame: three layers, aligned to the same photograph */
.b-protect__frame {
  position: relative; justify-self: end; width: 100%; max-width: 560px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px;
  background: radial-gradient(120% 80% at 50% 38%, #fbfbfa 0%, #f1f0ed 70%, #ebeae6 100%);
}
.b-protect__frame img { position: absolute; inset: 0; }
.b-protect__frame::after {                         /* a soft floor shadow while the robot stands alone */
  content: ""; position: absolute; left: 47%; top: 88.5%; width: 30%; height: 4%; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(20,20,19,.22), rgba(20,20,19,0)); transition: opacity .8s ease; z-index: 1;
}
.b-protect__scene { opacity: 0; transform: scale(1.08); filter: blur(10px) saturate(.9);
  transition: opacity 1.4s ease, transform 2.4s var(--out), filter 1.8s var(--out); }
.b-protect__robot { z-index: 2; transition: opacity .9s ease; }
.b-protect__biz { z-index: 3; opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 2.4s var(--out); }
.b-protect[data-step="2"] .b-protect__scene { opacity: 1; transform: none; filter: none; }
.b-protect:not([data-step="1"]) .b-protect__frame::after { opacity: 0; }
.b-protect[data-step="3"] .b-protect__scene { opacity: 1; transform: none; filter: none; }
.b-protect[data-step="3"] .b-protect__biz { opacity: 1; transform: none; }
.b-protect[data-step="3"] .b-protect__robot { opacity: 0; transition-delay: .3s; }

@media (max-width: 900px) {
  .b-protect { grid-template-columns: 1fr; }
  .b-protect__frame { justify-self: stretch; max-width: none; aspect-ratio: 4 / 4.4; }
  .b-protect__frame img { object-position: 50% 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .b-protect__scene, .b-protect__robot, .b-protect__biz, .b-protect__ln, .b-protect__frame::after { transition-duration: .01s !important; transition-delay: 0s !important; }
}
.b-protect__lead { font-size: .62em; letter-spacing: -.03em; margin-bottom: .32em; white-space: nowrap; }
@media (max-width: 420px) { .b-protect__lead { white-space: normal; } }

/* ---- protect frame, black and white with grain; layers wipe in as strips ---- */
.b-protect__frame { aspect-ratio: 4 / 5 !important; background: radial-gradient(120% 80% at 50% 38%, #f4f4f3 0%, #e6e6e4 72%, #dcdcda 100%); }
.b-strips { position: absolute; inset: 0; pointer-events: none; }
.b-strips i {
  position: absolute; top: 0; bottom: 0; left: calc(var(--i) * 12.5%); width: calc(12.5% + 1px);
  background: var(--img) calc(var(--i) * 100% / 7) 0 / 800% 100% no-repeat;
  clip-path: inset(100% 0 0 0); transform: translateY(7%);
  transition: clip-path .95s cubic-bezier(.76,0,.24,1), transform 1.25s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i) * 65ms);
}
/* override the earlier fade-and-blur on the scene and business layers */
.b-protect__scene, .b-protect__biz { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
.b-protect__scene { z-index: 0; }
.b-protect__biz { z-index: 3; }
.b-protect__biz i { transition-delay: calc((7 - var(--i)) * 65ms); }
.b-protect[data-step="2"] .b-protect__scene i,
.b-protect[data-step="3"] .b-protect__scene i,
.b-protect[data-step="3"] .b-protect__biz i { clip-path: inset(0 0 0 0); transform: none; }
.b-protect[data-step="3"] .b-protect__robot { transition-delay: .55s; }

/* film grain over everything in the frame, jittering a few frames a second */
.b-protect__grain {
  position: absolute; inset: -50%; z-index: 4; pointer-events: none;
  background: url("./assets/img/home/grain.png") 0 0 / 160px 160px repeat;
  opacity: .32; mix-blend-mode: overlay; animation: bGrain .9s steps(6) infinite;
}
@keyframes bGrain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(3%, -7%); }
  50% { transform: translate(-4%, -3%); } 67% { transform: translate(7%, 2%); } 83% { transform: translate(-2%, 6%); } 100% { transform: translate(0, 0); }
}
.b-protect__frame::after { background: radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,0)); }
@media (prefers-reduced-motion: reduce) {
  .b-strips i { transition: none !important; }
  .b-protect__grain { animation: none; }
}
@media (max-width: 900px) { .b-protect__frame { max-width: 520px; justify-self: center; } }

/* ---- protect frame as a dither (assets/home/protect-dither.js) ---- */
.b-protect__frame.has-dither { background: #f9f9f9; }
.b-protect__frame.has-dither > :not(canvas), .b-protect__frame.has-dither::after { display: none; }
.b-protect__dither { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }

/* closing section: a plain way to follow on X */
.b-x { display: inline-flex; align-items: center; gap: 10px; margin: 36px auto 0; min-height: 44px; padding: 0 4px; color: var(--grey); font-size: 16px; letter-spacing: -.005em; transition: color .2s ease; }
.b-close .lp-in { display: flex; flex-direction: column; align-items: center; }
.b-x svg { color: var(--ink); }
.b-x b { font-weight: 400; color: var(--ink); }
@media (hover: hover) { .lp .b-x:hover { color: var(--ink); } }
.b-x:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* ---- what Boop does: one near-full-width film, then one sentence (tonight's homepage) ---- */
.s2 { --gut: max(16px, 3.9vw); padding: var(--gut) var(--gut) clamp(96px, 12vw, 240px); }
.s2__media { margin: 0; overflow: hidden; border-radius: 6px; background: #000; aspect-ratio: 16 / 9; max-width: 100%; }
.s2__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.s2__text {
  margin: clamp(64px, 10.5vw, 210px) auto 0; text-align: center; text-wrap: balance;
  font-size: clamp(34px, 4.6vw, 76px); line-height: 1.04; letter-spacing: -.04em; color: var(--ink);
}
.s2__g { display: block; color: var(--grey); }
/* the film is 16:9 with titles and a ticker at its edges, so phones keep the whole frame */

/* ---- footer: brand and tagline on the left, Site / Contact / Follow on the right, no rule above ---- */
.ft { --gut: max(16px, 3.9vw); padding: clamp(48px, 5vw, 96px) var(--gut) 28px; }
.ft__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px clamp(40px, 6vw, 120px); align-items: start; }
.ft__brand { display: grid; gap: 22px; justify-items: start; }
.ft__brand a { display: block; border-radius: 6px; }
.lp .ft__mark { width: 56px; height: 56px; display: block; }
.ft__brand p { margin: 0; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.4; letter-spacing: -.01em; color: var(--grey); }
.ft__cols { display: grid; grid-template-columns: repeat(3, minmax(150px, max-content)); gap: 40px clamp(40px, 8vw, 150px); }
.ft__col h2 { margin: 0 0 18px; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-weight: 500; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }
.ft__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ft__col li a { display: inline-flex; align-items: center; min-height: 32px; font-size: 17px; letter-spacing: -.01em; color: var(--ink); transition: color .2s ease; }
@media (hover: hover) { .lp .ft__col li a:hover { color: var(--grey); } }
.ft__social { display: flex; gap: 14px; }
.ft__social a { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid #dcd9d2; color: var(--ink); transition: border-color .2s ease, background .2s ease; }
@media (hover: hover) { .lp .ft__social a:hover { border-color: var(--ink); background: #fff; } }
.ft a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.ft__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(64px, 8vw, 140px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--grey); }
.ft__bottom a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--grey); transition: color .2s ease; }
@media (hover: hover) { .lp .ft__bottom a:hover { color: var(--ink); } }
@media (max-width: 900px) {
  .ft__top { grid-template-columns: 1fr; }
  .ft__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
