/*
 * The Traders Conference — public site (landing + waitlist)
 * Brand: Poppins ExtraBold/Black, navy #021F63, green #16CC81, white.
 */
:root {
  --navy: #021F63;
  --navy-2: #0A2C7A;
  --navy-deep: #011544;
  --green: #16CC81;
  --green-hover: #2BDB93;
  --green-soft: #E7F9F1;
  --green-strong: #0B7A4E;
  --bg: #F5F7FB;
  --fg: #0B1633;
  --muted: #5A6479;
  --border: #E3E7EF;
  --input: #D3D9E4;
  --danger: #C8261D;
  --danger-soft: #FDECEB;
  --radius: 10px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 5vw, 64px);
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--fg); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--green); color: var(--navy); }

/* Entrance animations start hidden only while JS is about to animate them (see site.js). */
.js:not(.anim-off) [data-animate] { opacity: 0; }

/* ---- Shared decoration ---- */
.bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 35%, transparent 100%);
}
.bg-glow { position: absolute; width: 70vmax; height: 70vmax; right: -22vmax; top: -30vmax; background: radial-gradient(circle, rgba(22, 204, 129, .20), transparent 62%); }
.bg-glow-2 { right: auto; top: auto; left: -30vmax; bottom: -40vmax; background: radial-gradient(circle, rgba(31, 84, 214, .45), transparent 60%); }
.candles { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: min(46vh, 400px); pointer-events: none; }
.candles .candle { transform-box: fill-box; transform-origin: 50% 100%; }
.candles-soft { opacity: .35; height: 40%; }

.logo { position: relative; z-index: 2; display: inline-block; }
.logo img { width: clamp(124px, 13vw, 168px); height: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; margin: 0;
  padding: 7px 16px 7px 12px; border-radius: 999px; border: 1px solid rgba(22, 204, 129, .35); background: rgba(22, 204, 129, .08);
  color: #C9F5E2; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---- Landing ---- */
.landing { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--navy); color: #fff; overflow-x: hidden; }
.topbar { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px var(--gutter); }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); color: #fff; font-weight: 600; font-size: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }

.hero { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(24px, 6vh, 80px) var(--gutter) clamp(170px, 30vh, 300px); }
.headline { margin: 26px 0 0; font-weight: 900; font-size: clamp(48px, 10.5vw, 152px); line-height: .96; letter-spacing: -.045em; }
.headline .line { display: block; overflow: hidden; padding: 0 .04em .08em 0; margin-bottom: -.06em; }
.headline .word { display: inline-block; will-change: transform; }
.headline .hl { color: var(--green); }
.lede { max-width: 580px; margin: 26px 0 0; font-size: clamp(16px, 1.55vw, 19px); color: rgba(255, 255, 255, .78); }
.cta-row { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; margin-top: 36px; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 30px; border-radius: 999px; text-decoration: none;
  background: var(--green); color: var(--navy); font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  box-shadow: 0 12px 32px -10px rgba(22, 204, 129, .7), inset 0 -2px 0 rgba(2, 31, 99, .12);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s var(--ease-out);
}
.btn-cta svg { transition: transform .25s var(--ease-out); }
.btn-cta:hover { background: var(--green-hover); transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(22, 204, 129, .85), inset 0 -2px 0 rgba(2, 31, 99, .12); }
.btn-cta:hover svg { transform: translateX(4px); }
.btn-cta:active { transform: translateY(0) scale(.98); }
.cta-note { font-size: 14px; color: rgba(255, 255, 255, .62); }

.marquee { position: relative; z-index: 2; overflow: hidden; white-space: nowrap; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(1, 21, 68, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.marquee-track { display: inline-flex; padding: 16px 0; animation: marquee 48s linear infinite; }
.marquee span { position: relative; padding: 0 30px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.marquee span::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 4px; margin-top: -2px; border-radius: 1px; background: var(--green); }
@keyframes marquee { to { transform: translateX(-50%); } }

.site-foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 18px var(--gutter); background: var(--navy-deep); color: rgba(255, 255, 255, .55); font-size: 13px; }
.site-foot a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Waitlist ---- */
.wl { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 100vh; min-height: 100svh; }
.wl-aside {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column;
  padding: 28px clamp(24px, 4vw, 56px); background: var(--navy); color: #fff;
}
.wl-aside-body { position: relative; z-index: 2; margin: auto 0; padding: 40px 0 18vh; }
.wl-aside h1 { margin: 22px 0 0; font-weight: 900; font-size: clamp(40px, 4.6vw, 68px); line-height: .98; letter-spacing: -.045em; }
.perks { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 16px; max-width: 420px; }
.perks li { display: flex; align-items: flex-start; gap: 14px; font-size: 15px; color: rgba(255, 255, 255, .84); }
.tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(22, 204, 129, .16); color: var(--green); }

.wl-main { display: flex; justify-content: center; align-items: flex-start; padding: clamp(20px, 6vh, 72px) var(--gutter); }
.form-card {
  width: 100%; max-width: 640px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(2, 31, 99, .04), 0 24px 48px -24px rgba(2, 31, 99, .18); padding: clamp(22px, 4vw, 44px);
}
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin: -6px 0 18px -2px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--navy); }
.form-card h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; color: var(--fg); }
.form-card h2::before { content: ""; display: block; width: 28px; height: 6px; border-radius: 2px; background: var(--green); margin-bottom: 14px; }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; margin-top: 30px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field legend { font-size: 14px; font-weight: 600; color: var(--fg); padding: 0; }
.field legend { margin-bottom: 10px; }
.opt { font-weight: 400; color: var(--muted); }
.field input:not([type="radio"]):not([type="checkbox"]), .field select {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--fg);
  background: #fff; border: 1px solid var(--input); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(2, 31, 99, .05);
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.field input::placeholder { color: #9AA2B4; }
.field input:hover, .field select:hover { border-color: #B9C2D3; }
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(22, 204, 129, .35); }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6479' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.field-error { display: none; margin: 0; font-size: 13px; color: var(--danger); }
.field.invalid .field-error { display: block; }
.field.invalid input:not([type="radio"]):not([type="checkbox"]) { border-color: var(--danger); }
.field.invalid .choice span { border-color: #EBA8A3; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice, .chip { position: relative; cursor: pointer; }
.choice input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice span {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border: 1px solid var(--input); border-radius: var(--radius);
  font-size: 14.5px; font-weight: 500; background: #fff; transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.choice span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B9C2D3; transition: border-color .15s var(--ease-out), border-width .15s var(--ease-out); }
.choice:hover span { border-color: #B9C2D3; }
.choice input:checked + span { border-color: var(--navy); background: #F2F5FC; box-shadow: inset 0 0 0 1px var(--navy); }
.choice input:checked + span::before { border: 5px solid var(--navy); background: #fff; }
.choice input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--input);
  font-size: 14.5px; font-weight: 500; background: #fff; transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.chip span::before {
  content: ""; width: 0; height: 14px; margin-right: -8px; transition: width .2s var(--ease-out), margin .2s var(--ease-out);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316CC81' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 14px;
}
.chip:hover span { border-color: #B9C2D3; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:checked + span::before { width: 14px; margin-right: 0; }

.field > .consent { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--green-soft); border: 1px solid #BDEFD8; font-size: 14px; color: #2E3A52; line-height: 1.5; cursor: pointer; font-weight: 400; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); cursor: pointer; }
.field.invalid .consent { border-color: #EBA8A3; background: var(--danger-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { margin-top: 22px; padding: 12px 16px; border-radius: var(--radius); background: var(--danger-soft); border: 1px solid #F5C2BF; color: #8E1A13; font-size: 14px; }

.submit {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 26px; border: 0; border-radius: 999px;
  background: var(--green); color: var(--navy); font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 28px -12px rgba(22, 204, 129, .8), inset 0 -2px 0 rgba(2, 31, 99, .12);
  transition: background-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.submit:hover { background: var(--green-hover); transform: translateY(-1px); }
.submit:active { transform: translateY(0) scale(.99); }
.submit[disabled] { cursor: progress; opacity: .8; transform: none; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(2, 31, 99, .25); border-top-color: var(--navy); animation: spin .7s linear infinite; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { text-align: center; padding: 8px 0 4px; outline: none; }
.success-icon { display: grid; place-items: center; width: 80px; height: 80px; margin: 6px auto 22px; border-radius: 50%; background: var(--green-soft); color: var(--green-strong); box-shadow: 0 0 0 10px rgba(22, 204, 129, .08); }
.success h2::before { margin-left: auto; margin-right: auto; }
.success .sub { max-width: 440px; margin: 10px auto 0; }
.share-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn-share {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--input);
  background: #fff; color: var(--fg); font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), transform .15s var(--ease-out);
}
.btn-share:hover { background: var(--bg); border-color: #B9C2D3; }
.btn-share:active { transform: scale(.98); }
.btn-share.whatsapp { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-share.whatsapp:hover { background: var(--navy-2); }
.btn-share.whatsapp svg { color: var(--green); }
.status-line { min-height: 22px; margin: 14px 0 0; font-size: 13.5px; color: var(--green-strong); font-weight: 500; }

/* ---- Event registration (served by the hub at /e/{slug}) ---- */
.wl-aside .ev-title { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.02; }
.ev-summary { margin: 16px 0 0; max-width: 440px; font-size: 16px; color: rgba(255, 255, 255, .78); }
.ev-facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.ev-facts li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: rgba(255, 255, 255, .88); }
.ev-facts strong { color: #fff; font-weight: 600; }
.ev-facts .tick { width: 34px; height: 34px; border-radius: 10px; }
.ev-facts .icon { width: 18px; height: 18px; }
.ev-about { margin: 22px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); font-size: 14.5px; color: #2E3A52; }
.ev-about p { margin: 0 0 10px; }
.ev-about p:last-child { margin-bottom: 0; }
.form-card form .form-grid { margin-top: 24px; }
.btn-lg {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 14px; padding: 0 22px;
  border-radius: 999px; background: var(--green); color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 12px 28px -12px rgba(22, 204, 129, .8); transition: background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn-lg:hover { background: var(--green-hover); transform: translateY(-1px); }
.btn-lg:active { transform: scale(.99); }
.btn-lg .icon { width: 18px; height: 18px; }
.btn-whatsapp { margin-top: 22px; }
.btn-outline { background: #fff; color: var(--fg); border: 1px solid var(--input); box-shadow: none; font-weight: 600; }
.btn-outline:hover { background: var(--bg); }
.redirect-note { margin: 22px 0 0; font-size: 14.5px; color: var(--muted); }
.redirect-note strong { display: inline-block; min-width: 1ch; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .wl { grid-template-columns: minmax(0, 1fr); }
  .wl-aside { position: relative; height: auto; padding: 22px var(--gutter) 34px; }
  .wl-aside-body { padding: 34px 0 6px; }
  .wl-aside h1 { font-size: clamp(38px, 10vw, 56px); }
  .perks { margin-top: 24px; gap: 12px; }
  .perks li { font-size: 14.5px; }
  .candles-soft { display: none; }
  .wl-main { padding-top: 0; margin-top: -1px; background: linear-gradient(var(--navy) 0 28px, var(--bg) 28px); }
}
@media (max-width: 560px) {
  .topbar { padding-top: 18px; padding-bottom: 18px; }
  .btn-ghost { padding: 0 16px; font-size: 13px; }
  .hero-inner { padding-bottom: 150px; }
  .candles { height: 34vh; }
  .btn-cta { width: 100%; justify-content: center; }
  .cta-row { gap: 12px; }
  .cta-note { width: 100%; text-align: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .field.full { grid-column: auto; }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .share-row .btn-share { flex: 1 1 100%; justify-content: center; }
}

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