/*
  About: the five-step tour and the pitch around it. Loaded after style.css
  and built only from its tokens, so light and dark follow the rest of the
  site. The landing reuses the home page's .hero, the free preview its
  .preview-strip, the close its .cta-band and Sizz.
*/

/* ------------------------------------------------------------- landing */

/* Headings break into even lines, never one word left alone. */
.section-title, .tour-step h3 { text-wrap: balance; }

/* A longer headline than the home page's, so its orange half may wrap. */
.about-hero .hot { white-space: normal; }
.about-hero h1 { max-width: 15ch; }

/* -------------------------------------------------------------- stakes */

/* The problem, in the app's own heat badges: each thing that goes wrong in
   a week, labelled the way Sizzlo labels food. */
.stakes {
  margin: var(--head-gap) 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--outline);
  max-width: 860px;
}
.stakes li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-2);
}
.stakes .heat { justify-self: start; }
.stakes p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.stakes-turn {
  margin: 36px 0 0;
  max-width: 52ch;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--text-secondary);
}
.stakes-turn strong { color: var(--text-primary); font-weight: 650; }
@media (max-width: 520px) {
  .stakes li { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------------------------------------------------------------- tour */

/* Read top to bottom by default: each step is its screenshot, then its
   words. That is the page without scripting and on a phone. */
.tour-grid { margin-top: var(--head-gap); }
.tour-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(56px, 8vw, 88px);
}
.tour-shot { width: min(290px, 74vw); margin: 0 auto 28px; }
.tour-num {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.tour-step h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.tour-step > p:not(.tour-num):not(.tour-tip) {
  margin: 0;
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: 1.06rem;
}
/* Sizz's tip, as a note in his colour. */
.tour-tip {
  margin: 20px 0 0;
  max-width: 46ch;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--primary-tint);
  border: 1px solid var(--primary-line);
  color: var(--text-primary);
  font-size: .97rem;
}
.tour-tip strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--primary-text);
}

/* The pinned phone, wide screens with scripting only (site.js tour()). */
.tour-stage { display: none; }

@media (min-width: 900px) {
  html.js .tour-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(40px, 6vw, 96px);
  }
  html.js .tour-stage {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 3vh);
    height: calc(100vh - var(--header-h) - 6vh);
    height: calc(100dvh - var(--header-h) - 6vh);
    /* The phone sizes off this box both ways (cqw, cqh), so a narrow
       column gets a smaller phone rather than one that runs over it. */
    container-type: size;
  }
  html.js .tour-shot { display: none; }
  /* Each step holds the middle of the screen for a while; the ones not
     being shown step back. */
  html.js .tour-step {
    min-height: 72vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: .3;
    transition: opacity .5s var(--ease-settle, ease);
  }
  html.js .tour-step.is-active { opacity: 1; }
  html.js .tour-steps { gap: 0; }
}

/* 860 x 1864 captures: width is height x .4614, so 138cqw tall is 64% of
   the column wide. */
.tour-phone {
  position: absolute;
  top: 0;
  left: 50%;
  height: min(100cqh - 40px, 680px, 138cqw);
  aspect-ratio: 860 / 1864;
  transform: translateX(-28%);
}
.tour-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .5s var(--ease-settle, ease), transform .7s var(--ease-settle, ease);
}
.tour-frame img { width: 100%; height: 100%; }
.tour-frame.is-on { opacity: 1; transform: none; }

/* Sizz beside the phone, saying the step's tip. */
/* Clear of the phone's screen: Sizz and his bubble sit to its left, out
   into the page margin where there is one. */
.tour-guide {
  position: absolute;
  left: -16px;
  bottom: 6%;
  width: 140px;
  aspect-ratio: 1;
}
@media (min-width: 1200px) {
  .tour-guide { left: -64px; }
}
/* Narrower than that there is no margin to say it in without covering the
   screen, and every tip is printed in its step anyway. */
@media (max-width: 1199px) {
  .tour-says { display: none; }
  .tour-guide { width: 120px; }
}
.tour-guide::before {
  content: "";
  position: absolute;
  inset: 9% 7% 3%;
  border-radius: 50%;
  background: var(--primary-tint);
}
.tour-says {
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 12px;
  width: 11rem;
  margin: 0 0 6px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--outline);
  border-radius: 16px 16px 16px 4px;
  font-size: .9rem;
  line-height: 1.4;
  transition: opacity .25s ease;
}
.tour-says.is-swapping { opacity: 0; }

/* Where you are: five dots down the right of the phone. */
.tour-dots {
  position: absolute;
  top: 50%;
  right: -26px;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.tour-dots li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background-color .3s ease, transform .3s var(--ease-settle, ease);
}
.tour-dots li.is-on { background: var(--primary); transform: scale(1.3); }
.tour-dots span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html.js .tour-step, .tour-frame, .tour-says, .tour-dots li { transition: none; }
  .tour-frame { transform: none; }
}

/* ------------------------------------------------------------ contrast */

.contrast {
  margin-top: var(--head-gap);
  max-width: 960px;
  border-top: 2px solid var(--outline);
}
.contrast-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--line-2);
}
.contrast-row > span {
  position: relative;
  padding-left: 30px;
  font-size: 1.04rem;
}
/* A muted dash for the old way, an orange tick for the new. */
.contrast-row > span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.contrast-row > span:first-child { color: var(--text-tertiary); }
.contrast-row > span:first-child::before {
  background: linear-gradient(var(--text-tertiary), var(--text-tertiary)) center / 8px 2px no-repeat, var(--tint-2);
}
.contrast-row > span:last-child { color: var(--text-primary); font-weight: 600; }
.contrast-row > span:last-child::before {
  background: var(--primary);
}
.contrast-row > span:last-child::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(.2em + 4px);
  width: 5px;
  height: 9px;
  border: solid var(--on-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.contrast-head { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.contrast-head > span {
  padding-left: 30px;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-tertiary) !important;
}
.contrast-head > span:last-child { color: var(--primary-text) !important; }
.contrast-head > span::before,
.contrast-head > span::after { content: none !important; }
@media (max-width: 520px) {
  .contrast-row { gap: 14px; }
  .contrast-row > span { font-size: .95rem; padding-left: 26px; }
  .contrast-head > span { padding-left: 26px; }
}

/* ---------------------------------------------------------- try it free */

.try-next {
  margin: 24px 0 0;
  max-width: 62ch;
  font-size: 1.05rem;
  color: var(--text-secondary);
}
.try-next strong { color: var(--text-primary); font-weight: 650; }
.try-fine {
  margin: 14px 0 0;
  max-width: 70ch;
  font-size: .9rem;
  color: var(--text-tertiary);
}

/* ----------------------------------------------------------- questions */

.asks { margin-top: var(--head-gap); display: grid; gap: 12px; max-width: 860px; }
.ask {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .15s ease;
}
.ask:hover, .ask[open] { border-color: var(--line-2); }
.ask summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-lg);
}
.ask summary::-webkit-details-marker { display: none; }
/* The same plus-to-minus as the home page's FAQ. */
.ask summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--primary-text), var(--primary-text)) center / 100% 2px no-repeat,
    linear-gradient(var(--primary-text), var(--primary-text)) center / 2px 100% no-repeat;
  transition: transform .2s var(--ease-settle, ease);
}
.ask[open] summary::after {
  background: linear-gradient(var(--primary-text), var(--primary-text)) center / 100% 2px no-repeat;
}
.ask summary:focus-visible { outline-offset: -3px; }
.ask p { margin: 0; padding: 0 24px 22px; color: var(--text-secondary); max-width: 74ch; }
@media (max-width: 640px) {
  .ask summary { padding: 17px 18px; }
  .ask p { padding: 0 18px 20px; }
}
