/* M&K Digital — one stylesheet for every page.
   Look: near-black, white and silver type, one brand accent (Cherry from the MBG app) used sparingly. */
:root {
  --black: #050506;
  --raise: #0E0E10;
  --raise-2: #151517;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --text: #F5F5F7;
  --text-2: rgba(245, 245, 247, 0.62);
  --text-3: rgba(245, 245, 247, 0.42);
  --silver: #D9D6D8;
  --accent: #C7253E;
  --accent-light: #E0475E;
  --sheen: linear-gradient(100deg, #FFFFFF 0%, #E6E3E5 30%, #A9A4A7 60%, #FFFFFF 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --wrap: min(1080px, 100% - 48px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--text); font: 400 17px/1.6 var(--sans); font-optical-sizing: auto; font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
/* Grain keeps the dark gradients from banding */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; border-radius: 8px; }
.wrap { width: var(--wrap); margin-inline: auto; }
h1, h2, h3, p { text-wrap: balance; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--black); font-weight: 500; }
.skip:focus { top: 12px; }
.paint { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Frosted global bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; background: rgba(5, 5, 6, 0.66); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 0.5px solid var(--hair); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.mark { font: 700 17px/1 var(--sans); letter-spacing: -0.03em; }
.amp { color: var(--accent-light); }
.bar nav { display: flex; gap: 28px; font-size: 12.5px; color: var(--text-2); letter-spacing: 0.01em; }
.bar nav a { transition: color .3s var(--ease); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); }

/* ---------- Shared type + buttons ---------- */
.kicker { font: 600 13px/1 var(--sans); letter-spacing: 0.02em; color: var(--accent-light); }
h2 { margin-top: 16px; font: 700 clamp(40px, 6.4vw, 80px)/1.02 var(--sans); letter-spacing: -0.045em; }
/* Gradient text only paints inside its box, so the padding keeps descenders and the last letter whole */
.sheen { background: var(--sheen); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .08em .14em; margin: 0 -.08em -.14em; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px; font: 500 16px/1 var(--sans); transition: transform .5s var(--ease), background .3s, color .3s, box-shadow .5s var(--ease); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--text); color: var(--black); translate: var(--bx, 0) var(--by, 0); transition: transform .5s var(--ease), translate .7s var(--ease), box-shadow .5s var(--ease); }
.btn.primary:hover { box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 14px 40px -10px rgba(255, 255, 255, .25); }
.btn.link { color: var(--text); padding: 0 8px; }
.btn.link::after { content: "›"; font-size: 20px; color: var(--accent-light); transition: transform .4s var(--ease); }
.btn.link:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 0; text-align: center; overflow: clip; }
.hero h1 { margin: 0 auto; font: 700 clamp(52px, 9.6vw, 120px)/0.98 var(--sans); letter-spacing: -0.05em; }
/* Headline lines rise out of a mask and come into focus */
.hero h1 .line { display: block; overflow: clip; padding-bottom: .22em; margin-bottom: -.22em; }
.hero h1 .inner { display: block; animation: rise 1.4s var(--ease) var(--d, 0s) both; }
/* The one moment of colour: "Big ideas." drifts slowly from white through blush to cherry */
.hero h1 .inner.sheen { background-image: linear-gradient(100deg, #FFFFFF 0%, #F4D3D9 38%, #F0627A 72%, #C7253E 100%); animation: rise 1.4s var(--ease) var(--d, 0s) both, shimmer 9s ease-in-out 1.6s infinite alternate; }
@keyframes rise { from { transform: translateY(105%); filter: blur(10px); opacity: 0; } }
@keyframes shimmer { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.tagline { margin-top: 24px; font: 600 clamp(21px, 2.4vw, 28px)/1.25 var(--sans); letter-spacing: -0.02em; }
.lede { margin: 14px auto 0; max-width: 34em; font-size: 19px; color: var(--text-2); }
.actions { margin-top: 36px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* The lit object: a dark-glass monogram tile. --p: 0 → 1 as the hero scrolls away (set in JS) */
.stage { position: relative; height: clamp(380px, 50vw, 560px); margin-top: 40px; perspective: 1200px; opacity: calc(1 - var(--p, 0) * .75); }
.halo { position: absolute; left: 50%; top: 50%; width: 110%; max-width: 1000px; aspect-ratio: 2 / 1; translate: -50% -50%; scale: calc(1 + var(--p, 0) * .3);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .07), rgba(199, 37, 62, .06) 45%, transparent 75%); filter: blur(24px); }
.object { position: absolute; left: 50%; top: 46%; width: clamp(200px, 24vw, 290px); aspect-ratio: 1; translate: -50% -50%; scale: calc(1 - var(--p, 0) * .2);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 1.2s var(--ease); animation: float 8s ease-in-out infinite; }
.tile { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.tile svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tile-mark { position: relative; font: 700 clamp(52px, 6.2vw, 78px)/1 var(--sans); letter-spacing: -0.06em; }
.tile-mark .amp { -webkit-text-fill-color: var(--accent-light); }
.flare { opacity: .3; transition: opacity .8s var(--ease); }
.stage:hover .flare { opacity: .9; }
.ring { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%; border-radius: 34%; border: 1px solid rgba(255, 255, 255, .35); opacity: 0; scale: .8; pointer-events: none; }
.stage:hover .ring { animation: ring 1.8s var(--ease) .1s both; }
@keyframes ring { 0% { opacity: .6; scale: .8; } 100% { opacity: 0; scale: 1.5; } }
.trail { stroke-dasharray: 24 276; animation: trail 7s linear infinite; }
.trail.glow { opacity: .55; }
.floor { position: absolute; left: 50%; bottom: 8%; width: clamp(160px, 20vw, 260px); height: 24px; translate: -50% 0; background: radial-gradient(closest-side, rgba(255, 255, 255, .14), transparent); filter: blur(12px); animation: shadow 8s ease-in-out infinite; }
@keyframes float { 50% { translate: -50% calc(-50% - 14px); } }
@keyframes shadow { 50% { transform: scaleX(0.82); opacity: .7; } }
@keyframes trail { to { stroke-dashoffset: -300; } }

/* ---------- Chapters ---------- */
.chapter { padding: clamp(110px, 16vw, 180px) 0; }

/* About: pinned heading on the left, three statements on the right.
   Each statement's words light up with scroll and its hairline fills (--done, set in JS). */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.about-head { position: sticky; top: 120px; }
.about-head h2 { font-size: clamp(36px, 4.6vw, 60px); }
.points { list-style: none; padding: 0; margin: 0; }
.point { position: relative; padding: 40px 0; border-top: 0.5px solid var(--hair); }
.point:last-child { border-bottom: 0.5px solid var(--hair); }
.point::before { content: ""; position: absolute; left: 0; right: 0; top: -0.5px; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); transform: scaleX(var(--done, 0)); transform-origin: left; }
.statement { font: 600 clamp(22px, 2.5vw, 32px)/1.3 var(--sans); letter-spacing: -0.022em; }
.statement .w { opacity: var(--o, .2); transition: opacity .25s linear; }

/* Bento, with a spotlight + border glow that follow the cursor (--cx/--cy set in JS) */
.bento { margin-top: clamp(80px, 10vw, 120px); display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; }
.cell { position: relative; overflow: hidden; padding: 32px; min-height: 280px; border-radius: 28px; background: var(--raise); border: 0.5px solid var(--hair); display: flex; flex-direction: column; justify-content: flex-end; transition: transform .8s var(--ease), border-color .4s; }
.cell:hover { transform: translateY(-4px); border-color: var(--hair-strong); }
.cell.wide { background: radial-gradient(120% 140% at 100% 0%, rgba(199, 37, 62, .14), transparent 55%), var(--raise); }
.cell svg { position: absolute; top: 28px; left: 28px; width: 44px; height: 44px; z-index: 1; }
/* Icons take turns: one 4.2s loop, each card starts its ~1.1s moment 1s after the one before (--icd).
   Keyframe percentages are of the 4.2s loop, so change them together with --ic-loop. */
.bento { --ic-loop: 4.2s; }
.cell:nth-child(1) { --icd: .2s; } .cell:nth-child(2) { --icd: 1.2s; } .cell:nth-child(3) { --icd: 2.2s; }
.ic, .ic-btn { transform-box: fill-box; transform-origin: 50% 50%; }
.ic-screen { opacity: 0; }
.cell.in svg { animation: ic-halo var(--ic-loop) var(--ease) var(--icd) infinite; }
.cell.in .ic-phone { animation: ic-lift var(--ic-loop) var(--ease) var(--icd) infinite; }
.cell.in .ic-screen { animation: ic-light var(--ic-loop) var(--ease) var(--icd) infinite; }
.cell.in .ic-star { animation: ic-turn var(--ic-loop) var(--ease) var(--icd) infinite; }
.cell.in .ic-pad { animation: ic-wiggle var(--ic-loop) var(--ease) var(--icd) infinite; }
.cell.in .ic-btn.a { animation: ic-press var(--ic-loop) ease calc(var(--icd) + .2s) infinite; }
.cell.in .ic-btn.b { animation: ic-press var(--ic-loop) ease calc(var(--icd) + .4s) infinite; }
@keyframes ic-halo { 0%, 34%, 100% { filter: none; } 11% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, .45)); } }
@keyframes ic-lift { 0%, 31%, 100% { translate: 0 0; } 11% { translate: 0 -3px; } }
@keyframes ic-light { 0%, 31%, 100% { opacity: 0; } 11% { opacity: .3; } }
/* 144° keeps the five-point star looking identical, so the loop never jumps */
@keyframes ic-turn { 0% { rotate: 0deg; scale: 1; fill-opacity: 0; } 13% { scale: 1.14; fill-opacity: .18; } 28%, 100% { rotate: 144deg; scale: 1; fill-opacity: 0; } }
@keyframes ic-wiggle { 0%, 31%, 100% { rotate: 0deg; } 7% { rotate: -9deg; } 14% { rotate: 7deg; } 21% { rotate: -3deg; } }
@keyframes ic-press { 0%, 13%, 100% { fill: #D9D6D8; scale: 1; } 4% { fill: #E0475E; scale: 1.35; } }
.cell h3 { position: relative; z-index: 1; font: 600 24px/1.15 var(--sans); letter-spacing: -0.03em; }
.cell p { position: relative; z-index: 1; margin-top: 8px; color: var(--text-2); font-size: 16px; }
.cell::before, .cell::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
.cell::before { background: radial-gradient(420px circle at var(--cx, 50%) var(--cy, 50%), rgba(255, 255, 255, .06), transparent 45%); }
.cell::after { padding: 1px; background: radial-gradient(260px circle at var(--cx, 50%) var(--cy, 50%), rgba(255, 255, 255, .4), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.bento:hover .cell::before, .bento:hover .cell::after { opacity: 1; }

/* Apps. --q: 0 → 1 as the phone scrolls into place (set in JS; stays 1 without JS or with reduced motion) */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.apps .big { margin-top: 24px; font: 600 clamp(24px, 2.8vw, 34px)/1.22 var(--sans); letter-spacing: -0.025em; color: var(--text-2); }
.apps .big strong { color: var(--text); font-weight: 600; }
.live { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--accent-light); vertical-align: 0.2em; box-shadow: 0 0 12px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.stores { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }
.store { padding: 12px 18px; border-radius: 14px; background: var(--raise-2); border: 0.5px solid var(--hair-strong); font: 500 14px/1 var(--sans); color: var(--text-2); }
/* Float + pointer tilt live on a wrapper so they never fight the scroll-in transform on .phone */
.phone-float { justify-self: center; animation: drift 7s ease-in-out infinite; transform: perspective(1200px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 1s var(--ease); }
@keyframes drift { 50% { translate: 0 -14px; rotate: .8deg; } }
.phone { position: relative; width: min(300px, 76vw); aspect-ratio: 9 / 19.5; border-radius: 52px; padding: 11px;
  background: linear-gradient(145deg, #3A393C, #121214 40%, #2A292C 70%, #0B0B0C);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 60px 120px -30px rgba(199, 37, 62, .45), inset 0 1px 1px rgba(255, 255, 255, .25);
  transform: perspective(1400px) translateY(calc((1 - var(--q, 1)) * 80px)) rotateX(calc((1 - var(--q, 1)) * 28deg)) rotateZ(calc((1 - var(--q, 1)) * -6deg)) scale(calc(.9 + var(--q, 1) * .1));
  opacity: calc(.25 + var(--q, 1) * .75); }
/* The first app's screen: brand gradient with a softly beating heart, a light sweep and a glare that follows the cursor */
.screen { position: relative; height: 100%; border-radius: 42px; overflow: hidden; background: radial-gradient(80% 60% at 30% 20%, #F4D3D9 0%, #F0627A 30%, #C7253E 55%, #2A0B12 100%); }
.screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 92px; height: 26px; translate: -50% 0; border-radius: 999px; background: #000; z-index: 3; }
.screen::after { content: ""; position: absolute; inset: -20%; z-index: 1; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); translate: -100% 0; animation: sweep 6s var(--ease) 1s infinite; }
@keyframes sweep { 30%, 100% { translate: 100% 0; } }
.screen svg { position: absolute; left: 50%; top: 50%; width: 44%; translate: -50% -50%; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35)); animation: heartbeat 3.2s var(--ease) infinite; }
@keyframes heartbeat { 0%, 60%, 100% { scale: 1; } 12% { scale: 1.07; } 24% { scale: .99; } 36% { scale: 1.04; } }
.glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(55% 35% at var(--gx, 30%) var(--gy, 18%), rgba(255, 255, 255, .2), transparent 70%); }

/* Contact. Email: glass icon tile with an envelope that draws itself in; on hover the flap opens and the letter rises */
.contact { text-align: center; }
.contact .note { margin-top: 16px; font-size: 19px; color: var(--text-2); }
.mail { display: inline-flex; flex-direction: column; align-items: center; gap: 28px; margin-top: 44px; }
.env { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)), var(--raise);
  border: 0.5px solid var(--hair-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -24px rgba(255, 255, 255, .25);
  transition: transform .8s var(--ease), box-shadow .8s var(--ease); }
.env svg { width: 54px; overflow: visible; }
.env-body, .env-flap, .env-letter { fill: none; stroke: url(#rim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.env-body, .env-flap { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.env-flap { transform-box: fill-box; transform-origin: 50% 0; transition: stroke-dashoffset 1.6s var(--ease) .5s, transform .7s var(--ease); }
.env-letter { stroke: var(--accent-light); opacity: 0; transition: opacity .4s var(--ease) .15s, translate .9s var(--ease) .15s; }
.in .env-body, .in .env-flap { stroke-dashoffset: 0; }
.mail:hover .env { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 30px 70px -24px rgba(255, 255, 255, .35); }
.mail:hover .env-flap { transform: scaleY(-1); }
.mail:hover .env-letter { opacity: 1; translate: 0 -11px; }
.addr { position: relative; font: 700 clamp(34px, 7vw, 88px)/1.05 var(--sans); letter-spacing: -0.05em;
  background: var(--sheen); background-size: 200% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 .1em .14em; margin: 0 -.1em; transition: background-position 1.4s var(--ease); }
.in .addr { background-position: 60% 0; }
.mail:hover .addr { background-position: 0 0; }
.addr::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: .04em; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); transform: scaleX(0); transition: transform .9s var(--ease); }
.mail:hover .addr::after { transform: scaleX(1); }

/* ---------- Text pages (privacy, support, 404) ---------- */
.doc { padding: 150px 0 120px; }
.doc .wrap { max-width: 720px; }
.doc h1 { margin-top: 16px; font: 700 clamp(40px, 6vw, 64px)/1.04 var(--sans); letter-spacing: -0.045em; }
.doc .meta { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.doc h2 { margin-top: 48px; font-size: 24px; letter-spacing: -0.02em; }
.doc p, .doc li { margin-top: 14px; color: var(--text-2); text-wrap: pretty; }
.doc ul { padding-left: 20px; }
.doc a:not(.btn) { color: var(--text); border-bottom: 1px solid rgba(255, 255, 255, .3); transition: border-color .3s; }
.doc a:not(.btn):hover { border-color: var(--text); }
.doc .btn { margin-top: 32px; }

/* ---------- Footer ---------- */
.foot { border-top: 0.5px solid var(--hair); padding: 22px 0 34px; font-size: 12px; color: var(--text-3); }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--text-2); transition: color .3s; }
.foot a:hover { color: var(--text); }

/* ---------- Scroll reveal (staggered with .d1–.d5) ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1.2s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.d1 { --d: .15s; } .d2 { --d: .3s; } .d3 { --d: .55s; } .d4 { --d: .7s; } .d5 { --d: .85s; }
/* If the script never runs, nothing stays hidden */
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .bar nav { gap: 18px; }
  .bento, .apps, .about { grid-template-columns: 1fr; }
  .about { gap: 40px; }
  .about-head { position: static; }
  .point { padding: 28px 0; }
  .cell { min-height: 220px; }
  .apps { gap: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .statement .w { opacity: 1; }
  .env-body, .env-flap { stroke-dashoffset: 0; }
}
