:root {
  --bg: #F3F3EF;
  --card: #FFFFFF;
  --line: #DADDD6;
  --ink: #1E2723;
  --muted: #5B6A63;
  --purple: #6B3377;
  --purple-dark: #4F2459;
  --on-purple: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, .brand { font-family: 'Fraunces', Georgia, serif; }

a { color: var(--purple); }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }

/* header band, same purple as the PIS emails */
.band { background: var(--purple); color: var(--on-purple); }
.band-inner { max-width: 760px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.7rem; color: var(--on-purple); text-decoration: none; }
.chip { flex: none; width: 48px; height: 48px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.chip img { width: 40px; height: auto; display: block; }
.band a.badge { color: var(--on-purple); border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 6px 14px; font-size: .9rem; text-decoration: none; }
.band a.badge:hover { background: rgba(255,255,255,.14); }

.page { max-width: 760px; margin: 0 auto; padding: 48px 24px 32px; display: flex; flex-direction: column; gap: 48px; }

/* notice */
.hero-logo { display: block; width: 180px; max-width: 50%; height: auto; margin: 0 0 24px; }
.lead { margin: 0 0 8px; font-weight: 600; font-size: clamp(1.4rem, 4.5vw, 2rem); font-family: 'Fraunces', Georgia, serif; }
h1 { margin: 0; font-weight: 800; font-size: clamp(3rem, 12vw, 5.5rem); line-height: 1; letter-spacing: -.02em; }
.note { max-width: 560px; margin: 20px 0 0; font-size: 1.1rem; color: var(--muted); }

.steps { display: flex; flex-direction: column; gap: 14px; }
.steps h2 { margin: 0 0 4px; font-size: 1.6rem; }
.step { display: flex; gap: 18px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: var(--on-purple); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0; font-size: 1.15rem; }
.step p { margin: 2px 0 0; color: var(--muted); }
.step > div { flex: 1; min-width: 0; }

form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
input[type=email] { flex: 1 1 220px; min-width: 0; font: inherit; color: var(--ink); background: #fff; border: 1px solid #B9BEB6; border-radius: 10px; padding: 12px 14px; }
input[type=email]::placeholder { color: #7A857F; }
button, .btn { font: inherit; font-weight: 600; background: var(--purple); color: var(--on-purple); border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .btn:hover { background: var(--purple-dark); color: var(--on-purple); }
button:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--purple); border: 1px solid var(--purple); }
.btn-ghost:hover { background: rgba(107,51,119,.08); color: var(--purple-dark); }
.consent { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.status { min-height: 1.5em; margin: 8px 0 0; font-weight: 500; }
.status.ok { color: #1E6B3C; }
.status.error { color: #A12A3F; }

/* thank you page */
.thanks { align-items: center; text-align: center; gap: 20px; }
.thanks-gif { width: min(300px, 80%); height: auto; border-radius: 16px; }
.thanks h1 { font-size: clamp(2.4rem, 9vw, 4rem); }
.thanks p { max-width: 460px; margin: 0; color: var(--muted); font-size: 1.1rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* legal pages */
.doc h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin: 0 0 24px; }
.doc h2 { font-size: 1.4rem; margin: 36px 0 8px; }
.doc p, .doc li { color: #3F4C46; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--purple); }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--purple); border-radius: 10px; padding: 4px 20px; margin: 0 0 20px; }
.callout p { color: var(--ink); font-weight: 500; }

/* footer */
.foot { max-width: 760px; margin: 0 auto; width: 100%; padding: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: the header already shows the logo */
@media (max-width: 600px) { .hero-logo { display: none; } }

@media print { form, .status { display: none; } }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6) rotate(-6deg); } 60% { transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(107,51,119,.45); } 70%,100% { box-shadow: 0 0 0 12px rgba(107,51,119,0); } }

.page > section:first-child, .doc > div { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.steps > h2 { animation: rise .6s .25s cubic-bezier(.2,.7,.2,1) both; }
.steps > .step { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.steps > .step:nth-child(2) { animation-delay: .35s; }
.steps > .step:nth-child(3) { animation-delay: .5s; }
.steps > .step:nth-child(4) { animation-delay: .65s; }

.hero-logo { animation: bob 5s ease-in-out infinite; }
.num { animation: ring 2.8s ease-out infinite; }
.step:nth-child(3) .num { animation-delay: .4s; }
.step:nth-child(4) .num { animation-delay: .8s; }

.step { transition: transform .25s ease, box-shadow .25s ease; }
.step:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(60,40,90,.14); }
button, .btn { transition: background .2s ease, transform .15s ease; }
button:active, .btn:active { transform: scale(.96); }
.chip { transition: transform .3s ease; }
.brand:hover .chip { transform: rotate(-8deg) scale(1.06); }

.thanks .thanks-gif { animation: pop .7s cubic-bezier(.2,.8,.3,1) both; }
.thanks h1 { animation: rise .6s .3s cubic-bezier(.2,.7,.2,1) both; }
.thanks p { animation: rise .6s .45s cubic-bezier(.2,.7,.2,1) both; }
.thanks .actions { animation: rise .6s .6s cubic-bezier(.2,.7,.2,1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
