/* ---------- tokens ---------- */

:root {
  --blue: #003397;
  --blue-dk: #002672;
  --blue-lt: #1747b8;
  --teal: #1b9aa1;
  --teal-hi: #62e4e8;
  --teal-dk: #0d6672;
  --red: #ff5a49;
  --red-dk: #a91d14;
  --yellow: #ffd76a;
  --pink: #ffc9c2;
  --ink: #0a0b14;
  --cream: #fff5e3;
  --cream-dk: #efdcbc;
  --sky: #dfe8ff;

  --font-head: "Darumadrop One", system-ui, sans-serif;
  --font-body: "Mali", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --line: 3px solid var(--ink);
  --wobble: url(#wobble);
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
  color: var(--cream);
  font: 500 17px/1.5 var(--font-body);
  background:
    radial-gradient(70% 55% at 50% 12%, rgb(90 150 255 / .32), transparent 70%),
    radial-gradient(45% 45% at 0% 100%, rgb(98 228 232 / .13), transparent 70%),
    radial-gradient(55% 55% at 100% 65%, rgb(0 18 70 / .45), transparent 70%),
    var(--blue);
  background-attachment: fixed;
}

/* paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { margin: 0; font: 400 1em/1.1 var(--font-head); letter-spacing: .01em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- hand-drawn shapes: fill and outline live on ::before so text stays crisp ---------- */

.drawn { position: relative; isolation: isolate; }
.drawn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: var(--line);
  border-radius: inherit;
  background: var(--fill, var(--cream));
  filter: var(--wobble);
}

/* ---------- buttons ---------- */

.btn {
  all: unset;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px 19px;
  border-radius: 999px;
  color: var(--ink);
  font: 400 21px/1 var(--font-head);
  cursor: pointer;
  transition: transform .12s;
  --face: var(--teal-hi);
  --edge: var(--teal);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: var(--line);
  border-radius: inherit;
  background: radial-gradient(60% 40% at 28% 28%, rgb(255 255 255 / .5), transparent 60%), var(--face);
  box-shadow: inset 0 -7px 0 var(--edge), 0 6px 0 var(--ink);
  filter: var(--wobble);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); }
.btn:focus-visible { outline-offset: 6px; border-radius: 999px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--red { --face: var(--red); --edge: var(--red-dk); color: #fff; text-shadow: 0 2px 0 var(--red-dk); }
.btn--ghost { --face: var(--cream); --edge: var(--cream-dk); }
.btn--sm { padding: 11px 18px 13px; font-size: 16px; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy::after {
  content: "";
  width: 16px; height: 16px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.link {
  all: unset;
  font-weight: 700;
  opacity: .6;
  cursor: pointer;
}
.link:hover { opacity: 1; }

/* ---------- header ---------- */

.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px);
}
.top img { width: auto; height: 44px; }
.top nav { display: flex; align-items: center; gap: 10px; }
.chip {
  all: unset;
  padding: 10px 14px;
  border: 2px solid rgb(255 245 227 / .35);
  border-radius: 999px;
  font: 700 14px/1 var(--font-body);
  cursor: pointer;
}
.chip:hover { border-color: var(--cream); }

/* ---------- home ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: max(640px, calc(100vh - 170px));
  padding: 0 16px 270px;
  text-align: center;
}
.hero__copy { position: relative; z-index: 2; width: 100%; max-width: 900px; }
.hero__logo {
  width: min(720px, 92vw);
  margin: 0 auto;
  filter: drop-shadow(0 10px 0 rgb(0 0 0 / .25));
  animation: bob 5s ease-in-out infinite;
}
.hero__lead { max-width: 560px; margin: 10px auto 26px; color: var(--sky); font-size: clamp(18px, 2.4vw, 24px); }
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* Blobs stand behind the marquee and peek over it */
.peekers { position: absolute; inset: auto 0 0; z-index: 1; height: 260px; pointer-events: none; }
.peekers img { position: absolute; bottom: -60px; width: 300px; }
.peekers img:nth-child(1) { left: -30px; rotate: 8deg; }
.peekers img:nth-child(2) { left: 22%; bottom: -90px; width: 260px; }
.peekers img:nth-child(3) { left: calc(50% - 160px); bottom: -40px; width: 320px; }
.peekers img:nth-child(4) { right: 20%; bottom: -100px; width: 250px; }
.peekers img:nth-child(5) { right: -40px; rotate: -8deg; }

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-bottom: 80px;
  padding: 14px 0;
  border-block: var(--line);
  background: var(--blue-dk);
}
.marquee__track { display: flex; gap: 12px; width: max-content; animation: slide 60s linear infinite; }
.marquee img { width: 150px; height: 150px; border: var(--line); border-radius: 18px; }

.section { max-width: 1080px; margin: 0 auto 90px; padding: 0 16px; }
.section__title {
  margin-bottom: 28px;
  color: var(--teal-hi);
  font-size: clamp(32px, 4.4vw, 48px);
  text-align: center;
  text-shadow: 0 4px 0 var(--ink);
}

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding: 20px 16px 18px; border-radius: 24px; color: var(--ink); counter-increment: step; }
.steps li::after {
  content: counter(step);
  position: absolute;
  top: 18px; left: 16px;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: var(--line);
  border-radius: 50%;
  background: var(--teal-hi);
  font: 400 22px/1 var(--font-head);
}
.steps h3 { margin: 56px 0 6px; font-size: 20px; }
.steps p { font-size: 14px; line-height: 1.4; opacity: .8; }

.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.phases > div { padding: 22px; border-radius: 26px; color: var(--ink); }
.phases > div:first-child { --fill: var(--teal-hi); }
.phases h3 { font-size: 28px; }
.phases p { margin-top: 6px; font-size: 15px; }

.foot { padding: 30px 16px 20px; font-size: 14px; text-align: center; opacity: .7; }

/* ---------- application flow ---------- */

.stage { position: relative; max-width: 620px; margin: 20px auto 0; padding: 0 16px; }

.progress { display: flex; justify-content: center; gap: 8px; margin: 6px 0 26px; padding: 0; list-style: none; }
.progress li {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 3px solid rgb(255 245 227 / .35);
  border-radius: 50%;
  font: 400 17px/1 var(--font-head);
}
.progress .done { border-color: var(--ink); background: var(--cream); color: var(--ink); }
.progress .now { border-color: var(--ink); background: var(--teal-hi); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }

.panel { padding: 34px clamp(20px, 5vw, 40px) 30px; border-radius: 34px; color: var(--ink); }
.panel h2 { margin-bottom: 8px; font-size: clamp(30px, 4.8vw, 40px); }
.panel .lead { margin-bottom: 22px; opacity: .75; }
.panel__peek { position: absolute; top: -104px; right: 26px; z-index: -2; width: 150px; }
.panel--center { text-align: center; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  text-align: left;
}
.row__main { flex: 1; min-width: 0; }
.row small { display: block; font-size: 13px; opacity: .6; }
.ok { color: var(--teal-dk); font: 400 16px var(--font-head); white-space: nowrap; }

.avatar { width: 58px; height: 58px; border: var(--line); border-radius: 50%; }


.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.actions--center { justify-content: center; }
.gap { margin-top: 14px; }

.note { margin-top: 14px; font-size: 13px; opacity: .65; }
.label { display: block; margin-top: 16px; font-weight: 700; }
.field {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 16px;
  border: var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: 700 15px var(--font-mono);
}

.tweet { display: flex; gap: 12px; padding: 16px; border: 2.5px solid var(--ink); border-radius: 20px; background: #fff; }
.tweet .avatar { width: 44px; height: 44px; }

/* Blob ID card */
.idcard {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  margin: 6px 4px 0;
  padding: 18px;
  border-radius: 30px;
  color: var(--cream);
  box-shadow: 0 8px 0 var(--ink);
  rotate: -1.5deg;
  --fill: linear-gradient(160deg, var(--blue-lt), var(--blue) 55%);
}
.idcard__pic { overflow: hidden; border: var(--line); border-radius: 20px; }
.idcard__logo { width: auto; height: 30px; margin-bottom: 8px; }
.idcard dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.idcard dt { align-self: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.idcard dd { margin: 0; font-weight: 700; }
.idcard__code {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font: 400 20px var(--font-head);
  letter-spacing: .06em;
}

.big { margin: 8px 0 2px; color: var(--teal-dk); font: 400 clamp(64px, 12vw, 100px)/1 var(--font-head); }

.ref { display: flex; align-items: center; gap: 10px; }
.ref code {
  flex: 1;
  overflow: hidden;
  padding: 12px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font: 700 14px var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result { margin-top: 18px; padding: 22px; border: var(--line); border-radius: 24px; text-align: center; }
.result h3 { font-size: 32px; }
.result p { margin-top: 6px; }
.result img { width: 120px; margin: 0 auto 10px; border: var(--line); border-radius: 20px; }
.result--gtd { background: var(--teal-hi); }
.result--fcfs { background: var(--yellow); }
.result--pending { background: #fff; }
.result--none { background: var(--pink); }

/* ---------- motion ---------- */

@keyframes bob { 50% { transform: translateY(-8px) rotate(-.6deg); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(1turn); } }

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

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .peekers img { bottom: -30px; width: 200px; }
  .peekers img:nth-child(2), .peekers img:nth-child(4) { display: none; }
  .peekers img:nth-child(3) { left: calc(50% - 100px); bottom: -30px; width: 200px; }
  .phases { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .idcard { grid-template-columns: 1fr; }
  .idcard__pic { max-width: 220px; }
}

/* ---------- form details ---------- */

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.at { position: relative; }
.at::before {
  content: "@";
  position: absolute;
  top: 50%; left: 18px;
  translate: 0 -50%;
  margin-top: 3px;
  color: var(--ink);
  font: 700 15px var(--font-mono);
  opacity: .5;
}
.at .field { padding-left: 34px; }

.error {
  margin-top: 14px;
  padding: 10px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--pink);
  font-weight: 700;
}

.tweet__text { white-space: pre-line; overflow-wrap: anywhere; }
a.btn { text-decoration: none; }
