/* ==========================================================================
   Components: header, nav, buttons, stickers, notices, controls, toast, footer
   ========================================================================== */

/* ---- header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wordmark__tag {
  display: inline-block;
  padding: 3px 10px 4px;
  border: 1.5px solid var(--ink-2);
  border-radius: 999px;
  background: var(--lime);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.2;
  transform: rotate(-3deg);
  white-space: nowrap;
}

.wordmark--light {
  color: #f1f1f1;
}

/* small header pills (mirrors froink.com "launch" / "claim") */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s, background-color 0.15s;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill:active {
  transform: translateY(1px);
}

.pill--orange {
  background: var(--orange);
  border-color: transparent;
  color: var(--ink);
}

.pill--orange:hover {
  background: #ff5a35;
}

.pill__icon {
  width: 18px;
  height: 18px;
}

.pill[data-connected] {
  background: var(--lime);
}

/* ---- sub navigation (second row, like froink.com) ------------------------- */
.subnav {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.subnav__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--subnav-h);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.subnav__inner::-webkit-scrollbar {
  display: none;
}

.subnav a {
  flex: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.subnav a:hover,
.subnav a[aria-current="true"] {
  color: var(--ink);
}

.subnav__sep {
  flex: none;
  width: 1px;
  height: 18px;
  background: var(--line);
}

.subnav__ext {
  color: var(--muted-2) !important;
}

.subnav__ext:hover {
  color: var(--ink) !important;
}

@media (min-width: 1100px) {
  .subnav__inner {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---- big 3D buttons (froink.com "Launch a coin" / "Explore coins") ------- */
.btn {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
  --btn-edge: var(--line);
  --btn-shadow: #b5b5b5;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 38px;
  border: 1px solid var(--btn-edge);
  border-radius: 28px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: 0 7px 0 0 var(--btn-shadow);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(0);
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out), filter 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 0 var(--btn-shadow);
}

.btn:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 0 var(--btn-shadow);
}

.btn--orange {
  --btn-bg: var(--orange);
  --btn-fg: #fff;
  --btn-edge: var(--orange-edge);
  --btn-shadow: var(--orange-shadow);
}

.btn--white {
  --btn-bg: #fff;
}

.btn[aria-busy="true"] {
  cursor: progress;
  filter: saturate(0.7);
}

.btn[aria-busy="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn:focus-visible {
  outline-offset: 6px;
  border-radius: 28px;
}

.btn-link {
  border: 0;
  background: none;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link:hover {
  color: var(--ink);
}

/* small doodle chips (playground actions, copy, etc.) */
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid var(--ink-2);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 2px 3px 0 var(--ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.12s var(--ease-out), box-shadow 0.12s var(--ease-out);
}

.chip-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 4px 0 var(--ink-2);
}

.chip-btn:active {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 var(--ink-2);
}

.chip-btn--pink {
  background: var(--pink);
}

.chip-btn--ghost {
  background: #fff;
}

.chip-btn--dark {
  min-height: 34px;
  padding: 0 14px;
  border-color: #3a3a3a;
  background: #1c1c1c;
  color: #f1f1f1;
  box-shadow: none;
  font-size: 13px;
}

.chip-btn--dark:hover {
  background: #2a2a2a;
  box-shadow: none;
}

/* ---- text bits -------------------------------------------------------------- */
.eyebrow {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.3;
}

.lede {
  color: var(--muted);
  font-size: clamp(16px, 1.1vw + 11px, 19px);
  line-height: 1.65;
  max-width: 60ch;
}

.text-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: var(--orange);
  transition: text-decoration-color 0.15s, color 0.15s;
}

.text-link:hover {
  color: var(--orange-edge);
}

/* hand-written doodle annotations ("very token. much economics.") */
.annot {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  transform: rotate(-6deg);
  transform-origin: left center;
  white-space: nowrap;
}

.annot--purple {
  color: var(--purple);
}

.annot--magenta {
  color: var(--magenta);
}

/* "Pause doodles" toggle */
.doodle-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.doodle-toggle:hover {
  color: var(--ink);
  border-color: #cfcfcf;
}

.doodle-toggle__icon {
  font-size: 11px;
}

/* ---- sticker cards (doodle boxes with a sketchy second outline) ---------- */
.sticker {
  position: relative;
  border: 2px solid var(--ink-2);
  border-radius: 10px;
  background: #fff;
}

.sticker::after {
  content: "";
  position: absolute;
  inset: 4px -6px -6px 4px;
  z-index: -1;
  border: 1.5px solid var(--ink-2);
  border-radius: 12px;
  transform: rotate(0.6deg);
  pointer-events: none;
}

.sticker--lime {
  background: var(--lime);
}

.sticker--yellow {
  background: var(--yellow);
}

.sticker--pink {
  background: var(--pink);
}

.sticker--lavender {
  background: var(--lavender);
}

/* ---- notice box (froink.com "holder rewards enabled") --------------------- */
.notice {
  padding: 16px 20px;
  border-left: 3px solid var(--notice-edge);
  border-radius: 0 12px 12px 0;
  background: var(--cream);
  color: #5d5d5d;
  font-size: 14.5px;
  line-height: 1.6;
}

.notice__title {
  margin-bottom: 4px;
  color: var(--notice-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}

/* ---- circled step numbers ---------------------------------------------------- */
.step-num {
  --c: var(--purple);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--c);
  border-radius: 50%;
  color: var(--c);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

.step-num::after {
  content: "";
  position: absolute;
  inset: -5px -3px -2px -4px;
  border: 1.5px solid var(--c);
  border-radius: 50%;
  opacity: 0.35;
  transform: rotate(-12deg);
}

.step-num--pink {
  --c: var(--magenta);
}

.step-num--green {
  --c: var(--green-ink);
}

/* ---- status pill + redaction marker ------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1.5px solid var(--ink-2);
  border-radius: 999px;
  background: var(--lavender);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
  text-transform: lowercase;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  animation: blink 1.6s ease-in-out infinite;
}

.status-pill[data-state="open"] {
  background: var(--lime);
}

.status-pill[data-state="open"]::before {
  background: var(--green-ink);
  animation: none;
}

.redact {
  display: inline-block;
  height: 14px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(-8deg, transparent 0 3px, rgba(255, 255, 255, 0.12) 3px 4px),
    var(--ink-2);
  transform: rotate(-1.2deg);
  vertical-align: middle;
}

.redact--sm { width: 64px; }
.redact--md { width: 104px; }
.redact--lg { width: 150px; }

/* ---- range sliders ------------------------------------------------------------ */
.range {
  --fill: 30%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 14px;
  border: 2px solid var(--ink-2);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime) var(--fill), #fff var(--fill));
}

.range--time::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--yellow) var(--fill), #fff var(--fill));
}

.range::-moz-range-track {
  height: 10px;
  border: 2px solid var(--ink-2);
  border-radius: 999px;
  background: #fff;
}

.range::-moz-range-progress {
  height: 10px;
  border-radius: 999px;
  background: var(--lime);
}

.range--time::-moz-range-progress {
  background: var(--yellow);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -9px;
  border: 2px solid var(--ink-2);
  border-radius: 50%;
  background: #fff176 radial-gradient(circle, transparent 5.5px, var(--ink-2) 6px, var(--ink-2) 7.2px, transparent 7.6px);
  box-shadow: 2px 2px 0 var(--ink-2);
  transition: transform 0.12s;
}

.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink-2);
  border-radius: 50%;
  background: #fff176;
  box-shadow: 2px 2px 0 var(--ink-2);
}

.range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.range:focus-visible::-moz-range-thumb {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

/* ---- toast ------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  width: max-content;
  max-width: min(92vw, 460px);
  padding: 14px 20px;
  border: 2px solid var(--ink-2);
  border-radius: 14px;
  background: #fff;
  box-shadow: 4px 5px 0 var(--ink-2);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px) rotate(-1deg);
  transition: opacity 0.2s, transform 0.3s var(--ease-bounce), visibility 0s linear 0.3s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) rotate(-1deg);
  transition: opacity 0.2s, transform 0.3s var(--ease-bounce), visibility 0s;
}

/* ---- footer -------------------------------------------------------------------- */
.site-footer {
  padding: 64px 0 40px;
  background: var(--night);
  color: #f1f1f1;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-bottom: 36px;
  border-bottom: 1px solid #242424;
}

.footer__tag {
  color: #8d8d8d;
  font-family: var(--font-display);
  font-size: 15px;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 24px;
  padding: 40px 0;
}

.footer__nav h2 {
  margin-bottom: 14px;
  color: var(--muted-2);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
}

.footer__nav a {
  display: block;
  width: fit-content;
  padding: 5px 0;
  color: #f1f1f1;
  font-family: var(--font-display);
  font-size: 16.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.footer__nav a:hover {
  color: var(--yellow);
}

.footer__mint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 18px 0;
  border-top: 1px solid #242424;
  border-bottom: 1px solid #242424;
}

.footer__mint-label {
  color: #8d8d8d;
  font-family: var(--font-display);
  font-size: 14px;
}

.mint {
  font-family: var(--font-mono);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.footer__mint .mint {
  color: #dcdcdc;
}

.footer__legal {
  max-width: 80ch;
  padding-top: 22px;
  color: #8d8d8d;
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pill--hide-sm {
    display: none;
  }
  .wordmark__tag {
    font-size: 11.5px;
  }
}

@media (max-width: 380px) {
  .wordmark__tag {
    display: none;
  }
}

/* ---- keyframes ----------------------------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(0.7) rotate(20deg); opacity: 0.6; }
}

@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(-3deg) translateY(-2px); }
}
