:root{
    --void:#070F0B;
    --bg:#0A160F;
    --surface:#111F17;
    --surface-2:#17291E;
    --border: rgba(220,255,232,0.09);
    --border-strong: rgba(220,255,232,0.18);
    --emerald:#2F7D5C;
    --emerald-bright:#47B383;
    --silver-top:#eff3f4;
    --silver-mid:#c3cacc;
    --silver-bottom:#98a0a3;
    --text:#EAF3EE;
    --text-dim:#93A89D;
    --text-faint:#5E7267;
    --radius:20px;
    --shadow: 0 24px 60px rgba(0,0,0,0.45);
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
  }

  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:'Manrope', sans-serif;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
  }

  h1,h2,h3,.display{
    font-family:'Instrument Sans', sans-serif;
    font-weight:600;
    margin:0;
    letter-spacing:-0.015em;
  }

  .mono{font-family:'IBM Plex Mono', monospace;}

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

  .wrap{max-width:1180px; margin:0 auto; padding:0 28px;}

  ::selection{background:var(--emerald); color:#fff;}

  /* ---------- Logo mark ---------- */
  .logo-mark{width:30px; height:auto; display:block;}
  .logo-mark .b{fill:url(#deltaMetal);}

  .brand{display:flex; align-items:center; gap:11px; text-decoration:none;}
  .brand-word{
    font-family:'Instrument Sans', sans-serif;
    font-weight:600;
    font-size:19px;
    color:var(--text);
    letter-spacing:-0.01em;
  }

  /* ---------- Buttons ---------- */
  .btn{
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    font-family:'Instrument Sans', sans-serif;
    font-weight:600; font-size:15px;
    padding:13px 24px;
    border-radius:12px;
    border:1px solid transparent;
    cursor:pointer;
    text-decoration:none;
    transition:transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space:nowrap;
  }
  .btn:focus-visible{outline:2px solid var(--emerald-bright); outline-offset:3px;}
  .btn:active{transform:translateY(1px);}

  .btn-primary{
    background:linear-gradient(180deg, var(--emerald-bright), var(--emerald));
    color:#08150F;
    box-shadow:0 1px 0 rgba(255,255,255,0.2) inset, 0 12px 24px rgba(47,125,92,0.28);
  }
  .btn-primary:hover{box-shadow:0 1px 0 rgba(255,255,255,0.25) inset, 0 14px 30px rgba(47,125,92,0.38); transform:translateY(-1px);}

  .btn-ghost{
    background:var(--surface);
    border-color:var(--border-strong);
    color:var(--text);
  }
  .btn-ghost:hover{border-color:var(--emerald-bright); background:var(--surface-2);}

  .btn-small{padding:9px 18px; font-size:14px; border-radius:10px;}

  .btn-disabled{
    background:transparent; color:var(--text-faint); border-color:var(--border); cursor:not-allowed;
  }

  /* ---------- Nav ---------- */
  header{
    position:sticky; top:0; z-index:40;
    background:rgba(10,22,15,0.82);
    backdrop-filter:blur(12px);
    border-bottom:1px solid var(--border);
  }
  nav{display:flex; align-items:center; justify-content:space-between; padding:16px 0;}
  .nav-links{display:flex; gap:32px; list-style:none; margin:0; padding:0; font-size:14.5px; font-weight:500;}
  .nav-links a{text-decoration:none; color:var(--text-dim); transition:color 0.15s;}
  .nav-links a:hover{color:var(--text);}
  .nav-actions{display:flex; align-items:center; gap:12px;}

  .nav-toggle{display:none; background:none; border:none; cursor:pointer; width:40px; height:40px; align-items:center; justify-content:center;}
  .nav-toggle span, .nav-toggle::before, .nav-toggle::after{
    content:""; display:block; width:20px; height:2px; background:var(--text); border-radius:2px;
  }
  .nav-toggle span{margin:5px 0;}

  .mobile-menu{display:none; flex-direction:column; padding:6px 28px 18px; border-bottom:1px solid var(--border);}
  .mobile-menu a{padding:12px 2px; text-decoration:none; color:var(--text-dim); font-weight:500; border-bottom:1px solid var(--border);}
  .mobile-menu.open{display:flex;}

  @media (max-width:900px){
    .nav-links{display:none;}
    .nav-toggle{display:flex;}
    .nav-actions .btn-ghost{display:none;}
  }

  /* ---------- Hero ---------- */
  .hero{position:relative; padding:84px 0 56px; overflow:hidden;}
  .hero-glow{
    position:absolute; top:-220px; left:50%; transform:translateX(-50%);
    width:900px; height:560px;
    background:radial-gradient(ellipse at center, rgba(47,125,92,0.32), rgba(47,125,92,0) 68%);
    pointer-events:none;
  }
  .hero-grid{
    display:grid; grid-template-columns:1fr 0.95fr; gap:48px; align-items:center; position:relative;
  }
  .kicker{
    display:inline-flex; align-items:center; gap:8px;
    background:var(--surface); border:1px solid var(--border-strong);
    padding:7px 14px 7px 11px; border-radius:100px;
    font-size:13px; font-weight:500; color:var(--text-dim);
    margin-bottom:24px;
  }
  .kicker .dot{width:6px; height:6px; border-radius:50%; background:var(--emerald-bright); box-shadow:0 0 8px var(--emerald-bright);}

  .hero h1{font-size:clamp(36px, 4.6vw, 56px); line-height:1.06; color:var(--text);}
  .hero h1 .grad{
    background:linear-gradient(100deg, var(--emerald-bright), #8fe0bb);
    -webkit-background-clip:text; background-clip:text; color:transparent;
  }
  .hero p.lede{font-size:17.5px; line-height:1.65; max-width:46ch; margin:22px 0 32px; color:var(--text-dim);}
  .hero-ctas{display:flex; gap:14px; flex-wrap:wrap;}

  .hero-stats{display:flex; gap:34px; margin-top:44px; flex-wrap:wrap; border-top:1px solid var(--border); padding-top:26px;}
  .hero-stats div{display:flex; flex-direction:column; gap:4px;}
  .hero-stats .num{font-family:'IBM Plex Mono', monospace; font-weight:600; font-size:22px; color:var(--text);}
  .hero-stats .lbl{font-size:12.5px; color:var(--text-faint);}

  /* ---------- Position card (hero art) ---------- */
  .position-card{
    background:var(--surface);
    border:1px solid var(--border-strong);
    border-radius:24px;
    padding:26px;
    box-shadow:var(--shadow);
    position:relative;
  }
  .pc-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:22px;}
  .pc-pair{display:flex; align-items:center; gap:10px;}
  .pc-icons{display:flex;}
  .pc-icon{
    width:30px; height:30px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-family:'IBM Plex Mono', monospace; font-size:12px; font-weight:600;
    border:2px solid var(--surface);
    color:#08150F;
  }
  .pc-icon.eth{background:linear-gradient(160deg,#c9d3ce,#8b9995); margin-right:-10px; z-index:2;}
  .pc-icon.usdc{background:linear-gradient(160deg,#8fe0bb,#2F7D5C); z-index:1;}
  .pc-pair-name{font-family:'Instrument Sans', sans-serif; font-weight:600; font-size:16px;}
  .pc-fee{
    font-family:'IBM Plex Mono', monospace; font-size:11.5px; color:var(--text-dim);
    background:var(--bg); border:1px solid var(--border); padding:4px 9px; border-radius:100px;
  }

  .pc-status{
    display:inline-flex; align-items:center; gap:6px;
    font-size:12.5px; font-weight:600; color:#8fe0bb;
    background:rgba(47,125,92,0.14); border:1px solid rgba(71,179,131,0.3);
    padding:5px 11px; border-radius:100px; margin-bottom:18px;
  }
  .pc-status .live-dot{width:6px; height:6px; border-radius:50%; background:#47B383;}

  .range-track{
    position:relative; height:52px; border-radius:12px;
    background:
      repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 24px);
    background-color: var(--bg);
    border:1px solid var(--border);
    margin-bottom:12px;
    overflow:hidden;
  }
  .range-fill{
    position:absolute; top:0; bottom:0; left:32%; width:36%;
    background:linear-gradient(180deg, rgba(71,179,131,0.35), rgba(47,125,92,0.18));
    border-left:2px solid var(--emerald-bright);
    border-right:2px solid var(--emerald-bright);
  }
  .range-marker{
    position:absolute; top:-2px; bottom:-2px; left:49%; width:2px;
    background:var(--text);
  }
  .range-marker::after{
    content:""; position:absolute; top:-4px; left:50%; transform:translateX(-50%);
    width:8px; height:8px; border-radius:50%; background:var(--text);
  }
  .range-labels{display:flex; justify-content:space-between; font-family:'IBM Plex Mono', monospace; font-size:11px; color:var(--text-faint); margin-bottom:22px;}

  .pc-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
  .pc-cell{background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:12px 14px;}
  .pc-cell .k{font-size:11.5px; color:var(--text-faint); margin-bottom:5px;}
  .pc-cell .v{font-family:'IBM Plex Mono', monospace; font-size:15px; font-weight:600; color:var(--text);}
  .pc-cell .v.up{color:#8fe0bb;}

  .pc-float{
    position:absolute; top:-16px; right:24px;
    background:var(--surface-2); border:1px solid var(--border-strong);
    border-radius:14px; padding:9px 14px;
    font-family:'IBM Plex Mono', monospace; font-size:12px; color:var(--text-dim);
    box-shadow:var(--shadow);
  }

  @media (max-width:900px){
    .hero-grid{grid-template-columns:1fr;}
    .hero-stats{gap:26px;}
  }

  /* ---------- Marquee ---------- */
  .marquee-band{
    border-top:1px solid var(--border); border-bottom:1px solid var(--border);
    background:var(--surface);
    padding:15px 0;
    overflow:hidden;
    white-space:nowrap;
  }
  .marquee-track{display:inline-flex; animation:scroll 34s linear infinite;}
  .marquee-track span{
    font-family:'IBM Plex Mono', monospace;
    font-size:13px; font-weight:500;
    color:var(--text-dim);
    padding:0 28px;
    display:inline-flex; align-items:center; gap:10px;
    border-right:1px solid var(--border);
  }
  .marquee-track span b{color:var(--text); font-weight:600;}
  .marquee-track span .fee{color:var(--text-faint);}
  @keyframes scroll{ from{transform:translateX(0);} to{transform:translateX(-50%);} }

  /* ---------- Sections ---------- */
  section{padding:96px 0;}
  .section-head{max-width:600px; margin-bottom:52px;}
  .section-head h2{font-size:clamp(28px, 3.2vw, 38px); margin-bottom:14px;}
  .section-head p{font-size:16px; line-height:1.65; color:var(--text-dim);}

  /* ---------- Feature cards ---------- */
  .feature-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:20px;}
  .feature-card{
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--radius); padding:28px;
    transition:border-color 0.15s;
  }
  .feature-card:hover{border-color:var(--border-strong);}
  .feature-icon{
    width:42px; height:42px; border-radius:11px;
    background:var(--bg); border:1px solid var(--border-strong);
    display:flex; align-items:center; justify-content:center;
    margin-bottom:20px;
  }
  .feature-card h3{font-size:18px; margin-bottom:10px;}
  .feature-card p{font-size:14.5px; line-height:1.65; color:var(--text-dim); margin:0;}

  @media (max-width:900px){ .feature-grid{grid-template-columns:1fr;} }

  /* ---------- How it works ---------- */
  .steps-row{display:grid; grid-template-columns:repeat(3, 1fr); gap:0; position:relative;}
  .steps-row::before{
    content:""; position:absolute; top:23px; left:8%; right:8%; height:1px;
    background:repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
  }
  .step-item{position:relative; padding-right:20px;}
  .step-idx{
    width:46px; height:46px; border-radius:50%;
    background:var(--surface); border:1px solid var(--border-strong);
    display:flex; align-items:center; justify-content:center;
    font-family:'IBM Plex Mono', monospace; font-weight:600; font-size:15px;
    margin-bottom:22px; position:relative; z-index:1;
  }
  .step-item h3{font-size:17px; margin-bottom:9px;}
  .step-item p{font-size:14.5px; line-height:1.65; color:var(--text-dim); margin:0; max-width:32ch;}

  @media (max-width:820px){
    .steps-row{grid-template-columns:1fr; gap:36px;}
    .steps-row::before{display:none;}
  }

  /* ---------- Trust band ---------- */
  .trust-section{background:var(--surface); border-top:1px solid var(--border); border-bottom:1px solid var(--border);}
  .trust-row{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:24px;}
  .trust-item{display:flex; align-items:center; gap:12px; font-size:14.5px; color:var(--text-dim);}
  .trust-item .ic{width:34px; height:34px; border-radius:9px; background:var(--bg); border:1px solid var(--border-strong); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
  .trust-item b{color:var(--text); font-weight:600;}

  /* ---------- CTA banner ---------- */
  .cta-banner{
    background:linear-gradient(135deg, var(--surface-2), var(--surface));
    border:1px solid var(--border-strong);
    border-radius:28px;
    padding:56px;
    display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap;
    position:relative; overflow:hidden;
  }
  .cta-banner::before{
    content:""; position:absolute; top:-140px; right:-100px; width:360px; height:360px; border-radius:50%;
    background:radial-gradient(circle, rgba(71,179,131,0.22), transparent 70%);
  }
  .cta-banner h2{font-size:clamp(24px,3vw,32px); max-width:18ch; position:relative;}
  .cta-banner p{font-size:15.5px; color:var(--text-dim); margin-top:10px; max-width:40ch; position:relative;}
  .cta-actions{display:flex; gap:14px; flex-wrap:wrap; position:relative;}

  @media (max-width:640px){ .cta-banner{padding:34px 24px; border-radius:22px;} }

  /* ---------- Footer ---------- */
  footer{padding:56px 0 40px; border-top:1px solid var(--border);}
  .footer-top{display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; margin-bottom:40px;}
  .footer-tag{font-size:14px; color:var(--text-dim); max-width:32ch; margin-top:12px; line-height:1.6;}
  .footer-cols{display:flex; gap:56px; flex-wrap:wrap;}
  .footer-col h4{font-size:12.5px; text-transform:none; color:var(--text-faint); font-weight:600; margin-bottom:14px;}
  .footer-col a{display:block; font-size:14px; color:var(--text-dim); text-decoration:none; margin-bottom:11px;}
  .footer-col a:hover{color:var(--text);}
  .disclaimer{font-size:12px; line-height:1.7; color:var(--text-faint); border-top:1px solid var(--border); padding-top:22px;}

  /* ---------- Wallet Modal ---------- */
  .modal-overlay{
    position:fixed; inset:0; background:rgba(4,10,7,0.65);
    display:none; align-items:center; justify-content:center; z-index:100; padding:20px;
    backdrop-filter:blur(4px);
  }
  .modal-overlay.open{display:flex;}
  .modal{
    background:var(--surface); border:1px solid var(--border-strong);
    border-radius:22px; width:100%; max-width:380px; padding:28px;
    box-shadow:0 30px 70px rgba(0,0,0,0.55); position:relative;
  }
  .modal-close{
    position:absolute; top:18px; right:18px; background:none; border:none; cursor:pointer;
    width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--text-dim);
  }
  .modal-close:hover{background:var(--surface-2); color:var(--text);}
  .modal h3{font-size:19px; margin-bottom:6px;}
  .modal .sub{font-size:13.5px; color:var(--text-dim); margin-bottom:22px;}
  .wallet-list{display:flex; flex-direction:column; gap:10px;}
  .wallet-opt{
    display:flex; align-items:center; gap:14px; padding:13px 15px; border-radius:14px;
    border:1px solid var(--border); background:var(--bg); cursor:pointer;
    font-family:'Manrope', sans-serif; font-size:14.5px; font-weight:600; color:var(--text);
    text-align:left; transition:border-color 0.15s, transform 0.1s;
  }
  .wallet-opt:hover{border-color:var(--emerald-bright); transform:translateY(-1px);}
  .wallet-opt:focus-visible{outline:2px solid var(--emerald-bright); outline-offset:2px;}
  .wallet-icon{width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono', monospace; font-weight:600; font-size:13px; color:#08150F;}
  .modal-note{margin-top:20px; font-size:11.5px; color:var(--text-faint); line-height:1.6;}

  .modal-state{display:none; flex-direction:column; align-items:center; text-align:center; padding:10px 0 4px;}
  .modal-state.active{display:flex;}
  .spinner{width:38px; height:38px; border-radius:50%; border:3px solid var(--border-strong); border-top-color:var(--emerald-bright); animation:spin 0.8s linear infinite; margin-bottom:18px;}
  @keyframes spin{to{transform:rotate(360deg);}}
  .check-badge{width:54px; height:54px; border-radius:50%; background:var(--emerald); color:#fff; display:flex; align-items:center; justify-content:center; margin-bottom:16px;}
  .addr-pill{font-family:'IBM Plex Mono', monospace; font-weight:600; background:var(--bg); border:1px solid var(--border); padding:8px 16px; border-radius:100px; font-size:13.5px; margin:10px 0 20px;}

  .toast{
    position:fixed; bottom:26px; left:50%; transform:translateX(-50%) translateY(140%);
    background:var(--surface-2); border:1px solid var(--border-strong); color:var(--text);
    padding:13px 22px; border-radius:100px; font-size:14px; font-weight:500;
    display:flex; align-items:center; gap:10px; box-shadow:0 20px 40px rgba(0,0,0,0.4);
    transition:transform 0.35s ease; z-index:120;
  }
  .toast.show{transform:translateX(-50%) translateY(0);}
  .toast .live-dot{width:7px; height:7px; border-radius:50%; background:#47B383;}

  .nav-actions .connected-chip{
    display:flex; align-items:center; gap:8px;
    background:var(--surface); border:1px solid var(--border-strong);
    padding:8px 15px; border-radius:10px;
    font-family:'IBM Plex Mono', monospace; font-weight:600; font-size:13px; cursor:pointer; color:var(--text);
  }
  .connected-chip .live-dot{width:7px; height:7px; border-radius:50%; background:#47B383; flex-shrink:0;}
