/* LateForLunch.Life — laboratory of unnecessary inventions.
   Plain CSS, no build step. Edit freely; nothing will compile it. */

:root {
  --tomato: #e8402a;
  --tomato-deep: #b52a18;
  --mustard: #f3b61f;
  --mint: #3fbf9f;
  --plum: #5b2a86;
  --sky: #4aa3df;
  --ink: #1b1a17;
  --cream: #fff6e0;
  --paper: #fffdf7;
  --check: rgba(232, 64, 42, .42);
  --shadow: 6px 6px 0 var(--ink);
  --display: "Bungee", "Impact", system-ui, sans-serif;
  --shade: "Bungee Shade", "Bungee", "Impact", sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.55 var(--body);
  background-color: #fff;
  /* the tablecloth */
  background-image:
    linear-gradient(90deg, var(--check) 50%, transparent 50%),
    linear-gradient(var(--check) 50%, transparent 50%);
  background-size: 44px 44px;
  overflow-x: hidden;
}

a { color: var(--plum); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--tomato); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: var(--cream);
  border-bottom: 4px solid var(--mustard);
}
.topbar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 52px; flex-wrap: wrap; }
.topbar .logo { font-family: var(--display); color: var(--mustard); text-decoration: none; font-size: 18px; letter-spacing: .5px; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--cream); text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 4px 10px; border: 2px solid transparent; border-radius: 999px;
}
.topbar nav .short { display: none; }
.topbar nav a:hover { border-color: var(--mustard); color: var(--mustard); }

/* ---------- hero ---------- */
.hero { padding-top: 48px; padding-bottom: 24px; text-align: center; }
.hero .plate {
  position: relative;
  background: var(--paper); border: 4px solid var(--ink); border-radius: 50% / 18%;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 40px 20px 34px; margin: 0 auto; max-width: 980px;
}
.hero h1 {
  font-family: var(--shade); font-weight: 400; margin: 0; line-height: .95;
  font-size: clamp(42px, 10.5vw, 128px); color: var(--tomato);
}
.hero h1 .w { display: inline-block; white-space: nowrap; }
.hero h1 i { display: inline-block; font-style: normal; animation: wobble 2.6s ease-in-out infinite; }
.hero h1 i:nth-child(2n) { animation-delay: -1.3s; }
.hero h1 .q { color: var(--plum); animation-duration: .9s; }
.hero .tag {
  font-family: var(--marker); font-size: clamp(18px, 3.4vw, 28px);
  margin: 14px 0 6px; transform: rotate(-2deg);
}
.hero .sub { max-width: 640px; margin: 8px auto 0; font-size: 18px; }

@keyframes wobble {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-6px); }
}

/* the clock that refuses to keep time */
.clock {
  width: 120px; height: 120px; margin: 22px auto 0; position: relative;
  border: 5px solid var(--ink); border-radius: 50%; background: var(--mustard);
  box-shadow: var(--shadow);
}
.clock::after { content: ""; position: absolute; inset: 50%; width: 12px; height: 12px; margin: -6px; background: var(--ink); border-radius: 50%; }
.clock .hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; background: var(--ink); border-radius: 4px; }
.clock .h { width: 6px; height: 32px; margin-left: -3px; animation: spin 7s linear infinite; }
.clock .m { width: 4px; height: 46px; margin-left: -2px; background: var(--tomato); animation: spin 1.3s linear infinite; }
.clock .twelve, .clock .one { position: absolute; font: 700 13px var(--body); }
.clock .twelve { top: 4px; left: 50%; transform: translateX(-50%); }
.clock .one { top: 12px; right: 18px; color: var(--tomato-deep); }
@keyframes spin { to { transform: rotate(360deg); } }

.status {
  display: inline-block; margin: 22px auto 0; padding: 10px 16px;
  background: var(--ink); color: var(--cream); border-radius: 10px;
  font: 700 16px/1.4 var(--body); transform: rotate(1deg); max-width: 100%;
}
.status b { color: var(--mustard); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.btn {
  font: 400 16px var(--display); letter-spacing: .5px; cursor: pointer;
  padding: 12px 18px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--mint); color: var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.gong { background: var(--mustard); }
.btn.danger { background: var(--tomato); color: #fff; }

/* ---------- ticker ---------- */
.ticker {
  margin: 30px 0 0; background: var(--plum); color: #fff; overflow: hidden; white-space: nowrap;
  border-block: 4px solid var(--ink); transform: rotate(-1.2deg); width: 104%; margin-left: -2%;
}
.ticker .run { display: inline-block; padding: 10px 0; animation: tick 60s linear infinite; font-weight: 700; }
.ticker .run span { margin: 0 26px; }
.ticker .run span::before { content: "✺"; margin-right: 12px; color: var(--mustard); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- excuse machine ---------- */
.machine {
  margin: 44px auto 0; max-width: 820px; background: var(--sky); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 18px; box-shadow: 10px 10px 0 var(--ink);
  padding: 22px; text-align: center; transform: rotate(-.8deg);
}
.machine h2 { font-family: var(--display); font-weight: 400; margin: 0 0 6px; font-size: clamp(22px, 4vw, 34px); }
.machine .out {
  background: var(--paper); border: 3px dashed var(--ink); border-radius: 12px;
  min-height: 84px; display: grid; place-items: center; padding: 14px; margin: 14px 0;
  font: 400 clamp(18px, 3vw, 24px)/1.35 var(--marker);
}
.machine small { display: block; margin-top: 10px; opacity: .8; }

/* ---------- lab ---------- */
.lab-head { text-align: center; margin: 70px 0 10px; }
.lab-head h2 {
  display: inline-block; font-family: var(--shade); font-weight: 400; margin: 0;
  font-size: clamp(32px, 7vw, 72px); color: var(--ink); background: var(--mustard);
  border: 4px solid var(--ink); padding: 6px 18px; box-shadow: var(--shadow); transform: rotate(1.5deg);
}
.lab-head p { font-family: var(--marker); font-size: 20px; margin: 18px 0 0; background: var(--paper); display: inline-block; padding: 2px 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 10px; }
.chips a {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 12px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 3px 3px 0 var(--ink);
}
.chips a:hover { background: var(--mint); }

.section { margin: 54px 0 0; scroll-margin-top: 70px; }
.section > header {
  background: var(--ink); color: var(--cream); padding: 14px 18px; border-radius: 14px 14px 0 0;
  border: 4px solid var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
}
.section > header h3 { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(20px, 3.6vw, 30px); color: var(--mustard); }
.section > header p { margin: 0; opacity: .9; }
.section:nth-of-type(3n+2) > header h3 { color: var(--mint); }
.section:nth-of-type(3n) > header h3 { color: #ff8a73; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px;
  background: rgba(255, 253, 247, .9); border: 4px solid var(--ink); border-top: 0;
  border-radius: 0 0 14px 14px; padding: 26px 18px;
}

.card {
  position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  padding: 16px 16px 18px; box-shadow: var(--shadow); transition: transform .18s;
  display: flex; flex-direction: column;
}
.card:nth-child(4n+1) { transform: rotate(-1.2deg); }
.card:nth-child(4n+2) { transform: rotate(.9deg); background: #fff8e3; }
.card:nth-child(4n+3) { transform: rotate(-.4deg); }
.card:nth-child(4n)   { transform: rotate(1.4deg); background: #f2fbf7; }
.card:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.card.featured { border-width: 4px; }
.card.featured::before {
  content: "★"; position: absolute; top: -16px; left: -12px; width: 34px; height: 34px;
  display: grid; place-items: center; background: var(--mustard); border: 3px solid var(--ink);
  border-radius: 50%; font-size: 17px;
}
.card .year {
  align-self: flex-start; font: 700 12px var(--body); letter-spacing: .5px; text-transform: uppercase;
  background: var(--ink); color: var(--cream); padding: 2px 8px; border-radius: 999px;
}
.card h4 { font: 700 21px/1.2 var(--body); margin: 10px 0 6px; padding-right: 30px; }
.card p { margin: 0; font-size: 15.5px; flex: 1; }
.card .go { margin-top: 12px; font-weight: 700; }
.stamp {
  position: absolute; right: 8px; top: 8px; max-width: 46%;
  font: 400 12px/1.05 var(--marker); color: var(--tomato-deep); text-align: center;
  border: 2px solid var(--tomato-deep); border-radius: 6px; padding: 3px 6px;
  transform: rotate(9deg); opacity: .85; background: rgba(255, 255, 255, .6);
}

/* ---------- about + connect ---------- */
.duo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin: 70px 0 0; }
.panel {
  background: var(--paper); border: 4px solid var(--ink); border-radius: 16px; padding: 22px;
  box-shadow: 10px 10px 0 var(--ink); scroll-margin-top: 70px;
}
.panel h2 { font-family: var(--display); font-weight: 400; margin: 0 0 10px; font-size: clamp(24px, 4vw, 36px); color: var(--tomato); }
.note { background: #fff1b8; border: 2px dashed var(--ink); border-radius: 10px; padding: 10px 12px; transform: rotate(-.6deg); }
.panel.connect { background: var(--mint); transform: rotate(1deg); }
.panel.connect h2 { color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 14px 0 0; border-left: 4px dotted var(--ink); }
.timeline li { padding: 0 0 12px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -10px; top: 6px; width: 14px; height: 14px; background: var(--mustard); border: 3px solid var(--ink); border-radius: 50%; }
.timeline b { font-family: var(--display); font-weight: 400; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.links a {
  display: block; background: var(--paper); border: 3px solid var(--ink); border-radius: 12px;
  padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 700; box-shadow: 4px 4px 0 var(--ink);
}
.links a:hover { background: var(--mustard); }
.links small { display: block; font-weight: 400; }

footer.site {
  margin: 80px 0 0; background: var(--ink); color: var(--cream); text-align: center; padding: 28px 16px 40px;
  border-top: 6px solid var(--tomato);
}
footer.site .counter { font-family: var(--display); color: var(--mustard); font-size: 22px; letter-spacing: 2px; }
footer.site small { display: block; margin-top: 8px; opacity: .75; }

/* ---------- toys ---------- */
.flyer { position: fixed; pointer-events: none; z-index: 99; font-size: 26px; animation: fly 1.4s ease-out forwards; }
@keyframes fly { to { transform: translateY(-140px) rotate(var(--r, 40deg)) scale(1.4); opacity: 0; } }

body.shake { animation: shake .6s; }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px) rotate(-.5deg); }
  40%, 60% { transform: translate(7px, -3px) rotate(.5deg); }
}

body.chaos { animation: chaos 3s linear infinite; }
body.chaos .card { animation: wobble 1.2s ease-in-out infinite; }
@keyframes chaos { to { filter: hue-rotate(360deg); } }

/* ---------- project subpages ---------- */
.subpage { margin: 40px auto 0; max-width: 900px; }
.subpage .panel p { font-size: 18px; }
.subpage video, .subpage img { width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 12px; margin: 12px 0; background: #000; }
.back { display: inline-block; margin: 0 0 14px; font-weight: 700; }

@media (max-width: 800px) {
  .duo { grid-template-columns: 1fr; }
  .hero .plate { border-radius: 24px; padding: 30px 14px; box-shadow: 6px 6px 0 var(--ink); }
  .hero { padding-top: 24px; }
  .topbar nav .short { display: inline; }
  .topbar .wrap { min-height: 44px; gap: 4px 10px; }
  .topbar .logo { font-size: 15px; }
  .topbar nav { gap: 0; }
  .topbar nav a { font-size: 13px; padding: 4px 7px; }
  .topbar nav .long { display: none; }
  .grid { padding: 22px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
