/* ============================================================
   Friday Solution – "human touch" layer
   Hand-drawn accents, paper grain, sticky-note testimonials,
   cursor / magnetic / tilt interactions. Loaded after style.css.
   Every motion is switched off for prefers-reduced-motion.
   ============================================================ */
:root {
  --f-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --marker: rgba(123, 224, 168, 0.55);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}
img { height: auto; }
html, body { overflow-x: clip; }

/* ---------- paper grain over everything (very subtle) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- scroll progress ---------- */
.hx-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 80; pointer-events: none;
  background: linear-gradient(90deg, var(--lime), #F5C451 60%, #FF8A65); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- custom cursor (fine pointers only) ---------- */
.hx-dot, .hx-ring { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 90; border-radius: 50%; opacity: 0; transition: opacity .3s; will-change: transform; }
.hx-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--green); }
.hx-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1.5px solid var(--green);
  display: grid; place-items: center; font: 700 15px/1 var(--f-hand); color: var(--ink);
  transition: opacity .3s, width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background .3s, border-color .3s; }
.hx-cursor-on .hx-dot, .hx-cursor-on .hx-ring { opacity: 1; }
.hx-ring.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(123,224,168,.22); border-color: transparent; }
.hx-ring.is-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--lime); border-color: var(--lime); }
.hx-ring.is-down { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.hx-ring.on-dark { border-color: var(--lime); color: var(--ink); }
.hx-dot.on-dark { background: var(--lime); }
.glow { display: none !important; }

/* ---------- hero: blob, doodles, hand-drawn underline ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -140px; top: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(123,224,168,.35), rgba(23,133,90,.08) 60%, transparent 70%);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: hx-blob 18s ease-in-out infinite alternate;
  transform: translate(calc(var(--px, 0) * -40px), calc(var(--py, 0) * -40px));
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; left: -160px; bottom: -180px;
  background: radial-gradient(circle, rgba(245,196,81,.16), transparent 65%);
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; animation: hx-blob 22s ease-in-out infinite alternate-reverse;
}
@keyframes hx-blob {
  0% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; rotate: 0deg; }
  50% { border-radius: 64% 36% 41% 59% / 58% 62% 38% 42%; }
  100% { border-radius: 38% 62% 52% 48% / 36% 51% 49% 64%; rotate: 25deg; }
}
.hx-ul { position: relative; display: inline-block; white-space: nowrap; }
.hero h1 em .hx-ul, .pagehero h1 .hx-ul { white-space: normal; }
.hx-ul svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: .34em; overflow: visible; pointer-events: none; }
.hx-ul path { fill: none; stroke: #F5C451; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: hx-draw 1.1s .9s var(--ease-out) forwards; }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }

.hx-doodles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-doodles svg { position: absolute; fill: none; stroke-linecap: round; stroke-linejoin: round;
  transform: translate(calc(var(--px, 0) * var(--d, 20px)), calc(var(--py, 0) * var(--d, 20px))) rotate(var(--r, 0deg));
  transition: transform .5s var(--ease-out); }
.hx-doodles svg > * { animation: hx-wiggle 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes hx-wiggle { 0%,100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.08); } }

/* handwritten note next to the hero CTA */
.hx-note { position: relative; display: inline-flex; align-items: flex-start; gap: 4px; margin: 14px 0 0 6px;
  font: 700 23px/1.05 var(--f-hand); color: #F5C451; transform: rotate(-4deg); transform-origin: left center; }
.hx-note svg { width: 46px; height: 34px; flex: none; margin-top: -14px; stroke: #F5C451; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.hx-note path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hx-draw .9s 1.6s var(--ease-out) forwards; }
.hx-note span { opacity: 0; animation: hx-fade .6s 1.4s forwards; }
@keyframes hx-fade { to { opacity: 1; } }

/* hero headline: words rise in one by one */
.hx-split .hx-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.hx-split .hx-w > span { display: inline-block; transform: translateY(105%) rotate(4deg);
  animation: hx-rise .9s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes hx-rise { to { transform: none; } }

/* hero image: gentle tilt + tape strips */
.hv-card { transform: perspective(900px) rotateY(calc(var(--px, 0) * -8deg)) rotateX(calc(var(--py, 0) * 8deg)) rotate(-1.5deg);
  transition: transform .6s var(--ease-out); position: relative; }
.hv-card::before, .hv-card::after { content: ""; position: absolute; z-index: 3; width: 92px; height: 26px; background: rgba(245,236,200,.78);
  box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.hv-card::before { top: 10px; left: -22px; rotate: -38deg; }
.hv-card::after { bottom: 12px; right: -24px; rotate: -34deg; }
.hv-card { overflow: visible !important; }
.hv-card .hv-img { border-radius: 26px; }

/* ---------- section headings: marker highlight on the last words ---------- */
.hx-mark { background: linear-gradient(104deg, transparent .4em, var(--marker) .5em, var(--marker) calc(100% - .2em), transparent 100%) no-repeat 0 82% / 0% .42em;
  transition: background-size 1.1s .25s var(--ease-out); padding: 0 .08em; margin: 0 -.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hx-mark.in { background-size: 100% .42em; }
.on-ink .hx-mark, .cta-band .hx-mark { --marker: rgba(123,224,168,.32); }

/* eyebrow gets a hand-drawn squiggle */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.head .eyebrow::before, .pagehero .eyebrow::before { content: ""; width: 28px; height: 10px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 10'%3E%3Cpath d='M1 5c3-4 5-4 7 0s4 4 6 0 4-4 6 0 4 4 7 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 10'%3E%3Cpath d='M1 5c3-4 5-4 7 0s4 4 6 0 4-4 6 0 4 4 7 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.head[style*="center"] .eyebrow { justify-content: center; }

/* ---------- cards: 3D tilt + glare (JS sets --rx/--ry) ---------- */
.hx-tilt { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)) !important;
  transition: transform .5s var(--ease-out), box-shadow .3s, border-color .3s !important; transform-style: preserve-3d; }
.hx-tilt.hx-hot { --ty: -6px; transition: transform .12s linear, box-shadow .3s, border-color .3s !important; }
.hx-tilt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .3s;
  background: linear-gradient(calc(var(--ga, 120deg)), rgba(255,255,255,.55), transparent 55%); mix-blend-mode: soft-light; }
.hx-tilt.hx-hot::before { opacity: 1; }

/* service cards: arrow nudges, icon spins a little */
.svc .more { display: inline-flex; gap: 6px; transition: gap .3s var(--ease-spring); }
.svc:hover .more { gap: 12px; }
.svc .itile, .feat .itile, .steps .itile, .hc-card .itile { transition: transform .5s var(--ease-spring); }
.svc:hover .itile, .feat > div:hover .itile, .steps li:hover .itile, .hc-card:hover .itile { transform: rotate(-10deg) scale(1.12); }

/* steps: handwritten numbers with a scribbled circle */
.steps .bignum { font-family: var(--f-hand) !important; font-weight: 700; font-size: 46px !important; transform: rotate(-6deg); position: relative; display: inline-block; }
.steps .bignum::after { content: ""; position: absolute; inset: -6px -12px -2px -12px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 50' preserveAspectRatio='none'%3E%3Cpath d='M44 4C20 2 3 12 4 26s22 21 42 19 32-10 30-24S50 1 30 7' fill='none' stroke='%2317855A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  opacity: 0; transform: scale(.8) rotate(-10deg); transition: opacity .3s, transform .5s var(--ease-spring); }
.steps li:hover .bignum::after { opacity: .9; transform: none; }

/* ---------- testimonials as pinned notes ---------- */
.tgrid .tcard { --rot: -1.4deg; transform: rotate(var(--rot)); transition: transform .5s var(--ease-spring), box-shadow .3s !important; position: relative; overflow: visible; }
.tgrid .tcard:nth-child(2) { --rot: 1.1deg; margin-top: 18px; }
.tgrid .tcard:nth-child(3) { --rot: -.6deg; }
.tgrid .tcard:nth-child(4) { --rot: 1.6deg; }
.tgrid .tcard:hover { transform: rotate(0deg) translateY(-8px) scale(1.02) !important; box-shadow: 0 26px 50px rgba(10,26,51,.16); }
.tgrid .tcard::before { content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 24px; translate: -50% 0; rotate: -3deg; z-index: 2;
  background: rgba(245,196,81,.55); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tgrid .tcard figcaption b { font-family: var(--f-hand); font-size: 24px; font-weight: 700; }

/* trust strip: numbers wobble, hand circle on hover */
.strip .wrap > div { position: relative; }
.strip b { display: inline-block; transition: transform .45s var(--ease-spring); }
.strip .wrap > div:hover b { transform: rotate(-4deg) scale(1.1); }

/* FAQ: smooth open, plus becomes x */
.faq details { transition: background .3s, border-color .3s; }
.faq details[open] { background: rgba(123,224,168,.1); }
.faq details > p { animation: hx-open .45s var(--ease-out); }
@keyframes hx-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- buttons: magnetic + liquid fill ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--ease-out), box-shadow .3s, background .3s, color .3s; }
.btn::before { content: ""; position: absolute; z-index: -1; left: var(--bx, 50%); top: var(--by, 50%); width: 0; height: 0; border-radius: 50%;
  transform: translate(-50%, -50%); background: rgba(255,255,255,.28); transition: width .5s var(--ease-out), height .5s var(--ease-out); }
.btn:hover::before { width: 260%; height: 600%; }
.btn-green:hover { box-shadow: 0 12px 30px rgba(123,224,168,.42); }
.btn:active { transform: scale(.96) !important; }

/* links in body copy get a wavy hand underline on hover */
.tlink, .prose a, .post-body a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 2px; }
.tlink:hover, .prose a:hover, .post-body a:hover { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6'%3E%3Cpath d='M0 3c3-3 5-3 7 0s5 3 7 0 4-3 6 0' fill='none' stroke='%2317855A' stroke-width='1.6'/%3E%3C/svg%3E") 0 100% / 20px 6px repeat-x;
  animation: hx-wave 1s linear infinite; }
.on-ink .tlink:hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6'%3E%3Cpath d='M0 3c3-3 5-3 7 0s5 3 7 0 4-3 6 0' fill='none' stroke='%237BE0A8' stroke-width='1.6'/%3E%3C/svg%3E"); }
@keyframes hx-wave { to { background-position-x: 20px; } }

/* navigation: hand-drawn underline for the current page */
.nav > a.on, .nav > .dd > a.on { position: relative; }
.nav > a:not(.btn):not(.navphone)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4c8-3 18-3 38-1' fill='none' stroke='%237BE0A8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.nav > a:not(.btn):not(.navphone) { position: relative; }
.nav > a:not(.btn):not(.navphone):hover::after { transform: scaleX(1); }

/* dark bands get a torn/wavy top edge */
section.on-ink:not(.hero) { position: relative; }
section.on-ink:not(.hero)::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 20px; pointer-events: none; background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V12C10 6 20 16 30 12S50 4 60 10s20 8 30 2 20-6 30 0v8z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' preserveAspectRatio='none'%3E%3Cpath d='M0 20V12C10 6 20 16 30 12S50 4 60 10s20 8 30 2 20-6 30 0v8z'/%3E%3C/svg%3E") 0 0 / 240px 100% repeat-x; }

/* marketplace logos float gently */
.mk-logo { transition: transform .5s var(--ease-spring), filter .3s; }
.mk-logo:nth-child(odd) { animation: hx-bob 5s ease-in-out infinite; }
.mk-logo:nth-child(even) { animation: hx-bob 5s -2.5s ease-in-out infinite; }
.mk-logo:hover { transform: scale(1.12) rotate(-3deg); }
@keyframes hx-bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -5px; } }

/* images reveal like a photo being slid out */
.hx-reveal { clip-path: inset(0 0 100% 0 round 18px); transition: clip-path 1.1s var(--ease-out); }
.hx-reveal.in { clip-path: inset(0 0 0 0 round 0); }

/* page hero (inner pages) */
.pagehero { position: relative; overflow: hidden; isolation: isolate; }
.pagehero::after { content: ""; position: absolute; z-index: -1; width: 460px; height: 460px; right: -120px; top: -160px;
  background: radial-gradient(circle at 40% 40%, rgba(123,224,168,.28), transparent 65%);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: hx-blob 16s ease-in-out infinite alternate;
  transform: translate(calc(var(--px, 0) * -30px), calc(var(--py, 0) * -30px)); }

/* footer signature */
.hx-sign { font: 700 30px/1 var(--f-hand); color: var(--lime); margin-top: 18px; transform: rotate(-3deg); display: inline-block; }

/* ---------- small screens ---------- */
@media (max-width: 620px) {
  .hx-note { font-size: 20px; }
  .hero::before { width: 380px; height: 380px; right: -160px; top: -60px; }
  .tgrid .tcard:nth-child(2) { margin-top: 0; }
  .tgrid .tcard { --rot: 0deg !important; }
  .hv-card::before, .hv-card::after { width: 64px; height: 20px; }
  .hv-card::before { left: -10px; } .hv-card::after { right: -10px; }
  .steps .bignum { font-size: 40px !important; }
}
@media (hover: none) {
  .hx-dot, .hx-ring { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hx-split .hx-w > span { transform: none; opacity: 1; }
  .hx-reveal { clip-path: none; }
  .hv-card, .hx-tilt { transform: none !important; }
}

/* ---------- layout glitch fixes ---------- */
/* browsers add an 8px body margin; it showed as a white frame around the dark header and hero */
body { margin: 0; }
/* grid/flex children must be allowed to shrink, or long words push cards off small screens */
.sidecard, .formwrap > *, .two > *, .feat > div, .box, .card, .tcard, .svc, .pt { min-width: 0; }
.sidecard { grid-template-columns: minmax(0, 1fr) !important; }
.sidecard *, .box *, .fc-row * { overflow-wrap: anywhere; }
h1, h2, h3 { overflow-wrap: break-word; hyphens: manual; }
.hero .hx-note { order: 7; justify-self: start; }
.hero h1 em { background: none !important; padding-bottom: 0 !important; }

/* ============================================================
   Navigation: animated dropdowns (desktop) + tap-to-open accordions (mobile)
   ============================================================ */
.dd-tog { display: none; }

/* burger morphs into a cross */
.burger span, .burger span::before, .burger span::after { transition: transform .35s var(--ease-out), top .25s .1s, background .2s; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); transition: top .2s, transform .35s .1s var(--ease-spring); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); transition: top .2s, transform .35s .1s var(--ease-spring); }

@media (min-width: 961px) {
  .dd .menu { display: grid !important; opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(12px) scale(.97) rotate(-.6deg); transform-origin: 24px 0;
    transition: opacity .22s, transform .35s var(--ease-out), visibility 0s .35s; }
  .dd .menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* hover bridge */
  .dd:hover .menu, .dd:focus-within .menu, .dd.open .menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .22s, transform .45s var(--ease-spring), visibility 0s; }
  .dd .menu a { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .35s var(--ease-out), background .2s, padding .25s var(--ease-out); }
  .dd:hover .menu a, .dd:focus-within .menu a, .dd.open .menu a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 30ms); }
  .dd .menu a:hover { padding-left: 20px; }
  .dd > a::after { transition: transform .3s var(--ease-spring); }
  .dd:hover > a::after, .dd.open > a::after { transform: translateY(1px) rotate(225deg); }
}

@media (max-width: 960px) {
  /* the panel slides down, links follow one by one */
  .nav.open { animation: hx-nav-in .4s var(--ease-out); transform-origin: top; }
  .nav.open > * { animation: hx-item-in .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms + 60ms); }
  @keyframes hx-nav-in { from { opacity: 0; transform: translateY(-12px) scaleY(.96); } }
  @keyframes hx-item-in { from { opacity: 0; transform: translateX(-14px); } }

  /* parent row: label + chevron button */
  .dd { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid rgba(255,255,255,.06); }
  .dd > a { cursor: pointer; }
  .dd-tog { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -6px; border: 0; border-radius: 12px; background: rgba(255,255,255,.06); color: var(--on-ink); cursor: pointer; transition: background .25s, color .25s; }
  .dd-tog svg { transition: transform .45s var(--ease-spring); }
  .dd.open .dd-tog { background: var(--lime); color: var(--ink); }
  .dd.open .dd-tog svg { transform: rotate(180deg); }
  .dd.open > a { color: #fff !important; }

  /* the submenu folds open */
  .dd .menu { grid-column: 1 / -1; display: grid !important; max-height: 0; overflow: hidden; opacity: 0;
    padding: 0 0 0 14px !important; margin-left: 4px; border-left: 2px solid rgba(123,224,168,.35);
    transition: max-height .45s var(--ease-out), opacity .3s, padding .35s var(--ease-out); }
  .dd.open .menu { max-height: var(--mh, 900px); opacity: 1; padding: 4px 0 12px 14px !important; }
  .dd .menu a { opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .4s var(--ease-out), color .2s; }
  .dd.open .menu a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms + 80ms); }
  .dd .menu a.hx-all { color: var(--lime) !important; font-weight: 600; }
  .dd .menu a[aria-current="page"] { color: var(--lime) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .dd .menu, .dd .menu a { transition: none !important; transform: none !important; }
}
.nav .hx-all[hidden] { display: none !important; }
