/* labs.flocoffee.id — Flo Labs. White page, ink type, two halftone dot fields (canvas) behind a fanned
   card carousel. Fonts: Poppins 300/400 (display), Lato (text), Inter 500 (interface labels). */

:root {
  --ink: #111111;
  --ink-2: #4a4a4a;
  --ink-3: #6b6b6b;
  --line: #e4e2dd;
  --paper: #ffffff;
  --mist: #f5f4f1;
  --cherry: #c2371c;
  --cherry-deep: #9e2a13;
  --sun: #f0b92b;
  --card-w: 340px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --text: "Lato", "Helvetica Neue", Arial, sans-serif;
  --ui: "Inter", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; z-index: 20; font-family: var(--ui); font-size: .875rem; }
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.top { position: relative; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand img { width: 52px; height: auto; align-self: center; }
.brand-sub { font-family: var(--display); font-weight: 300; font-size: 1.375rem; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-family: var(--ui); font-weight: 500; font-size: .9375rem; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a:hover { text-decoration: underline; }
.nav .nav-out { border: 1px solid var(--ink); border-radius: 999px; padding: 8px 16px; background: var(--paper); }
.nav .nav-out:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 28px 0 56px; isolation: isolate; overflow-x: clip; }
.dots { position: absolute; z-index: -1; left: 0; top: -72px; width: 100%; height: calc(100% + 72px); pointer-events: none; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 7.2vw, 6rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  text-align: center;
  margin: 0 auto;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--cherry); }
.lede { text-align: center; max-width: 46ch; margin: 22px auto 0; color: var(--ink-2); font-size: 1.125rem; text-wrap: pretty; }

/* ---------- carousel ---------- */
.fan { position: relative; margin-top: 44px; }
.fan-stage {
  position: relative;
  height: calc(var(--card-h, 520px) + 96px);
  touch-action: pan-y;
  outline: none;
}
.card {
  position: absolute;
  left: 50%;
  top: 18px;
  width: var(--card-w);
  margin-left: calc(var(--card-w) / -2);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 28px;
  padding: 14px 14px 22px;
  display: flex;
  flex-direction: column;
  transform-origin: 50% 120%;
  transition: transform .62s var(--ease), opacity .3s linear, box-shadow .3s linear;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
.fan.is-dragging .card, .card.no-anim { transition: none; }
.card[hidden] { display: none; }
.card.is-far { opacity: 0; pointer-events: none; }
.card.is-center { box-shadow: 0 24px 48px -28px rgba(17, 17, 17, .45); }
.card:not(.is-center) { cursor: pointer; }
.card-shot { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--mist); border: 1px solid var(--line); }
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; pointer-events: none; }
.card-body { padding: 18px 8px 0; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-family: var(--ui); font-weight: 500; font-size: .75rem; color: var(--ink-3); min-height: 22px; }
.tag { border: 1px solid var(--ink); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: .6875rem; line-height: 1.5; }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.015em; margin: 6px 0 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: .9875rem; line-height: 1.5; min-height: 4.5em; }
.card-go { margin-top: 16px; font-family: var(--ui); font-weight: 500; font-size: .9375rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 0; }
.card-go svg { transition: transform .25s var(--ease); }
.card-go:hover { color: var(--cherry-deep); }
.card-go:hover svg { transform: translateX(4px); }

.fan-ctl { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 4px; }
.fan-btn {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--paper);
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.fan-btn:hover { background: var(--ink); color: var(--paper); }
.fan-btn:active { transform: scale(.94); }
.fan-count { font-family: var(--ui); font-weight: 500; font-size: .875rem; font-variant-numeric: tabular-nums; min-width: 5ch; text-align: center; color: var(--ink-2); }

.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 34px auto 0; padding: 0; list-style: none; }
.pill {
  font-family: var(--ui); font-weight: 500; font-size: 1rem;
  border: 1px solid var(--ink); background: var(--paper); border-radius: 999px;
  padding: 11px 22px; cursor: pointer; transition: background .2s, color .2s;
}
.pill:hover { background: var(--mist); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pill small { font-size: .8125rem; opacity: .65; margin-left: 6px; font-variant-numeric: tabular-nums; }

/* Without JavaScript the cards are a plain scrolling row. */
html:not(.js) .fan-stage { height: auto; display: flex; gap: 20px; overflow-x: auto; padding: 18px 20px 28px; scroll-snap-type: x mandatory; }
html:not(.js) .card { position: static; margin: 0; flex: none; scroll-snap-align: center; }
html:not(.js) .fan-ctl, html:not(.js) .pills { display: none; }

/* ---------- index list ---------- */
.index { padding: 72px 0 24px; }
.index h2, .about h2 { font-family: var(--display); font-weight: 300; font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.index-note { color: var(--ink-2); margin: 0 0 28px; max-width: 60ch; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.row { border-bottom: 1px solid var(--line); }
.row a { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: 8px 28px; align-items: baseline; padding: 18px 4px; text-decoration: none; transition: background .2s, padding .25s var(--ease); }
.row a:hover { background: var(--mist); padding-inline: 14px; }
.row-name { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-desc { color: var(--ink-2); font-size: .9875rem; }
.row-url { font-family: var(--ui); font-weight: 500; font-size: .875rem; color: var(--ink-3); white-space: nowrap; }
.row a:hover .row-url { color: var(--cherry-deep); }
.group { font-family: var(--ui); font-weight: 500; font-size: .875rem; color: var(--ink-3); padding: 30px 4px 10px; margin: 0; border-bottom: 1px solid var(--ink); }
.group:first-of-type { padding-top: 4px; }
.rows + .group { margin-top: 0; }

/* ---------- about + footer ---------- */
.about { padding: 72px 0 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px 64px; align-items: start; }
.about p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-2); }
.about p:last-child { margin-bottom: 0; }
.about a { color: var(--ink); }

.foot { border-top: 1px solid var(--ink); padding: 28px 0 40px; font-size: .9375rem; color: var(--ink-2); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--ui); font-weight: 500; font-size: .875rem; }
.foot a { color: var(--ink); }
.foot address { font-style: normal; max-width: 44ch; }

/* ---------- 404 ---------- */
.nf { padding: 14vh 0 18vh; text-align: center; }
.nf h1 { font-family: var(--display); font-weight: 300; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.03em; margin: 0 0 12px; }
.nf p { color: var(--ink-2); margin: 0 auto 28px; max-width: 40ch; }
.btn { display: inline-block; border: 1px solid var(--ink); border-radius: 999px; padding: 11px 22px; text-decoration: none; font-family: var(--ui); font-weight: 500; }
.btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; padding: 56px 0 64px; }
  .row a { grid-template-columns: 1fr; gap: 4px; padding: 16px 4px; }
  .nav .nav-in { display: none; }
}
@media (max-width: 600px) {
  :root { --card-w: min(300px, 78vw); }
  body { font-size: 1rem; }
  .hero { padding: 16px 0 44px; }
  .lede { font-size: 1.0625rem; }
  .fan { margin-top: 30px; }
  .card { border-radius: 24px; padding: 12px 12px 18px; }
  .card h2 { font-size: 1.3125rem; }
  .pill { padding: 9px 16px; font-size: .9375rem; }
  .fan-btn { width: 52px; height: 52px; }
  .index { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-go svg, .fan-btn, .row a { transition: none; }
}
