/* ═══════════════════════════════════════════════════════════════════════
   ViLi Portfolio — shared.css
   Design: POP / MEMPHIS — white canvas, confetti geometry, primary pops,
   thick ink outlines, hard offset shadows, chunky rounded type.
   Vanilla CSS, no build step. Animate only transform/opacity.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---- Fonts: Poppins (display) + DM Sans (body), loaded via <link> per page ---- */

/* ═══ TOKENS ═══ */
:root {
  /* Surfaces */
  --paper: #FFFDF9;      /* page background (warm white) */
  --panel: #FFFFFF;      /* cards */
  --ink: #141414;        /* text + outlines */
  --muted: #66625C;      /* secondary text */
  --hairline: #ECE7DD;   /* soft rules */

  /* Primary pops */
  --blue:   #2BB0ED;
  --pink:   #F5457B;
  --yellow: #FFC93C;
  --mint:   #2DD4A7;
  --purple: #7A5CFF;
  --danger: #F5457B;
  --success: #2DD4A7;

  /* Fonts */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  /* Type scale */
  --fs-display: 60px;
  --fs-h1: 44px;
  --fs-h2: 32px;
  --fs-h3: 18px;
  --fs-body: 17px;
  --fs-label: 12px;

  /* Spacing (8px base) */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 40px; --sp-6: 56px;
  --sp-section: 88px;
  --maxw: 1120px;

  /* Shape language */
  --bw: 2.5px;                 /* border weight */
  --r: 16px;                   /* card radius */
  --r-btn: 10px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-soft: 6px 6px 0 rgba(20,20,20,.10);

  /* Motion */
  --ease: cubic-bezier(.34, 1.56, .64, 1);  /* springy */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur: 220ms;
}

/* ═══ RESET / BASE ═══ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

/* ═══ TYPOGRAPHY ═══ */
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 800; margin: 0; letter-spacing: -.02em; color: var(--ink); }
.display { font-size: var(--fs-display); line-height: 1.02; }
.h1 { font-size: var(--fs-h1); line-height: 1.05; }
.h2 { font-size: var(--fs-h2); line-height: 1.1; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.label {
  font-family: var(--font-body); font-size: var(--fs-label); line-height: 1.3;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.deck { max-width: 52ch; color: var(--muted); }
.muted { color: var(--muted); }

/* Was chrome-fill in Y2K — now just bold ink (kept so markup doesn't change) */
.chrome-text { color: var(--ink); }

/* ═══ LAYOUT ═══ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-3); }
.section { padding: var(--sp-section) 0; }
@media (max-width: 768px) { .section { padding: var(--sp-6) 0; } }

/* scanlines → no-op in Memphis (class kept on markup) */
.scanlines { position: relative; }

/* ═══ CARD / "WINDOW" (repurposed as sticker card) ═══ */
.win {
  position: relative; background: var(--panel);
  border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
}
.win--float { box-shadow: var(--shadow); }

/* Titlebar → playful colored header strip */
.titlebar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 10px 16px; background: var(--yellow);
  border-bottom: var(--bw) solid var(--ink);
}
.titlebar__name {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  letter-spacing: .02em; color: var(--ink); text-transform: lowercase;
}
.titlebar__dots { display: flex; gap: 7px; margin-left: auto; }
.titlebar__dots i {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--panel);
}
.titlebar__dots i:nth-child(1) { background: var(--pink); }
.titlebar__dots i:nth-child(2) { background: var(--blue); }
.titlebar__dots i:nth-child(3) { background: var(--mint); }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  color: var(--ink); background: var(--panel);
  border: var(--bw) solid var(--ink); border-radius: var(--r-btn);
  box-shadow: var(--shadow-sm); cursor: pointer; position: relative;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* primary (was btn-acid) → bold ink button */
.btn-acid { background: var(--ink); color: var(--paper); }
.btn-acid:hover { background: #000; }

/* secondary text link (was btn-pink) */
.btn-pink {
  background: transparent; border: 0; box-shadow: none; color: var(--ink);
  min-height: auto; padding: 6px 2px; text-decoration: underline;
  text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 4px;
}
.btn-pink:hover { transform: none; box-shadow: none; color: var(--pink); }
.btn--full { width: 100%; }

/* sweep → no-op (kept on markup); Memphis uses press-shadow instead */
.sweep::before { content: none; }

/* ═══ STATUS CHIPS ═══ */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 2px solid var(--ink); border-radius: 40px;
  background: var(--panel); font-family: var(--font-display);
  font-size: 12px; letter-spacing: .04em; font-weight: 700; color: var(--ink);
  white-space: nowrap;
}
.chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.chip--live::before { background: var(--mint); }
.chip--demo::before { background: var(--pink); }
.chip--code::before { background: var(--blue); }
.chip--soon::before { background: var(--yellow); }
.chip--live { background: #E4FBF3; }
.chip--demo { background: #FFE7EF; }
.chip--code { background: #E3F5FD; }
.chip--soon { background: #FFF4D6; }
.chip span { color: var(--ink); }

/* ═══ SPARKLE / STAR ═══ */
.sparkle { display: inline-block; color: var(--pink); }
.sparkle--twinkle { animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { transform: rotate(0) scale(.9); } 50% { transform: rotate(20deg) scale(1.12); } }

/* ═══ REVEAL ═══ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ═══ DIVIDERS ═══ */
.hairline { height: 2px; background: var(--hairline); border: 0; margin: 0; }
.divider-dither {
  height: 0; border: 0; border-top: var(--bw) dashed var(--ink); margin: 0; opacity: .55;
}

/* ═══ NAVBAR ═══ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 62px;
  display: flex; align-items: center; background: var(--paper);
  border-bottom: var(--bw) solid var(--ink);
}
.nav .wrap { display: flex; align-items: center; width: 100%; gap: var(--sp-3); }
.nav__brand { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: -.02em; }
.nav__links { display: flex; gap: var(--sp-3); margin: 0 auto; }
.nav__links a {
  font-family: var(--font-display); color: var(--ink); font-size: 15px; font-weight: 600;
  position: relative; padding: 4px 2px;
}
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; width: 0;
  background: var(--pink); border-radius: 3px; transition: width .2s var(--ease-out); margin: 0 auto; }
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }
.nav__cta { margin-left: auto; min-height: 42px; padding: 0 18px; }
.nav__burger { display: none; margin-left: auto; background: var(--panel); border: var(--bw) solid var(--ink);
  color: var(--ink); width: 48px; height: 42px; border-radius: var(--r-btn); cursor: pointer; box-shadow: var(--shadow-sm); }

@media (max-width: 768px) {
  .nav__links {
    position: fixed; top: 62px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--paper); border-bottom: var(--bw) solid var(--ink);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  }
  .nav__links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__links a { padding: 16px var(--sp-3); min-height: 48px; display: flex; align-items: center;
    border-top: 2px solid var(--hairline); }
  .nav__burger { display: block; order: 3; margin-left: 12px; }
  .nav__cta { margin-left: auto; order: 2; }
  .nav .wrap { gap: var(--sp-2); }
}

/* ═══ FOOTER ═══ */
.footer { background: var(--panel); border-top: var(--bw) solid var(--ink); position: relative; }
.footer .wrap { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer .label { color: var(--muted); }
.footer .dot-online { color: var(--mint); }
.footer a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.footer a:hover { color: var(--pink); }
@media (max-width: 560px) { .footer .wrap { gap: var(--sp-2); } }

/* ═══ CTA BANNER ═══ */
.cta-banner { background: var(--blue); border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink);
  text-align: center; position: relative; }
.cta-banner .wrap { max-width: 720px; }
.cta-banner .h2 { color: var(--ink); }
.cta-banner p { color: var(--ink); opacity: .82; margin: var(--sp-2) auto var(--sp-4); max-width: 48ch; }

/* ═══ SECTION MARKER ═══ */
.section-marker { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-4); }
.section-marker .sparkle { color: var(--blue); }

/* ═══ HERO ═══ */
.hero { padding-top: var(--sp-6); padding-bottom: var(--sp-6); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 58% 42%; gap: var(--sp-5); align-items: center; position: relative; z-index: 2; }
.hero__kicker { margin-bottom: var(--sp-3); }
.hero__h1 { margin-bottom: var(--sp-3); }
.hero__h1 em { font-style: normal; color: var(--pink); }
.hero__deck { margin-bottom: var(--sp-4); font-size: 19px; color: var(--muted); }
.hero__actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.hero__media { position: relative; }
.hero__win { transform: rotate(2deg); transition: transform var(--dur) var(--ease); }
.hero__win:hover { transform: rotate(2deg) translateY(-4px); }
.hero__win .tw__body { aspect-ratio: 16 / 10; }
.hero__spark { position: absolute; top: -16px; left: -12px; font-size: 30px; z-index: 3; color: var(--yellow); }

/* Memphis confetti overlay — sits in safe zones, never over copy */
.confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.confetti > * { position: absolute; }
.confetti .float { animation: bob 6s ease-in-out infinite; }
.confetti .float.b { animation-duration: 7.5s; animation-delay: -2s; }
.confetti .float.c { animation-duration: 5.5s; animation-delay: -1s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(6deg); } }

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__win { transform: none; }
  .hero__win:hover { transform: translateY(-4px); }
}
@media (max-width: 768px) {
  .hero__h1 { font-size: 40px; }
  .hero__actions .btn-acid { width: 100%; }
  .confetti { display: none; } /* keep mobile clean + zero overlap risk */
}

/* ═══ TOOL GRID (bento) ═══ */
.toolgrid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: var(--sp-3); position: relative; z-index: 2; }
.tw { display: flex; flex-direction: column; color: var(--ink); text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tw:hover { text-decoration: none; transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); }
.tw:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.tw__body { position: relative; overflow: hidden; background: var(--panel); flex: 1; min-height: 150px; aspect-ratio: 16 / 10;
  border-bottom: var(--bw) solid var(--ink); }
.tw__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tw__shot--empty {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px;
  background: var(--yellow);
}
.tw:nth-child(2) .tw__shot--empty { background: var(--pink); }
.tw:nth-child(3) .tw__shot--empty { background: var(--mint); }
.tw:nth-child(4) .tw__shot--empty { background: var(--blue); }
.tw:nth-child(5) .tw__shot--empty { background: var(--purple); }
.poster__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 3.4vw, 34px);
  letter-spacing: -.02em; text-align: center; padding: 0 16px; color: var(--ink); }
.poster__spark { font-size: 20px; color: var(--ink); }
.tw__foot { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.tw__tag { margin: 0; font-size: 15px; color: var(--ink); font-weight: 500; }
.tw__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.tw__go { min-height: 44px; padding: 0 16px; font-size: 14px; box-shadow: var(--shadow-sm); }

/* bento sizing */
.tw--large { grid-column: span 2; grid-row: span 2; }
.tw--large .tw__body { aspect-ratio: 16 / 11; }
.tw--large .tw__tag { font-size: 18px; }
.tw--wide { grid-column: span 2; }
.tw--small { grid-column: span 2; }
@media (min-width: 901px) { .tw--small { grid-column: span 1; } .tw--wide { grid-column: span 2; } }
@media (max-width: 900px) {
  .toolgrid { grid-template-columns: repeat(2, 1fr); }
  .tw--large { grid-column: span 2; grid-row: span 1; }
  .tw--wide, .tw--small { grid-column: span 1; }
}
@media (max-width: 560px) {
  .toolgrid { grid-template-columns: 1fr; }
  .tw--large, .tw--wide, .tw--small { grid-column: span 1; grid-row: auto; }
}

/* ═══ STATBAR ═══ */
.statbar { background: var(--yellow); border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.statbar .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: var(--sp-5) var(--sp-2); text-align: center; border-right: var(--bw) solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: 52px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink); }
.stat:nth-child(1) .stat__num { color: var(--pink); }
.stat:nth-child(2) .stat__num { color: var(--blue); }
.stat:nth-child(3) .stat__num { color: var(--ink); }
.stat:nth-child(4) .stat__num { color: var(--purple); }
.stat__label { margin-top: 10px; color: var(--ink); }
@media (max-width: 640px) {
  .statbar .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: var(--bw) solid var(--ink); }
  .stat__num { font-size: 40px; }
}

/* ═══ MARQUEE ═══ */
.marquee { background: var(--pink); border-bottom: var(--bw) solid var(--ink);
  overflow: hidden; height: 40px; display: flex; align-items: center; margin-top: 62px; }
.marquee__track { display: inline-flex; white-space: nowrap; will-change: transform; animation: marquee 38s linear infinite; }
.marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee.is-static .marquee__track { animation: none; }
.marquee__seg { font-family: var(--font-display); font-size: 13px; letter-spacing: .02em; font-weight: 700;
  color: #fff; padding: 0 26px; }
.marquee__seg .sparkle { color: var(--yellow); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══ TOOL PAGE: ToolHeader ═══ */
.toolhead { padding-top: calc(62px + var(--sp-6)); position: relative; overflow: hidden; }
.toolhead__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--sp-3);
  font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 14px; }
.toolhead__back:hover { color: var(--pink); }
.toolhead__grid { display: grid; grid-template-columns: 8fr 4fr; gap: var(--sp-4); align-items: end; position: relative; z-index: 2; }
.toolhead__h1 { margin-bottom: var(--sp-2); }
.toolhead__aside { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
@media (max-width: 900px) {
  .toolhead__grid { grid-template-columns: 1fr; align-items: start; gap: var(--sp-3); }
  .toolhead__h1 { font-size: 32px; }
}
@media (max-width: 560px) { .toolhead__aside .btn { width: 100%; } }

/* ═══ LIVE FRAME ═══ */
.liveframe { margin-top: var(--sp-5); }
.liveframe__titlebar { background: var(--mint); }
.liveframe__fs { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 12px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 40px;
  padding: 6px 14px; min-height: 34px; cursor: pointer; z-index: 2; position: relative; }
.liveframe__fs:hover { background: var(--yellow); text-decoration: none; }
.liveframe__stage { position: relative; min-height: 70vh; background: var(--panel); }
.liveframe__stage iframe { display: block; width: 100%; height: 70vh; border: 0; background: #fff; }
.liveframe__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--muted); font-size: 15px; }
@media (max-width: 768px) {
  .liveframe { margin-left: calc(var(--sp-3) * -1); margin-right: calc(var(--sp-3) * -1); border-radius: 0; }
  .liveframe__stage iframe, .liveframe__stage { min-height: 78vh; height: 78vh; }
}

/* ═══ FEATURE LIST ═══ */
.featurelist { margin-top: var(--sp-5); }
.featurelist .titlebar { background: var(--blue); }
.featurelist__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.fl-col { padding: var(--sp-4); border-right: var(--bw) solid var(--ink); }
.fl-col:last-child { border-right: 0; }
.fl-col h3 { margin-bottom: var(--sp-3); color: var(--ink); }
.fl-col ul { list-style: none; margin: 0; padding: 0; }
.fl-col li { padding: 12px 0; border-top: 2px solid var(--hairline); display: flex; gap: 10px; font-size: 15px; }
.fl-col li:first-child { border-top: 0; }
.fl-col li::before { content: "▸"; color: var(--pink); font-weight: 800; flex: none; }
.fl-col--hood li::before { content: "✦"; color: var(--blue); }
.fl-caveat { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .featurelist__grid { grid-template-columns: 1fr; }
  .fl-col { border-right: 0; border-top: var(--bw) solid var(--ink); }
  .fl-col:first-child { border-top: 0; }
}

/* ═══ SHOWCASE STACK ═══ */
.showcase { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-6); }
.showrow { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: center; }
.showrow:nth-child(even) .showrow__media { order: 2; }
.showrow__win { transform: rotate(-1.5deg); }
.showrow:nth-child(even) .showrow__win { transform: rotate(1.5deg); }
.showrow__win .tw__body { aspect-ratio: 16 / 10; }
.showrow h3 { color: var(--ink); margin-bottom: var(--sp-2); }
.showrow p { color: var(--muted); }
.showrow__callout { margin-top: var(--sp-3); padding: 14px 18px; border: 2px solid var(--ink); border-radius: 12px;
  background: #FFF4D6; font-size: 14px; color: var(--ink); font-weight: 500; }
@media (max-width: 900px) {
  .showrow { grid-template-columns: 1fr; gap: var(--sp-3); }
  .showrow__media, .showrow:nth-child(even) .showrow__media { order: 0; }
  .showrow__win, .showrow:nth-child(even) .showrow__win { transform: none; }
}

/* ═══ REDUCED MOTION ═══ */
@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; }
  .sparkle--twinkle { animation: none; }
  .confetti .float { animation: none; }
}
