/* S-IndieLabS "Warm Doodle": same palette and type as Couplay (theme H). Light only. */
:root {
  --cream: #fff8f3;
  --surface: #ffffff;
  --ink: #2b1b17;
  --ink-raised: #3d2a24;
  --muted: #6e5a52;
  --line: #eadfd7;
  --line-strong: #ddcfc5;
  --coral: #c8411e;
  --coral-press: #8f2c12;
  --coral-soft: #fde4d8;
  --teal: #0f7c7a;
  --teal-dark: #0a5856;
  --teal-soft: #d7f0ee;
  --sunny: #ffc93c;
  --sunny-soft: #fff0c2;
  --sunny-ink: #6b4a00;
  --plum: #6b3fa0;
  --plum-soft: #ece3f7;
  --sky: #2a6fdb;
  --sky-soft: #dde9fb;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --doodle: 'Caveat', cursive;
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble-2: 18px 225px 18px 255px / 255px 18px 225px 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  overflow-x: clip;
}
a { color: var(--teal-dark); }
a:hover { color: var(--teal); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sunny); color: var(--ink); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; position: relative; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.hand { font-family: var(--doodle); font-weight: 700; }

/* Doodle primitives */
.doodle-svg { position: absolute; pointer-events: none; overflow: visible; }
.doodle-svg * { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodle-svg .fill-sun { fill: var(--sunny); }
.doodle-svg .fill-coral { fill: var(--coral); stroke: var(--ink); }
.doodle-svg .st-coral { stroke: var(--coral); }
.doodle-svg .st-teal { stroke: var(--teal); }
.bob { animation: bob 5s ease-in-out infinite; }
.bob.slow { animation-duration: 7s; }
.spin { animation: spin 24s linear infinite; transform-origin: center; transform-box: fill-box; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.scribble {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}
.scribble::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%; bottom: -0.14em; height: 0.3em;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 25 2, 40 13, 65 7 S 105 3, 128 9 S 170 12, 197 4' fill='none' stroke='%23c8411e' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hilite { background: linear-gradient(transparent 58%, var(--sunny) 58% 92%, transparent 92%); padding: 0 4px; }

/* Header */
.top { padding: 18px 0; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 2px dashed var(--line-strong); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--sunny); transform: rotate(-4deg); transition: transform 160ms; }
.brand:hover img { transform: rotate(5deg) scale(1.06); }
.brand b { display: block; font: 800 22px/1 var(--display); letter-spacing: -0.5px; }
.brand small { display: block; font: 700 18px/1 var(--doodle); color: var(--teal); margin-top: 2px; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 999px; }
.top nav a:hover { background: var(--coral-soft); }
.top nav a.pill { background: var(--coral); color: #fff; box-shadow: 0 3px 0 var(--coral-press); }
.top nav a.pill:hover { background: #b93a1a; }
.mobile-menu { display: none; }

/* Buttons */
.button, .button-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; font: 700 17px var(--body); text-decoration: none; cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms;
}
.button { border: 0; background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-press); transform: translateY(-2px); }
.button:hover { background: #b93a1a; color: #fff; }
.button:active { transform: translateY(2px); box-shadow: 0 0 0 var(--coral-press); }
.button.teal { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); }
.button.teal:hover { background: #0c6a68; }
.button-ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform: translateY(-1px); }
.button-ghost:hover { background: var(--sunny-soft); color: var(--ink); }
.button-ghost:active { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); }
.button.small, .button-ghost.small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Hero */
.hero { padding: 48px 0 72px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.eyebrow { font: 700 13px/1 var(--body); letter-spacing: 1px; text-transform: uppercase; color: var(--coral); margin: 0 0 14px; }
h1 { font: 800 clamp(40px, 6.4vw, 72px)/1.02 var(--display); letter-spacing: -1.8px; margin: 0 0 20px; }
h1 .doodle { font: 700 1.12em/1 var(--doodle); color: var(--teal); letter-spacing: 0; display: inline-block; transform: rotate(-3deg); }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.lede strong { color: var(--ink); }
.hero-art { position: relative; min-height: 380px; }
.mascot-card {
  position: relative; margin: 0 auto; width: min(340px, 100%); aspect-ratio: 1;
  background: var(--sunny); border: 3px solid var(--ink); border-radius: var(--wobble);
  box-shadow: 0 8px 0 var(--ink); display: grid; place-items: center; transform: rotate(2deg);
}
.mascot-card img { width: 86%; }
.sticker {
  position: absolute; z-index: 2; font: 700 24px/1 var(--doodle); padding: 7px 14px; border-radius: 12px;
  background: var(--surface); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); white-space: nowrap;
}
.sticker.coral { background: var(--coral); color: #fff; }
.sticker.teal { background: var(--teal); color: #fff; }
.sticker.sun { background: var(--sunny); }

/* Sections */
section { padding: 72px 0; position: relative; }
.band { background: var(--surface); border-top: 2px dashed var(--line-strong); border-bottom: 2px dashed var(--line-strong); }
.kicker { font: 700 28px/1 var(--doodle); color: var(--teal); margin: 0 0 4px; display: inline-block; transform: rotate(-2deg); }
h2.title { font: 800 clamp(32px, 4.4vw, 48px)/1.06 var(--display); letter-spacing: -1.2px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 36px; max-width: 42em; font-size: 18px; }
.section-head { position: relative; }

/* Project cards */
.projects { display: grid; gap: 40px; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: var(--surface); border: 3px solid var(--ink); border-radius: var(--wobble);
  padding: 28px 32px; box-shadow: 8px 8px 0 var(--ink); position: relative;
}
.project:nth-child(even) .p-art { order: -1; }
.project:nth-child(even) { border-radius: var(--wobble-2); }
.p-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.p-icon { width: 60px; height: 60px; border-radius: 16px; border: 2.5px solid var(--ink); background: var(--cream); object-fit: cover; flex: none; padding: 0; }
.p-icon.pad { padding: 8px; }
.p-head h3 { font: 800 clamp(26px, 3.4vw, 34px)/1.05 var(--display); letter-spacing: -0.8px; margin: 0; }
.p-head .hand { display: block; font-size: 22px; line-height: 1; color: var(--coral); margin-top: 4px; }
.project p { color: var(--muted); margin: 0 0 14px; }
.project p strong { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.tags li { padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 2px solid var(--ink); background: var(--cream); }
.tags .coral { background: var(--coral-soft); color: var(--coral-press); }
.tags .teal { background: var(--teal-soft); color: var(--teal-dark); }
.tags .sun { background: var(--sunny-soft); color: var(--sunny-ink); }
.tags .plum { background: var(--plum-soft); color: #43206f; }
.tags .sky { background: var(--sky-soft); color: #174a9d; }
.p-art { position: relative; }
.shot {
  position: relative; margin: 0; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden;
  background: var(--cream); box-shadow: 0 6px 0 var(--ink); transform: rotate(-1.5deg);
}
.project:nth-child(even) .shot { transform: rotate(1.5deg); }
.shot img { width: 100%; height: auto; }
.status-badge {
  position: absolute; top: -16px; right: 18px; z-index: 3; transform: rotate(4deg);
  font: 700 24px/1 var(--doodle); padding: 6px 16px; border-radius: 12px; border: 2.5px solid var(--ink);
  background: var(--sunny); box-shadow: 0 3px 0 var(--ink);
}
.project:nth-child(even) .status-badge { right: auto; left: 18px; transform: rotate(-4deg); }

/* Couplay poster (drawn, not a screenshot) */
.poster-couplay { background: var(--cream); display: grid; place-items: center; padding: 26px 20px 30px; text-align: center; min-height: 280px; }
.poster-couplay img { width: 150px; margin: 0 auto 8px; }
.poster-couplay .hand { font-size: 30px; color: var(--teal); line-height: 1.05; }
.poster-couplay b { display: block; font: 800 28px/1.05 var(--display); letter-spacing: -0.8px; margin: 2px 0 8px; }

/* Game grid (older + in-dev titles) */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.card {
  padding: 22px; border-radius: 22px; background: var(--cream); border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink); display: flex; flex-direction: column; gap: 4px; position: relative;
  transition: transform 140ms, box-shadow 140ms;
}
.card:hover { transform: translate(-2px, -3px) rotate(-0.4deg); box-shadow: 8px 9px 0 var(--ink); }
.card h3 { font: 800 24px/1.1 var(--display); letter-spacing: -0.5px; margin: 0; }
.card .hand { font-size: 22px; color: var(--coral); line-height: 1; margin-bottom: 8px; display: block; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.card .shot { margin-bottom: 16px; transform: none; border-radius: 16px; box-shadow: none; border-width: 2.5px; }
.card .tags { margin: auto 0 0; }
.card .tags li { font-size: 13px; padding: 4px 11px; }
.card .link { margin-top: 14px; font-weight: 700; }

/* Gravity doodle sim */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.chamber {
  position: relative; height: 240px; border: 3px solid var(--ink); border-radius: 22px; background:
    repeating-linear-gradient(0deg, transparent 0 31px, var(--line) 31px 33px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 33px), var(--surface);
  box-shadow: 0 6px 0 var(--ink); overflow: hidden;
}
.chamber .lbl { position: absolute; left: 14px; right: 14px; display: flex; justify-content: space-between; font: 700 20px/1 var(--doodle); color: var(--muted); }
.chamber .lbl.t { top: 10px; } .chamber .lbl.b { bottom: 10px; }
.chamber .floor, .chamber .ceil { position: absolute; left: 0; right: 0; height: 10px; background: var(--ink); }
.chamber .floor { bottom: 0; } .chamber .ceil { top: 0; }
.blob {
  position: absolute; left: 50%; margin-left: -28px; width: 56px; height: 56px; top: 150px;
  background: var(--coral); border: 3px solid var(--ink); border-radius: 18px; transition: top 420ms cubic-bezier(.34,1.45,.64,1), background 200ms;
  display: grid; place-items: center;
}
.blob::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 18px 0 0 var(--ink); margin-right: 18px; transition: transform 300ms; }
.chamber.up .blob { top: 28px; background: var(--teal); }
.chamber.up .blob::before { transform: translateY(14px); }
.sim-note { font: 700 24px/1.1 var(--doodle); color: var(--teal); margin: 14px 0 0; }

/* Lab / engineering */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0 0 28px; padding: 0; }
.pillar { padding: 22px; border-radius: 20px; background: var(--cream); border: 2px solid var(--line-strong); }
.pillar b { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sunny-soft); color: var(--sunny-ink); font: 800 18px var(--display); margin-bottom: 12px; border: 2px solid var(--ink); }
.pillar h3 { font: 700 20px/1.2 var(--display); margin: 0 0 6px; }
.pillar p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 9px 16px; border-radius: 999px; font-weight: 600; background: var(--sunny-soft); color: var(--sunny-ink); border: 2px solid var(--ink); }
.chips li:nth-child(3n+2) { background: var(--teal-soft); color: var(--teal-dark); }
.chips li:nth-child(3n) { background: var(--coral-soft); color: var(--coral-press); }
.founder { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 40px; padding: 24px 28px; border: 3px dashed var(--ink); border-radius: 26px; background: var(--sunny-soft); }
.founder img { width: 84px; height: 84px; border-radius: 22px; border: 3px solid var(--ink); background: var(--sunny); transform: rotate(-5deg); }
.founder h3 { font: 800 26px/1.1 var(--display); margin: 0 0 4px; }
.founder p { margin: 0; color: var(--ink-raised); }

/* Notify form + CTA */
.cta { text-align: center; }
.cta .sub { margin-left: auto; margin-right: auto; }
.cta .actions { justify-content: center; }
.notify { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; margin: 0 auto; justify-content: center; }
.notify label { position: absolute; left: -999px; }
.notify input {
  flex: 1 1 250px; min-height: 56px; padding: 0 22px; border-radius: 999px;
  border: 2.5px solid var(--ink); background: var(--surface); font: 400 17px var(--body); color: var(--ink);
}
.notify input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px var(--teal-soft); }
.status { min-height: 26px; margin: 12px 0 0; font-weight: 700; }
.status.ok { color: var(--teal-dark); }
.contact-line { margin-top: 26px; }
.contact-line .hand { font-size: 28px; color: var(--coral); }

/* Footer */
footer { padding: 36px 0 52px; border-top: 2px dashed var(--line-strong); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer .sig { font: 700 26px/1 var(--doodle); color: var(--ink); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; }

/* Scroll reveal (progressive: content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero .wrap, .project, .sim { grid-template-columns: 1fr; }
  .project:nth-child(even) .p-art { order: 0; }
  .hero-art { min-height: 0; padding: 20px 0 10px; }
  .project { padding: 24px 20px 28px; box-shadow: 6px 6px 0 var(--ink); }
  .hero-art .sticker { display: none; }
}
@media (max-width: 700px) {
  .hero > .doodle-svg { display: none; }
  .grid, .pillars { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}
@media (max-width: 720px) {
  .desktop-nav { display: none !important; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary {
    min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center;
    border: 2.5px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink);
    font-weight: 700; line-height: 1; cursor: pointer; list-style: none; box-shadow: 0 3px 0 var(--ink);
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] summary { background: var(--sunny); }
  .mobile-menu nav {
    position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; min-width: 210px; padding: 8px;
    display: flex; flex-direction: column; gap: 2px;
    border: 2.5px solid var(--ink); border-radius: 18px; background: var(--surface); box-shadow: 5px 5px 0 var(--ink);
  }
  .mobile-menu nav a { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 10px; }
  .mobile-menu nav a:hover { background: var(--coral-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
