/* ==========================================================================
   MWatt.io — landing page
   Palette matches the app dashboard: #0d0d0d base, #00d4aa accent.
   ========================================================================== */

:root {
  --bg:        #0a0a0a;
  --bg-2:      #101010;
  --bg-3:      #151515;
  --panel:     #121212;
  --line:      #1f1f1f;
  --line-2:    #2a2a2a;

  --text:      #e8e8e8;
  --text-2:    #a6a6a6;
  --text-3:    #7a7a7a;

  --accent:    #00d4aa;
  --accent-2:  #38e0bd;
  --accent-dim:rgba(0, 212, 170, .12);
  --amber:     #ffb347;

  --radius:    10px;
  --radius-lg: 16px;
  --wrap:      1160px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #06110e; padding: .6rem 1rem; border-radius: 0 0 6px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 650; }

h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.06rem; letter-spacing: -.01em; }

.grad {
  background: linear-gradient(100deg, var(--accent) 10%, #6ff0d4 60%, var(--accent) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.eyebrow {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent); margin-bottom: .85rem;
}

.lede  { color: var(--text-2); font-size: 1.06rem; max-width: 34em; margin-top: 1.1rem; }
.sec-sub { color: var(--text-2); margin-top: .9rem; max-width: 46em; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-mark { width: 22px; height: 22px; fill: var(--accent); flex-shrink: 0; }
.brand-text { font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-dot  { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.35rem; border-radius: 8px; font-size: .93rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s, color .18s;
}
.btn-primary {
  background: var(--accent); color: #06110e;
  box-shadow: 0 6px 22px -8px rgba(0, 212, 170, .55);
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(0, 212, 170, .65); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: #4a4a4a; background: #141414; transform: translateY(-1px); }
.btn-sm { padding: .5rem 1rem; font-size: .86rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1rem; }
.btn-arrow { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 10, .9); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.nav-links { display: flex; align-items: center; gap: 1.7rem; }
.nav-links a { font-size: .9rem; color: var(--text-2); transition: color .18s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: #06110e; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }

.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-glow {
  position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 520px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,212,170,.16), transparent 65%);
  filter: blur(20px);
}

.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.hero-points { list-style: none; margin-top: 2.2rem; display: grid; gap: .6rem; }
.hero-points li {
  position: relative; padding-left: 1.6rem; color: var(--text-2); font-size: .92rem;
}
.hero-points li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ---------- Dashboard mock ---------- */
.hero-visual { perspective: 1400px; }
.mock {
  background: linear-gradient(160deg, #141414, #0e0e0e);
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: 14px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
  transform: rotateY(-7deg) rotateX(3deg); transform-origin: left center;
  transition: transform .6s var(--ease);
}
.hero-visual:hover .mock { transform: rotateY(-3deg) rotateX(1deg); }

.mock-bar { display: flex; align-items: center; gap: .75rem; padding: 2px 4px 12px; border-bottom: 1px solid var(--line); }
.dotrow { display: inline-flex; gap: 5px; }
.dotrow i { width: 8px; height: 8px; border-radius: 50%; background: #2c2c2c; }
.mock-title { font-size: .78rem; color: var(--text-3); letter-spacing: .04em; }
.mock-live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,170,.55); }
  70%      { box-shadow: 0 0 0 7px rgba(0,212,170,0); }
}

.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kpi { background: #101010; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; }
.kpi-label { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); }
.kpi-val { display: block; margin-top: .2rem; font-size: 1.02rem; font-weight: 650; color: var(--accent); font-variant-numeric: tabular-nums; }

.mock-chart { background: #0e0e0e; border: 1px solid var(--line); border-radius: 8px; padding: 8px 0 0; overflow: hidden; }
.mock-chart svg { display: block; width: 100%; height: 120px; }
.grid-lines line { stroke: #1c1c1c; stroke-width: 1; }
.mock-chart .line {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.4s var(--ease) .3s forwards;
  vector-effect: non-scaling-stroke;
}
.mock-chart .line-dim {
  stroke: var(--amber); stroke-width: 1.4; opacity: .45; stroke-dasharray: 4 5;
  animation: none; stroke-dashoffset: 0;
}
.mock-chart .area { opacity: 0; animation: fadein 1.2s ease 1.1s forwards; }
@keyframes draw   { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

.mock-rows { margin-top: 10px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mrow { display: flex; align-items: center; gap: .6rem; background: #101010; padding: .5rem .7rem; font-size: .8rem; color: var(--text-2); }
.mrow em { margin-left: auto; font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.st { width: 6px; height: 6px; border-radius: 50%; }
.st.ok   { background: var(--accent); }
.st.warn { background: var(--amber); }

/* ==========================================================================
   STAT BAND
   ========================================================================== */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 1.9rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 1.75rem; font-weight: 650; letter-spacing: -.03em; color: var(--accent); }
.stat span { display: block; margin-top: .25rem; font-size: .82rem; color: var(--text-3); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 46em; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem 1.7rem;
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(420px circle at 50% -20%, rgba(0,212,170,.09), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: #303030; transform: translateY(-3px); background: var(--bg-3); }
.card:hover::after { opacity: 1; }

.ico {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid rgba(0,212,170,.22); margin-bottom: 1.1rem;
}
.ico svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: .55rem; }
.card p  { color: var(--text-2); font-size: .92rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.step {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.25rem 1.5rem;
  transition: border-color .25s, transform .25s var(--ease);
}
.step:hover { border-color: #303030; transform: translateY(-3px); }
.step-num {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  color: var(--accent); margin-bottom: .75rem;
}
.step h3 { font-size: .98rem; margin-bottom: .45rem; }
.step p  { color: var(--text-2); font-size: .86rem; line-height: 1.55; }

/* ---------- Note ---------- */
.note {
  display: flex; gap: 1.2rem; align-items: flex-start; margin-top: 2.2rem;
  background: linear-gradient(120deg, rgba(0,212,170,.06), transparent 60%);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1.6rem 1.6rem;
}
.note-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--accent-dim); border: 1px solid rgba(0,212,170,.22); }
.note-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.note h3 { margin-bottom: .4rem; }
.note p  { color: var(--text-2); font-size: .92rem; max-width: 60em; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.check { list-style: none; margin-top: 1.8rem; display: grid; gap: 1rem; }
.check li { position: relative; padding-left: 1.9rem; color: var(--text-2); font-size: .93rem; }
.check li strong { color: var(--text); font-weight: 600; }
.check li::before {
  content: ''; position: absolute; left: 0; top: .35em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent-dim); border: 1px solid rgba(0,212,170,.35);
}
.check li::after {
  content: ''; position: absolute; left: 4px; top: .62em; width: 6px; height: 3px;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Flow diagram ---------- */
.split-visual { display: flex; flex-direction: column; align-items: center; }
.flow {
  position: relative; width: 100%; max-width: 360px;
  display: grid; grid-template-columns: 1fr; justify-items: center; gap: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
}
.flow-node {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: .85rem 1.1rem; border-radius: 10px; background: #101010; border: 1px solid var(--line-2);
  min-width: 132px;
}
.flow-node svg { width: 22px; height: 22px; fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-node span { font-size: .78rem; color: var(--text-2); letter-spacing: .02em; }
.flow-node.core { border-color: rgba(0,212,170,.4); background: linear-gradient(160deg, rgba(0,212,170,.1), #101010); box-shadow: 0 0 30px -10px rgba(0,212,170,.5); }
.flow-node.core svg { stroke: var(--accent); }
.flow-node.core span { color: var(--accent); font-weight: 600; }

.flow-line { width: 2px; height: 30px; background: var(--line-2); position: relative; overflow: hidden; }
.flow-line i {
  position: absolute; left: -1px; width: 4px; height: 10px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: travel 2.2s linear infinite;
}
.flow-line.l2 i { animation-delay: .7s; }
.flow-line.l3 i { animation-delay: 1.4s; }
@keyframes travel { 0% { top: -12px; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { top: 32px; opacity: 0; } }

.flow-cap { margin-top: 1rem; font-size: .8rem; color: var(--text-3); text-align: center; }

/* ---------- Hardware ---------- */
.hw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hw {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .3rem;
  transition: border-color .25s, transform .25s var(--ease);
}
.hw:hover { border-color: #303030; transform: translateY(-2px); }
.hw-type  { font-size: .68rem; text-transform: uppercase; letter-spacing: .11em; color: var(--accent); }
.hw strong { font-size: .93rem; font-weight: 600; line-height: 1.35; }
.hw-proto { font-size: .78rem; color: var(--text-3); margin-top: .15rem; }

/* ==========================================================================
   CTA + FOOTER
   ========================================================================== */
.cta { padding: clamp(4rem, 9vw, 6.5rem) 0; position: relative; overflow: hidden; }
.cta::before {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 800px; height: 380px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,212,170,.13), transparent 68%);
  filter: blur(10px);
}
.cta-inner { position: relative; text-align: center; }
.cta-inner p { color: var(--text-2); margin-top: .9rem; }
.cta-inner .btn { margin-top: 1.9rem; }
.cta-fine { font-size: .82rem; color: var(--text-3); margin-top: 1.2rem !important; }
.cta-fine span { color: var(--text-2); }

.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 2.6rem 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand p { color: var(--text-3); font-size: .86rem; margin-top: .6rem; max-width: 30em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: flex-start; }
.footer-links a { font-size: .87rem; color: var(--text-2); transition: color .18s; }
.footer-links a:hover { color: var(--accent); }
.footer-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--text-3);
}

/* ==========================================================================
   REVEAL ON SCROLL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hw-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0d0d0d; border-bottom: 1px solid var(--line);
    padding: .5rem 24px 1.1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a.btn { margin-top: .9rem; border-bottom: 0; justify-content: center; }

  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-visual { order: 2; margin-top: 1rem; }
  .mock { transform: none; }
  .hero-visual:hover .mock { transform: none; }
  .split-visual { order: 2; }

  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .cards, .steps, .hw-grid { grid-template-columns: 1fr; }
  .note { flex-direction: column; gap: .9rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .mock-chart .line { stroke-dashoffset: 0; }
  .mock-chart .area { opacity: 1; }
}
