/* TAGYOURCONTENT A: the phone layer. Loaded after style.css and only active up to 760px (main.js's "narrow").
   One spacing scale, one fluid type scale, 44px touch targets, and a sticky "Make it yours" bar driven by
   scroll timelines (no JS). Owned by the mobile pass; style.css stays the source of the design. */

/* the bar is a phone-only element: never shown on wider screens */
.mbar { display: none; }

@media (max-width: 760px) {
  :root {
    /* the spacing scale (--s1 to --s9) and --gut, --t-small live in shared/chrome.css */
    /* type scale, fluid between 360 and 430 */
    --t-hero: clamp(46px, 14.6vw, 62px);
    --t-h2: clamp(40px, 11.6vw, 52px);
    --t-big: clamp(54px, 16vw, 70px);
    --t-h3: clamp(28px, 8.6vw, 35px);
    --t-punch: clamp(44px, 13.4vw, 58px);
    --t-lead: 17px;
    --t-body: 16px;
    --t-micro: 11px;   /* chips and tiny UI labels; never smaller */
  }
  html { scroll-padding-top: 84px; }
  body { font-size: var(--t-body); }

  /* hero: headline + subline as one group, the CTA as the next step, the demo after */
  .hero { padding: 88px var(--gut) var(--s7); gap: var(--s6); min-height: 100svh; align-content: start; }
  .hero-h { font-size: var(--t-hero); overflow-wrap: normal; hyphens: manual; }
  .hero-sub { font-size: 18px; line-height: 1.45; margin-top: var(--s4); max-width: 30ch; }
  .hero-btn { margin-top: var(--s5); }
  .hero-btn.btn.big { height: 56px; padding: 0 32px; }
  /* the demo, sized for thumbs; results keep their slot so nothing below jumps when they land */
  .chat { padding: var(--s3); border-radius: 24px; }
  .demo-foot { margin: 0 2px var(--s3); min-height: 44px; }
  .works { font-size: var(--t-small); gap: var(--s2); }
  .works img { width: 20px; height: 20px; }
  .field { min-height: 64px; padding: var(--s3) 64px var(--s3) var(--s4); }
  .ask { font-size: 16px; }
  .tagw { width: 46px; margin-top: -25px; }
  .tiles { gap: 6px; }
  /* before the first results land: four quiet placeholder tiles in the reserved slot, not an empty white hole */
  .tiles:empty { display: block; --tw: calc((100vw - 70px) / 4); background: linear-gradient(#f3eff3, #f3eff3) 0 0, linear-gradient(#f3eff3, #f3eff3) 33.333% 0, linear-gradient(#f3eff3, #f3eff3) 66.667% 0, linear-gradient(#f3eff3, #f3eff3) 100% 0; background-size: var(--tw) calc(var(--tw) * 1.04); background-repeat: no-repeat; }
  .tiles { min-height: calc((100vw - 62px) * .4219); }
  .chip, .ui-grid .chip, .ap-r .chip { font-size: var(--t-micro); padding: 4px 7px; }
  .tile .chip { line-height: 1.15; }
  /* the left flower is planted just under the demo and grows into the gap above the pains, never over the demo */
  .f1 { left: 2vw; right: auto; top: calc(100% - 40px); bottom: auto; width: 26vw; --flip: 1; --rot: -8deg; }
  .f2 { display: none; }

  /* section rhythm */
  .wrap { padding: var(--s8) var(--gut); }
  .h2, .uc-h { font-size: var(--t-h2); }
  .lede { font-size: var(--t-lead); margin-top: var(--s4); }
  .cta-row { margin-top: var(--s6); }
  /* button sizes, the header, menu and footer: shared/chrome.css */

  /* pains: stacked, the punchline is the visual */
  .pains { padding-top: var(--s9); }
  .pain-row { gap: var(--s3); }
  .pc { padding: var(--s5); border-radius: 30px; }
  .pc h3 { font-size: var(--t-h3); }
  .pc p { font-size: var(--t-lead); margin-top: var(--s3); }
  .pc .punch { font-size: var(--t-punch); margin-top: var(--s5); padding-top: 0; }
  .pc .file { margin-top: var(--s6); font-size: 24px; padding: 16px 22px 16px 18px; }

  /* solution: stacked cards, visuals scaled to the card */
  .solution { padding-top: var(--s8); }
  .sol-row { gap: var(--s3); margin-top: var(--s6); }
  .sx { border-radius: 30px; }
  .sx .in { padding: var(--s5); gap: var(--s5); }
  .sx-head { grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: var(--s4); }
  .bt { font-size: 20px; }
  .ui-ask { font-size: 15px; }
  .ui-bar, .ui-meta { font-size: var(--t-micro); }
  .orbit { width: min(100%, 300px); }
  .o-lab { font-size: var(--t-micro); }
  .f-src b { font-size: 14px; }
  .f-src em, .f-hub em { font-size: 12px; color: var(--body); }

  /* use cases: a swipeable row from edge to edge, the next card peeking */
  .uc-in { padding: var(--s8) var(--gut) var(--s5); }
  .filters { gap: var(--s2); margin-top: var(--s5); scroll-padding-inline: var(--gut); scroll-snap-type: x proximity; }
  .fp { min-height: 44px; padding: 0 var(--s4); scroll-snap-align: start; }
  .uc-rail { margin-top: var(--s5); gap: var(--s4); }
  .ucl { margin: -24px calc(var(--gut) * -1); padding: 24px var(--gut); scroll-padding-inline: var(--gut); gap: var(--s3); cursor: auto; }
  .u { flex: 0 0 min(80vw, 320px); min-height: 0; padding: var(--s5); border-radius: 26px; }
  .u .line { font-size: 19px; }
  .u .who { font-size: 12px; }
  .uc-ctrl { margin-top: var(--s4); gap: var(--s2); }
  .uc-arrow { width: 48px; height: 48px; }
  .applied { border-radius: 26px; padding: var(--s4); }
  .ap-q { font-size: 15px; }

  /* the one-liner band */
  .marquee { padding: var(--s9) 0 var(--s7); }
  .band { padding: 3vw 0 2.4vw; }
  .seg .display { font-size: 18vw; }

  /* pricing: Team first, the switch stays in reach while the plans scroll by */
  #pricing.wrap { padding-left: 10px; padding-right: 10px; }
  .panel { padding: var(--s7) var(--s4) var(--s6); border-radius: 30px; }
  .pr-head { display: contents; }
  .lede { max-width: none; }
  .bill { position: sticky; top: 76px; z-index: 4; display: flex; width: 100%; margin-top: var(--s5); }
  .bill-o { flex: 1; justify-content: center; min-height: 48px; padding: 0 var(--s2); font-size: 15px; }
  .bill-o em { font-size: 12px; }
  .plans { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s5); }
  .plan { padding: var(--s5); border-radius: 24px; }
  .plan.hi { order: -1; }
  .plan .price { margin-top: var(--s4); min-height: 0; }
  .plan .amt, .plan .price.talk { font-size: 52px; }
  .plan .bal, .plan .btn { margin-top: var(--s5); }
  .feats { margin-top: var(--s5); padding-top: var(--s5); gap: var(--s3); }
  .credits { margin-top: var(--s6); font-size: 15px; }
  .trust { font-size: 14px; }

  /* closing: a big moment, not a full empty screen */
  .closing { min-height: 86svh; padding: var(--s9) var(--gut) 120px; }
  .big-line { font-size: var(--t-big); }
  .c-flower { width: 42vw; left: -12vw; bottom: -4vh; }
  .c-tag { width: 22vw; right: 4vw; top: 8vh; }

  /* contact: the chat fits the visible screen, keyboard open or not */
  .contact { padding-top: var(--s8); padding-bottom: var(--s8); }
  .ct-box { margin-top: var(--s5); padding: var(--s3); }
  .ct-log:not(:empty) { max-height: max(140px, calc(100dvh - 270px)); overflow-y: auto; overscroll-behavior: contain; }
  .ct-form { min-height: 60px; padding: 6px 6px 6px var(--s4); scroll-margin-bottom: var(--s5); }
  .ct-form input { font-size: 16px; }   /* 16px or more: iOS does not zoom on focus */
  .ct-send { width: 48px; height: 48px; }
  .ct-note { font-size: var(--t-small); }
  .ct-note a { display: inline-block; padding: 12px 4px; margin: -12px 0; }

  /* the sticky "Make it yours" bar
     Shows once the hero has scrolled away, leaves when the closing line arrives (and stays gone over the contact
     box and the footer). Pure CSS: the hero and the closing are named view timelines, scoped to the page. */
  html { timeline-scope: --m-hero, --m-close; }
  .hero { view-timeline-name: --m-hero; }
  .closing { view-timeline-name: --m-close; }
  .mbar { display: flex; position: fixed; z-index: 28; left: var(--gut); right: var(--gut); bottom: calc(var(--s3) + env(safe-area-inset-bottom)); height: 58px; padding: 0 var(--s5); justify-content: center; gap: var(--s3); font-size: 18px; visibility: hidden; }
  .mbar .bal-t { display: flex; align-items: baseline; gap: var(--s3); }
  .mbar-p { font-size: var(--t-small); font-weight: 400; }
  /* flat and crisp like every CTA (chrome.css .bal); one quiet shadow lifts it off the content it floats over */
  .mbar, .mbar:hover, .mbar:focus-visible { box-shadow: 0 10px 24px -12px rgba(33, 33, 33, .45); }
  .mbar:hover .bal-t, .mbar:focus-visible .bal-t { transform: none; }
  @supports (animation-timeline: view()) {
    .mbar { visibility: visible; animation: mbar-in linear both, mbar-out linear both; animation-timeline: --m-hero, --m-close; animation-range: exit 70% exit 100%, entry 0% entry 25%; }
    .mbar:focus-visible { translate: 0 0 !important; }
  }
  /* browsers without scroll timelines: mobile.js toggles .is-shown with an IntersectionObserver */
  @supports not (animation-timeline: view()) {
    .mbar { translate: 0 calc(100% + 40px); transition: translate .5s var(--ease), visibility 0s .5s; }
    .mbar.is-shown { visibility: visible; translate: 0 0; transition: translate .5s var(--ease); }
  }
}
@keyframes mbar-in { from { translate: 0 calc(100% + 40px); } to { translate: 0 0; } }
@keyframes mbar-out { from { opacity: 1; transform: none; visibility: visible; } to { opacity: 0; transform: translateY(30%); visibility: hidden; } }

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  /* no scroll-linked movement: the bar switches on after the hero and off at the closing, without sliding */
  .mbar { animation-timing-function: steps(1, jump-end), steps(1, jump-start); }
  .mbar, .mbar.is-shown { transition: none; }
}
