/* ELPHO web app: the wallet UI from the extension, laid out for a browser.
   Desktop: a navigation rail, the wallet, and an overview column — the way
   MetaMask Portfolio frames its app. Phone: the wallet fills the screen. */

body.web { min-height: 100vh; min-height: 100dvh; background: var(--color-surface); overflow-x: hidden; }
.mono { font-family: var(--font-mono); }

.web-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 720px) 320px;
  justify-content: center;
  gap: 0;
  min-height: 100vh;
}

/* ---- navigation rail ---- */
.web-nav {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 14px; background: var(--color-bg);
  border-right: var(--rule-width) solid var(--color-divider);
}
.web-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; color: var(--color-text); }
.web-brand span { font-family: var(--font-heading); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
#web-nav { display: flex; flex-direction: column; gap: 2px; }
#web-nav button {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border: 0; background: transparent; cursor: pointer;
  font: 600 14px var(--font-body); color: var(--color-neutral-700); text-align: left;
  border-left: 3px solid transparent;
}
#web-nav button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#web-nav button:hover { background: var(--color-surface); color: var(--color-text); }
#web-nav button.active { color: var(--color-accent); border-left-color: var(--color-accent); background: var(--color-accent-100); font-weight: 800; }
:root[data-theme="dark"] #web-nav button.active { background: color-mix(in srgb, var(--color-accent) 14%, transparent); }
.nav-dot { position: absolute; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .5; } }
.nav-promo {
  margin-top: auto; padding: 14px; border: var(--rule-width) solid var(--color-divider);
  display: grid; gap: 4px; font-size: 12px; color: var(--color-neutral-700);
}
.nav-promo b { font-size: 14px; color: var(--color-text); margin-top: 6px; }
.nav-promo a { color: var(--color-accent); font-weight: 800; text-decoration: none; margin-top: 4px; }
.nav-soon { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--color-divider); font-size: 11px; line-height: 1.5; color: var(--color-neutral-600); }
.nav-lock {
  margin-top: 8px; padding: 10px; border: var(--rule-width) solid var(--color-divider);
  background: transparent; font: 700 13px var(--font-body); color: var(--color-text); cursor: pointer;
}
.nav-lock:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- the wallet ---- */
.web-main { min-width: 0; background: var(--color-bg); border-right: var(--rule-width) solid var(--color-divider); }
body.web .app { height: 100vh; height: 100dvh; position: relative; }
body.web .main { scrollbar-width: thin; }
body.web .scrim { justify-content: center; }
body.web .sheet { max-width: 560px; }
body.web .toast { left: 50%; right: auto; transform: translateX(-50%); width: min(420px, calc(100% - 32px)); }

/* Wider screens: more breathing room inside the wallet. */
@media (min-width: 900px) {
  body.web .nav { display: none; }            /* the rail replaces the tab bar */
  body.web .header { padding: 18px 28px 14px; }
  body.web .balance { padding: 28px 28px 22px; }
  body.web .balance-value { font-size: 52px; }
  body.web .actions { display: grid; grid-template-columns: repeat(4, 1fr); }
  body.web .section, body.web .row, body.web .field, body.web .btn-row, body.web .lede,
  body.web .kv, body.web .hero-block { padding-left: 28px; padding-right: 28px; }
  body.web .rig, body.web .pool, body.web .warn, body.web .error, body.web .notice, body.web .quote, body.web .ref-card { margin-left: 28px; margin-right: 28px; }
  body.web .plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 28px 16px; }
  body.web .hero-title { font-size: 40px; }
}

/* ---- overview column ---- */
.web-side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: 20px 18px; display: grid; align-content: start; gap: 12px; }
.side-card { background: var(--color-bg); border: var(--rule-width) solid var(--color-divider); padding: 16px; }
.side-hero { position: relative; aspect-ratio: 1.3; display: grid; place-items: center; overflow: hidden; transform-style: preserve-3d; transition: transform .25s ease-out; background: #171514; border-color: #171514; }
.side-hero img { position: relative; width: 62%; height: auto; animation: side-float 6s ease-in-out infinite; filter: drop-shadow(0 16px 26px rgba(0,0,0,.5)); }
.side-glow { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 45%, transparent), transparent 70%); filter: blur(22px); animation: side-breathe 6s ease-in-out infinite; }
@keyframes side-float { 50% { transform: translateY(-8px); } }
@keyframes side-breathe { 50% { opacity: .55; transform: scale(1.1); } }
.side-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-neutral-600); font-weight: 700; }
.side-v { font-family: var(--font-heading); font-weight: 800; font-size: 32px; letter-spacing: -.02em; margin: 6px 0 4px; }
.side-s { font-size: 12px; color: var(--color-neutral-600); word-break: break-all; }
.side-launch { border-color: var(--color-accent); }
.side-launch .side-v { color: var(--color-accent); }
.side-btn { margin-top: 12px; width: 100%; padding: 10px; border: 0; background: var(--color-accent); color: #fff; font: 800 13px var(--font-body); cursor: pointer; }
.side-eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 700; color: var(--color-accent); margin: 0 0 8px; }
.side-title { font-family: var(--font-heading); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -.03em; margin: 0 0 10px; }
.side-lede { font-size: 13.5px; line-height: 1.55; color: var(--color-neutral-700); margin: 0; }
.side-points { list-style: none; padding: 0; margin: 0; }
.side-points li { padding: 10px 0; border-bottom: 1px solid var(--color-divider); font-size: 12.5px; line-height: 1.5; color: var(--color-neutral-700); }
.side-points b { color: var(--color-text); }

@media (prefers-reduced-motion: reduce) {
  .side-hero img, .side-glow, .nav-dot { animation: none; }
  .side-hero { transition: none; }
}

@media (max-width: 1260px) {
  .web-layout { grid-template-columns: 232px minmax(0, 760px); }
  .web-side { display: none; }
}

@media (max-width: 900px) {
  .web-layout { grid-template-columns: 1fr; }
  .web-nav { display: none; }
  .web-main { border: 0; }
  body.web .app { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 420px) {
  body.web .header .wordmark { font-size: 0; flex: 1; }
  body.web .header .chip { white-space: nowrap; }
}

/* ---- onboarding page ---- */
body.web.onboarding { background: var(--color-surface); }
.web-top {
  display: flex; align-items: center; gap: var(--space-4);
  height: 64px; padding: 0 20px; background: var(--color-bg);
  border-bottom: var(--rule-width) solid var(--color-divider);
}
.web-top .web-brand { padding: 0; }
.web-stage.single { display: grid; justify-content: center; padding: 32px 16px; }
.web-stage.single .frame {
  width: min(480px, calc(100vw - 32px));
  border: var(--rule-width) solid var(--color-rule); background: var(--color-bg);
  box-shadow: 10px 10px 0 var(--color-accent);
}
@media (max-width: 600px) {
  .web-stage.single { padding: 0; }
  .web-stage.single .frame { width: 100vw; box-shadow: none; border: 0; }
}

@media (min-width: 900px) {
  body.web .hero-block .lede { padding: 0; }
  body.web .pool .kv, body.web .rig .kv { padding-left: 0; padding-right: 0; }
  body.web .rig .btn-row { padding-left: 0; padding-right: 0; }
  body.web .steps-list, body.web .link-row { padding-left: 28px; padding-right: 28px; }
}
