/* Shared motion layer for /websites and /counter-systems.
   Everything here only switches on once motion.js has added html.motion,
   so without JS (or with reduced motion) the pages render fully static. */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- header: hides on scroll down, returns on scroll up ---------- */
.bar { transition: transform .45s cubic-bezier(.2,.7,.1,1); }
html.motion .bar.away { transform: translateY(-110%); }

/* ---------- hero title: words / characters rise out of a mask ---------- */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom;
  padding-bottom: .1em; margin-bottom: -.1em; }
.hero h1 .w > span { display: inline-block; }
html.motion .hero h1.play .w > span {
  transform: translateY(115%);
  animation: mo-rise 1s cubic-bezier(.2,.7,.1,1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 80ms);
}
@keyframes mo-rise { to { transform: none; } }
html.motion .hero .lede, html.motion .hero .chips, html.motion .hero .facts, html.motion .hero .eyebrow {
  animation: mo-fade .9s cubic-bezier(.2,.7,.1,1) both;
}
html.motion .hero .eyebrow { animation-delay: 0s; }
html.motion .hero .lede { animation-delay: .45s; }
html.motion .hero .chips, html.motion .hero .facts { animation-delay: .6s; }
@keyframes mo-fade { from { opacity: 0; transform: translateY(16px); } }

/* ---------- hero layout with a live illustration on the right ---------- */
.hero .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero .hero-copy { max-width: 660px; }
@media (min-width: 920px) {
  .hero .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; }
}
.hero-visual { position: relative; display: flex; justify-content: center; }
html.motion .hero-visual { animation: mo-fade 1.1s .35s cubic-bezier(.2,.7,.1,1) both; }

/* ---------- floating round CTA that sways like hanging signage ---------- */
.float-cta {
  position: absolute; z-index: 3; top: -18px; right: -6px;
  width: 104px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; text-align: center; text-decoration: none;
  background: var(--copper); color: var(--panel);
  font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.1;
  box-shadow: 0 18px 36px -18px rgba(0,0,0,.45);
  transform-origin: 50% 0;
}
.float-cta small { display: block; font-family: var(--mono); font-weight: 400; font-size: 9.5px;
  letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 4px; }
html.motion .float-cta { animation: mo-sway 7s ease-in-out infinite; }
.float-cta:hover { background: var(--pine); }
@keyframes mo-sway { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }

/* ---------- scroll reveals (re-fire both directions, like the Tico site) ---------- */
html.motion .reveal { opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.1,1), transform .8s cubic-bezier(.2,.7,.1,1);
  transition-delay: calc(var(--d, 0) * 70ms); }
html.motion .reveal.in { opacity: 1; transform: none; }

/* page-count bars on the website plans grow in */
html.motion .plan .stack i { transform-origin: left; transform: scaleX(0);
  transition: transform .6s cubic-bezier(.2,.7,.1,1); }
html.motion .plan.in .stack i { transform: scaleX(1); }
html.motion .plan.in .stack i:nth-child(2) { transition-delay: .08s; }
html.motion .plan.in .stack i:nth-child(3) { transition-delay: .16s; }
html.motion .plan.in .stack i:nth-child(4) { transition-delay: .24s; }
html.motion .plan.in .stack i:nth-child(5) { transition-delay: .32s; }
html.motion .plan.in .stack i:nth-child(6) { transition-delay: .40s; }

/* perforated tear line draws across on the counter plans */
html.motion .plan .tear { clip-path: inset(0 100% 0 0); transition: clip-path .9s .2s cubic-bezier(.2,.7,.1,1); }
html.motion .plan.in .tear { clip-path: inset(0 0 0 0); }

/* ---------- tilt cards (fine pointer only) ---------- */
.plan { position: relative; transform-style: preserve-3d; }
html.motion .plan.tilting { transition: transform .15s ease-out, box-shadow .3s ease; }
html.motion .plan.tilt-rest { transition: transform .6s cubic-bezier(.2,.7,.1,1), opacity .8s, box-shadow .3s ease; }
.plan::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--pine) 10%, transparent), transparent 60%);
  opacity: 0; transition: opacity .3s ease; }
.plan.tilting::after { opacity: 1; }

/* ---------- magnetic buttons ---------- */
[data-magnet] { transition: translate .35s cubic-bezier(.2,.7,.1,1), background .2s ease, color .2s ease; }

/* ---------- websites hero: a phone receiving enquiries ---------- */
.phone { width: 250px; max-width: 100%; aspect-ratio: 9 / 17; border-radius: 34px; padding: 12px;
  background: #1C1A17; box-shadow: 0 40px 70px -35px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06); }
.phone .screen { height: 100%; border-radius: 24px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, var(--pine-soft), var(--paper)); padding: 44px 12px 12px;
  display: flex; flex-direction: column; gap: 10px; }
.phone .notch { position: absolute; top: 10px; left: 50%; width: 72px; height: 20px; margin-left: -36px;
  border-radius: 12px; background: #1C1A17; }
.phone .clock { font-family: var(--display); font-size: 40px; font-weight: 600; text-align: center;
  color: var(--pine-ink); letter-spacing: -.02em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.note { background: var(--panel); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 11px;
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 3px 9px; align-items: start;
  box-shadow: 0 10px 20px -16px rgba(0,0,0,.35); }
.note i { grid-row: span 2; width: 26px; height: 26px; border-radius: 7px; background: var(--pine);
  color: var(--panel); font-style: normal; font-family: var(--mono); font-size: 12px; display: grid; place-items: center; }
.note b { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.note span { font-size: 11px; color: var(--ink-soft); line-height: 1.3; }
.note em { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--ink-soft); float: right; }
html.motion .phone .note { animation: mo-note 9s cubic-bezier(.2,.7,.1,1) infinite both; }
html.motion .phone .note:nth-of-type(2) { animation-delay: 1.4s; }
html.motion .phone .note:nth-of-type(3) { animation-delay: 2.8s; }
@keyframes mo-note {
  0% { opacity: 0; transform: translateY(-14px) scale(.96); }
  6%, 82% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* ---------- counter hero: a docket printing out ---------- */
.hero-visual .printer ~ .float-cta, .hero-visual .float-cta.low { top: auto; bottom: -10px; right: -4px; }
.printer { width: 270px; max-width: 100%; position: relative; }
.printer .slot { height: 34px; border-radius: 12px 12px 6px 6px; background: #1C1A17; position: relative; z-index: 2;
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.5); }
.printer .slot::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 8px; height: 4px;
  border-radius: 3px; background: #3a3631; }
.printer .led { position: absolute; right: 14px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--pine); }
html.motion .printer .led { animation: mo-blink 1.2s steps(2) infinite; }
@keyframes mo-blink { 50% { opacity: .25; } }
.docket-clip { overflow: hidden; margin: -6px 26px 0; }
.docket { background: var(--panel); border: 1px solid var(--hair); border-top: 0; padding: 16px 16px 20px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink); line-height: 1.75;
  position: relative; padding-bottom: 26px; }
.docket::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -8px; height: 9px;
  background: linear-gradient(135deg, var(--panel) 50%, transparent 50%) 0 0 / 12px 9px repeat-x,
              linear-gradient(-135deg, var(--panel) 50%, transparent 50%) 0 0 / 12px 9px repeat-x; }
.docket-clip { padding-bottom: 10px; }
.docket .row { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.docket .h { font-weight: 500; font-size: 13px; text-align: center; letter-spacing: .08em; }
.docket .sub { text-align: center; color: var(--ink-soft); font-size: 10.5px; }
.docket hr { border: 0; border-top: 1px dashed var(--hair); margin: 6px 0; }
.docket .pick { margin-top: 6px; text-align: center; background: var(--pine-soft); color: var(--pine-ink); border-radius: 4px; padding: 2px 0; }
html.motion .docket { animation: mo-print 8s cubic-bezier(.3,.6,.2,1) infinite both; }
@keyframes mo-print {
  0% { transform: translateY(-100%); opacity: 1; }
  45%, 88% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
.ping { position: absolute; left: 50%; top: 17px; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  border: 2px solid var(--copper); opacity: 0; pointer-events: none; z-index: 1; }
html.motion .ping { animation: mo-ping 8s ease-out infinite; }
@keyframes mo-ping { 0% { opacity: .8; transform: scale(1); } 12% { opacity: 0; transform: scale(14); } 100% { opacity: 0; transform: scale(14); } }

/* cross-link to the other offer */
.xlink { color: var(--pine); font-weight: 500; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pine) 40%, transparent); white-space: nowrap; }
.xlink:hover { border-bottom-color: var(--pine); }

@media (max-width: 919px) {
  .float-cta { display: none; }
  .phone { width: 210px; }
  .printer { width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  html.motion .reveal, html.motion .hero h1.play .w > span { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------- "which one fits you" chooser (shared by both pages) ---------- */
.chooser { background: var(--sunk); border-bottom: 1px solid var(--hair); }
.chooser .q { margin-top: 22px; }
.chooser .ql { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); margin-bottom: 10px; }
.chooser .opts { display: flex; flex-wrap: wrap; gap: 9px; }
.chooser .opts button { font: inherit; font-size: 14.5px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--hair); border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.chooser .opts button:hover { border-color: var(--pine); transform: translateY(-1px); }
.chooser .opts button[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: var(--panel); }
.chooser .result { margin-top: 26px; background: var(--panel); border: 1px solid var(--pine); border-radius: 4px;
  padding: 22px 22px 20px; box-shadow: 0 0 0 1px var(--pine); display: grid; gap: 6px; }
.chooser .result .rk { font-family: var(--mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--pine); }
.chooser .result h3 { font-size: 22px; letter-spacing: -.01em; }
.chooser .result .why { font-size: 14.5px; color: var(--ink-soft); max-width: 560px; }
.chooser .result .price { font-family: var(--mono); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.chooser .result .go { justify-self: start; margin-top: 10px; font-family: var(--mono); font-size: 13.5px; text-decoration: none;
  background: var(--pine); color: var(--panel); padding: 11px 18px; border-radius: 3px; }
.chooser .result .go:hover { background: var(--pine-ink); }
.chooser .hint { margin-top: 18px; font-size: 13.5px; color: var(--ink-soft); }
html.motion .chooser .result:not([hidden]) { animation: mo-pop .5s cubic-bezier(.2,.7,.1,1) both; }
@keyframes mo-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* plan picked by the chooser (on this page, or arriving via ?plan=) */
.plan.recommended { border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper); }
.plan .rec-badge { display: none; position: absolute; top: -11px; left: 20px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; background: var(--copper); color: var(--panel); padding: 3px 10px; border-radius: 999px; }
.plan.recommended .rec-badge { display: block; }
html.motion .plan.recommended { animation: mo-glow 1.6s ease-out 2; }
@keyframes mo-glow { 0% { box-shadow: 0 0 0 2px var(--copper); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--copper) 25%, transparent); } 100% { box-shadow: 0 0 0 2px var(--copper); } }

/* ---------- counter: hardware comparison ---------- */
.hw { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .hw { grid-template-columns: 1fr; } }
.hw-col { border: 1px solid var(--hair); border-radius: 4px; padding: 22px 22px 18px; background: var(--panel); }
.hw-col h3 { font-size: 18px; margin-bottom: 12px; }
.hw-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hw-col li { font-size: 14.5px; padding-left: 24px; position: relative; color: var(--ink); }
.hw-col.old { background: var(--sunk); }
.hw-col.old li { color: var(--ink-soft); }
.hw-col.old li::before { content: "×"; position: absolute; left: 3px; top: -1px; color: var(--copper); font-family: var(--mono); }
.hw-col.new { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.hw-col.new li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--pine); font-family: var(--mono); }
.hw-col b { font-family: var(--mono); font-weight: 500; color: var(--pine-ink); }

/* ---------- counter: live shop screenshot ---------- */
.live p { max-width: 640px; }
.shot { display: block; margin-top: 26px; border-radius: 10px; overflow: hidden; text-decoration: none;
  border: 1px solid var(--hair); background: #1C1A17; box-shadow: 0 30px 60px -38px rgba(0,0,0,.5);
  transition: transform .5s cubic-bezier(.2,.7,.1,1), box-shadow .5s ease; }
.shot:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -38px rgba(0,0,0,.55); }
.shot .chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #2a2723; }
.shot .chrome i { width: 9px; height: 9px; border-radius: 50%; background: #5a544c; }
.shot .chrome .url { margin-left: 10px; flex: 1; max-width: 320px; font-family: var(--mono); font-size: 11px; color: #c9c2b6;
  background: #1C1A17; border-radius: 5px; padding: 3px 10px; }
.shot img { display: block; width: 100%; height: auto; }
.shot-cap { margin-top: 12px; font-size: 14px; }

.shots-2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 700px) { .shots-2 { grid-template-columns: 1fr; } }
.tab { margin: 0; }
.tab .bezel { background: #1C1A17; border-radius: 18px; padding: 10px; box-shadow: 0 26px 50px -34px rgba(0,0,0,.5); }
.tab .bezel img { display: block; width: 100%; height: auto; border-radius: 9px; }
.tab figcaption { margin-top: 10px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.tab figcaption b { color: var(--ink); font-weight: 600; }

.shots-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .shots-2.even { grid-template-columns: 1fr; } }
.tab.web .bezel { padding: 0; border-radius: 10px; overflow: hidden; }
.tab.web .bezel img { border-radius: 0; }
.tab .chrome { display: flex; align-items: center; gap: 6px; padding: 8px 11px; background: #2a2723; }
.tab .chrome i { width: 8px; height: 8px; border-radius: 50%; background: #5a544c; }
.tab .chrome .url { margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: #c9c2b6; background: #1C1A17; border-radius: 5px; padding: 2px 9px; }
.blur-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); font-family: var(--mono); }
