/* franchise.samsgrill.ca · motion & interaction layer (v2)
   Sits on top of styles.css. Every effect is opt-out under prefers-reduced-motion. */

:root {
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur: .5s;
  --lift: 0 14px 34px rgba(15, 17, 21, .14);
  --lift-dark: 0 14px 34px rgba(0, 0, 0, .45);
}


/* safe centering: a page taller than the viewport starts at the top instead of overflowing above it */
.stage > section.on:not(.bleed):not(.form) { align-items: flex-start; }
.stage > section.on:not(.bleed):not(.form) > .wrap { margin-block: auto; }

/* ---------- page entrance: children stagger in ---------- */
.stage > section.on { animation: none; }
.stage > section.on [data-r] { opacity: 0; transform: translateY(18px); }
.stage > section.on.is-in [data-r] { animation: rise var(--dur) var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 14) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.stage > section.on.is-in .bleed-copy [data-r] { animation-delay: calc(120ms + var(--i, 0) * 90ms); }

/* headline words on the cover */
.xl .w { display: inline-block; opacity: 0; transform: translateY(.35em) rotate(1.5deg); transform-origin: left bottom; }
.is-in .xl .w { animation: word .7s var(--ease-out) both; animation-delay: calc(200ms + var(--wi, 0) * 60ms); }
@keyframes word { to { opacity: 1; transform: none; } }

/* cover parallax layers */
.bleed .bg { will-change: transform; transition: transform .25s ease-out; transform: scale(1.06) translate(var(--px, 0), var(--py, 0)); animation: none; }
.bleed .badge-float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.scroll-hint { position: absolute; right: 36px; bottom: 28px; z-index: 2; display: flex; align-items: center; gap: 10px; color: #c4c8ce; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.scroll-hint i { width: 36px; height: 1px; background: #ff0000; display: block; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-6px); opacity: .3; } 50% { opacity: 1; } 100% { transform: translateX(6px); opacity: .3; } }
@media (max-width: 820px) { .scroll-hint { display: none; } }

/* ---------- buttons ---------- */
.btn, .railbtn, .pill, .dot, .tocitem, .proof-r { transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background-color .18s, border-color .18s, color .18s; }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease-out); pointer-events: none; }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 0, 0, .28); }
.btn-ghost:hover, .btn-ghost-d:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:focus-visible, .railbtn:focus-visible, .pill:focus-visible, .dot:focus-visible, .proof-r:focus-visible, .chip:focus-visible, .usp > div:focus-visible, .gallery figure:focus-visible, .ways .card:focus-visible { outline: 2px solid #ff0000; outline-offset: 3px; }
.railbtn:hover { transform: translateY(-1px); }
.railbtn-red:hover { box-shadow: 0 8px 20px rgba(255, 0, 0, .3); }
.dot { position: relative; }
.dot:hover { transform: scale(1.6); background: #c4c8ce; }
.dot-on:hover { background: #ff0000; }
.dot::after { content: attr(data-title); position: absolute; bottom: 18px; left: 50%; transform: translate(-50%, 6px); background: #fff; color: #171a21; font: 500 12px/1.2 Roboto, system-ui, sans-serif; letter-spacing: 0; padding: 7px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease-out); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.dot:hover::after, .dot:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.prog-line { box-shadow: 0 0 12px rgba(255, 0, 0, .7); }

/* ---------- cards: concept chips, USP, ways, steps ---------- */
.chip, .usp > div, .ways .card, .steps5 .card, .seven-list li, .proof-q div, .facts tr { transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s, background-color .22s; }
.chip { cursor: pointer; position: relative; }
.chip:hover, .usp > div:hover, .ways .card:hover, .steps5 .card:hover { transform: translateY(-4px); box-shadow: var(--lift); border-color: #ff0000; }
.usp > div:hover { box-shadow: var(--lift-dark); }
.usp > div { cursor: pointer; position: relative; }
.usp i { transition: color .2s, text-shadow .2s, transform .25s var(--ease-spring); display: inline-block; }
.usp > div:hover i { text-shadow: 0 0 18px rgba(255, 0, 0, .7); transform: scale(1.08); }
.seven-list li:hover { background: #fff; box-shadow: var(--lift); transform: translateX(4px); }
.seven-list .k, .step .k { transition: transform .25s var(--ease-spring), box-shadow .25s; }
.seven-list li:hover .k, .steps5 .card:hover .k { transform: scale(1.12); box-shadow: 0 6px 16px rgba(255, 0, 0, .35); }
.facts tbody tr:hover, .facts tr:hover { background: #2b303a; }
.facts td { transition: color .2s; } .facts tr:hover td { color: #ff6b6b; }

/* expandable detail (chips, USP, steps, journey) */
.more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease-out), margin .35s var(--ease-out); margin-top: 0; }
.more > div { overflow: hidden; }
.more > div p { margin: 0; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.08); font-size: 13px; line-height: 1.5; color: #5c6066; }
.usp .more > div p { border-top-color: #2b303a; color: #c4c8ce; }
.is-open .more { grid-template-rows: 1fr; margin-top: 6px; }
.x-ind { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 999px; border: 1.5px solid #c4c8ce; display: grid; place-items: center; font-size: 15px; line-height: 1; color: #5c6066; transition: transform .3s var(--ease-spring), border-color .2s, color .2s, background-color .2s; }
.usp > div .x-ind, .usp > div span.x-ind { border-color: #2b303a; color: #c4c8ce; font-size: 15px; line-height: 1; }
.is-open .x-ind, .usp > div.is-open span.x-ind, .chip.is-open span.x-ind { transform: rotate(45deg); background: #ff0000; border-color: #ff0000; color: #fff; }
.chip:hover .x-ind, .usp > div:hover .x-ind { border-color: #ff0000; color: #ff0000; }
.usp > div.is-open { border-color: #ff0000; }
.chip.is-open { border-color: #ff0000; }

/* ---------- galleries + lightbox ---------- */
.gallery figure, .fig { position: relative; cursor: zoom-in; }
.gallery img, .fig img { transition: transform .6s var(--ease-out), filter .4s; }
.gallery figure:hover img, .fig:hover img { transform: scale(1.06); }
.gallery figcaption { position: relative; transition: color .2s; }
.gallery figcaption::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 2px; background: #ff0000; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.gallery figure:hover figcaption::before { transform: scaleX(1); }
.gallery figure:hover { box-shadow: var(--lift); transform: translateY(-3px); border-color: #ff0000; }
.gallery figure { transition: transform .22s var(--ease-out), box-shadow .22s, border-color .22s; }
.gallery figure::after, .fig::after { content: "⤢"; position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; background: rgba(15,17,21,.75); color: #fff; display: grid; place-items: center; font-size: 15px; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease-out); pointer-events: none; }
.gallery figure:hover::after, .fig:hover::after { opacity: 1; transform: none; }
.fig figcaption { pointer-events: none; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(15, 17, 21, .92); display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lb.on { opacity: 1; pointer-events: auto; }
.lb figure { margin: 0; max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 12px; transform: scale(.96); transition: transform .3s var(--ease-out); }
.lb.on figure { transform: none; }
.lb img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb figcaption { color: #f5f5f5; font-size: 15px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.lb figcaption small { color: #c4c8ce; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.lb .lb-x { position: absolute; top: 18px; right: 18px; }
.lb .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); min-width: 48px; padding: 0; font-size: 22px; }
.lb .lb-prev { left: 18px; } .lb .lb-next { right: 18px; }
@media (max-width: 820px) { .lb .lb-nav { display: none; } }

/* ---------- fast facts count-up ---------- */
.giant { font-variant-numeric: tabular-nums; }
.facts tr { opacity: 1; }
.is-in .facts tr { animation: rise .5s var(--ease-out) both; animation-delay: calc(200ms + var(--i, 0) * 60ms); }

/* ---------- next steps / journey connectors ---------- */
.seven-list { position: relative; }
.seven-list:not(.journey)::before { content: ""; position: absolute; left: 31px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(#ff0000, #ff0000) no-repeat; background-size: 100% var(--line, 0%); transition: background-size 1.2s var(--ease-out); z-index: 0; }
.is-in .seven-list:not(.journey)::before { --line: 100%; }
.seven-list li { position: relative; z-index: 1; cursor: default; }
.journey li { cursor: pointer; }
.journey li .more > div p { border-top: 0; padding-top: 6px; }

/* ways: pick your path */
.ways .card { cursor: pointer; position: relative; }
.ways .card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #ff0000; border-radius: 10px 10px 0 0; transform: scaleX(0); transition: transform .3s var(--ease-out); }
.ways .card:hover::before, .ways .card.is-pick::before { transform: scaleX(1); }
.ways .card.is-pick { border-color: #ff0000; box-shadow: var(--lift); }
.pick-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 46px; }
.pick-cta p { margin: 0; font-size: 15px; }
.pick-cta[hidden] { display: none; }

/* ---------- ratings & quotes ---------- */
.proof-r:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.proof-r .n { transition: transform .25s var(--ease-spring); display: inline-block; }
.proof-r:hover .n { transform: scale(1.1); }
.proof-q div:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); border-color: rgba(255,255,255,.35); }

/* ---------- form ---------- */
.in { transition: border-color .18s, box-shadow .18s, transform .18s; }
.in:focus { outline: none; border-color: #ff0000; box-shadow: 0 0 0 4px rgba(255, 0, 0, .14); }
.in:not(:placeholder-shown):valid { border-color: #c4c8ce; }
.field { transition: opacity .25s; }
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(.96); }
.pill[aria-pressed="true"] { animation: pop .3s var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: none; } }
[data-when] { animation: rise .35s var(--ease-out) both; }
fieldset[data-step] { animation: rise .4s var(--ease-out) both; }
#stepDots .dot { transition: background-color .3s, width .3s; }
.step-names { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #5c6066; margin-top: 6px; }
.step-names span { padding: 3px 8px; border-radius: 999px; border: 1px solid #e5e5e5; transition: all .25s; }
.step-names span.done { border-color: #ff0000; color: #c40000; background: #ffe9e4; }
.step-names span.now { background: #171a21; color: #fff; border-color: #171a21; }
@media (max-width: 820px) { .step-names { display: none; } }

/* received: check mark draws */
.check { width: 72px; height: 72px; }
.check circle { fill: none; stroke: #ff0000; stroke-width: 3; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .8s var(--ease-out) forwards; }
.check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* keyboard hint toast */
.kb-hint { position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 10px); background: #fff; color: #171a21; border-radius: 999px; padding: 8px 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 60; opacity: 0; transition: opacity .3s, transform .3s var(--ease-out); pointer-events: none; display: flex; gap: 8px; align-items: center; }
.kb-hint.on { opacity: 1; transform: translate(-50%, 0); }
.kb-hint kbd { font: 500 12px/1 Roboto, system-ui, sans-serif; border: 1px solid #c4c8ce; border-radius: 5px; padding: 3px 6px; background: #f5f5f5; }
@media (max-width: 820px) { .kb-hint { display: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage > section.on [data-r], .xl .w { opacity: 1 !important; transform: none !important; }
  .seven-list:not(.journey)::before { --line: 100%; }
  .bleed .bg { transform: none; }
}

/* ---------- straight answers ---------- */
.usp.faq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.usp.faq > div { cursor: default; }
.usp.faq i { font-size: 22px; color: #ff0000; }
.usp.faq strong { font-size: 16px; line-height: 1.3; }
.usp.faq span { font-size: 13.5px; line-height: 1.5; }
.usp.faq > div:hover { transform: translateY(-3px); border-color: #ff0000; }
@media (max-width: 1100px) { .usp.faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .usp.faq { grid-template-columns: 1fr; } }

/* ---------- tabs ---------- */
.tab { transition: transform .18s var(--ease-out), background-color .18s, border-color .18s, color .18s, box-shadow .18s; }
.tab:hover { transform: translateY(-1px); border-color: #ff0000; color: #ff0000; }
.tab[aria-selected="true"]:hover { color: #fff; box-shadow: 0 8px 20px rgba(255,0,0,.28); }
.tab:focus-visible { outline: 2px solid #ff0000; outline-offset: 3px; }
.panel.pop-in { animation: rise .4s var(--ease-out) both; }
.stage > section.on.is-in .panel.pop-in [data-r] { animation: rise .4s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 45ms); }

/* ---------- lead-designer pass ---------- */
/* headings on content pages: room for the content above the fold */
.head .h, .txt .h { font-size: clamp(34px, 3.6vw, 50px); }
.head .lead, .txt .lead { font-size: 15.5px; }
.col { gap: 22px; }
/* more-below indicator */
.more-below { position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); margin: 0; transform: translate(-50%, 8px); width: max-content; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 14px; border-radius: 999px; background: #171a21; color: #f5f5f5; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 10px 26px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease-out); pointer-events: none; z-index: 5; cursor: pointer; }
.more-below.on { opacity: .92; transform: translate(-50%, 0); pointer-events: auto; }
.more-below i { font-style: normal; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* keyboard hint: out of the content's way */
.kb-hint { left: 24px; transform: translate(0, 10px); bottom: calc(72px + env(safe-area-inset-bottom, 0px)); font-size: 12px; }
.kb-hint.on { transform: none; }
/* FAQ cards on a light page */
.paper .usp.faq > div { background: #171a21; border-color: #171a21; }
.paper .usp.faq > div:hover { box-shadow: var(--lift); }
/* "Why Sam's Grill" cards: white tiles on the dark page */
.ink .usp:not(.faq) > div { background: #fff; border-color: #fff; }
.ink .usp:not(.faq) strong { color: #ff0000; }
.ink .usp:not(.faq) span, .ink .usp:not(.faq) .more > div p { color: #5c6066; }
.ink .usp:not(.faq) .more > div p { border-top-color: rgba(0,0,0,.08); }
.ink .usp:not(.faq) > div .x-ind { border-color: #c4c8ce; color: #5c6066; }
.ink .usp:not(.faq) > div:hover .x-ind { border-color: #ff0000; color: #ff0000; }
.ink .usp:not(.faq) > div.is-open span.x-ind { background: #ff0000; border-color: #ff0000; color: #fff; }
.ink .usp:not(.faq) > div.is-open { border-color: #ff0000; }
/* "Fast facts" table: white card on the dark page */
.ink .facts { background: #fff; color: #171a21; }
.ink .facts th, .ink .facts td { border-bottom-color: #e5e5e5; }
.ink .facts th { color: #5c6066; }
.ink .facts td small, .ink .facts tr.note td { color: #5c6066; }
.ink .facts tr:hover { background: #f5f5f5; }
.ink .facts tr:hover td { color: #ff0000; }
.ink .facts tr.note:hover { background: transparent; }
.ink .facts tr.note:hover td { color: #5c6066; }
/* lightbox close always reachable on phones */
@media (max-width: 820px) { .lb .lb-x { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; min-height: 40px; padding: 6px 12px; font-size: 14px; } .lb img { max-height: calc(100vh - 160px); } }

@media (max-width: 820px) { .grid4.three { grid-template-columns: 1fr !important; } .more-below { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); font-size: 11px; } }
/* "Is this for you?" ownership cards: red headings */
.ways .card strong { color: #ff0000; }

/* ---- Cover lead card (2026-10-27): the short "talk to the franchise team" form.
   It creates a lead only; the full application stays a separate, later step.
   Desktop: pitch left, card right. Phones: pitch, then the card is the next swipe. */
.cover-lead { align-items: stretch; }
.cover-lead .copy.cover-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.cover-pitch { display: flex; flex-direction: column; gap: 18px; }
.cover-lead .xl { font-size: clamp(54px, 5.4vw, 88px); }
.cover-badge { width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.lead-jump { display: none; }
.lead-card { background: #f5f5f5; color: #171a21; border-radius: 16px; padding: 24px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.4); scroll-margin-top: 12px; }
.lead-card form, .lead-done { display: flex; flex-direction: column; gap: 13px; }
.lead-h { margin: 0; font-size: 36px; line-height: .95; color: #171a21; }
.lead-hint { margin: -6px 0 0; font-size: 14px; }
.lead-card .f2 { gap: 12px; }
.lead-card .in { font-size: 16px; min-height: 46px; } /* 16px stops iOS zooming into the field */
.lead-card .flabel { font-size: 13px; font-weight: 500; }
.lead-card .pills { gap: 6px; }
.lead-card .pill { min-height: 44px; padding: 8px 13px; }
.lead-send { min-height: 52px; font-size: 20px; width: 100%; }
.lead-card .field { gap: 5px; }
.lead-alt { margin: 0; text-align: center; font-size: 13px; }
.lead-alt a, .linkbtn { color: #c40000; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.lead-done p { margin: 0; line-height: 1.5; }
.lead-done-row { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 1000px) {
  .cover-lead .copy.cover-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 820px) {
  .cover-lead .copy.cover-grid { padding: 40px 16px 24px; }
  .cover-lead .xl { font-size: 46px; }
  .lead-card .in { min-height: 48px; }
  .cover-badge { width: 84px; height: 84px; }
  .lead-jump { display: inline-flex; }
  .cover-pitch .row { flex-direction: column; align-items: stretch; }
  .lead-card { padding: 22px 18px; border-radius: 14px; }
  .lead-h { font-size: 34px; }
  .lead-card .f2 { grid-template-columns: 1fr; }
  .lead-done-row .btn { width: 100%; }
}
