/* Public website: home page, service pages, homepage application and the
 * welcome / business-needs page. Builds on the tokens in app.css; every
 * colour comes from a token so light and dark themes both work.
 *
 * Prefixes: site-  page sections and components
 *           sh-    the animated "customers coming to a business" hero art
 */

/* ------------------------------------------------------------------ hero */
.site-hero {
  padding: var(--sp-7) 0 0;
  background: linear-gradient(180deg, var(--navy-50) 0%, var(--teal-50) 100%);
  text-align: center;
  overflow: hidden;
}
.site-hero h1 {
  max-width: 22ch;
  margin: 0 auto var(--sp-5);
  font-size: clamp(2rem, 1.25rem + 3.2vw, 3.3rem);
  line-height: 1.12;
  color: var(--text);
}
.site-hero-art { max-width: 1120px; margin: 0 auto; padding: 0 var(--sp-4); }
.sh-scene { display: block; width: 100%; height: auto; }

/* Scene colours. People use a small palette of brand tokens; skin tones are
   fixed illustration colours that read on both themes. */
.sh-floor { fill: var(--navy-100); }
.sh-floor-line { stroke: var(--border-strong); stroke-width: 2; }
.sh-leg { fill: var(--ink-600); }
.sh-bag { fill: var(--gold-500); }
.sh-c1 .sh-body { fill: var(--navy-600); }
.sh-c2 .sh-body { fill: var(--teal-600); }
.sh-c3 .sh-body { fill: var(--gold-600); }
.sh-c4 .sh-body { fill: var(--teal-800); }
.sh-c1 .sh-head { fill: #f1c9a5; }
.sh-c2 .sh-head { fill: #c68e62; }
.sh-c3 .sh-head { fill: #8d5a3b; }
.sh-c4 .sh-head { fill: #e3b28a; }
.sh-c3 .sh-bag, .sh-c4 .sh-bag { fill: var(--navy-600); }

.sh-sign { fill: var(--teal-700); }
.sh-sign-dot { fill: var(--gold-500); }
.sh-sign-bar { fill: #ffffff; opacity: .9; }
.sh-sign-wire { stroke: var(--border-strong); stroke-width: 2; }
.sh-counter-top { fill: var(--navy-700); }
.sh-counter { fill: var(--teal-700); }
.sh-counter-stripe { fill: var(--gold-500); }
.sh-register-base { fill: var(--ink-700); }
.sh-register-screen { fill: var(--navy-900); }
.sh-register-glow { fill: var(--teal-600); }
.sh-cashier-body { fill: var(--teal-800); }
.sh-cashier-head { fill: #c68e62; }
.sh-cashier-apron { fill: #ffffff; opacity: .85; }
.sh-coin { fill: var(--gold-500); stroke: var(--gold-700); stroke-width: 1.5; }

/* Motion. Each customer walks from off-stage left to the counter and is
   "served" (fades out) as the next one arrives. Negative delays start the
   line already full, so the first frame is never empty. */
.sh-person { animation: sh-advance 18s linear infinite; }
.sh-p1 { animation-delay: 0s; }
.sh-p2 { animation-delay: -2s; }
.sh-p3 { animation-delay: -4s; }
.sh-p4 { animation-delay: -6s; }
.sh-p5 { animation-delay: -8s; }
.sh-p6 { animation-delay: -10s; }
.sh-p7 { animation-delay: -12s; }
.sh-p8 { animation-delay: -14s; }
.sh-p9 { animation-delay: -16s; }

.sh-walk { animation: sh-bob .5s ease-in-out infinite alternate; }
.sh-leg { transform-box: fill-box; transform-origin: 50% 0; }
.sh-leg-a { animation: sh-step .5s ease-in-out infinite alternate; }
.sh-leg-b { animation: sh-step .5s ease-in-out infinite alternate-reverse; }
.sh-register-glow { animation: sh-glow 2s ease-in-out infinite; }
.sh-coin { transform-box: fill-box; transform-origin: 50% 50%; animation: sh-coin 2s ease-out infinite; }
.sh-coin-2 { animation-delay: .25s; }
.sh-cashier { animation: sh-bob 1s ease-in-out infinite alternate; }

@keyframes sh-advance {
  0%   { transform: translateX(-60px); opacity: 0; }
  4%   { opacity: 1; }
  93%  { opacity: 1; }
  100% { transform: translateX(724px); opacity: 0; }
}
@keyframes sh-bob   { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes sh-step  { from { transform: rotate(16deg); } to { transform: rotate(-16deg); } }
@keyframes sh-glow  { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes sh-coin  {
  0%   { transform: translateY(14px) scale(.6); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-22px) scale(1); opacity: 0; }
}

/* Reduced motion: a still picture of the queue. app.css shortens every
   animation globally; an infinite animation with negative delays would then
   flicker, so the scene switches animations off outright and places each
   customer in line. */
@media (prefers-reduced-motion: reduce) {
  .sh-scene *, .sh-scene { animation: none !important; }
  .sh-p1 { transform: translateX(700px); }
  .sh-p2 { transform: translateX(616px); }
  .sh-p3 { transform: translateX(532px); }
  .sh-p4 { transform: translateX(448px); }
  .sh-p5 { transform: translateX(364px); }
  .sh-p6 { transform: translateX(280px); }
  .sh-p7 { transform: translateX(196px); }
  .sh-p8 { transform: translateX(112px); }
  .sh-p9 { transform: translateX(28px); }
  .sh-coin { opacity: 0; }
}

/* -------------------------------------------------------------- sections */
.site-section { padding: var(--sp-8) 0; }
.site-section h2 { text-align: center; }
.site-intro { background: var(--surface); }
.site-intro-text { font-size: 1.15rem; line-height: 1.75; color: var(--text-muted); margin: 0 auto; max-width: var(--measure); }

.site-services { background: var(--surface-sunken); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.site-svc-grid {
  list-style: none; padding: 0; margin: var(--sp-6) 0 0;
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}
.site-svc-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal-600);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease;
}
.site-svc-card:hover, .site-svc-card:focus-within { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.site-svc-card:nth-child(3n+2) { border-top-color: var(--navy-600); }
.site-svc-card:nth-child(3n) { border-top-color: var(--gold-500); }
.site-svc-num { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--link); }
.site-svc-name { font-size: 1.12rem; margin: 0; }
.site-svc-text { color: var(--text-muted); margin: 0; flex: 1; }
.site-svc-more { font-weight: 700; text-decoration: none; color: var(--link); align-self: flex-start; margin-top: var(--sp-2); }
.site-svc-more:hover { text-decoration: underline; }

/* ----------------------------------------------------- application form */
.site-apply { background: linear-gradient(180deg, var(--surface) 0%, var(--navy-50) 100%); scroll-margin-top: var(--sp-4); }
.site-apply-lede { text-align: center; color: var(--text-muted); max-width: 60ch; margin: 0 auto var(--sp-5); }
.site-apply-form { padding: var(--sp-6); box-shadow: var(--shadow); }
.site-fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-5); min-width: 0; }
.site-fieldset legend { font-weight: 700; font-size: 1.08rem; color: var(--text); padding: 0; margin-bottom: var(--sp-3); }
.site-form-row { display: grid; gap: 0 var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-form-row-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1fr); }
.site-apply-actions { margin-top: var(--sp-5); }
.site-apply-submit { width: 100%; letter-spacing: .04em; }
.site-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) {
  .site-form-row, .site-form-row-3 { grid-template-columns: 1fr; }
  .site-apply-form { padding: var(--sp-4); }
  .site-section { padding: var(--sp-7) 0; }
}

/* ------------------------------------------------- welcome / needs page */
.site-welcome-hero { padding: var(--sp-7) 0 var(--sp-6); background: linear-gradient(180deg, var(--navy-50) 0%, var(--surface) 100%); text-align: center; }
.site-welcome-hero h1 { margin-bottom: var(--sp-3); }
.site-welcome-hero p { max-width: 62ch; margin: 0 auto; font-size: 1.1rem; color: var(--text-muted); }
.site-needs-grid {
  list-style: none; padding: 0; margin: 0 0 var(--sp-5);
  display: grid; gap: var(--sp-2);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.site-need {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-raised); padding: var(--sp-3);
  cursor: pointer; height: 100%;
}
.site-need:hover { border-color: var(--border-strong); }
.site-need:has(input:checked) { border-color: var(--teal-600); background: var(--teal-50); }
.site-need input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: .2rem; flex: 0 0 auto; accent-color: var(--teal-700); }
.site-need span { font-weight: 600; }
.site-svc-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-1) var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.site-svc-links a { text-decoration: none; }
.site-svc-links a:hover { text-decoration: underline; }
.site-svc-links .site-num { color: var(--text-faint); font-variant-numeric: tabular-nums; margin-right: var(--sp-1); }
.site-confirm { border-left: 4px solid var(--ok-700); }

/* ---------------------------------------------------------- service page */
.site-svc-hero { padding: var(--sp-7) 0 var(--sp-6); background: linear-gradient(180deg, var(--navy-50) 0%, var(--surface) 100%); }
.site-svc-hero .site-svc-num { font-size: 2.4rem; display: block; margin-bottom: var(--sp-2); }
.site-svc-hero .lede { font-size: 1.15rem; color: var(--text-muted); max-width: var(--measure); }
.site-svc-body { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .site-svc-body { grid-template-columns: 1fr; } }
.site-svc-body h2 { text-align: left; font-size: 1.3rem; }
.site-svc-body ul { padding-left: 1.2rem; }
.site-svc-body li { margin-bottom: var(--sp-2); }
.site-svc-cta { position: sticky; top: var(--sp-4); }
.site-disclosure { font-size: .95rem; color: var(--text-muted); }
.site-disclosure li { margin-bottom: var(--sp-2); }
.site-curated { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); list-style: none; padding: 0; margin: 0; }
.site-curated-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.site-curated-card h3 { margin: 0; font-size: 1.1rem; }
.site-curated-logo { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.site-pager { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-6); }
