/* Owen's interaction layer (round 7): hero strip font hook, 3D card tilt + glare, button shine, FAQ accordion.
   Motion itself runs in src/scripts/fx.ts (GSAP ScrollTrigger). Loaded on every page from Site.astro. */

/* Satoshi (Owen, 2026-11-28): all hero text, the top nav, every heading, the looping bar and the big numbers. Body text
   stays Albert Sans. The file is the original web font, all weights in one. Its license (ITF Free Font License)
   allows hosting it here but not changing it: never subset, convert or rename it. */
@font-face {
  font-family: "Satoshi"; src: url("/fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
}
.hero, .nav { --font-text: var(--font-display); font-family: var(--font-display); }
h1, h2, h3, h4, .t-card { font-family: var(--font-display) !important; }

/* Looping bar font: follows the headings. Change --marquee-font to swap only the bar. */
:root { --marquee-font: var(--font-display); }

/* ---------- 3D card tilt: the glare layer fx.ts adds to each card ---------- */
.fx-tilt { transform-style: preserve-3d; will-change: transform; }
.fx-tilt > .fx-glare.fx-glare {
  position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .16), rgba(183, 243, 74, .06) 35%, transparent 60%);
  mix-blend-mode: screen; transition: opacity 250ms ease;
}
.fx-tilt.is-tilting > .fx-glare.fx-glare { opacity: 1; }

/* ---------- button shine: a diagonal light sweep on hover, and once when the button scrolls into view ---------- */
.btn.fx-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn.fx-shine > .fx-shine__bar {
  position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  transform: translateX(0) skewX(-20deg); opacity: 0;
}
.btn.fx-shine.is-shining > .fx-shine__bar { animation: fx-shine 750ms cubic-bezier(.4, 0, .2, 1); }
.btn--secondary.fx-shine > .fx-shine__bar { background: linear-gradient(105deg, transparent 0%, rgba(183, 243, 74, .35) 50%, transparent 100%); }
@keyframes fx-shine { 0% { opacity: 1; transform: translateX(0) skewX(-20deg); } 100% { opacity: 1; transform: translateX(420%) skewX(-20deg); } }

/* ---------- FAQ accordion ---------- */
.acc { display: grid; }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__h { margin: 0; font-size: var(--t-card, 20px); font-weight: 400; }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 18px 0;
  background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.acc__btn:hover span { color: var(--accent, #b7f34a); }
.acc__btn:focus-visible { outline: 2px solid var(--accent, #b7f34a); outline-offset: 4px; border-radius: 4px; }
.acc__icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); transition: background 250ms, border-color 250ms, transform 350ms cubic-bezier(.22, 1, .36, 1); }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform 350ms cubic-bezier(.22, 1, .36, 1); }
.acc__icon::after { transform: rotate(90deg); }
.acc__item.is-open .acc__icon { background: var(--accent, #b7f34a); border-color: var(--accent, #b7f34a); color: #111318; transform: rotate(180deg); }
.acc__item.is-open .acc__icon::after { transform: rotate(0deg); }
.acc__panel { display: grid; grid-template-rows: 1fr; }
.acc--js .acc__panel { grid-template-rows: 0fr; transition: grid-template-rows 380ms cubic-bezier(.22, 1, .36, 1); }
.acc--js .acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__inner p { margin: 0; padding: 0 44px 22px 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.acc--js .acc__item:not(.is-open) .acc__inner p { visibility: hidden; transition: visibility 0s 380ms; }

@media (prefers-reduced-motion: reduce) {
  .acc--js .acc__panel, .acc__icon, .acc__icon::before, .acc__icon::after { transition: none; }
  .btn.fx-shine > .fx-shine__bar { display: none; }
}

/* ---------- liquid glass (Owen, 2026-11-27) ----------
   .glass        a frosted, see-through panel: backdrop blur + saturation, a light rim that is brighter at the top
                 left (and lime at the bottom right), an inner sheen, and the lime glow underneath.
   .glass-stage  put on the section behind a glass panel: soft lime light that slowly drifts, so the blur has
                 something to bend. Positions per section with --g1 / --g2 (x y). */
.glass.glass.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025) 45%, rgba(183, 243, 74, .045));
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05), inset 0 0 32px rgba(255, 255, 255, .035),
    0 30px 80px -34px rgba(0, 0, 0, .7), 0 28px 70px -30px rgba(183, 243, 74, .38);
}
.glass.glass.glass::before { /* the rim */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(140deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .06) 28%, rgba(255, 255, 255, 0) 55%, rgba(183, 243, 74, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass.glass.glass::after { /* the sheen across the top */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 20% -10%, rgba(255, 255, 255, .14), transparent 55%);
}
/* fields and small parts sitting on glass go see-through too */
.glass input[type="number"], .glass input[type="text"], .glass input[type="email"], .glass input[type="tel"], .glass select, .glass textarea {
  background: rgba(10, 11, 14, .45) !important; border-color: rgba(255, 255, 255, .12) !important;
}
.glass-pill { background: rgba(17, 19, 24, .45) !important; -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .16) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

.glass-stage { position: relative; }
/* (2026-11-27) the drifting lime light behind glass panels now comes from the site background (site-bg.css);
   the old per-section blob was clipped at the hero's right edge, so it is gone. */
.glass-stage::before { content: none; }
.glass-stage > .wrap { position: relative; z-index: 1; }
@keyframes glass-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-3%, 2%, 0) scale(1.05); } 100% { transform: translate3d(2%, -2%, 0) scale(.98); } }

/* the nav bar: frosted glass over the page as it scrolls under it */
.nav.nav { background: rgba(17, 19, 24, .62); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border-bottom-color: rgba(255, 255, 255, .08); box-shadow: inset 0 -1px 0 rgba(183, 243, 74, .08); }

/* phone and tablet menu: backdrop-filter makes the bar the box its fixed children are measured from, which squashed
   the full-screen menu to the bar's height. No blur while the menu is open (it covers the page anyway). */
@media (max-width: 1023px) {
  .nav.nav.is-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass.glass.glass { background: rgba(30, 33, 40, .92); } .nav.nav { background: var(--bg); }
}
@media (prefers-reduced-motion: reduce) { .glass-stage::before { animation: none; } }
.card--plan.is-featured.glass.glass.glass { border-color: rgba(183, 243, 74, .7); box-shadow: inset 0 0 0 1px rgba(183, 243, 74, .5), inset 0 1px 0 rgba(255, 255, 255, .22), 0 28px 70px -26px rgba(183, 243, 74, .5); }

/* drawn hero pictures (service pages, /pricing, /detailing) fill the hero panel and sit in its middle */
.hero__media > .frame__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media > .svc { justify-content: center; }
@media (max-width: 1023px) { .hero__media:has(> .frame__img) { min-height: 420px; } }
