/* TEMP-LANDING mobile layer (2026-09-27) — the ONLY mobile-specific styling for
   the cloned landing. Kept in its own file so mobile is trivially revertable:
   delete the <link> in TempLanding.tsx and mobile renders exactly like the
   untouched clone. Desktop (>=768px) is unaffected by everything in here.

   The one mobile defect this fixes: the hero mockup window is a fixed 700px
   (their live iframe needed a fixed height; ours is an image). On desktop the
   reader-brief webp is taller than the window and crops cleanly — on mobile it
   rendered 340x278 with 422px of empty card below it. Mobile gets the
   MOBILE-form-factor brief capture (reader-brief-mobile@2x.png, a phone-shaped
   Reader screenshot) at natural aspect, with the window sized to hug it:
   a complete, uncropped product preview in a card that fits it exactly. */

@media (max-width: 768px) {
  /* 1. swap the mockup content: desktop brief -> mobile brief (CSS content-swap;
           the src attribute is untouched, so desktop rules never see this). */
  .temp-landing-root img[src*="reader-brief@2x.optimized"] {
    content: url("../landing/reader-brief-mobile@2x.webp");
  }

  /* 2. let the image take its natural aspect (860x1068 -> 340x422 at card width) */
  .temp-landing-root img[src*="reader-brief"] {
    height: auto;
  }

  /* 3. the mockup window hugs the image instead of staying a fixed 700px */
  .temp-landing-root .hero-mockup-window {
    height: auto;
  }

  /* 4. Intelligent Summaries paragraph (Ryan 2026-09-27): narrow from the
        right by ~7 characters — ~27 chars/line down to ~20 — so the copy
        wraps taller and sits further from the condensing mock. Mobile only;
        desktop keeps the masterpiece's max-w-sm. */
  #features .md\:col-span-2:first-child p {
    max-width: 193px;
  }

  /* 5. Your Schedule card: content-height on mobile leaves justify-between
        nothing to distribute — paragraph sat flush against the 08:00 row
        (measured 0px). Give the row the card's own rhythm (24px = their mb-6).
        Desktop spaces it via the fixed 350px row, untouched. */
  #features .bg-brand-dark .rounded-xl.bg-gray-800 {
    margin-top: 24px;
  }

  /* 6. Use-cases persona rows: the 40px icon tiles have no shrink-0, so on
        narrow widths flex compressed them to 26px (desktop: 40px, never
        squeezed). Lock them at their intended square. */
  a.w-full .flex.items-center .w-10.h-10.rounded-lg {
    flex-shrink: 0;
  }

  /* 7. Reviews: four on mobile (Ryan 2026-09-27) — drop testimonial card 1
        and card 5, the two weakest; desktop keeps all six. (Attributions are
        pseudonymous — real feedback, names changed for customer privacy.) */
  section .grid.lg\:grid-cols-3 > div:nth-child(1),
  section .grid.lg\:grid-cols-3 > div:nth-child(5) {
    display: none;
  }

  /* 8. Footer: drop the DailyTube Alternatives link soup on mobile — it is
        SEO real estate, not thumb-scroll content; the section shrinks the
        footer to its essentials. Desktop keeps it. */
  footer .border-t.pt-8.mb-12 {
    display: none;
  }

  /* 9. Scroll-in card effects (Ryan 2026-09-27): the desktop HOVER effects,
        fired by scroll instead — mobile has no hover, so the five feature
        cards play their effect once as they arrive mid-viewport. The
        controller (TempLanding.tsx) adds .in-view when a card enters the
        middle of the view and removes it when the card rises past the top
        ~12% — reversible, re-firing at the same mid-view point on the way
        back down. End states below replicate each hover's target with the
        elements' own transition classes doing the animation. Desktop
        untouched: no .in-view is ever added >=768px and these rules are
        mobile-gated.

        1. Intelligent Summaries — the condensing bars slide in (48px -> 16px,
           their translate-x-12 -> group-hover:translate-x-4). */
  #features .md\:col-span-2:first-child.in-view .absolute.right-0 {
    transform: translateX(16px);
  }

  /* 2. Connect Anything — the icon grid brightens to full. */
  #features [class*="F6F5F0"].in-view .grid.grid-cols-4 {
    opacity: 1;
  }

  /* 3. Your Schedule — the toggle flips ON (emerald track, knob slides
        right, their own 300ms transitions) and the clock rings once. */
  #features .bg-brand-dark.in-view .rounded-xl .w-10.h-5 {
    background-color: #34d399;
  }
  #features .bg-brand-dark.in-view .rounded-xl .w-4.h-4 {
    left: calc(100% - 18px);
  }
  #features .bg-brand-dark.in-view .ri-time-line {
    animation: alarm-ring 0.6s ease-in-out;
  }

  /* 4. Your Daily Digest — the three inbox rows nudge in, their staggered
        300/500/700ms transitions already on the rows. */
  #features a[class*="col-span-2"].in-view .group-hover\:translate-x-1 {
    transform: translateX(4px);
  }

  /* 5. Use-cases mock — the tilted Dev Digest straightens to level. */
  .rotate-3.in-view {
    transform: rotate(0deg);
  }

  /* 6. Hero CTA (Ryan 2026-09-30): the "Build your digest" button lifts +
        darkens and its arrow nudges — on scroll, like the cards above. The
        declarations mirror the compiled hover rules exactly (var flips +
        the composite transform) so the elements' own transitions animate. */
  main a.group[href$="/summarize"].in-view {
    --tw-translate-y: -0.25rem;
    --tw-bg-opacity: 1;
    background-color: rgb(31 41 55 / var(--tw-bg-opacity, 1));
    transform: translate(var(--tw-translate-x), var(--tw-translate-y))
      rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
      scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  }
  main a.group[href$="/summarize"].in-view .group-hover\:translate-x-1 {
    --tw-translate-x: 0.25rem;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y))
      rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
      scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  }

  /* 7. Logo strip: the scrolling marquee colorizes (grayscale -> full color)
        when it enters the band. Opacity stays at its base 50 — hover never
        lifted it either. */
  .animate-scroll.in-view {
    --tw-grayscale: grayscale(0);
    filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast)
      var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert)
      var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
  }

  /* 8. Use-case persona rows: the trailing arrow fades in. */
  .group\/card.in-view .group-hover\/card\:opacity-100 {
    opacity: 1;
  }
}

/* 10. TOUCH NEVER FIRES THE HOVER EFFECTS (Ryan, 2026-09-30): on a touch
       screen a tap applies :hover and it STICKS until the next tap elsewhere
       — the effects must be scroll-owned only. These neutralizers put every
       tap-sticky hover state back to its base value on (hover: none) devices;
       the .in-view rules above remain the only mobile activation path.
       Desktop (hover-capable) is untouched. */
@media (hover: none) {
  .hover\:-translate-y-1:hover {
    --tw-translate-y: 0;
  }
  .group:hover .group-hover\:translate-x-1,
  .group:hover .group-hover\:translate-x-4 {
    --tw-translate-x: 0;
  }
  .hover\:bg-gray-800:hover {
    background-color: rgb(18 18 18 / var(--tw-bg-opacity, 1));
  }
  .hover\:grayscale-0:hover {
    --tw-grayscale: grayscale(100%);
  }
  .group:hover .group-hover\:opacity-100 {
    opacity: 0.6; /* the 4-icon grid's base opacity-60 */
  }
  .group\/card:hover .group-hover\/card\:opacity-100 {
    opacity: 0; /* the persona arrow's base opacity-0 */
  }
  .group:hover .group-hover\:bg-brand-yellow {
    background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)); /* gray-600 base */
  }
  .group:hover .group-hover\:animate-\[alarm-ring_0\.6s_ease-in-out\] {
    animation: none;
  }
  .group:hover .group-hover\:left-\[calc\(100\%-18px\)\] {
    left: 0.125rem; /* the toggle knob's base left-0.5 */
  }
}

/* ── Mobile nav drawer (2026-09-27, Ryan): tapping the hamburger slides a
   drawer in from the RIGHT carrying the desktop nav options. Replaces the
   clone's inherited dropdown, which was dead on arrival (their button never
   carried aria-controls, so the toggle script no-opped — verified before
   replacing). Controlled by MENU_TOGGLE in TempLanding.tsx: .open on
   #mobile-menu, backdrop/X/Esc/link taps close it, body scroll locks while
   open. The container is md:hidden, so >=768px none of this exists. */

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}
.mm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.4);
  opacity: 0;
  transition: opacity 0.24s ease;
}
/* The drawer as a FLOATING FROSTED CARD — same DNA as the desktop glass pill
   (translucent white + backdrop-blur + hairline border), but inset from the
   screen edges on all sides so it floats over the dim like the pill floats
   over the page. saturate() makes the cream/hero colors glow through the frost. */
.mm-panel {
  position: absolute;
  top: 12px;
  right: 6px;
  bottom: 12px;
  width: 316px;
  max-width: calc(100vw - 16px);
  /* Leading-edge float: the LEFT corners carry the curve (the edge you see,
     catching the shadow), the right side leans toward the screen edge with a
     whisper of radius — the drawer reads as a sheet hovering over the page,
     not a box bolted to the frame. */
  border-radius: 24px 7px 7px 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    -18px 0 48px rgba(18, 18, 18, 0.2),
    0 0 0 1px rgba(18, 18, 18, 0.04);
  transform: translateX(calc(100% + 26px));
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 22px 24px 26px;
}
/* Staggered entrance: on open, contents settle in one after another. On close
   the animation is simply gone (links sit at their base visible state) and the
   panel's slide-out carries them away — no janky reverse stagger needed. */
@keyframes mm-settle {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
#mobile-menu.open .mm-head {
  animation: mm-settle 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
#mobile-menu.open .mm-link {
  animation: mm-settle 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#mobile-menu.open .mm-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mm-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mm-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mm-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.open .mm-foot {
  animation: mm-settle 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}
#mobile-menu.open {
  pointer-events: auto;
}
#mobile-menu.open .mm-backdrop {
  opacity: 1;
}
#mobile-menu.open .mm-panel {
  transform: translateX(0);
}
.mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.mm-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121212;
  background: none;
  border: none;
  cursor: pointer;
}
.mm-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mm-link {
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
}
.mm-link:hover {
  color: #000;
  background: #f9fafb;
}
.mm-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #f3f4f6;
}
.mm-signin {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  padding: 8px;
}

/* ── The burger is the Apple-style SMIL morph: two <polyline> "breads"
   whose points animate to a shared midpoint then split into the X diagonals
   (see the <animate> elements in TempLanding.tsx; 0.24s, spline-keyed). This
   wrapper only centers the 19px svg in the 40px tap target.
   MEDIA-GATED (fixed 2026-09-27): ungated, its display:flex loaded after
   main.css and out-cascaded the button's md:hidden — the burger was visible
   on DESKTOP on both temp pages since the drawer shipped. */
@media (max-width: 768px) {
  .mm-bars-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}


/* ── When the drawer owns the stage, the floating pill dissolves upward and
   lets go (opacity + pointer-events + a small rise, preserving the nav's
   -translate-x-1/2 centering inside the transform). body.mm-open is set by
   the drawer controller. */
@media (max-width: 768px) {
  body.temp-landing nav[aria-label="Main navigation"] {
    transition:
      opacity 0.26s ease,
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.temp-landing.mm-open nav[aria-label="Main navigation"] {
    opacity: 0;
    transform: translate(-50%, -14px);
    pointer-events: none;
  }
}


