/* =========================================================================
   App-specific shared primitives.
   Built on top of /design-system/colors_and_type.css (which provides the
   --primary-*, --neutral-*, --space-*, --radius-*, --shadow-*, typography,
   and base element styles). Only the bits unique to this app live here:
   topbar, persona-nav, buttons, footer, animations.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg-subtle);
  color: var(--fg-default);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.view-enter    { animation: fadeInUp .4s var(--ease-out) both; }
.stagger-child { opacity: 0; animation: fadeInUp .5s var(--ease-out) both; }
.stagger-child:nth-child(1) { animation-delay: .06s; }
.stagger-child:nth-child(2) { animation-delay: .12s; }
.stagger-child:nth-child(3) { animation-delay: .18s; }
.stagger-child:nth-child(4) { animation-delay: .24s; }
.stagger-child:nth-child(5) { animation-delay: .30s; }
.stagger-child:nth-child(6) { animation-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── SLIM TOP BANNER (above topbar, scrolls away) ─── */
.top-banner {
  background: var(--primary-700); color: #fff;
}
.top-banner-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 9px 28px;
  display: flex; align-items: center; gap: 14px;
  font: 600 13px/18px var(--font-sans);
}
.top-banner-pill {
  display: inline-block; flex-shrink: 0;
  padding: 3px 10px;
  background: rgba(255,255,255,.18);
  border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
}
.top-banner-text {
  flex: 1; min-width: 0;
  color: rgba(255,255,255,.92);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-banner-text strong { color: #fff; font-weight: 700; margin-right: 6px; }
.top-banner-cta {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; font-weight: 700; text-decoration: none;
  transition: opacity 160ms var(--ease-out);
}
.top-banner-cta:hover { color: #fff; text-decoration: none; opacity: .8; }
.top-banner-cta svg { transition: transform 180ms var(--ease-out); }
.top-banner-cta:hover svg { transform: translateX(3px); }

@media (max-width: 720px) {
  .top-banner-inner { padding: 8px 18px; gap: 10px; font-size: 12px; }
  .top-banner-text { white-space: normal; }
}

/* ─── TOPBAR (sticky, light cream) ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 255, .85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; gap: 20px; }
.topbar .brand-row { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.wt-logo {
  height: 28px; width: auto; display: block; flex-shrink: 0;
  cursor: pointer; transition: opacity 180ms var(--ease-out);
}
.wt-logo:hover { opacity: .85; }
.brand-pill {
  font: var(--body-bold-14);
  color: var(--fg-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--ease-out);
}
.brand-pill:hover { color: var(--primary-700); text-decoration: none; }

.crumbs { display: flex; align-items: center; gap: 8px; font: var(--body-medium-14); color: var(--fg-muted); min-width: 0; flex: 1; }
.crumbs a { color: var(--fg-muted); text-decoration: none; font-weight: 600; white-space: nowrap; transition: color 160ms var(--ease-out); }
.crumbs a:hover { color: var(--primary-700); text-decoration: none; }
.crumbs .sep { color: var(--neutral-500); flex-shrink: 0; }
.crumbs .current { color: var(--primary-900); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.persona-nav { display: flex; gap: 4px; background: var(--primary-200); border-radius: var(--radius-pill); padding: 4px; }
.persona-nav a {
  background: none; border: none; font-family: inherit; font-size: 12.5px; font-weight: 700;
  padding: 6px 14px; border-radius: var(--radius-pill); color: var(--fg-muted); text-decoration: none;
  transition: all 180ms var(--ease-out); display: inline-flex; align-items: center; gap: 6px;
}
.persona-nav a:hover { color: var(--primary-900); text-decoration: none; }
.persona-nav a.active { background: var(--surface); color: var(--primary-900); box-shadow: var(--shadow-sm); }

.topbar-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-md);
  background: var(--primary-700); color: #fff;
  font: var(--body-bold-14); text-decoration: none;
  transition: all 180ms var(--ease-out);
  white-space: nowrap;
}
.topbar-cta:hover { background: var(--primary-800); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

/* ─── BUTTONS ─── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-md); font: var(--body-bold-14); font-family: inherit; cursor: pointer; border: none; transition: all 180ms var(--ease-out); text-decoration: none; }
.btn-primary { background: var(--primary-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-800); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--primary-700); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--primary-200); border-color: var(--primary-300); text-decoration: none; }

/* ─── SITE FOOTER ─── */
.site-footer {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 64px auto 0; padding: 32px 28px;
  border-top: 1px solid var(--border);
  text-align: center; font: var(--body-medium-12);
  color: var(--fg-muted);
}

@media (max-width: 720px) {
  .topbar-inner { padding: 12px 18px; gap: 12px; flex-wrap: wrap; }
  .brand-pill { display: none; }
  .topbar-cta { padding: 8px 14px; }
}

/* ─── Compact support help card (used site-wide) ─── */
.support-card-mini {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 14px 20px; box-shadow: var(--shadow-sm);
  max-width: 1240px; margin: 32px auto 0;
  transition: box-shadow 200ms var(--ease-out);
}
.support-card-mini:hover { box-shadow: var(--shadow-md); }
.support-card-mini .support-mini-mascot { flex-shrink: 0; width: 56px; height: 56px; }
.support-card-mini .support-mini-mascot img { width: 100%; height: 100%; object-fit: contain; }
.support-card-mini .support-mini-text { flex: 1; min-width: 200px; line-height: 1.35; }
.support-card-mini .support-mini-text strong { display: block; color: var(--primary-900); font: 700 14px/19px var(--font-sans); margin-bottom: 1px; }
.support-card-mini .support-mini-text span { display: block; color: var(--fg-muted); font: 400 12.5px/17px var(--font-sans); }
.support-card-mini .support-mini-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; background: var(--primary-700); color: #fff;
  border-radius: var(--radius-md); font: 700 13px/18px var(--font-sans);
  text-decoration: none; flex-shrink: 0;
  transition: all 180ms var(--ease-out);
}
.support-card-mini .support-mini-cta:hover { background: var(--primary-800); transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }

@media (max-width: 540px) {
  .support-card-mini { justify-content: center; text-align: center; padding: 14px 16px; }
  .support-card-mini .support-mini-text { text-align: center; }
}

/* ── Footer privacy notice ─────────────────────────────── */
.site-footer .footer-privacy {
  color: var(--fg-subtle, #9191a4);
  font-weight: 400;
  margin-left: 6px;
}
