/* LUUUIG.network — "LuigiOS" design tokens
   paper:   #FAFAFA (Instagram's own feed background)
   ink:     #111111
   green:   #43B047 (Luigi green — the one accent)
   green-d: #2E7D32
   red:     #E53935 (window dot + .mp4 file glyph only)
   gray:    #8E8E8E (Instagram caption gray)
   display: Pixelify Sans · numbers: VT323 · body: Space Grotesk · files/labels: Space Mono */

:root {
  --paper: #FAFAFA;
  --ink: #111111;
  --green: #43B047;
  --green-d: #2E7D32;
  --red: #E53935;
  --yellow: #F2C94C;
  --gray: #8E8E8E;
  --line: #E2E2E2;
  --display: "Pixelify Sans", monospace;
  --numbers: "VT323", monospace;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* ---------- menu bar ---------- */

.menubar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.55rem clamp(1rem, 4vw, 2rem);
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.menubar-logo {
  font-family: var(--display);
  font-size: 1.2rem;
  text-decoration: none;
  white-space: nowrap;
}

.menubar-mush { color: var(--green); }
.menubar-ext { color: var(--green); }

.menubar-items {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2.2vw, 1.5rem);
  margin-left: auto;
}

.menubar-items a {
  text-decoration: none;
  padding: 0.15rem 0;
  opacity: 0.9;
}

.menubar-items a:hover { color: var(--green); opacity: 1; }

.menubar-cta {
  border: 1.5px solid var(--paper);
  padding: 0.15rem 0.75rem !important;
  border-radius: 999px;
}

.menubar-cta:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff !important;
}

.menubar-clock {
  color: var(--green);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- desktop hero ---------- */

.desktop {
  position: relative;
  min-height: min(85vh, 52rem);
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  /* subtle pixel-grid wallpaper */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

.desktop-inner {
  position: relative;
  z-index: 2;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 11vh, 7rem) clamp(1rem, 4vw, 2.5rem) 3.5rem;
  pointer-events: none; /* let drags pass; re-enable on children */
}

.desktop-inner > * { pointer-events: auto; }

.hero-path {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

.hero-ext { color: var(--green); }

.hero-cursor {
  display: inline-block;
  width: 0.09em;
  height: 0.8em;
  margin-left: 0.06em;
  background: var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.hero-sub a {
  color: var(--green-d);
  font-weight: 500;
  text-decoration-thickness: 2px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------- draggable files ---------- */

.file {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 8.75rem;
  padding: 0.6rem 0.25rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: grab;
  font-family: var(--mono);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 150ms ease;
  touch-action: none;
}

.file:hover { transform: rotate(0deg) scale(1.06); }
.file.dragging { cursor: grabbing; z-index: 9; transition: none; }
.file.dragging .file-glyph { box-shadow: 8px 8px 0 rgba(17, 17, 17, 0.25); }

/* file glyph: a document shape with a folded corner, drawn in CSS */
.file-glyph {
  position: relative;
  width: 3.6rem;
  height: 4.4rem;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 4px 14px 4px 4px;
  box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.18);
}

.file-glyph::before { /* folded corner */
  content: "";
  position: absolute;
  top: -2.5px;
  right: -2.5px;
  width: 1rem;
  height: 1rem;
  background: var(--paper);
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  border-radius: 0 0 0 6px;
}

.file-glyph::after { /* format tag */
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  color: #fff;
}

.file-zip::after { content: "ZIP"; background: var(--green); }
.file-mp4::after { content: "MP4"; background: var(--red); }
.file-txt::after { content: "TXT"; background: var(--ink); }
.file-exe::after { content: "EXE"; background: var(--green-d); }

.file-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.file:hover .file-name { background: var(--green); color: #fff; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn-primary:hover { background: var(--green-d); border-color: var(--green-d); }

.btn-ghost { background: transparent; color: var(--ink); }

.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-small { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-big { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* ---------- ticker ---------- */

.ticker {
  border-bottom: 2px solid var(--ink);
  background: var(--green);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 0;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.section {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) clamp(1rem, 4vw, 2.5rem);
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 5vw, 3rem);
  margin-bottom: 1.25rem;
}

.section-title::before {
  content: "▸ ";
  color: var(--green);
}

.section-note {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.section-lede {
  max-width: 38rem;
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

.section-invert {
  max-width: none;
  background: var(--ink);
  color: var(--paper);
}

.section-invert > * {
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- account windows ---------- */

.windows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 1.5rem;
}

.window {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--green);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-green { background: var(--green); }

.window-name {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.window-body { padding: 1.5rem; }

.window-handle {
  font-family: var(--display);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.window-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.window-stats dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
}

.window-stats dd {
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---------- stats ---------- */

.section-stats {
  max-width: none;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(rgba(67, 176, 71, 0.06), rgba(67, 176, 71, 0.06)),
    var(--paper);
}

.section-stats > * {
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 1.5rem;
}

.stat {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  padding: 1.25rem 1.5rem;
  box-shadow: 4px 4px 0 var(--ink);
}

.stat-num {
  font-family: var(--numbers);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--green-d);
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--gray);
  margin-top: 0.4rem;
}

.stat-hot {
  background: var(--green);
  box-shadow: 4px 4px 0 var(--green-d);
}

.stat-hot .stat-num { color: #fff; }
.stat-hot .stat-label { color: rgba(255, 255, 255, 0.85); }

/* ---------- posts ---------- */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr));
  gap: 1.5rem;
  align-items: start;
}

.posts-grid .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
}

.post-fallback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 14rem;
  padding: 1.5rem;
  border: 2px dashed var(--gray);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.post-fallback:hover { border-color: var(--green); background: #fff; }

.post-fallback .pf-file {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gray);
}

.post-fallback .pf-label {
  font-family: var(--display);
  font-size: 1.3rem;
}

.post-fallback .pf-cta {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-d);
}

/* ---------- advertise ---------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1.5rem;
}

.offer {
  border: 2px solid var(--paper);
  border-radius: 10px;
  padding: 1.5rem;
}

.offer-file {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
  margin-bottom: 0.9rem;
}

.offer h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.offer p:last-child { color: #C8C8C8; font-size: 0.98rem; }

/* ---------- contact ---------- */

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-note {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gray);
}

/* ---------- footer ---------- */

.footer {
  border-top: 2px solid var(--ink);
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--display);
  font-size: 1.2rem;
}

.footer-logo span { color: var(--green); }

.footer-fine {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--gray);
}

/* ---------- mobile (95% of traffic — tight and small) ---------- */

@media (max-width: 640px) {
  body { font-size: 0.95rem; }

  .menubar {
    flex-wrap: wrap;
    gap: 0.3rem 0.7rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.7rem;
  }
  .menubar-logo { font-size: 1.05rem; }
  .menubar-clock { display: none; }
  .menubar-items {
    flex-wrap: wrap;
    gap: 0.3rem 0.55rem;
    margin-left: 0;
  }

  /* hero: keep the desktop metaphor — files live in a band under the text,
     still absolutely positioned so they stay draggable on touch */
  .desktop { min-height: 0; }
  .desktop-inner { padding: 2.25rem 1rem 16.5rem; }
  .hero-path { font-size: 0.72rem; margin-bottom: 0.5rem; }
  .hero-title { font-size: 10.5vw; }
  .hero-sub { font-size: 0.95rem; margin-top: 1rem; }
  .hero-actions { margin-top: 1.25rem; gap: 0.5rem; }

  .file { width: 7.5rem; padding: 0.4rem 0.2rem; gap: 0.35rem; }
  .file-glyph { width: 2.9rem; height: 3.6rem; box-shadow: 3px 3px 0 rgba(17, 17, 17, 0.18); }
  .file-glyph::after { font-size: 0.56rem; bottom: 0.35rem; }
  .file-name { font-size: 0.66rem; }
  .file:nth-of-type(1) { left: 7%;  top: auto; bottom: 8.75rem; }
  .file:nth-of-type(2) { left: 52%; top: auto; bottom: 9.5rem; }
  .file:nth-of-type(3) { left: 13%; top: auto; bottom: 0.85rem; }
  .file:nth-of-type(4) { left: 56%; top: auto; bottom: 1.6rem; }

  .btn { padding: 0.6rem 1.15rem; font-size: 0.82rem; }
  .btn-small { padding: 0.5rem 0.95rem; font-size: 0.78rem; }
  .btn-big { padding: 0.75rem 1.4rem; font-size: 0.88rem; }

  .ticker-track { font-size: 0.75rem; padding: 0.4rem 0; }

  .section { padding: 2.5rem 1rem; }
  .section-title { font-size: 1.5rem; margin-bottom: 0.9rem; }
  .section-note { font-size: 0.75rem; margin-bottom: 1.25rem; }
  .section-lede { font-size: 0.95rem; margin-bottom: 1.5rem; }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .stat {
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .stat-hot { box-shadow: 3px 3px 0 var(--green-d); }
  .stat-num { font-size: 2.15rem; }
  .stat-label { font-size: 0.66rem; line-height: 1.35; margin-top: 0.25rem; }

  .windows { gap: 1rem; }
  .window { box-shadow: 4px 4px 0 var(--green); }
  .window-body { padding: 1rem; }
  .window-handle { font-size: 1.3rem; }
  .window-stats { gap: 1.1rem; margin-bottom: 1rem; }
  .window-stats dd { font-size: 0.95rem; }

  /* posts: swipeable carousel instead of a tall stack */
  .posts-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0 1rem 0.5rem;
  }
  .posts-grid::-webkit-scrollbar { display: none; }
  .posts-grid > * {
    flex: 0 0 min(84vw, 21rem);
    scroll-snap-align: center;
  }

  .offer-grid { gap: 0.75rem; }
  .offer { padding: 1rem 1.1rem; }
  .offer h3 { font-size: 1.1rem; }
  .offer p:last-child { font-size: 0.85rem; }

  .contact-actions { gap: 0.6rem; }
  .contact-actions .btn { flex: 1 1 auto; text-align: center; }

  .footer { padding: 1.5rem 1rem; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .hero-cursor { animation: none; }
  .btn:hover, .file:hover { transform: none; }
}
