/* ============================================================
   DRIFT PROTOCOL — EMERGENCY RECOVERY PORTAL
   style.css  |  Main page styles
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  --bg:       #07060e;
  --bg2:      #0c0b18;
  --bg3:      #11101f;
  --surface:  #141228;
  --surface2: #1a1733;
  --border:   rgba(255,255,255,0.06);
  --border-o: rgba(255,140,60,0.22);
  --orange:   #ff8c3c;
  --orange2:  #ffb560;
  --red:      #ff4040;
  --red-dim:  rgba(255,64,64,0.10);
  --purple:   #7c5cfc;
  --pur-dim:  rgba(124,92,252,0.15);
  --text:     #ede9ff;
  --muted:    #6e6888;
  --dim:      #3d3858;
  --green:    #22d37a;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  /* Critical: antialiasing prevents subpixel blur from compositing layers */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Background grid — isolated on own GPU layer via translateZ so it
   NEVER bleeds onto text rendering of page content */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(124,92,252,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,252,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
}

/* Ambient glow — own layer */
body::after {
  content: '';
  position: fixed; top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,140,60,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
}

/* ── EMERGENCY BANNER ── */
.banner {
  position: relative; z-index: 100;
  background: linear-gradient(90deg, #160505 0%, #1c0707 50%, #160505 100%);
  border-bottom: 1px solid rgba(255,64,64,0.3);
  padding: 9px 20px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; text-align: center;
}
.banner .pdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
  animation: pls 1.5s ease-in-out infinite;
}
@keyframes pls {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,64,64,.5); }
  50%       { opacity: .6; box-shadow: 0 0 0 7px rgba(255,64,64,0); }
}
.banner span { font-family: 'DM Mono', monospace; font-size: 11.5px; color: #ff9090; letter-spacing: .05em; }
.banner strong { color: var(--red); }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 99;
  /* Higher opacity bg means less need for heavy blur — reduces GPU layer conflicts */
  background: rgba(7,6,14,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 66px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  /* Own compositing layer — prevents backdrop-filter bleed onto page text */
  transform: translateZ(0);
  isolation: isolate;
}
.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.logo-sub  { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--red); letter-spacing: .14em; text-transform: uppercase; margin-top: 1px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; padding: 7px 15px; border-radius: 7px; transition: all .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer; border-radius: 9px;
  font-family: 'DM Sans', sans-serif; font-weight: 600;
  text-decoration: none; transition: all .22s; white-space: nowrap;
}
.btn-wallet {
  background: var(--purple); color: #fff;
  padding: 10px 20px; font-size: 13.5px;
  box-shadow: 0 0 22px rgba(124,92,252,.28);
}
/* Use translate shorthand (not transform) — avoids GPU compositing bleed on siblings */
.btn-wallet:hover  { background: #9070ff; box-shadow: 0 0 36px rgba(124,92,252,.5); translate: 0 -1px; }
.btn-primary {
  background: linear-gradient(135deg, var(--orange), #e8620a);
  color: #fff; font-size: 15px;
  padding: 14px 30px; border-radius: 10px;
  box-shadow: 0 0 28px rgba(255,140,60,.3);
}
.btn-primary:hover { translate: 0 -2px; box-shadow: 0 0 44px rgba(255,140,60,.5); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
  font-size: 15px; padding: 14px 30px; border-radius: 10px;
}
.btn-ghost:hover  { border-color: var(--orange); color: var(--orange); background: rgba(255,140,60,.05); translate: 0 -2px; }
.btn-danger {
  background: linear-gradient(135deg, var(--red), #cc1a1a);
  color: #fff; font-size: 15px;
  padding: 14px 30px; border-radius: 10px;
  box-shadow: 0 0 24px rgba(255,64,64,.25);
}
.btn-danger:hover { translate: 0 -2px; box-shadow: 0 0 42px rgba(255,64,64,.46); }
.btn-full { width: 100%; justify-content: center; }

/* ── HERO ── */
.hero {
  position: relative; z-index: 1;
  padding: 88px 32px 64px;
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  isolation: isolate;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red-dim); border: 1px solid rgba(255,64,64,.28);
  border-radius: 100px; padding: 6px 14px; margin-bottom: 22px;
  font-family: 'DM Mono', monospace; font-size: 10.5px;
  color: #ff9090; letter-spacing: .09em; text-transform: uppercase;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pls 1.5s ease-in-out infinite; }
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(34px, 4.8vw, 58px);
  font-weight: 800; line-height: 1.06; letter-spacing: -.03em; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { font-size: 15.5px; color: var(--muted); line-height: 1.72; margin-bottom: 36px; max-width: 480px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── STATUS CARD ── */
.status-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px;
  position: relative; overflow: hidden;
}
.status-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--purple));
}
.sc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sc-head h3 {
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.live-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(34,211,122,.1); border: 1px solid rgba(34,211,122,.22);
  border-radius: 100px; padding: 4px 11px;
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--green);
}
.live-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: pls 1.5s ease-in-out infinite; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 15px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 9px;
}
.row-label { font-size: 12.5px; color: var(--muted); }
.row-val   { font-family: 'DM Mono', monospace; font-size: 12.5px; font-weight: 500; }
.c-o { color: var(--orange); }
.c-r { color: var(--red); }
.c-g { color: var(--green); }
.c-m { color: var(--muted); }
.prog-wrap { margin-top: 18px; }
.prog-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.prog-lbl span:last-child { color: var(--orange); }
.prog-track { height: 5px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.prog-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange2));
  border-radius: 100px;
  animation: fill 2.2s ease-out forwards;
}
@keyframes fill { to { width: 67%; } }

/* ── STATS BAR ── */
.stats-bar {
  position: relative; z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
}
.stats-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr);
}
.stat-block {
  text-align: center; padding: 30px 20px;
  border-right: 1px solid var(--border);
}
.stat-block:last-child { border-right: none; }
.stat-big {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800; color: var(--orange);
  letter-spacing: -.02em; line-height: 1; margin-bottom: 6px;
}
.stat-lbl { font-size: 11.5px; color: var(--muted); }

/* ── SECTIONS ── */
.section {
  position: relative; z-index: 1; padding: 88px 32px;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1240px; margin: 0 auto; }
.sec-tag {
  font-family: 'DM Mono', monospace; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--orange); margin-bottom: 12px;
}
.sec-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 3.8vw, 42px);
  font-weight: 800; letter-spacing: -.025em; margin-bottom: 14px;
}
.sec-sub { font-size: 15px; color: var(--muted); line-height: 1.72; max-width: 540px; margin-bottom: 48px; }

/* ── ALERT BOX ── */
.alert {
  background: var(--red-dim); border: 1px solid rgba(255,64,64,.22);
  border-radius: 13px; padding: 20px 24px; margin-bottom: 44px;
  display: flex; align-items: flex-start; gap: 16px;
}
.alert-ico { font-size: 21px; flex-shrink: 0; margin-top: 1px; }
.alert h4  { font-family: 'Syne', sans-serif; font-size: 14.5px; font-weight: 700; color: #ff9090; margin-bottom: 5px; }
.alert p   { font-size: 13px; color: rgba(255,144,144,.65); line-height: 1.65; }

/* ── INCIDENT GRID ── */
.inc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.timeline { position: relative; padding-left: 30px; margin-top: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--red), var(--orange), var(--purple));
  opacity: .35;
}
.tl-item  { position: relative; margin-bottom: 28px; }
.tl-dot   { position: absolute; left: -26px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--orange); }
.tl-dot.r { border-color: var(--red); }
.tl-dot.g { border-color: var(--green); }
.tl-time  { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--dim); margin-bottom: 5px; letter-spacing: .04em; }
.tl-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.tl-desc  { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ── COMMITMENT ── */
.commit-grid { display: flex; flex-direction: column; gap: 11px; margin-top: 8px; }

/* ── STEPS ── */
.steps-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 15px; padding: 28px 24px; position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
/* Use translate (not transform) for hover lift — avoids compositing context on siblings */
.step-card:hover { border-color: var(--border-o); translate: 0 -3px; box-shadow: 0 22px 44px rgba(0,0,0,.35); }
.step-n {
  font-family: 'Syne', sans-serif; font-size: 52px; font-weight: 800;
  color: rgba(255,140,60,.07); position: absolute; top: 14px; right: 18px; line-height: 1;
}
.step-ico {
  width: 42px; height: 42px; background: rgba(255,140,60,.1);
  border: 1px solid rgba(255,140,60,.18); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-bottom: 14px;
}
.step-card h3 { font-family: 'Syne', sans-serif; font-size: 16.5px; font-weight: 700; margin-bottom: 9px; }
.step-card p  { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* ── RECOVERY PANELS ── */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 50px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 17px; padding: 32px; position: relative; overflow: hidden;
}
.panel.feat {
  border-color: rgba(255,140,60,.28);
  background: linear-gradient(145deg, var(--surface), var(--surface2));
}
.panel.feat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--orange2));
}
.panel h3   { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.panel > p  { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; line-height: 1.65; }
.field { margin-bottom: 15px; }
.field label {
  display: block; font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 7px;
}
.field input, .field select {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; color: var(--text);
  font-family: 'DM Mono', monospace; font-size: 12.5px; outline: none;
  transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.field input:focus, .field select:focus { border-color: var(--orange); }
.field input::placeholder { color: var(--dim); }
.field select option { background: var(--bg2); }
.fee-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 14px; margin-bottom: 16px; }
.fee-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; }
.fee-row:last-child { margin-bottom: 0; }
.fee-row .k { color: var(--muted); }
.fee-row .v { font-family: 'DM Mono', monospace; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-q {
  padding: 17px 22px; font-family: 'Syne', sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  user-select: none; transition: background .2s;
}
.faq-q:hover { background: var(--surface2); }
.chev { transition: rotate .3s; font-size: 11px; color: var(--muted); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .2s;
  font-size: 13.5px; color: var(--muted); line-height: 1.72; padding: 0 22px;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 22px 17px; }
.faq-item.open .chev  { rotate: 180deg; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1; background: var(--bg2);
  border-top: 1px solid var(--border); padding: 64px 32px 32px;
}
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1fr auto auto auto;
  gap: 64px; margin-bottom: 48px;
}
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.68; max-width: 250px; }
.footer-col h4 {
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px;
}
.footer-col a { display: block; color: var(--dim); text-decoration: none; font-size: 13.5px; margin-bottom: 9px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 11.5px; color: var(--dim); }
.socials { display: flex; gap: 10px; }
.soc-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: 13px; transition: all .2s;
}
.soc-btn:hover { border-color: var(--orange); color: var(--orange); }

/* ── PAGE TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface2); border: 1px solid rgba(34,211,122,.28);
  border-radius: 13px; padding: 15px 19px;
  display: flex; align-items: center; gap: 12px;
  z-index: 9999; translate: 0 70px; opacity: 0;
  transition: all .35s cubic-bezier(.34,1.56,.64,1); max-width: 300px;
  -webkit-font-smoothing: antialiased;
}
.toast.show { translate: 0 0; opacity: 1; }
.toast-ico { font-size: 19px; }
.toast h5  { font-family: 'Syne', sans-serif; font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.toast p   { font-size: 11.5px; color: var(--muted); }

/* ── SCROLL REVEAL ── */
/* Opacity-only — no translateY to avoid subpixel blurring on children */
.reveal { opacity: 0; transition: opacity .7s ease; }
.reveal.vis { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 64px 28px 52px; }
  .inc-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .panels { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2,1fr); }
  .stat-block:nth-child(2) { border-right: none; }
  .stat-block:nth-child(3) { border-top: 1px solid var(--border); }
  .stat-block:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .nav-links { display: none; }
  .section { padding: 64px 28px; }
}
@media (max-width: 640px) {
  nav { padding: 0 16px; height: 58px; }
  .nav-logo img { width: 32px; height: 32px; }
  .logo-name { font-size: 16px; }
  .logo-sub  { font-size: 8px; }
  .btn-wallet { padding: 9px 14px; font-size: 12px; }
  .banner span { font-size: 10px; }
  .hero { padding: 44px 16px 40px; gap: 32px; }
  .hero h1 { font-size: 32px; }
  .hero p  { font-size: 14px; }
  .hero-btns { flex-direction: column; gap: 10px; }
  .hero-btns .btn { width: 100%; justify-content: center; padding: 14px 20px; }
  .badge { font-size: 9.5px; padding: 5px 12px; }
  .section { padding: 52px 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .stat-big { font-size: 26px; }
  .stats-bar { padding: 0 16px; }
  .stat-block { padding: 22px 14px; }
  .status-card { padding: 20px 18px; }
  .row { padding: 10px 12px; }
  .row-label, .row-val { font-size: 11.5px; }
  .panel { padding: 24px 18px; }
  .panel h3 { font-size: 17px; }
  .step-card { padding: 22px 18px; }
  .step-n { font-size: 40px; }
  .sec-title { font-size: 26px; }
  .timeline { padding-left: 24px; }
  .alert { padding: 16px 18px; gap: 12px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 40px 16px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .toast { bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .inc-grid { gap: 36px; }
  .commit-grid .row { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 28px; }
  .stat-big { font-size: 22px; }
}
