/* Zazu entry page: what a signed-out visitor sees first.
   Shown only while <html> has the `signed-out` class (set by shim.js / phone.js).
   Sign-in itself is the existing #signin section, opened here as a glass sheet. */

#entry { display: none; }
html.signed-out { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.signed-out { scroll-behavior: auto; } }

/* Undo the app's full-screen grid and phone padding, so the entry page scrolls like a normal page */
html.signed-out, html.signed-out body { height: auto; }
html.signed-out body {
  display: block; width: auto; max-width: none; height: auto; min-height: 100dvh; margin: 0; padding: 0;
  overflow-x: clip; overflow-y: visible; overscroll-behavior: auto;
  background: #000;
}
html.signed-out body::before, html.signed-out body::after { display: none; }
html.signed-out body > #entry { display: block !important; }

/* ---------- Top bar ---------- */
.en-bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) 18px max(40px, env(safe-area-inset-left));
  transition: background .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.en-bar.scrolled {
  background: rgba(0,0,0,.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: rgba(255,255,255,.07);
}
.en-brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 9px;
  color: var(--text); text-decoration: none; font-size: 24px; font-weight: 700; letter-spacing: -.05em;
}
.en-brand .logo { width: 28px; height: 28px; }
.en-nav { display: flex; gap: 40px; }
.en-nav a, .en-login {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: .01em;
  opacity: .82; transition: opacity .15s;
}
.en-nav a:hover, .en-login:hover { opacity: 1; }
.en-actions { justify-self: end; display: flex; align-items: center; gap: 28px; }
.en-login { background: none; padding: 8px 0; font-size: 15px !important; }
.en-cta { padding: 12px 24px !important; font-size: 15px !important; font-weight: 600; }

/* ---------- Hero ---------- */
.en-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(56px, 11vh, 128px) 24px clamp(48px, 8vh, 88px);
}
.en-h {
  margin: 0; font-family: var(--font); font-weight: 400; text-transform: uppercase;
  font-size: clamp(44px, 6.4vw, 96px); line-height: .94; letter-spacing: -.025em;
  text-wrap: balance;
}
.en-sub { margin: 28px 0 0; max-width: 1120px; font-size: 18px; line-height: 1.5; color: var(--text); opacity: .86; text-wrap: balance; }
.en-big { margin-top: 36px; padding: 18px 44px !important; font-size: 17px !important; font-weight: 600; }
.en-small { margin: 22px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Showcase strip: bleeds off the right edge, drifts sideways ---------- */
.en-strip {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 8px 0 40px; overscroll-behavior-x: contain;
}
.en-strip::-webkit-scrollbar { display: none; }
.en-track { display: flex; gap: 28px; width: max-content; padding: 0 max(40px, env(safe-area-inset-left)); }
.en-shot { margin: 0; flex: none; width: clamp(280px, 34vw, 560px); }
.en-shot img, .en-feature img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.11); background: #0b0b0c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 20px 50px rgba(0,0,0,.5);
}
.en-shot figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ---------- Sections below ---------- */
.en-section, .en-foot {
  max-width: 1160px; margin: 0 auto; padding: 96px max(40px, env(safe-area-inset-right)) 24px max(40px, env(safe-area-inset-left));
  scroll-margin-top: 64px;
}
.en-eyebrow { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.en-h2 { margin: 0 0 40px; font-family: var(--font); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 4vw, 52px); line-height: 1; letter-spacing: -.02em; max-width: 20ch; }
.en-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 56px; align-items: center;
  padding: 32px 0; border-top: 1px solid rgba(255,255,255,.08);
}
.en-feature:nth-of-type(even) > div { order: 2; }
.en-feature h3, .en-steps h3 { margin: 0 0 10px; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.en-feature p, .en-steps p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

.en-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.en-steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.en-steps li {
  padding: 24px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.035) 55%, rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.11); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 30px rgba(0,0,0,.35);
}
.en-steps span {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 18px; border-radius: 999px;
  background: var(--sheen); color: #0b0b0b; font-weight: 600; font-size: 15px;
}
.en-steps h3 { font-size: 19px; }
.en-steps p { font-size: 15px; }

.en-foot { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
.en-foot .en-h2 { margin: 0; max-width: none; }

/* ---------- Floating market pill ---------- */
.en-pill {
  position: fixed; z-index: 30; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 10px 22px 10px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(22,22,24,.82); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 40px rgba(0,0,0,.6);
  font-size: 15px; font-variant-numeric: tabular-nums;
  animation: en-rise .5s ease-out both;
}
@keyframes en-rise { from { opacity: 0; transform: translate(-50%, 12px); } }
.en-pill .en-state {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); font-weight: 500;
}
.en-pill .en-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.en-pill.open .en-dot { background: var(--up); box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: en-pulse 2s infinite; }
@keyframes en-pulse { 70% { box-shadow: 0 0 0 7px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.en-pill .en-idx { color: var(--muted); }
.en-pill .en-idx b { font-weight: 500; }
.en-pill .up { color: var(--up); } .en-pill .down { color: var(--down); } .en-pill .flat { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .en-pill, .en-pill.open .en-dot { animation: none; } }

/* ---------- Sign in / create account, as a glass sheet over the entry page ---------- */
html.signed-out #signin { display: none !important; }
html.signed-out.auth-open #signin {
  display: grid !important; place-items: center; position: fixed; inset: 0; z-index: 40; min-height: 0;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  overflow-y: auto; animation: en-fade .2s ease-out;
}
html.auth-open body { overflow: hidden; }
@keyframes en-fade { from { opacity: 0; } }
.signin-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
html.signed-out .signin-card {
  width: 100%; max-width: 420px; padding: 32px 24px 22px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.035) 55%, rgba(255,255,255,.05)), rgba(10,10,11,.75);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 30px 80px rgba(0,0,0,.6);
}
html.signed-out .signin-card h1 { margin: 6px 0 12px; }
.signin-close {
  display: none; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--text); font-size: 22px; line-height: 1;
}
html.signed-out .signin-close { display: grid; place-items: center; }
.signin-close:hover { background: rgba(255,255,255,.12); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .en-nav { display: none; }
  .en-bar { grid-template-columns: 1fr auto; }
  .en-feature { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .en-feature:nth-of-type(even) > div { order: 0; }
  .en-steps, .en-steps-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .en-bar { padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); gap: 10px; }
  .en-brand { font-size: 21px; }
  .en-brand .logo { width: 24px; height: 24px; }
  .en-actions { gap: 14px; }
  .en-cta { padding: 9px 16px !important; font-size: 14px !important; }
  .en-login { font-size: 14px !important; }
  .en-hero { padding: 48px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
  .en-h { font-size: clamp(34px, 10.5vw, 56px); line-height: .98; }
  .en-sub { font-size: 16px; margin-top: 20px; }
  .en-big { align-self: stretch; margin-top: 28px; padding: 16px 20px !important; }
  .en-track { gap: 14px; padding: 0 max(16px, env(safe-area-inset-left)); }
  .en-shot { width: 78vw; }
  .en-section, .en-foot { padding: 64px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
  .en-foot { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .en-foot .en-big { align-self: stretch; }
  .en-h2 { margin-bottom: 28px; }
  .en-steps, .en-steps-4 { grid-template-columns: minmax(0, 1fr); }
  .en-pill { font-size: 13px; gap: 10px; padding: 8px 16px 8px 8px; }
  .en-pill .en-state { padding: 5px 10px; }
  .en-pill .en-extra { display: none; }
}
