/* Petagon — design system */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  /* brand */
  --navy: #1E2060; --navy2: #191B52; --navy3: #13153F;
  --purple: #7C4DFF; --purpleL: #C4A8FF; --purpleD: #5B2FE0;
  --green: #3DD68C; --green-ink: #1c9b62;
  --red: #FF5C5C; --red-ink: #d23b3b;
  --gold: #FFCB47; --gold-ink: #8a6b00;
  /* neutrals */
  --ink: #1b1c33; --muted: #6b6d8a; --line: #e9e9f3; --bg: #f5f5fb; --card: #fff;
  /* gradients */
  --grad-purple: linear-gradient(135deg, #8B5CFF 0%, var(--purpleD, #5B2FE0) 100%);
  --grad-navy: linear-gradient(165deg, #2A2C72 0%, var(--navy3) 100%);
  /* elevation */
  --shadow-sm: 0 1px 2px rgba(30,32,96,.05), 0 2px 6px rgba(30,32,96,.05);
  --shadow: 0 4px 14px rgba(30,32,96,.08), 0 1px 3px rgba(30,32,96,.05);
  --shadow-md: 0 12px 30px rgba(30,32,96,.12);
  --shadow-lg: 0 24px 60px rgba(30,32,96,.18);
  /* shape */
  --radius: 18px; --r-sm: 12px; --r-lg: 26px; --r-pill: 999px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Fredoka", "Plus Jakarta Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased;
  background: var(--bg);
  background-image: radial-gradient(1200px 420px at 50% -180px, rgba(124,77,255,.10), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--purpleD); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: 960px; margin: 0 auto; padding: 22px 18px 40px; }
.narrow { max-width: 470px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.center { text-align: center; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* headings */
h1, h2 { font-family: var(--display); letter-spacing: -.01em; color: var(--navy); }
h2 { font-size: 21px; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 14px rgba(19,21,63,.25);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.brand::before {
  content: ""; width: 26px; height: 26px; flex: none; background: var(--purpleL);
  -webkit-mask: url("/icons/paw.svg") center/contain no-repeat; mask: url("/icons/paw.svg") center/contain no-repeat;
}
.brand b { font-family: var(--display); color: #fff; font-size: 22px; font-weight: 600; letter-spacing: .2px; }
.brand span { color: var(--purpleL); font-size: 12px; font-weight: 600; letter-spacing: .3px; align-self: center; }
.topbar a, .topbar button.link { color: #d7d8f0; }
.topbar a:hover, .topbar button.link:hover { color: #fff; text-decoration: none; }

/* hero */
.hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: var(--grad-navy); border-radius: 0 0 32px 32px; padding: 44px 22px 60px;
}
.hero::after {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 320px;
  background: radial-gradient(closest-side, rgba(124,77,255,.45), transparent); filter: blur(10px); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(30px, 7.5vw, 52px); font-weight: 700; line-height: 1.05; margin: 16px auto 10px; max-width: 12ch; }
.hero p { color: #c9caf0; max-width: 540px; margin: 0 auto 24px; font-size: 16px; }
.kicker { display: inline-block; color: var(--purpleL); font-weight: 700; letter-spacing: 2px; font-size: 12px; text-transform: uppercase; background: rgba(196,168,255,.12); padding: 6px 12px; border-radius: var(--r-pill); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }

/* a tappable card (landing path choices) */
.tile { display: block; text-align: left; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tile h3 { color: var(--navy); }
a.tile:hover, .tile.linkish:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--purpleL); text-decoration: none; }
.tile .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(124,77,255,.12); color: var(--purpleD); margin-bottom: 12px; }
.tile .ic svg { width: 26px; height: 26px; }

/* icons */
.svgic { width: 1.25em; height: 1.25em; vertical-align: -.18em; flex: none; }

/* forms */
label { display: block; font-weight: 600; font-size: 13px; color: #4a4c69; margin: 14px 0 6px; }
input, select {
  width: 100%; padding: 13px 14px; min-height: 46px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #a6a8c0; }
input:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(124,77,255,.16); }
input:disabled { background: #f3f3f8; color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: 46px; border-radius: var(--r-sm); border: 0; font: inherit; font-weight: 700;
  cursor: pointer; background: var(--grad-purple); color: #fff; box-shadow: 0 6px 16px rgba(91,47,224,.28);
  transition: transform .12s ease, box-shadow .18s ease, filter .15s ease;
}
.btn:hover { box-shadow: 0 10px 22px rgba(91,47,224,.34); filter: brightness(1.03); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { filter: grayscale(.3) opacity(.6); box-shadow: none; cursor: default; }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 24px; min-height: 54px; font-size: 17px; border-radius: 14px; }
.btn--navy { background: var(--navy); box-shadow: 0 6px 16px rgba(19,21,63,.28); }
.btn--ghost { background: #fff; color: var(--purpleD); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--purpleL); background: rgba(124,77,255,.04); filter: none; }
.btn svg { width: 18px; height: 18px; }
button.link { background: none; border: 0; color: var(--purpleD); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; line-height: 1; }
.chip--green { background: rgba(61,214,140,.16); color: var(--green-ink); }
.chip--gold { background: rgba(255,203,71,.22); color: var(--gold-ink); }
.chip--red { background: rgba(255,92,92,.15); color: var(--red-ink); }
.chip--muted { background: #eef0f6; color: var(--muted); }

/* score */
.score { display: flex; align-items: center; gap: 18px; }
.score .num { font-family: var(--display); font-size: 46px; font-weight: 700; color: var(--navy); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.score .of { color: var(--muted); font-weight: 600; font-size: .42em; }
.bar { height: 12px; background: #ececf6; border-radius: var(--r-pill); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--purple), var(--purpleL)); transition: width .6s cubic-bezier(.2,.8,.2,1); }

/* verdict */
.verdict { position: relative; border-radius: var(--r-lg); padding: 36px 22px; text-align: center; color: #fff; box-shadow: var(--shadow-md); animation: pop .35s cubic-bezier(.2,1.3,.4,1) both; }
.verdict h1 { color: inherit; font-family: var(--display); font-size: clamp(32px, 8vw, 54px); margin: 6px 0 4px; letter-spacing: .5px; font-weight: 700; }
.verdict .ico { width: 64px; height: 64px; margin: 0 auto; border-radius: var(--r-pill); display: grid; place-items: center; background: rgba(255,255,255,.22); }
.verdict .ico svg { width: 38px; height: 38px; stroke: currentColor; }
.verdict--FULL { background: linear-gradient(150deg, #4FE39B, #25b673); }
.verdict--LEASH { background: linear-gradient(150deg, #FFD66B, #F4B740); color: #4a3a00; }
.verdict--DENIED { background: linear-gradient(150deg, #FF7A7A, #ec4f4f); }
.verdict ul { list-style: none; padding: 0; margin: 14px 0 0; font-weight: 600; display: grid; gap: 4px; }
.verdict ul li { opacity: .92; }

/* passport */
.passport-head { display: flex; gap: 16px; align-items: center; }
.avatar { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; background: var(--grad-purple); flex: none; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 34px; font-weight: 600; box-shadow: var(--shadow-sm); }
.ptg { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; color: var(--purpleD); font-weight: 700; }
.qr { background: #fff; padding: 14px; border-radius: 16px; border: 1px solid var(--line); width: fit-content; box-shadow: var(--shadow-sm); }

/* lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 13px 20px; border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s, transform .25s; z-index: 80; max-width: 90vw; font-weight: 600; }
.toast--show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: linear-gradient(135deg, #FF7A7A, #ec4f4f); }
.toast--success { background: linear-gradient(135deg, #4FE39B, #25b673); }

/* focus */
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; border-radius: 8px; }

/* consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; background: var(--navy); color: #fff; padding: 14px 16px; border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; z-index: 90; }
.consent a { color: var(--purpleL); }

footer { text-align: center; color: var(--muted); font-size: 12px; line-height: 1.8; padding: 34px 20px; }
footer a { color: var(--muted); }

@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* entrance + stagger for cards / list items (set style="--i:N" per item) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: rise .34s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes pulseIn { 0% { transform: scale(.82); opacity: 0; } 60% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
.pulse-in { animation: pulseIn .4s cubic-bezier(.2,1.3,.4,1) both; }

/* active nav item (consistent highlight across app pages) */
.topbar .link.active, .topbar a.link.active { color: var(--purpleD); font-weight: 700; }

/* social links row */
.socials { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(124,77,255,.1); color: var(--purpleD); transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.socials a:hover { transform: translateY(-2px); background: rgba(124,77,255,.18); box-shadow: var(--shadow-sm); }
.socials a:active { transform: scale(.94); }
.socials a svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
