/* ===========================================================
   RCombinator hero
   Palette sampled directly from the mark: lime #CBFB07, ink #1A160D.
   Accelerator typography (Source Serif 4) over a Robinhood-style
   market surface (Outfit, tabular figures).
   =========================================================== */

:root {
  color-scheme: dark;

  --lime:      #cbfb07;
  --lime-dim:  #aad500;
  --lime-soft: rgba(203, 251, 7, 0.13);

  --ink:       #0a0906;   /* page ground, from the mark's black */
  --surface:   #131208;
  --surface-2: #1a1810;
  --line:      #262418;
  --line-2:    #3a3724;

  --paper:     #f4f4ea;
  --grey:      #9a9885;
  --grey-dim:  #6d6b5c;
  --red:       #ff6a52;

  --f-sans:  "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

p, h1 { margin: 0; }
dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code { font-size: inherit; }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

/* ---------- ambient glow ---------- */

.glow {
  position: fixed;
  inset: -30% -20% auto -20%;
  height: 90vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 78% 22%, rgba(203, 251, 7, 0.16) 0%, transparent 70%),
    radial-gradient(40% 50% at 12% 8%, rgba(203, 251, 7, 0.07) 0%, transparent 72%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.09); }
}

/* ---------- top bar ---------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 1.1rem var(--pad);
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.brand img { width: 42px; height: 42px; border-radius: 9px; }

.chain {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--grey-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

/* ---------- hero layout ---------- */

.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(2.5rem, 5vw, 4rem);
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--lime);
}
.eyebrow__txt { white-space: nowrap; }
.eyebrow__mail {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid rgba(203, 251, 7, 0.35);
  word-break: break-all;
}
.eyebrow__mail:hover { border-bottom-color: var(--lime); }
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 var(--lime-soft);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(203, 251, 7, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(203, 251, 7, 0); }
  100% { box-shadow: 0 0 0 0 rgba(203, 251, 7, 0); }
}

h1 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--lime); }

.lede {
  font-size: 1.0625rem;
  color: var(--grey);
  max-width: 44ch;
}

.cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--lime);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:hover { background: var(--lime-dim); border-color: var(--lime-dim); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line-2); }
.btn--ghost:hover { background: transparent; border-color: var(--lime); color: var(--lime); }

/* ---------- contract address ---------- */

.ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 40rem;
}
.ca__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--grey-dim);
}
.ca__addr { font-size: 0.75rem; color: var(--grey); word-break: break-all; }
.ca__copy {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.ca__copy:hover { color: var(--lime); border-color: var(--lime); }

/* ---------- market card ---------- */

.quote {
  background: linear-gradient(168deg, var(--surface-2) 0%, var(--surface) 62%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
  width: 100%;
}

.quote { min-width: 0; }
.quote__head { display: flex; align-items: center; gap: 0.85rem; }
.live { flex: none; }
.quote__logo { width: 46px; height: 46px; border-radius: 10px; flex: none; }
.quote__id { margin-right: auto; min-width: 0; }
.quote__name { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.quote__sym { font-size: 0.75rem; color: var(--grey-dim); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--lime);
  white-space: nowrap;
}
.live.stale { color: var(--grey-dim); }
.live.stale .pulse { background: var(--grey-dim); animation: none; box-shadow: none; }

.quote__price {
  font-family: var(--f-sans);
  font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin-top: 1.35rem;
  font-variant-numeric: tabular-nums;
  transition: color .35s ease;
}
.quote__price.flash-up { color: var(--lime); }
.quote__price.flash-down { color: var(--red); }

.quote__chg { font-size: 0.875rem; margin-top: 0.2rem; }
.quote__chg.up { color: var(--lime); }
.quote__chg.down { color: var(--red); }
.quote__chg span { color: var(--grey-dim); margin-left: 0.35rem; }

/* ---------- chart ---------- */

.chart { margin-top: 1.1rem; }
.chart svg { display: block; width: 100%; height: 132px; }

#line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 1.5s cubic-bezier(.4, 0, .2, 1) .25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

#area, #dot { opacity: 0; animation: appear .7s ease 1.35s forwards; }
@keyframes appear { to { opacity: 1; } }

#dot { filter: drop-shadow(0 0 6px rgba(203, 251, 7, 0.8)); }

.chart__axis {
  position: relative;
  height: 1.1rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-dim);
  margin-top: 0.5rem;
}
.chart__axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.chart__axis span:first-child { transform: none; }
.chart__axis span:last-child { transform: translateX(-100%); }

/* ---------- stat grid ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.grid dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--grey-dim);
}
.grid dd {
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  margin-top: 0.1rem;
}

/* ---------- buy / sell flow ---------- */

.flow { margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.flow__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--grey-dim);
}
.flow__head b { color: var(--paper); font-weight: 600; }
.flow__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--red);
  overflow: hidden;
  margin-top: 0.5rem;
}
.flow__bar span {
  display: block;
  height: 100%;
  background: var(--lime);
  border-radius: 999px;
  transition: width .8s cubic-bezier(.4, 0, .2, 1);
}
.flow__note { font-size: 0.625rem; color: var(--grey-dim); margin-top: 0.5rem; }

/* ---------- marquee ---------- */

.marquee {
  position: relative;
  z-index: 2;
  border-block: 1px solid var(--line);
  background: var(--lime);
  overflow: hidden;
  padding-block: 0.55rem;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: run 26s linear infinite;
}
.marquee__word {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-family: var(--f-sans);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}
.marquee__word i {
  width: 9px; height: 9px;
  background: var(--ink);
  border-radius: 50%;
  flex: none;
}
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.25rem var(--pad) 1.75rem;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}
.foot__note {
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--grey-dim);
  max-width: 74ch;
}
.foot__mail { font-size: 0.6875rem; }
.foot__mail a { color: var(--lime); text-decoration: none; }
.foot__mail a:hover { text-decoration: underline; }

/* ---------- entrance ---------- */

.top, .hero__copy > *, .quote, .marquee, .foot {
  animation: rise .8s cubic-bezier(.2, .7, .3, 1) both;
}
.hero__copy > *:nth-child(1) { animation-delay: .05s; }
.hero__copy > *:nth-child(2) { animation-delay: .12s; }
.hero__copy > *:nth-child(3) { animation-delay: .19s; }
.hero__copy > *:nth-child(4) { animation-delay: .26s; }
.hero__copy > *:nth-child(5) { animation-delay: .33s; }
.quote   { animation-delay: .18s; }
.marquee { animation-delay: .4s; }
.foot    { animation-delay: .5s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- touch & small screens ---------- */

/* Hover lifts read as stuck states on touch, and tap targets need real size. */
@media (hover: none) {
  .btn:hover { transform: none; }
  .btn, .ca__copy, .eyebrow__mail, .foot__mail a { -webkit-tap-highlight-color: rgba(203, 251, 7, 0.18); }
}

@media (max-width: 760px) {
  :root { --pad: 1.15rem; }

  .top { padding-block: 0.9rem; }
  .brand { font-size: 1rem; }
  .brand img { width: 36px; height: 36px; border-radius: 8px; }
  .chain {
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.65rem;
  }

  .hero {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    gap: 2rem;
  }
  .hero__copy { gap: 1.15rem; }

  h1 { font-size: clamp(2rem, 8.6vw, 3rem); line-height: 1.06; }
  .lede { font-size: 1rem; }

  /* full-width, thumb-sized buttons stacked in reading order */
  .cta { width: 100%; gap: 0.6rem; }
  .cta .btn {
    flex: 1 1 100%;
    min-height: 52px;
    padding-inline: 1.1rem;
  }

  /* label and Copy share a row; the address gets the full width beneath */
  .ca {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label copy"
      "addr  addr";
    align-items: center;
    padding-top: 1.1rem;
    gap: 0.45rem 0.65rem;
  }
  .ca__label { grid-area: label; }
  .ca__copy  { grid-area: copy; min-height: 34px; padding: 0.4rem 0.85rem; }
  .ca__addr  { grid-area: addr; font-size: 0.6875rem; line-height: 1.55; }

  .quote { padding: 1.15rem; border-radius: 14px; }
  .quote__logo { width: 40px; height: 40px; }
  .quote__price { font-size: 2.15rem; margin-top: 1.1rem; }
  .chart svg { height: 112px; }

  .grid { gap: 0.85rem 0.9rem; margin-top: 1.2rem; padding-top: 1.2rem; }
  .grid dt { font-size: 0.625rem; letter-spacing: 0.09em; }
  .grid dd { font-size: 0.9375rem; }

  .flow { margin-top: 1.2rem; padding-top: 1.1rem; }

  .marquee__word {
    font-size: 1.6rem;
    gap: 1.5rem;
    padding-right: 1.5rem;
  }
  .marquee__word i { width: 7px; height: 7px; }

  .foot { gap: 0.7rem; padding-top: 1rem; }
  .foot__note { font-size: 0.625rem; }
}

/* Narrowest phones: give the long figures a full row each. */
@media (max-width: 360px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .quote__price { font-size: 1.95rem; }
  .quote__sym { font-size: 0.6875rem; }
  .chain span { display: none; }
}

/* Short landscape phones: don't force a full-height hero. */
@media (max-height: 520px) and (orientation: landscape) {
  body { min-height: 0; }
  .hero { padding-block: 1.25rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  .glow, .pulse, .marquee__track,
  .top, .hero__copy > *, .quote, .marquee, .foot,
  #line, #area, #dot {
    animation: none !important;
  }
  #line { stroke-dashoffset: 0; }
  #area, #dot { opacity: 1; }
  .marquee { overflow-x: auto; }
  .flow__bar span { transition: none; }
}
