/* ============================================
   BATH — Undercover in Web3
   ============================================ */

:root {
  --bg: #b8a6f2;
  --ink: #1b1730;
  --cream: #fbf6ea;
  --bill: #4cae6b;
  --bill-dark: #2e8b4f;
  --citrus: #f5a623;
  --sky: #bfd9f7;
  --loss: #d1495b;

  --font-display: "Baloo 2", ui-rounded, "SF Pro Rounded", "Segoe UI Rounded", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --wrap: 1120px;
  --radius: 18px;
  --border: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--citrus);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bill-dark);
  margin: 0 0 0.8em;
}

.eyebrow--badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px 8px 14px;
  box-shadow: 4px 4px 0 rgba(27, 23, 48, 0.2);
}
.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bill);
  box-shadow: 0 0 0 3px rgba(76, 174, 107, 0.25);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* ===== FLOATBAR ===== */
.floatbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 7px 10px 7px 12px;
  box-shadow: 4px 4px 0 rgba(27, 23, 48, 0.22);
}
.floatbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}
.floatbar__logo { width: 32px; height: auto; }
.floatbar__links { display: flex; gap: 6px; }
.floatbar__links a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bill);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.floatbar__links a:hover {
  background: #58c179;
  transform: translateY(-1px);
}

/* ===== layout helpers ===== */
.section__head {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.section__sub {
  max-width: 60ch;
  margin: 0 auto;
  opacity: 0.85;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 90px 24px;
  scroll-margin-top: 90px;
}
.hero__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}
.hero__lede {
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.6em;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__text > * {
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero__text > *:nth-child(1) { animation-delay: 0s; }
.hero__text > *:nth-child(2) { animation-delay: 0.08s; }
.hero__text > *:nth-child(3) { animation-delay: 0.16s; }
.hero__text > *:nth-child(4) { animation-delay: 0.24s; }
.hero__art {
  position: relative;
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.1s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: 999px;
  border: var(--border) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn--fill { background: var(--citrus); color: var(--ink); }

.hero__art::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 62%);
  filter: blur(8px);
  pointer-events: none;
}
.tub-illustration {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 0 rgba(27, 23, 48, 0.12));
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  animation: hero-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.4s;
}
.scroll-cue__pill {
  width: 26px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 3px 3px 0 rgba(27, 23, 48, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.scroll-cue:hover .scroll-cue__pill { transform: translateY(-2px); }
.scroll-cue__coin {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--citrus);
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 8px;
  line-height: 1;
  color: var(--ink);
  transform: translateX(-50%);
  animation: coin-slide 1.8s ease-in-out infinite;
}
@keyframes coin-slide {
  0%, 100% { top: 4px; }
  50% { top: 19px; }
}
.scroll-cue__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ===== MARKET ===== */
.market {
  background: var(--cream);
  padding: 70px 24px 90px;
  scroll-margin-top: 90px;
}
.ticker {
  max-width: 680px;
  margin: 52px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.ticker__card {
  background: var(--cream);
  border: var(--border) solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 8px 8px 0 rgba(27, 23, 48, 0.15);
}
.ticker__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticker__badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  border: 3px solid var(--ink);
}
.ticker__badge--btc { background: var(--citrus); }
.ticker__badge--xrp { background: var(--sky); }
.ticker__card h3 { margin: 0; font-size: 1.15rem; }
.ticker__full {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0.6;
}
.ticker__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.ticker__change {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  width: fit-content;
  margin: 0;
}
.ticker__change[data-state="up"] { background: var(--bill); }
.ticker__change[data-state="down"] { background: var(--loss); color: var(--cream); }
.ticker__change[data-state="loading"],
.ticker__change[data-state="error"] { background: var(--bg); opacity: 0.75; }

.ticker__meta {
  text-align: center;
  margin: 28px auto 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.6;
}

.market-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 22px auto 0;
}
.market-social {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 rgba(27, 23, 48, 0.18);
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.market-social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
.market-social:hover {
  background: var(--bill);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(27, 23, 48, 0.22);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 40px 24px;
}
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.85;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--cream);
}
.footer__tub { width: 46px; height: auto; }
.footer__inner p { margin: 0; max-width: 60ch; }

/* ===== scroll reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== responsive ===== */
@media (max-width: 900px) {
  .hero { flex-direction: column; justify-content: center; padding: 110px 24px 48px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__art { order: -1; max-width: 340px; margin: 0 auto; }
  .hero__text { text-align: center; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .scroll-cue { position: static; transform: none; margin-top: 36px; }
}

@media (max-width: 640px) {
  .ticker { grid-template-columns: 1fr; max-width: 360px; }
}

@media (max-width: 420px) {
  .hero { padding: 100px 18px 48px; }
  .hero__art { max-width: 260px; }
  .market { padding: 56px 18px 70px; }
  .ticker__card { padding: 20px; }
  .footer { padding: 32px 18px; }
  .footer__inner { justify-content: center; text-align: center; }
  .floatbar { gap: 10px; padding: 6px 8px 6px 10px; top: 12px; }
  .floatbar__brand span { display: none; }
  .floatbar__links a { padding: 7px 13px; font-size: 0.68rem; }
}

@media (max-height: 700px) {
  .scroll-cue { bottom: 16px; }
}

@media (max-height: 560px) {
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__text > *,
  .hero__art,
  .eyebrow__dot,
  .scroll-cue,
  .scroll-cue__coin {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .scroll-cue__coin { top: 11px; transform: translateX(-50%); }
  .scroll-cue { transform: translateX(-50%); }
}
