/* Mantra Signal — landing
 *
 * Design thesis: the product is a message that arrives in WhatsApp at 2am, and
 * its whole claim is "angka, bukan perasaan". So the page is dressed in the
 * colours of the channel it actually ships through — WhatsApp's dark-mode ink
 * and its outgoing-bubble teal — not the blue→purple gradient every other
 * crypto page wears. The one loud element is the hero instrument, where the
 * Risk:Reward is drawn to scale over real Bybit candles. Everything else stays
 * quiet so that reads as the point.
 */

:root {
  /* Ground and surfaces are WhatsApp's dark-mode values, used deliberately:
     the customer already reads signals on exactly this background. */
  --ink:      #0B141A;
  --panel:    #111B21;
  --panel-2:  #182229;
  --line:     #22303A;

  --bubble:   #005C4B;  /* outgoing-bubble teal — the brand ground */
  --signal:   #25D366;  /* WhatsApp green: confirmed, live, upside only */
  --loss:     #F15E6C;  /* muted, never neon — a loss should not glow */
  --gold:     #F5C451;  /* confidence / R:R — neither up nor down */

  --paper:    #E9EDEF;
  --muted:    #8696A0;

  --edge: 14px;
  --gutter: clamp(20px, 4vw, 28px);
  --wrap: 1140px;

  /* Type scale — one ratio, applied consistently. */
  --t-xs: 12px;
  --t-sm: 14px;
  --t-base: 16.5px;
  --t-lg: 18.5px;
  --t-xl: clamp(26px, 3.2vw, 34px);
  --t-hero: clamp(38px, 6.4vw, 76px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  font-size: var(--t-base);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* Archivo carries the display voice — wide, editorial, a little industrial.
   Deliberately not Space Grotesk, which is the default startup face and what
   this page wore before. */
.disp {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.022em;
  line-height: 1.02;
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

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

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--panel); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 16px; }

/* ── eyebrow / section heads ─────────────────────────────────────── */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}
.shead { max-width: 620px; margin-bottom: 46px; }
.shead h2 { font-size: var(--t-xl); margin: 12px 0 10px; }
.shead p { color: var(--muted); margin: 0; font-size: var(--t-lg); }

/* ── top bar ─────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 20, 26, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Archivo', sans-serif; font-weight: 700; font-stretch: 112%; font-size: 17px; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.top nav { display: flex; gap: 24px; margin-left: auto; }
.top nav a { color: var(--muted); font-size: var(--t-sm); }
.top nav a:hover { color: var(--paper); }

/* ── buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 11px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--paper);
  transition: border-color .16s, background .16s, transform .16s;
}
.btn:hover { border-color: var(--signal); }
.btn.pri {
  /* Flat WhatsApp teal, no gradient — the gradient is the tell of the template
     look this page is moving away from. */
  background: var(--bubble); border-color: var(--bubble); color: #fff;
}
.btn.pri:hover { background: #06705B; border-color: #06705B; transform: translateY(-1px); }
.btn.sm { padding: 9px 16px; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn.pri:hover { transform: none; } }

/* ── hero ────────────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 54px; align-items: center;
  padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(48px, 7vw, 88px);
}
.hero h1 { font-size: var(--t-hero); margin: 16px 0 20px; }
/* The claim the whole product rests on. Teal underline rather than a gradient
   fill: it marks the phrase without turning it into decoration. */
.hero h1 mark {
  background: none; color: var(--paper);
  /* Real underline rather than a box-shadow bar: skip-ink lets the descender
     of the "g" cut through cleanly instead of being struck out. */
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.13em;
  text-decoration-skip-ink: auto;
}
.hero .sub { color: var(--muted); font-size: var(--t-lg); max-width: 30em; margin: 0 0 28px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--muted); }
.trust span::before { content: '✓'; color: var(--signal); margin-right: 7px; }

/* ── the instrument: live candles + R:R geometry + the bubble ────── */
.instr { display: grid; gap: 14px; }
.chartcard {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--edge); padding: 14px 14px 10px;
}
.chartcard header {
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace; font-size: var(--t-xs); color: var(--muted);
  margin-bottom: 10px;
}
.chartcard header .live { color: var(--signal); display: inline-flex; align-items: center; gap: 6px; }
.chartcard header .live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) { .chartcard header .live i { animation: none } }
.chartcard .px { margin-left: auto; color: var(--paper); font-size: var(--t-sm); }
#chart { display: block; width: 100%; height: 224px; }

/* the WhatsApp message the chart is about */
.bubble {
  background: var(--bubble);
  border-radius: 12px 4px 12px 12px;
  padding: 13px 15px 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.8px; line-height: 1.85;
  max-width: 92%; margin-left: auto;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
}
.bubble .ln { display: block; opacity: 0; transform: translateY(3px); transition: opacity .32s, transform .32s; }
.bubble .ln.on { opacity: 1; transform: none; }
.bubble b { font-weight: 600; }
.bubble .up { color: #B9F6CA; } .bubble .dn { color: #FFC2C9; } .bubble .gd { color: var(--gold); }
.bubble .meta { display: block; text-align: right; font-size: 10.5px; color: rgba(233,237,239,.62); margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .bubble .ln { opacity: 1; transform: none; transition: none } }

/* ── ticker tape ─────────────────────────────────────────────────── */
.tape { border-bottom: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.tape .wrap { display: flex; gap: 30px; padding-top: 13px; padding-bottom: 13px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; overflow-x: auto; scrollbar-width: none; }
.tape .wrap::-webkit-scrollbar { display: none; }
.tape span { white-space: nowrap; color: var(--muted); }
.tape b { color: var(--paper); font-weight: 600; margin-right: 6px; }
.tape .u { color: var(--signal); } .tape .d { color: var(--loss); }

/* ── sections ────────────────────────────────────────────────────── */
section { padding: clamp(58px, 8vw, 96px) 0; }
.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* steps — numbered because the order is real: buy, activate, receive. The
   duration is on each one because "how long until I get in" is the actual
   anxiety, not the count. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--edge); padding: 24px; }
.step .n { font-family: 'IBM Plex Mono', monospace; font-size: var(--t-xs); color: var(--signal); letter-spacing: .14em; }
/* Step marks. Inline SVG rather than Lottie: these are three 62px icons, and a
   Lottie runtime would cost ~250KB of JS to animate them — more than the rest
   of the page's script combined. Each one animates only when its card is in
   view, so nothing loops in the background. */
.step .lot { width: 58px; height: 58px; margin: 14px 0 4px; color: var(--signal); display: block; }

.step .s-tap { transform-origin: 33px 30px; }
.step .s-check { stroke-dasharray: 26; stroke-dashoffset: 26; }
.step .w { opacity: 0; transform-origin: 24px 32px; }

.step.seen .s-tap { animation: tap 2.6s ease-in-out infinite; }
.step.seen .s-check { animation: draw .55s ease-out .15s forwards; }
.step.seen .w1 { animation: wave 2.4s ease-out infinite; }
.step.seen .w2 { animation: wave 2.4s ease-out .28s infinite; }
.step.seen .w3 { animation: wave 2.4s ease-out .56s infinite; }

@keyframes tap  { 0%, 62%, 100% { transform: scale(1); opacity: 1 } 76% { transform: scale(.62); opacity: .55 } }
@keyframes draw { to { stroke-dashoffset: 0 } }
@keyframes wave { 0% { opacity: 0 } 22% { opacity: 1 } 70%, 100% { opacity: 0 } }

@media (prefers-reduced-motion: reduce) {
  .step.seen .s-tap, .step.seen .w1, .step.seen .w2, .step.seen .w3 { animation: none; }
  .step .w { opacity: 1; }
  .step .s-check { stroke-dashoffset: 0; }
}
.step h3 { font-family: 'Archivo', sans-serif; font-stretch: 108%; font-size: 18px; margin: 6px 0 8px; }
.step p { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.step .when { display: inline-block; margin-top: 12px; font-family: 'IBM Plex Mono', monospace; font-size: var(--t-xs); color: var(--gold); }

/* features */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { border: 1px solid var(--line); border-radius: var(--edge); padding: 22px; background: var(--ink); }
.feat h3 { font-family: 'Archivo', sans-serif; font-stretch: 108%; font-size: 16.5px; margin: 10px 0 8px; }
.feat p { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.feat .ic { font-size: 20px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: var(--edge); padding: 26px; background: var(--panel-2); position: relative; }
.plan.hot { border-color: var(--bubble); box-shadow: 0 0 0 1px var(--bubble); }
.plan .tag {
  position: absolute; top: -11px; left: 26px; background: var(--bubble); color: #fff;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .12em;
  padding: 4px 10px; border-radius: 999px;
}
.plan h3 { font-family: 'Archivo', sans-serif; font-stretch: 112%; text-transform: uppercase; font-size: 15px; letter-spacing: .06em; margin: 0 0 6px; color: var(--muted); }
.plan .price { font-family: 'Archivo', sans-serif; font-stretch: 112%; font-weight: 700; font-size: 30px; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--muted); font-stretch: 100%; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; }
.plan li { font-size: var(--t-sm); padding: 7px 0 7px 24px; position: relative; border-bottom: 1px solid var(--line); }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--signal); }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: '—'; color: var(--line); }
.plan .btn { width: 100%; }

/* faq */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; color: var(--signal); font-size: 20px; }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--muted); font-size: var(--t-sm); margin: 0 0 18px; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 38px 0 46px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--paper); }

/* login modal — same endpoints as before, htmx swaps into #panel */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(3, 7, 10, .8); backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.mcard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 34px; width: min(390px, 92vw); text-align: center; position: relative; }
.mcard .x { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.mcard h2 { font-family: 'Archivo', sans-serif; font-stretch: 110%; font-size: 20px; margin: 0 0 4px; }
.mcard .muted { color: var(--muted); font-size: 13px; }
.mcard button { width: 100%; margin-top: 16px; padding: 12px 16px; border: none; border-radius: 10px; background: var(--bubble); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.mcard input { width: 100%; margin-top: 8px; padding: 12px; text-align: center; letter-spacing: 5px; font-size: 16px; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.mcard .code { font-family: 'IBM Plex Mono', monospace; font-size: 28px; letter-spacing: 7px; font-weight: 600; color: var(--gold); margin: 18px 0; }
.mcard .err { color: var(--loss); font-size: 13px; margin-top: 10px; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
  .steps, .feats, .plans { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .bubble { max-width: 100%; }
}
@media (max-width: 620px) {
  .feats { grid-template-columns: 1fr; }
  #chart { height: 190px; }
}
