/* ============================================================================
   FRAME — homepage experience
   Loaded by index.html only, after frame-theme.css (the shared blue/lavender
   theme that also styles the generator on all 13 generator pages). This file
   keeps only what is unique to the homepage: the centred marketing hero and
   its trust row, the animated viewfinder span, the GSAP hero/story/section
   hooks and the homepage lower-section system. Motion lives in
   home-experience.js (GSAP + ScrollTrigger).
   ========================================================================= */

#page-home{background:var(--hx-page);}
/* one cool page: older section fills give way to it */
#page-home .strip,#page-home .explainer,#page-home .qrtypes,#page-home .placement,
#page-home .compare,#page-home .faq,#page-home .health,#page-home .spotlight,#page-home .trust-strip{background:transparent!important;}
#page-home .templates{background:#EEF2FA!important;}

/* ================================================================ HERO */
#page-home #generator{padding-top:30px!important;padding-bottom:72px!important;}
/* pale lavender page with two soft ambient shapes, as in the approved mock */
/* the deeper tone GSAP fades in as the page turns from hero to tool */
#page-home .hx-backdrop{
  position:absolute;left:0;right:0;top:-58px;bottom:0;z-index:-1;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,#E8ECFB 0%,#EEF1FB 55%,var(--hx-page) 100%);
}
/* centred introduction: headline, one line of promise, the paragraph, trust */
#page-home #generator .hero-head{
  display:block!important;max-width:900px!important;margin:0 auto 30px!important;text-align:center!important;
}
#page-home #generator .hero-head > .eyebrow{justify-content:center;color:var(--hx-dim)!important;}
#page-home #generator .hero-head > .eyebrow::before{background:linear-gradient(90deg,var(--hx-blue-2),var(--hx-violet))!important;}
#page-home #generator .hero-head > h1{
  font-size:clamp(34px,8.4vw,44px)!important;line-height:1.04!important;letter-spacing:-.035em!important;
  font-weight:800!important;color:var(--hx-ink)!important;margin:14px auto 14px!important;text-wrap:balance;
}
/* "QR Code" in the headline carries the blue gradient */
#page-home #generator .hx-grad{
  background:linear-gradient(95deg,#2563EB 0%,#3B82F6 55%,#4F46E5 100%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:#2563EB;
}
#page-home #generator .hero-head > .hero-tagline{
  font-size:18px!important;font-weight:650!important;color:var(--hx-ink)!important;margin:0 auto 8px!important;line-height:1.35!important;
}
#page-home #generator .hero-head > .hero-tagline .accent{color:var(--hx-blue)!important;}
#page-home #generator .hero-head > p:not(.hero-tagline){
  font-size:15.5px!important;line-height:1.6!important;color:var(--hx-dim)!important;
  max-width:680px!important;margin:0 auto!important;text-wrap:pretty;
}
/* trust row: the three promises, coloured icons, hairline separated */
#page-home #generator .hero-badges{
  display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center;
  gap:10px 0!important;margin:20px 0 0!important;overflow:visible!important;padding:0!important;
}
#page-home #generator .hero-badge{
  background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;
  padding:0 24px!important;font-size:15px!important;font-weight:550!important;color:var(--hx-ink)!important;gap:10px!important;
}
#page-home #generator .hero-badge + .hero-badge{border-left:1px solid var(--hx-line-2)!important;}
#page-home #generator .hero-badge svg{width:24px;height:24px;color:var(--hx-blue);}
#page-home #generator .hero-badge svg *{stroke-width:2.2px;}
#page-home #generator .hero-badge:first-child svg{color:var(--hx-violet);}
@media (min-width:901px){
  #page-home #generator .hero-head > h1{font-size:clamp(44px,4.1vw,58px)!important;margin:12px auto 12px!important;}
  #page-home #generator .hero-head > .hero-tagline{font-size:20px!important;}
  #page-home #generator .hero-head > p:not(.hero-tagline){font-size:16px!important;}
}


/* ============================================================ RESULT STAGE */
/* viewfinder corners around the code, in blue */
#page-home .hx-corners{
  position:absolute;inset:-14px;pointer-events:none;z-index:3;
  --c:var(--hx-blue-2);--l:30px;--w:3.5px;
  background:
    linear-gradient(var(--c),var(--c)) top left/var(--l) var(--w) no-repeat,
    linear-gradient(var(--c),var(--c)) top left/var(--w) var(--l) no-repeat,
    linear-gradient(var(--c),var(--c)) top right/var(--l) var(--w) no-repeat,
    linear-gradient(var(--c),var(--c)) top right/var(--w) var(--l) no-repeat,
    linear-gradient(var(--c),var(--c)) bottom left/var(--l) var(--w) no-repeat,
    linear-gradient(var(--c),var(--c)) bottom left/var(--w) var(--l) no-repeat,
    linear-gradient(var(--c),var(--c)) bottom right/var(--l) var(--w) no-repeat,
    linear-gradient(var(--c),var(--c)) bottom right/var(--w) var(--l) no-repeat;
}
@media (max-width:900px){
  #page-home #generator .hero-head{margin-bottom:24px!important;}
  #page-home #generator .hero-head > .hero-tagline{font-size:17px!important;}
  #page-home #generator .hero-badges{margin-top:16px!important;row-gap:8px!important;column-gap:18px!important;}
  #page-home #generator .hero-badge{padding:0!important;font-size:13px!important;gap:7px!important;}
  #page-home #generator .hero-badge + .hero-badge{border-left:0!important;}
  #page-home #generator .hero-badge svg{width:17px;height:17px;}
  #page-home .hx-corners{inset:-10px;--l:24px;}
}

/* ================================================ SECTIONS + TRANSITIONS */
#page-home .strip-head h2,#page-home .howto h2{
  font-size:clamp(30px,3.5vw,48px)!important;line-height:1.08!important;letter-spacing:-.035em!important;text-wrap:balance;
}
/* dark hand-off: the navy story surface opens from an inset rounded panel to
   full width (GSAP tweens --hx-hand 0.9 -> 1) */
html.hx-gsap #page-home .howto{background:transparent!important;position:relative;isolation:isolate;}
html.hx-gsap #page-home .howto::before{
  content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:var(--ws-navy);transform-origin:50% 0;
  transform:scaleX(var(--hx-hand,1));
  border-radius:calc((1 - var(--hx-hand,1)) * 400px) calc((1 - var(--hx-hand,1)) * 400px) 0 0;
}
/* the navy story + differentiator sections: blue accents instead of orange */
#page-home .howto{color:#E5E9F5;}
#page-home .howto-eyebrow{color:#93B4FF!important;background:rgba(59,130,246,.14)!important;border-color:rgba(99,140,255,.38)!important;}
#page-home .howto-step-num,#page-home .howto-advantage h3{color:#93B4FF!important;}
#page-home .howto-head p,#page-home .howto-step-text p,#page-home .howto-advantage p{color:#B7C0D6!important;}
#page-home .howto-advantage{background:rgba(59,130,246,.07)!important;border-color:rgba(99,140,255,.28)!important;}
#page-home .diff-num{background:var(--hx-blue-2)!important;color:#fff!important;}
#page-home .diff-step-final{background:rgba(59,130,246,.14)!important;border-color:rgba(99,140,255,.4)!important;color:#93B4FF!important;}
/* story stage: text that sat on the orange motif now sits on blue */
#page-home .hs-label b,#page-home .hs-tab.is-on,#page-home .hs-caption,#page-home .hs-dl-on,#page-home .hs-ready-check{color:#fff!important;}
/* a blue rule that grows across the page into the next chapter */
#page-home .hx-rule{
  height:3px;border-radius:2px;margin:0 0 44px;transform-origin:0 50%;
  background:linear-gradient(90deg,var(--hx-blue-2) 0%,var(--hx-violet) 100%);
}
/* step markers: a short blue rule before "Step 0X" that GSAP draws in */
html.hx-gsap #page-home .howto-step-num::before{
  content:'';display:inline-block;vertical-align:middle;width:28px;height:2px;margin:-2px 12px 0 0;
  background:var(--hx-blue-2);border-radius:2px;transform-origin:0 50%;transform:scaleX(var(--hx-num,1));
}
/* the hero scrub starts the workspace slightly low; set it before first
   paint so GSAP's first frame matches (no jump on load) */
@media (min-width:1024px){
  html.hx-motion #page-home #generator .studio{transform:translateY(16px);}
  /* the toolbar line's scrub start (GSAP sets the same 0.18), so the deferred
     motion setup never redraws it on screen */
  html.hx-motion #page-home #generator{--hx-draw:.18;}
  html.hx-motion #page-home #generator .hx-corners{transform:scale(1.06);}
}
/* the hero scrub ends with the studio 20px higher (y:-20): the sticky result
   column sits that much lower so it never meets the header */
@media (min-width:1024px) and (prefers-reduced-motion:no-preference){
  html.hx-gsap #page-home #generator{--gx-sticky-extra:20px;}
}

/* story stage surfaces: the warm brown ink becomes the navy product stage */
#page-home .hs-stage{background:linear-gradient(180deg,#1E2640 0%,#151B2E 100%)!important;border-color:rgba(147,180,255,.16)!important;}
#page-home .hs-field{border-color:rgba(99,140,255,.5)!important;}
#page-home .hs-sw-grad{background:linear-gradient(135deg,#16181D,#3730A3)!important;}
#page-home .hs-sw-teal{background:#3B82F6!important;}
#page-home .hs-dl{border-color:rgba(99,140,255,.55)!important;}

/* ======================================== phones + small tablets (<= 768px)
   A tighter header and intro so the generator arrives much sooner. Copy is
   unchanged; only spacing, sizes and the trust row's wrapping move. */
@media (max-width:768px){
  #page-home #generator{padding-top:8px!important;}
  #page-home #generator .hero-head{margin-bottom:12px!important;}
  #page-home #generator .hero-head > .eyebrow{font-size:12.5px!important;padding:0!important;margin:0!important;line-height:1.4!important;min-height:0!important;}
  #page-home #generator .hero-head > h1{font-size:30px!important;line-height:1.02!important;letter-spacing:-.03em!important;margin:6px auto 6px!important;}
  #page-home #generator .hero-head > .hero-tagline{font-size:15.5px!important;margin:0 auto 4px!important;}
  #page-home #generator .hero-head > p:not(.hero-tagline){font-size:14px!important;line-height:1.48!important;}
  #page-home #generator .hero-badges{margin-top:10px!important;row-gap:4px!important;column-gap:14px!important;}
  #page-home #generator .hero-badge{font-size:12.5px!important;gap:5px!important;line-height:1.3!important;}
  #page-home #generator .hero-badge svg{width:15px;height:15px;}
}

/* ===================================== LOWER SECTIONS: one blue/lavender system
   Rhythm under the tool: navy story → white trust strip → lavender band
   (Real advantages) → white → lavender → navy differentiator → white …
   Labels carry a short blue → violet marker; cards are quiet white surfaces
   with cool hairlines; one entrance per section, driven by GSAP through
   --hx-o / --hx-y (unset = fully visible, which is what reduced motion gets). */
#page-home #why-frame{background:linear-gradient(180deg,#EEF1FC 0%,#F5F7FD 60%,var(--hx-page) 100%)!important;}
#page-home .templates{background:#fff!important;}
#page-home .explainer{background:#F3F5FD!important;}
#page-home .qrtypes,#page-home .spotlight,#page-home .health,#page-home .faq{background:#fff!important;}
#page-home .placement,#page-home .compare{background:#F3F5FD!important;}
html #page-home section .eyebrow{color:var(--hx-blue-ink)!important;display:inline-flex!important;align-items:center;gap:10px;}
html #page-home section .eyebrow::before{
  content:''!important;display:block!important;width:22px;height:2px;border-radius:2px;flex:0 0 22px;
  background:linear-gradient(90deg,var(--hx-blue-2),var(--hx-violet));transform-origin:0 50%;transform:scaleX(var(--hx-mk,1));
}
html #page-home .howto .howto-eyebrow::before{display:none!important;}
html #page-home .strip-sub,html #page-home .strip-head p{color:var(--hx-dim)!important;}
/* Real advantages: translucent white cards, blue/violet icon tile, a
   restrained lift and a soft accent line on hover */
html #page-home #why-frame .card{
  position:relative;background:rgba(255,255,255,.78)!important;border:1px solid var(--hx-line)!important;border-radius:18px!important;
  padding:24px 22px 22px!important;box-shadow:0 1px 2px rgba(15,23,42,.04),0 10px 30px -24px rgba(30,41,82,.25)!important;
  translate:0 calc(var(--hx-y,0px) + var(--hx-lift,0px))!important;
  transition:box-shadow .22s ease,border-color .22s ease,translate .22s ease;overflow:hidden;
}
html #page-home #why-frame .card::after{
  content:'';position:absolute;left:22px;right:22px;top:0;height:2px;border-radius:0 0 2px 2px;
  background:linear-gradient(90deg,var(--hx-blue-2),var(--hx-violet));transform:scaleX(0);transform-origin:0 50%;
  transition:transform .35s cubic-bezier(.2,.8,.2,1);
}
html #page-home #why-frame .card:hover{--hx-lift:-3px;border-color:#C2CFE6!important;box-shadow:0 2px 4px rgba(15,23,42,.04),0 18px 36px -22px rgba(30,41,82,.4)!important;}
html #page-home #why-frame .card:hover::after{transform:scaleX(1);}
html #page-home #why-frame .card-icon,html #page-home .qrtype-ico,html #page-home .placement-ico{
  width:42px!important;height:42px!important;border-radius:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  background:linear-gradient(135deg,rgba(59,130,246,.13),rgba(124,58,237,.13))!important;color:var(--hx-blue)!important;margin-bottom:14px!important;
}
html #page-home #why-frame .card h3{color:var(--hx-ink)!important;}
html #page-home #why-frame .card p{color:var(--hx-dim)!important;}
/* every other homepage card: same family, quieter */
html #page-home .qrtype-card,html #page-home .placement-card,html #page-home .template-card,html #page-home .explainer-item,
html #page-home .placement-tips,html #page-home .health-drop,html #page-home .demo-card{
  border:1px solid var(--hx-line)!important;border-radius:16px!important;background:#fff!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
html #page-home .qrtype-card:hover,html #page-home .placement-card:hover,html #page-home .template-card:hover{border-color:#C2CFE6!important;box-shadow:0 12px 26px -18px rgba(30,41,82,.35)!important;}
html #page-home .faq-q .plus{color:var(--hx-dim)!important;background:none!important;border-color:var(--hx-line)!important;}
html #page-home .faq-item.open .faq-q .plus{color:var(--hx-blue)!important;}
html #page-home .faq-q:hover{color:var(--hx-blue-ink)!important;}
html #page-home .checker-link,html #page-home .explainer-item a{color:var(--hx-blue-ink)!important;}
html #page-home .data-table th{background:#F2F5FC!important;color:var(--hx-ink-2)!important;}
/* GSAP-driven entrance: elements tagged .hx-grp read these variables */
html #page-home .hx-grp{opacity:var(--hx-o,1)!important;translate:0 var(--hx-y,0px)!important;}
@media (prefers-reduced-motion:reduce){
  html #page-home .hx-grp{opacity:1!important;translate:none!important;}
  html #page-home #why-frame .card,html #page-home #why-frame .card::after{transition:none!important;}
  html #page-home #why-frame .card:hover{--hx-lift:0px;}
}

/* The hero scrub draws the toolbar line through --hx-draw (0.18 → 1). It
   used to tween --hx-line, which is also the shared border colour token:
   inside #generator that turned every `border:1px solid var(--hx-line)`
   invalid, so the homepage's tiles, rows and colour controls lost the
   outline the dedicated pages show. */
#page-home #generator#generator .type-toolbar::after{transform:scaleX(var(--hx-draw,1))!important;}
#page-home #generator#generator .studio.qr-empty .type-toolbar::after{transform:scaleX(calc(var(--hx-draw,1) * .4))!important;}

/* The desktop scroll deconstruction of the generator (Phase 10) now lives in
   the shared generator-scroll-motion.css/.js, used by all 13 generator pages. */
