/* MF-LAB.com — main stylesheet */

@font-face{font-family:"Archivo";src:url("../fonts/archivo-var.woff2") format("woff2-variations"),url("../fonts/archivo-var.woff2") format("woff2");font-weight:100 900;font-stretch:62% 125%;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("../fonts/jetbrains-mono-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("../fonts/jetbrains-mono-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("../fonts/jetbrains-mono-700.woff2") format("woff2");font-weight:700;font-display:swap}

:root{
  --ink:#06090E; --ink2:#0A1018; --line:#1A2330; --line2:#3A4656;
  --text:#F1F4F8; --text2:#C9D1DC; --muted:#A3ADBB; --dim:#8F9AA9;
  --cyan:#00E5FF; --blue:#4CB0FF; --gold:#D8B25C; --green:#00FF9D; --mint:#7FE3B5;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --pad:64px; --sec:112px;
  --grid:linear-gradient(rgba(0,229,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(0,229,255,.05) 1px,transparent 1px);
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:88px}
body{margin:0;background:var(--ink);color:var(--text);font-family:var(--sans);font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
a:hover{color:var(--blue)}
:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
h1,h2,h3,p{margin:0}
ul{margin:0;padding:0;list-style:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.skip{position:absolute;left:-999px;top:8px;background:var(--cyan);color:var(--ink);padding:10px 14px;font-family:var(--mono);z-index:100}
.skip:focus{left:8px}

.wrap{max-width:1440px;margin:0 auto;padding:0 var(--pad)}
.section{padding:var(--sec) 0;border-bottom:1px solid var(--line)}
.section.alt{background:var(--ink2)}
.gridbg{background-image:var(--grid);background-size:48px 48px}
.mono{font-family:var(--mono)}
.eyebrow{font-family:var(--mono);font-size:13px;letter-spacing:.1em;color:var(--dim);text-transform:uppercase}
.eyebrow b{font-weight:400}
.c-cyan{color:var(--cyan)}.c-blue{color:var(--blue)}.c-gold{color:var(--gold)}.c-green{color:var(--green)}.c-mint{color:var(--mint)}
.display{font-weight:800;font-stretch:115%;letter-spacing:-.02em;line-height:1;text-transform:uppercase}
.h2{font-size:clamp(36px,4.4vw,60px)}
.lead{font-size:18px;color:var(--muted);max-width:440px}
.sec-head{display:flex;justify-content:space-between;align-items:flex-end;gap:32px;margin-bottom:56px}
.sec-head>div{display:flex;flex-direction:column;gap:18px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 24px;font-family:var(--mono);font-size:14px;letter-spacing:.06em;text-transform:uppercase;border:1px solid transparent;cursor:pointer;background:none;color:var(--text)}
.btn svg{width:16px;height:16px;flex-shrink:0}
.btn-cyan{background:var(--cyan);color:var(--ink);font-weight:700}
.btn-gold{background:var(--gold);color:var(--ink);font-weight:700}
.btn-green{background:var(--green);color:var(--ink);font-weight:700}
.btn-cyan:hover,.btn-gold:hover,.btn-green:hover{color:var(--ink);filter:brightness(1.1)}
.btn-line{border-color:var(--line2)}
.btn-line:hover{border-color:var(--text);color:var(--text)}
.btn-outline-cyan{border-color:var(--cyan);color:var(--cyan)}
.btn-outline-blue{border-color:var(--blue);color:var(--blue)}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:rgba(6,9,14,.92);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.site-header .wrap{height:80px;display:flex;align-items:center;justify-content:space-between}
.logo{display:flex;align-items:center;gap:14px}
.logo svg{width:34px;height:34px}
.logo span{font-family:var(--mono);font-size:16px;font-weight:700;letter-spacing:.12em}
.nav{display:flex;align-items:center;gap:32px;font-family:var(--mono);font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.nav .btn{min-height:42px;padding:0 18px;font-size:13px}
.menu-toggle{display:none;width:44px;height:44px;align-items:center;justify-content:center;background:none;border:0;color:var(--text);cursor:pointer}
.menu-toggle svg{width:22px;height:22px}

/* Hero */
.hero{border-bottom:1px solid var(--line)}
.hero .wrap{display:grid;grid-template-columns:7fr 4fr;gap:72px;padding-top:96px;padding-bottom:88px;align-items:center}
.hero-copy{display:flex;flex-direction:column;gap:36px}
.hero h1{font-size:clamp(44px,6.2vw,88px);line-height:.98;display:flex;flex-direction:column;gap:6px}
.hero .intro{font-size:20px;color:var(--text2);max-width:640px}
.hero-ctas{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px}

.panel{background:var(--ink2);border:1px solid var(--line);font-family:var(--mono)}
.panel-head{height:44px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);font-size:12px;color:var(--dim)}
.dot{display:inline-flex;align-items:center;gap:8px}
.dot::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;animation:pulse 2.4s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}
.panel-row{padding:20px 18px;display:flex;flex-direction:column;gap:12px;border-bottom:1px solid var(--line)}
.panel-row:last-child{border-bottom:0}
.panel-row .top{display:flex;justify-content:space-between;font-size:12px}
.panel-row .inline{flex-direction:row;justify-content:space-between;align-items:center}
.chips{display:flex;flex-wrap:wrap;gap:8px;font-family:var(--mono);font-size:12px;color:var(--text2)}
.chips span{padding:4px 8px;border:1px solid #1F3440}
.big-n{font-family:var(--sans);font-stretch:115%;font-weight:800;font-size:44px;line-height:1}
.segs{display:flex;gap:4px}.segs i{flex:1;height:4px;background:var(--blue)}
.wave{width:100%;height:48px}
.wave path{stroke-dasharray:600;animation:trace 4s linear infinite}
@keyframes trace{from{stroke-dashoffset:600}to{stroke-dashoffset:0}}
.bars{display:flex;align-items:flex-end;gap:3px;height:32px}
.bars i{flex:1;background:var(--gold);transform-origin:bottom;animation:eq 1.6s ease-in-out infinite alternate}
@keyframes eq{from{transform:scaleY(.35)}to{transform:scaleY(1)}}
@media (prefers-reduced-motion:reduce){*{animation:none!important}html{scroll-behavior:auto}}

/* Ventures */
.cards3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.venture{min-height:540px;padding:36px;background:var(--ink2);border:1px solid var(--line);border-top:2px solid var(--accent);display:flex;flex-direction:column;justify-content:space-between;gap:32px}
.venture .kicker{display:flex;justify-content:space-between;align-items:center;font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--accent)}
.venture .kicker svg{width:26px;height:26px}
.venture h3{font-size:40px;margin:22px 0}
.venture p{color:var(--text2)}
.venture .chips span{border-color:var(--chip)}
.venture .go{display:flex;align-items:center;justify-content:space-between;height:48px;margin-top:22px;border-top:1px solid var(--line);font-family:var(--mono);font-size:13px;letter-spacing:.06em;color:var(--accent)}
.venture .go svg{width:16px;height:16px}

/* Apps */
.apps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.app{min-height:240px;padding:28px;background:var(--ink);border:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between;gap:24px;transition:border-color .2s}
.app:hover{border-color:var(--blue);color:var(--text)}
.app .row{display:flex;justify-content:space-between;align-items:flex-start}
.tile{width:64px;height:64px;border-radius:15px;display:block;object-fit:cover;flex-shrink:0}
.num{display:flex;align-items:center;gap:10px;font-family:var(--mono);font-size:12px;color:var(--dim)}
.badge{padding:4px 8px;background:var(--gold);color:var(--ink);font-weight:700}
.app h3{font-size:26px;line-height:1.1;font-weight:700}
.app p{font-size:16px;color:var(--text2)}
.app small{font-family:var(--mono);font-size:11px;letter-spacing:.08em;color:var(--dim)}
.app .meta{display:flex;flex-direction:column;gap:8px}

/* Protocols */
.split{display:grid;grid-template-columns:5fr 5fr;gap:24px 96px;align-items:end;margin-bottom:48px}
.protocols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:var(--ink2)}
.protocols>div{padding:28px;display:flex;flex-direction:column;gap:14px;border-right:1px solid var(--line)}
.protocols>div:last-child{border-right:0}
.protocols h3{font-weight:700;font-stretch:110%;font-size:26px}
.protocols p{font-size:15px;color:var(--muted)}
.protocols small{font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--text2)}

/* Editions */
.editions{display:grid;grid-template-columns:8fr 4fr;gap:20px}
.books{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.book{display:flex;flex-direction:column;gap:18px}
.book>a{display:block}
.book img{width:100%;height:auto;aspect-ratio:720/1110;object-fit:cover;border:1px solid var(--line);transition:transform .25s}
.book a:hover img{transform:translateY(-4px)}
.book .meta{display:flex;flex-direction:column;gap:6px}
.book small{font-family:var(--mono);font-size:11px;letter-spacing:.08em;color:var(--gold)}
.book h3{font-weight:700;font-size:18px;line-height:1.25}
.book p{font-size:14px;line-height:1.5;color:var(--muted)}
.book .stores{display:flex;flex-wrap:wrap;gap:6px 14px;font-family:var(--mono);font-size:12px;letter-spacing:.04em}
.book .stores a{color:var(--gold);text-decoration:underline;text-underline-offset:3px}
.podcast{padding:32px;background:var(--ink2);border:1px solid var(--line);border-top:2px solid var(--gold);display:flex;flex-direction:column;justify-content:space-between;gap:28px}
.podcast .body{display:flex;flex-direction:column;gap:18px}
.podcast h3{font-weight:700;font-size:28px;line-height:1.15}
.podcast .bars{height:56px}
.podcast p{font-size:15px;color:var(--muted)}
.podcast .links{display:flex;flex-direction:column;gap:10px}
.podcast .btn-line{border-color:#3A3220}

/* Energy */
.flow{padding:32px 36px;background:var(--ink);border:1px solid var(--line);display:flex;flex-direction:column;gap:20px;margin-bottom:20px}
.flow .top{display:flex;justify-content:space-between;gap:16px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--dim)}
.flow ol{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:40px;counter-reset:f}
.flow li{position:relative;border:1px solid var(--line2);padding:18px 12px;text-align:center;font-family:var(--mono)}
.flow li strong{display:block;font-size:15px;font-weight:500}
.flow li span{font-size:13px;color:var(--dim)}
.flow li.hl{border-color:var(--green);border-width:1.5px}
.flow li.hl strong{color:var(--green)}
.flow li:not(:last-child)::after{content:"";position:absolute;right:-34px;top:50%;width:28px;height:1.5px;background:var(--green)}
.flow li:not(:last-child)::before{content:"";position:absolute;right:-34px;top:calc(50% - 5px);width:8px;height:8px;border-top:1.5px solid var(--green);border-right:1.5px solid var(--green);transform:rotate(45deg) translate(-1px,1px)}
.flow .note{font-family:var(--mono);font-size:12px;color:var(--dim)}
.energy-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.ecard{padding:32px;background:var(--ink);border:1px solid var(--line);display:flex;flex-direction:column;gap:16px}
.ecard.acc{border-top:2px solid var(--green)}
.ecard h3{font-weight:700;font-size:24px;line-height:1.2}
.ecard p{font-size:16px;color:var(--muted)}
.services li{padding:11px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between}
.services li:last-child{border-bottom:0}
.services li span{font-family:var(--mono);font-size:12px;color:var(--green)}
.ecard.svc{justify-content:space-between}

/* About */
.about{display:grid;grid-template-columns:4fr 7fr;gap:24px 120px}
.about .count{display:flex;align-items:baseline;gap:14px;margin-top:22px}
.about .count b{font-weight:800;font-stretch:125%;font-size:clamp(84px,9vw,120px);line-height:.9}
.about .count span{font-family:var(--mono);font-size:13px;line-height:1.5;color:var(--muted)}
.about .story{font-size:clamp(21px,2.1vw,30px);line-height:1.35}
.principles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:48px}
.principles div{padding-top:18px;border-top:1px solid var(--line2);display:flex;flex-direction:column;gap:10px}
.principles small{font-family:var(--mono);font-size:12px}
.principles p{font-size:16px;color:var(--muted)}

/* Contact */
.contact{padding:var(--sec) 0 40px}
.contact-grid{display:grid;grid-template-columns:5fr 6fr;gap:48px 96px;align-items:start}
.contact-copy{display:flex;flex-direction:column;gap:28px}
.contact h2{font-size:clamp(44px,5.4vw,76px);line-height:.95}
.contact-meta{display:flex;flex-direction:column;gap:12px;padding-top:24px;border-top:1px solid var(--line);font-family:var(--mono);font-size:12px;letter-spacing:.06em;color:var(--dim)}
.form-panel .panel-head{padding:0 24px}
.cform{padding:28px 24px;display:flex;flex-direction:column;gap:22px;font-family:var(--sans)}
.cform .two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field{display:flex;flex-direction:column;gap:8px}
.field label,.cform legend{font-family:var(--mono);font-size:11px;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}
.field input,.field textarea{width:100%;min-height:48px;padding:12px 14px;background:var(--ink);border:1px solid var(--line2);color:var(--text);font:16px/1.5 var(--sans);border-radius:0}
.field textarea{resize:vertical;min-height:150px}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--cyan)}
.field input::placeholder,.field textarea::placeholder{color:#6B7788}
.cform fieldset{margin:0;padding:0;border:0}
.cform legend{padding:0;margin-bottom:10px}
.topics{display:flex;flex-wrap:wrap;gap:8px}
.topics input{position:absolute;opacity:0;pointer-events:none}
.topics label{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:1px solid var(--line2);font-family:var(--mono);font-size:12px;color:var(--text2);cursor:pointer}
.topics input:checked+label{background:var(--cyan);border-color:var(--cyan);color:var(--ink);font-weight:700}
.topics input:focus-visible+label{outline:2px solid var(--cyan);outline-offset:3px}
.form-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.check{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);cursor:pointer}
.check input{width:18px;height:18px;margin:0;accent-color:var(--cyan)}
.check a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-error{font-family:var(--mono);font-size:12px;color:#FF8A7A;min-height:1em}
.form-ok{padding:56px 24px;display:flex;flex-direction:column;align-items:flex-start;gap:18px}
.form-ok h3{font-weight:700;font-size:28px;line-height:1.2}
.form-ok svg{width:44px;height:44px}
[hidden]{display:none!important}
.btn[disabled]{opacity:.6;cursor:progress}

/* Footer */
.footer-cols{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;padding-top:36px;margin-top:80px;border-top:1px solid var(--line);font-size:15px}
.footer-cols div{display:flex;flex-direction:column;gap:10px}
.footer-cols .h{font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--dim)}
.footer-cols .brand{font-family:var(--mono);font-size:15px;font-weight:700;letter-spacing:.12em}
.footer-cols .muted{color:var(--dim);line-height:1.6}

/* Legal page */
.legal{max-width:820px;padding:96px 0}
.legal h1{font-size:clamp(36px,5vw,56px);margin:18px 0 40px}
.legal h2{font-size:20px;font-weight:700;margin:40px 0 12px}
.legal p,.legal li{color:var(--text2)}
.legal ul{list-style:disc;padding-left:22px;display:flex;flex-direction:column;gap:6px}
.legal a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}

/* ---------- Responsive ---------- */
@media (max-width:1180px){
  :root{--pad:40px;--sec:96px}
  .nav{gap:22px}
  .hero .wrap{grid-template-columns:1fr;gap:56px}
  .panel{max-width:560px}
  .cards3,.apps,.energy-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .venture:last-child,.energy-cards .svc{grid-column:1/-1}
  .venture{min-height:0}
  .protocols{grid-template-columns:repeat(2,minmax(0,1fr))}
  .protocols>div{border-bottom:1px solid var(--line)}
  .protocols>div:nth-child(2n){border-right:0}
  .editions{grid-template-columns:1fr}
  .flow ol{grid-template-columns:1fr;gap:28px;max-width:420px}
  .flow li:not(:last-child)::after{right:auto;left:50%;top:auto;bottom:-22px;width:1.5px;height:16px}
  .flow li:not(:last-child)::before{right:auto;left:calc(50% - 4px);top:auto;bottom:-22px;transform:rotate(135deg)}
  .about{grid-template-columns:1fr;gap:32px}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width:980px){
  .menu-toggle{display:inline-flex}
  .nav{display:none;position:absolute;top:80px;left:0;right:0;flex-direction:column;align-items:stretch;gap:0;background:var(--ink);border-bottom:1px solid var(--line);padding:8px var(--pad) 24px}
  .nav.open{display:flex}
  .nav>a{padding:16px 0;border-bottom:1px solid var(--line)}
  .nav .btn{margin-top:16px;min-height:52px}
}
@media (max-width:720px){
  :root{--pad:20px;--sec:56px}
  body{font-size:16px}
  .gridbg{background-size:32px 32px}
  .site-header .wrap{height:64px}
  .nav{top:64px}
  .logo svg{width:28px;height:28px}.logo span{font-size:14px}
  .hero .wrap{padding-top:48px;padding-bottom:56px;gap:40px}
  .hero-copy{gap:28px}
  .hero .intro{font-size:17px}
  .hero-ctas{flex-direction:column}
  .hero-ctas .btn{width:100%}
  .sec-head{flex-direction:column;align-items:flex-start;margin-bottom:28px;gap:16px}
  .cards3,.apps,.energy-cards,.books,.principles{grid-template-columns:1fr}
  .venture{padding:26px 22px}
  .venture h3{font-size:30px;margin:16px 0}
  .app{min-height:0;padding:18px;flex-direction:row;align-items:center;justify-content:flex-start;gap:16px}
  .app .row{flex-direction:column;gap:0}
  .app .num{display:none}
  .tile{width:54px;height:54px;border-radius:13px}
  .app h3{font-size:19px}
  .app p{font-size:14px}
  .split{grid-template-columns:1fr;margin-bottom:28px}
  .protocols>div{padding:18px 16px}
  .protocols h3{font-size:18px}
  .protocols p{display:none}
  .book{flex-direction:row;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line)}
  .book>a{flex:0 0 96px;width:96px}
  .book img{width:96px}
  .podcast{padding:24px 20px}
  .flow{padding:18px 16px}
  .flow .top span:last-child{display:none}
  .ecard{padding:22px 20px}
  .cform{padding:20px 16px}
  .cform .two{grid-template-columns:1fr}
  .form-foot .btn{width:100%}
  .footer-cols{grid-template-columns:1fr 1fr;gap:28px 16px;margin-top:48px}
  .contact-grid{gap:32px}
}
