/* ============ FMike portal ============ */
:root {
    --bg: #050806;
    --surface: rgba(255,255,255,.035);
    --surface-2: rgba(255,255,255,.06);
    --line: rgba(255,255,255,.08);
    --line-2: rgba(255,255,255,.16);
    --text: #f4f4f7;
    --muted: #93a39a;
    --dim: #56665c;
    --violet: #22e584;
    --lime: #c6ff4a;
    --teal: #14d6b4;
    --mint: #c6ff4a;
    --orange: #c6ff4a;
    --radius: 26px;
    --display: 'Bricolage Grotesque', system-ui, sans-serif;
    --sans: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--lime); color: #04140a; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: 620px; height: 620px; background: #0e9f5a; top: -220px; left: -160px; opacity: .45; }
.b2 { width: 520px; height: 520px; background: #0f766e; top: 30%; right: -220px; opacity: .35; animation-delay: -7s; }
.b3 { width: 480px; height: 480px; background: var(--lime); bottom: -260px; left: 30%; opacity: .12; animation-delay: -14s; }
@keyframes drift {
    0%   { transform: translate(0,0) scale(1); }
    50%  { transform: translate(80px,60px) scale(1.12); }
    100% { transform: translate(-60px,100px) scale(.95); }
}
.grid-lines {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    opacity: .55;
}
.noise {
    position: absolute; inset: -50%; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 16px; z-index: 50;
    max-width: 1180px; margin: 16px auto 0; padding: 10px 12px 10px 22px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(8,14,10,.6);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    width: calc(100% - 32px);
}
.brand { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--mint)); box-shadow: 0 0 16px var(--violet); }
.brand-tld { color: var(--dim); font-weight: 600; }
.topbar nav { display: flex; gap: 4px; align-items: center; }
.topbar nav a { padding: 8px 16px; border-radius: 999px; font-size: .92rem; color: var(--muted); transition: color .2s, background .2s; }
.topbar nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar nav a.nav-cta { background: var(--text); color: var(--bg); font-weight: 600; }
.topbar nav a.nav-cta:hover { background: #fff; color: var(--bg); }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 90px; text-align: center; }
.pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    font-family: var(--mono); font-size: .78rem; color: var(--muted);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); position: relative; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--mint); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }

.hero h1 {
    font-family: var(--display);
    font-size: clamp(3.2rem, 9vw, 7.4rem);
    font-weight: 800; line-height: .95; letter-spacing: -.045em;
    margin: 30px 0 28px;
}
.grad {
    background: linear-gradient(100deg, var(--violet) 0%, var(--lime) 40%, var(--teal) 70%, var(--violet) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shine 7s linear infinite;
}
@keyframes shine { to { background-position: 220% center; } }
.lead { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 1.15rem; }
.hero-actions { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px;
    font: 600 .98rem var(--sans); cursor: pointer; border: 0;
    transition: transform .2s, box-shadow .3s, background .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--lime), var(--violet)); color: #04140a; box-shadow: 0 10px 40px -10px var(--violet); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px var(--violet); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
kbd {
    font-family: var(--mono); font-size: .75rem;
    padding: 2px 7px; border-radius: 6px;
    background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted);
}

/* ---------- Section head ---------- */
.section-head { margin-bottom: 28px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--violet); }
.section-head h2 { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(260px, auto); gap: 18px; }
.card-xl   { grid-column: span 2; grid-row: span 2; }
.card-md   { grid-column: span 1; }
.card-wide { grid-column: span 3; }

.card {
    --accent: var(--violet);
    --mx: 50%; --my: 50%;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 30px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
    border: 1px solid var(--line);
    transition: border-color .3s, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
    will-change: transform;
}
.card::before { /* gradient border on hover */
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: radial-gradient(400px circle at var(--mx) var(--my), var(--accent), transparent 45%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .3s;
}
.card-glow {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(500px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%);
    opacity: 0; transition: opacity .3s;
}
a.card:hover { border-color: transparent; box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 60%, transparent); }
a.card:hover::before, a.card:hover .card-glow { opacity: 1; }

.card-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.card-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    color: var(--accent);
}
.card-icon svg { width: 26px; height: 26px; }
.status {
    font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted);
    display: inline-flex; align-items: center; gap: 7px;
}
.status-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.status-soon { border-style: dashed; }

.card-body { position: relative; z-index: 1; margin-top: 28px; }
.card-tag { font-family: var(--mono); font-size: .76rem; color: var(--dim); }
.card h3 { font-family: var(--display); font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 10px; }
.card-xl h3 { font-size: clamp(2.6rem, 5vw, 4rem); }
.card p { color: var(--muted); max-width: 460px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips span { font-size: .78rem; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.card-arrow {
    position: absolute; right: 26px; bottom: 26px; z-index: 1;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--line-2);
    transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s, color .3s;
}
.card-arrow svg { width: 20px; height: 20px; }
a.card:hover .card-arrow { background: var(--accent); color: #0a0a0f; transform: rotate(45deg) scale(1.08); border-color: transparent; }

/* 4mapper visual: floating projected planes */
.mapper-visual {
    position: absolute; right: -40px; top: 50px; width: 62%; height: 70%;
    perspective: 900px; pointer-events: none;
}
.plane {
    position: absolute; border-radius: 14px; border: 1px solid rgba(255,255,255,.18);
    transform-style: preserve-3d;
}
.p1 { width: 62%; height: 56%; top: 8%; left: 10%;
      background: linear-gradient(135deg, rgba(34,229,132,.55), rgba(20,214,180,.2));
      transform: rotateY(-28deg) rotateX(12deg); animation: float1 9s ease-in-out infinite; }
.p2 { width: 46%; height: 40%; top: 36%; left: 46%;
      background: linear-gradient(135deg, rgba(198,255,74,.42), rgba(34,229,132,.12));
      transform: rotateY(-28deg) rotateX(12deg) translateZ(60px); animation: float2 11s ease-in-out infinite; }
.p3 { width: 34%; height: 30%; top: 2%; left: 58%;
      background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 2px, transparent 2px 18px), rgba(20,214,180,.18);
      transform: rotateY(-28deg) rotateX(12deg) translateZ(-40px); animation: float1 13s ease-in-out infinite reverse; }
@keyframes float1 { 50% { transform: rotateY(-20deg) rotateX(18deg) translateY(-14px); } }
@keyframes float2 { 50% { transform: rotateY(-34deg) rotateX(8deg) translateZ(60px) translateY(12px); } }
.card-xl .card-body { margin-top: auto; padding-top: 180px; }

/* coming soon */
.card-soon { border-style: dashed; border-color: var(--line-2); background: transparent; }
.card-soon .card-icon { --accent: var(--muted); }
.card-soon h3 { color: var(--muted); }

/* blog card */
.card-blog { flex-direction: row; gap: 36px; align-items: stretch; }
.blog-intro { flex: 0 0 34%; display: flex; flex-direction: column; justify-content: space-between; position: relative; padding-bottom: 60px; }
.blog-intro .card-arrow { left: 0; right: auto; bottom: 0; }
.posts { list-style: none; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; position: relative; z-index: 1; }
.posts li {
    display: flex; flex-direction: column; gap: 12px;
    background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 18px; padding: 10px;
    transition: border-color .3s;
}
a.card:hover .posts li { border-color: var(--line-2); }
.posts img, .post-ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; display: block; background: var(--surface-2); }
.posts li > div { padding: 0 6px 6px; display: flex; flex-direction: column; gap: 4px; }
.post-meta { font-family: var(--mono); font-size: .7rem; color: var(--dim); }
.post-title { font-weight: 600; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Manifesto ---------- */
.manifesto { margin: 110px 0 80px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.m-item { padding: 32px 28px 0 0; }
.m-num { font-family: var(--mono); font-size: .8rem; color: var(--violet); }
.m-item h4 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -.02em; margin: 10px 0 6px; }
.m-item p { color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
    max-width: 1180px; margin: 0 auto; padding: 30px 24px 50px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.footer .muted { color: var(--dim); }
.footer a:hover { color: var(--text); }

/* ---------- Search palette ---------- */
.search {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(5,5,8,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: flex-start; padding-top: 16vh;
}
.search[hidden] { display: none; }
.search-box {
    width: min(560px, 92vw); border-radius: 20px; overflow: hidden;
    background: #0b120d; border: 1px solid var(--line-2);
    box-shadow: 0 40px 120px -20px rgba(34,229,132,.35);
    animation: pop .2s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.search-box input {
    width: 100%; padding: 20px 22px; background: transparent; border: 0; outline: 0;
    color: var(--text); font: 500 1.1rem var(--sans); border-bottom: 1px solid var(--line);
}
#searchResults { list-style: none; padding: 8px; max-height: 320px; overflow: auto; }
#searchResults li { padding: 12px 14px; border-radius: 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
#searchResults li span { color: var(--dim); font-family: var(--mono); font-size: .78rem; }
#searchResults li.sel, #searchResults li[data-k]:hover { background: var(--surface-2); }
#searchResults li.empty { color: var(--muted); cursor: default; }
.search-hint { padding: 10px 18px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--dim); display: flex; gap: 8px; align-items: center; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .35s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .card-xl, .card-wide { grid-column: span 2; }
    .card-blog { flex-direction: column; }
    .blog-intro { flex: none; }
}
@media (max-width: 640px) {
    .topbar nav a:not(.nav-cta):not([href="/blog/"]) { display: none; }
    .hero { padding: 80px 0 60px; }
    .bento { grid-template-columns: 1fr; }
    .card-xl, .card-wide, .card-md { grid-column: span 1; grid-row: auto; }
    .card-xl .card-body { padding-top: 150px; }
    .mapper-visual { width: 90%; right: -60px; height: 200px; top: 70px; }
    .posts { grid-template-columns: 1fr; }
    .posts li { flex-direction: row; align-items: center; }
    .posts img, .post-ph { width: 92px; flex: none; }
    .manifesto { grid-template-columns: 1fr; }
    .card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
