/* ==========================================================================
   Tapir Trade
   Tropical modernism. Saturated planes, neon surf, heliconia coral.
   Colours are lifted from the crest: jungle at night, the water, the flower.
   ========================================================================== */

:root {
  /* Ground */
  --night:     #04150f;
  --night-2:   #07231a;
  --jade:      #0a3527;

  /* The water, pushed to neon */
  --surf:      #1fe6c2;
  --surf-dim:  #0fb99b;

  /* The heliconia */
  --coral:     #ff5b3f;
  --coral-hot: #ff7358;

  --gold:      #ffc44d;

  /* Light ground */
  --sand:      #f9f2e4;
  --sand-2:    #f0e4cd;
  --sand-3:    #e3d2b4;

  --on-dark:   #f4ecdc;
  --on-dark-2: rgba(244, 236, 220, 0.62);
  --on-light:  #10281e;
  --on-light-2:#4a5f54;

  /* Fluid scale, pushed much harder at the top than the previous pass */
  --step--2: clamp(0.70rem, 0.68rem + 0.10vw, 0.76rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.16vw, 0.94rem);
  --step-0:  clamp(1.00rem, 0.95rem + 0.28vw, 1.16rem);
  --step-1:  clamp(1.20rem, 1.11rem + 0.44vw, 1.45rem);
  --step-2:  clamp(1.44rem, 1.30rem + 0.66vw, 1.81rem);
  --step-3:  clamp(1.80rem, 1.55rem + 1.10vw, 2.60rem);
  --step-4:  clamp(2.30rem, 1.85rem + 2.00vw, 3.60rem);
  --step-5:  clamp(3.00rem, 2.20rem + 3.60vw, 5.40rem);
  --step-6:  clamp(3.40rem, 2.20rem + 5.40vw, 7.20rem);

  --sp-2xs: 0.5rem;
  --sp-xs:  0.75rem;
  --sp-s:   1rem;
  --sp-m:   1.5rem;
  --sp-l:   2.25rem;
  --sp-xl:  3.5rem;
  --sp-2xl: 5.5rem;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --frame: min(1280px, 100% - var(--gutter) * 2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--on-dark);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 0.98; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--surf); outline-offset: 3px; }
::selection { background: var(--surf); color: var(--night); }

.frame { width: var(--frame); margin-inline: auto; }

/* Fraunces with its wonk and softness raised. This is the single biggest
   reason the type does not read as a default. */
.display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 120;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Ticker
   -------------------------------------------------------------------------- */

.ticker {
  background: var(--surf);
  color: var(--night);
  overflow: hidden;
  border-bottom: 3px solid var(--night);
}

.ticker__rail {
  display: flex;
  width: max-content;
  animation: slide 42s linear infinite;
}

.ticker:hover .ticker__rail { animation-play-state: paused; }

.ticker__set {
  display: flex;
  align-items: center;
  gap: var(--sp-l);
  padding: 0.62rem var(--sp-l) 0.62rem 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ticker__set b { font-weight: 700; }
.ticker__set i { font-style: normal; opacity: 0.5; }

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) { .ticker__rail { animation: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: var(--sp-2xl);
  overflow: hidden;
}

/* Two soft lights, surf and coral, so the black is never flat. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(52% 46% at 22% 18%, rgba(31, 230, 194, 0.20), transparent 68%),
    radial-gradient(46% 42% at 86% 76%, rgba(255, 91, 63, 0.17), transparent 66%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: var(--sp-xl);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-2xl); }
}

.hero__crest {
  width: clamp(200px, 30vw, 340px);
  margin-inline: auto;
  filter: drop-shadow(0 0 60px rgba(31, 230, 194, 0.28)) drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55));
  animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

@media (prefers-reduced-motion: reduce) { .hero__crest { animation: none; } }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--surf);
  margin-bottom: var(--sp-m);
}

.hero__eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surf);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(31, 230, 194, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(31, 230, 194, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 230, 194, 0); }
}

@media (prefers-reduced-motion: reduce) { .hero__eyebrow::before { animation: none; } }

.hero__title { font-size: var(--step-6); margin-bottom: var(--sp-m); }

.hero__title em {
  font-style: italic;
  color: var(--surf);
  text-shadow: 0 0 44px rgba(31, 230, 194, 0.45);
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--on-dark-2);
  max-width: 46ch;
  margin-bottom: var(--sp-l);
}

.hero__lede strong { color: var(--on-dark); font-weight: 600; }

/* --------------------------------------------------------------------------
   Capture
   -------------------------------------------------------------------------- */

.capture { max-width: 580px; }

.field {
  display: grid;
  grid-template-columns: 1fr auto;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(244, 236, 220, 0.18);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field:focus-within {
  border-color: var(--surf);
  box-shadow: 0 0 0 5px rgba(31, 230, 194, 0.16);
}

.field input {
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  color: var(--on-dark);
  padding: 1.15rem 1.2rem;
  width: 100%;
}

.field input::placeholder { color: rgba(244, 236, 220, 0.38); }
.field input:focus { outline: none; }

.btn {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--coral);
  color: #fff;
  border: 0;
  padding: 1.15rem 2rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease, transform 180ms cubic-bezier(0.22,1,0.36,1), box-shadow 180ms ease;
}

.btn:hover { background: var(--coral-hot); box-shadow: 0 0 34px rgba(255, 91, 63, 0.5); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: progress; }

@media (max-width: 560px) {
  .field { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

.form-status {
  min-height: 1.3em;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  color: var(--on-dark-2);
}
.form-status[data-tone="ok"]   { color: var(--surf); }
.form-status[data-tone="warn"] { color: var(--coral-hot); }

.meter { margin-top: var(--sp-m); }

.meter__track {
  height: 8px;
  background: rgba(244, 236, 220, 0.12);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--surf-dim), var(--surf));
  box-shadow: 0 0 22px rgba(31, 230, 194, 0.65);
  transition: width 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.meter__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.meter__legend b { color: var(--surf); font-weight: 700; }

.proof {
  display: flex;
  gap: var(--sp-m);
  flex-wrap: wrap;
  margin-top: var(--sp-s);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.proof b { color: var(--gold); font-weight: 700; }

.fine {
  margin-top: var(--sp-s);
  font-size: var(--step--2);
  line-height: 1.6;
  color: rgba(244, 236, 220, 0.42);
  max-width: 54ch;
}

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */

.band {
  background: var(--coral);
  color: #fff;
  padding-block: var(--sp-xl);
  border-block: 3px solid var(--night);
}

.band__grid {
  display: grid;
  gap: var(--sp-l);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) { .band__grid { grid-template-columns: auto 1fr; gap: var(--sp-2xl); } }

.band__fig {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  font-weight: 700;
  font-size: clamp(3.6rem, 11vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.band__copy { font-size: var(--step-1); line-height: 1.4; max-width: 48ch; }
.band__copy b { border-bottom: 3px solid rgba(255, 255, 255, 0.55); font-weight: 600; }

/* --------------------------------------------------------------------------
   Register
   -------------------------------------------------------------------------- */

.register {
  background: var(--sand);
  color: var(--on-light);
  padding-block: var(--sp-2xl);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-m);
  flex-wrap: wrap;
  padding-bottom: var(--sp-s);
  border-bottom: 3px solid var(--on-light);
  margin-bottom: var(--sp-l);
}

.section-head h2 { font-size: var(--step-4); }
.section-head .eyebrow { color: var(--on-light-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }

thead th {
  text-align: left;
  padding: 0 var(--sp-s) var(--sp-xs) 0;
  border-bottom: 1px solid var(--sand-3);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-light-2);
  white-space: nowrap;
}

tbody td {
  padding: var(--sp-s) var(--sp-s) var(--sp-s) 0;
  border-bottom: 1px solid var(--sand-2);
  vertical-align: baseline;
}

tbody tr { transition: background-color 150ms ease; }
tbody tr:hover { background: var(--sand-2); }

.co {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 30, "opsz" 60;
  font-weight: 600;
  font-size: var(--step-1);
  display: block;
  line-height: 1.1;
}
.sector { font-size: var(--step--2); color: var(--on-light-2); }

.num {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums slashed-zero;
}
th.num { padding-right: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.62rem;
  white-space: nowrap;
}
.tag--sell { background: var(--on-light); color: var(--sand); }
.tag--buy  { background: var(--surf); color: var(--night); }

tr.sealed td { opacity: 0.75; }
tr.sealed .co, tr.sealed .sector, tr.sealed .num, tr.sealed .tag { filter: blur(5px); user-select: none; }
tr.sealed:last-of-type td {
  -webkit-mask-image: linear-gradient(180deg, #000 5%, rgba(0,0,0,0.15) 100%);
          mask-image: linear-gradient(180deg, #000 5%, rgba(0,0,0,0.15) 100%);
}

.gate {
  background: var(--on-light);
  color: var(--sand);
  padding: var(--sp-l) var(--sp-m);
  text-align: center;
}
.gate p {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 600;
  font-size: var(--step-3);
}
.gate span { display: block; margin-top: 0.5rem; font-size: var(--step--1); color: rgba(249, 242, 228, 0.6); }

.register__foot {
  margin-top: var(--sp-m);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-m);
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--on-light-2);
}

/* --------------------------------------------------------------------------
   Closing enrolment
   -------------------------------------------------------------------------- */

.enrol {
  background: var(--jade);
  padding-block: var(--sp-2xl);
  position: relative;
  overflow: hidden;
}

.enrol::before {
  content: "";
  position: absolute;
  inset: auto -5% -60% 40%;
  height: 120%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(31, 230, 194, 0.16), transparent 70%);
  pointer-events: none;
}

.enrol__grid {
  position: relative;
  display: grid;
  gap: var(--sp-xl);
  grid-template-columns: 1fr;
}

@media (min-width: 940px) { .enrol__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-2xl); } }

.enrol h2 { font-size: var(--step-5); margin-block: var(--sp-s) var(--sp-m); }
.enrol .eyebrow { color: var(--surf); }

.quote { border-left: 3px solid var(--surf); padding-left: var(--sp-m); align-self: center; }
.quote p {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 90;
  font-weight: 500;
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.28;
}
.quote .eyebrow { display: block; margin-top: var(--sp-m); color: var(--on-dark-2); }

/* --------------------------------------------------------------------------
   Sticky
   -------------------------------------------------------------------------- */

.sticky {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  background: var(--coral);
  color: #fff;
  transform: translateY(105%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  border-top: 3px solid var(--night);
}
.sticky.is-up { transform: none; }

.sticky__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-m);
  padding-block: 0.8rem;
  flex-wrap: wrap;
}

.sticky__copy {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sticky__copy b { font-weight: 700; }

.sticky .btn { background: var(--night); padding: 0.8rem 1.5rem; }
.sticky .btn:hover { background: #000; box-shadow: none; }

@media (max-width: 640px) { .sticky__inner { justify-content: center; text-align: center; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot { background: var(--night); padding-block: var(--sp-xl) var(--sp-l); }

.foot__grid { display: grid; gap: var(--sp-l) var(--sp-xl); grid-template-columns: 1fr; }
@media (min-width: 720px)  { .foot__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

.foot .eyebrow { color: var(--surf); }

.foot__legal {
  margin-top: var(--sp-s);
  font-size: var(--step--1);
  line-height: 1.65;
  color: rgba(244, 236, 220, 0.45);
  max-width: 56ch;
}

.foot__list { margin-top: var(--sp-s); display: grid; gap: 0.6rem; font-size: var(--step--1); }
.foot__list a {
  color: rgba(244, 236, 220, 0.7);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.foot__list a:hover { color: var(--surf); border-bottom-color: var(--surf); }

.foot__base {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-s);
  border-top: 1px solid rgba(244, 236, 220, 0.12);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-m);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 236, 220, 0.34);
}

/* --------------------------------------------------------------------------
   Reveal
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms cubic-bezier(0.22,1,0.36,1), transform 700ms cubic-bezier(0.22,1,0.36,1);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* Honeypot */
.decoy {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}
