/* pabloio · bento workshop
   Tokens are the live pabloio.com signal system (pabloio/site/pabloio/src/app/globals.css).
   Each tile's body carries its own project's colours. The frame is the only shared layer. */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/anton-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --background: #0b0b0b;
  --foreground: #f5f5f0;
  --accent: #d0ff00;
  --muted: #9a9a94;
  --dim: #4a4a44;
  --surface: #131313;
  --border: #1f1f1f;
  --radius: 22px;
  --radius-in: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Anton", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--background); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:focus-visible { outline: 3px solid var(--background); outline-offset: -7px; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
img { max-width: 100%; }

/* vignette: above the field, below the content, exactly as the live site */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

/* ---------- the field ---------- */
.dots { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.glow {
  position: fixed; top: 0; left: 0; width: 600px; height: 600px; border-radius: 50%;
  z-index: 1; pointer-events: none; opacity: 0.7; will-change: transform;
  background: radial-gradient(circle, rgba(208, 255, 0, 0.06) 0%, rgba(208, 255, 0, 0.02) 40%, transparent 70%);
  mix-blend-mode: screen;
  transform: translate3d(-1000px, -1000px, 0);
}
@media (pointer: coarse) { .glow { display: none; } }

main { position: relative; z-index: 10; }

/* ---------- hero ---------- */
.hero {
  min-height: 88svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: clamp(3rem, 8svh, 5rem) 24px 3rem;
}
.mark { position: relative; width: 64px; height: 64px; will-change: transform; }
@media (min-width: 1024px) { .mark { width: 68px; height: 68px; } }
.mark__glow {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(208, 255, 0, 0.35) 0%, rgba(208, 255, 0, 0) 65%);
  filter: blur(12px);
}
.mark svg { position: relative; display: block; width: 100%; height: 100%; }
.orbit { transform-origin: 50px 50px; animation: spin 14s linear infinite; }
.orbit--slow { animation: spin 26s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.kicker {
  margin-top: 20px; margin-right: -0.15em;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
}
h1 {
  margin-top: clamp(2rem, 5svh, 3.25rem);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  line-height: 0.93; letter-spacing: -0.01em;
  font-size: clamp(2.75rem, min(7.4vw, 11.5svh), 6.5rem);
  max-width: 13ch;
}
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.02em 0.04em; }
.w__in { display: inline-block; }
.sub {
  margin-top: clamp(1.25rem, 3svh, 1.75rem); max-width: 34ch;
  font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.5; color: var(--muted);
}
.status {
  margin-top: clamp(1.75rem, 4svh, 2.5rem); margin-right: -0.2em;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}

/* ---------- the bento ---------- */
.gallery { max-width: 1240px; margin: 0 auto; padding: 0 24px 4rem; }
.grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 112px; gap: 14px;
  grid-auto-flow: dense;
}
.tile {
  grid-column: span var(--c, 4); grid-row: span var(--r, 3);
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  color: inherit; text-decoration: none;
  transition: border-color 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
a.tile:hover, a.tile:focus-visible {
  border-color: rgba(208, 255, 0, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 24px 60px -30px rgba(208, 255, 0, 0.45);
}
.tile__head {
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; row-gap: 5px; align-items: baseline;
  padding: 16px 18px 13px;
}
.tile__no { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; color: var(--dim); }
.tile__name { font-weight: 800; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__status {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  text-align: right; white-space: nowrap;
}
a.tile .tile__status::after { content: " ↗"; color: var(--dim); transition: color 0.5s; }
a.tile:hover .tile__status::after { color: var(--accent); }
.tile__line { grid-column: 1 / -1; font-size: 14px; line-height: 1.45; color: var(--muted); }
.tile__body {
  position: relative; flex: 1; min-height: 0; overflow: hidden; container-type: inline-size;
  margin: 0 18px 18px; border-radius: var(--radius-in); border: 1px solid var(--border); background: var(--background);
}
.tile__img { display: block; width: 100%; height: 100%; object-fit: var(--fit, cover); object-position: var(--pos, top center); transition: transform 1.2s var(--ease); }
a.tile:hover .tile__img { transform: scale(1.03); }

/* typographic bodies */
.tile__type { position: relative; height: 100%; }
.tile__big {
  position: absolute; left: 18px; bottom: 12px;
  font-family: var(--font-display); font-size: clamp(2.75rem, 21cqw, 6rem); line-height: 0.88; text-transform: uppercase; letter-spacing: -0.01em;
}
.tile__mono { position: absolute; right: 18px; top: 14px; font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--muted); white-space: pre-line; text-align: right; }
.tile__icon { height: 100%; display: grid; place-items: center; }
.tile__icon img { width: min(44%, 150px); height: auto; border-radius: 22%; }
.chip {
  position: absolute; right: 12px; bottom: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; background: rgba(11, 11, 11, 0.7);
}
.chip--left { right: auto; left: 12px; }
.tile__canvas { display: block; width: 100%; height: 100%; background: #08080a; }
.tile--fluid .chip { transition: opacity 0.5s; }
.tile--fluid.is-awake .chip { opacity: 0; }

/* tablet */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 104px; }
  .tile { grid-column: span var(--cm, 6); grid-row: span var(--rm, 3); }
}
/* phone: one column, each tile at its own height */
@media (max-width: 640px) {
  .gallery { padding: 0 16px 3rem; }
  .grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .tile { grid-column: auto; grid-row: auto; min-height: var(--hp, 320px); }
  .tile__head { padding: 14px 16px 12px; }
  .tile__body { margin: 0 14px 14px; }
}

/* ---------- commissions ---------- */
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3rem 24px 5rem; }
.cta h2 {
  margin-top: 1.1rem; max-width: 16ch;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em;
  font-size: clamp(2.1rem, 5vw, 4rem);
}
.cta p { margin-top: 1.25rem; max-width: 38ch; color: var(--muted); line-height: 1.5; font-size: clamp(1rem, 1.3vw, 1.125rem); }
.btnwrap { position: relative; margin-top: 2.25rem; display: flex; align-items: center; justify-content: center; }
.btnwrap::before {
  content: ""; position: absolute; width: 340px; height: 96px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(208, 255, 0, 0.16) 0%, rgba(208, 255, 0, 0) 65%);
  filter: blur(24px); animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 0.85; transform: scale(1.04); } }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 20px;
  padding: 16px 32px; border-radius: 16px;
  background: var(--accent); color: var(--background);
  font-family: var(--font-sans); font-weight: 900; font-size: 16px; letter-spacing: -0.01em; text-transform: uppercase; white-space: nowrap; text-decoration: none;
  box-shadow: 0 12px 40px -12px rgba(208, 255, 0, 0.45);
  transition: background-color 0.5s, box-shadow 0.5s;
  will-change: transform;
}
@media (min-width: 768px) { .btn { padding: 20px 48px; border-radius: 22px; font-size: 20px; gap: 24px; } }
.btn:hover { background: var(--foreground); box-shadow: 0 24px 60px -20px rgba(208, 255, 0, 0.6); }
.btn__in, .btn__mark { position: relative; z-index: 1; display: inline-block; }
.btn__mark svg { display: block; width: 15px; height: 15px; }
.follow {
  margin-top: 1.75rem; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.5s;
}
.follow:hover { color: var(--accent); }
.follow svg { width: 9px; height: 9px; }

/* ---------- footer ---------- */
footer {
  position: relative; z-index: 10; border-top: 1px solid var(--border); padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--muted);
}
footer a { color: inherit; text-decoration: none; transition: color 0.5s; letter-spacing: 0.2em; }
footer a:hover { color: var(--accent); }
footer .copy { letter-spacing: 0.2em; text-transform: uppercase; }
footer .x { order: -1; display: inline-flex; align-items: center; gap: 10px; }
footer .x svg { width: 9px; height: 9px; }
footer .mail { position: relative; }
footer .mail::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 0; background: var(--accent); transition: width 0.7s ease-out; }
footer .mail:hover::after { width: 100%; }
@media (min-width: 640px) {
  footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
  footer .copy { justify-self: start; }
  footer .x { order: 0; justify-self: center; }
  footer .mail { justify-self: end; margin-right: -0.2em; }
}

/* ---------- motion: entrances ---------- */
.js:not(.reduced) .w__in {
  opacity: 0; transform: translateY(110%); filter: blur(12px);
  animation: reveal 1.1s var(--ease) forwards; animation-delay: calc(0.8s + var(--i) * 0.09s);
}
@keyframes reveal { to { opacity: 1; transform: none; filter: blur(0); } }
.js:not(.reduced) .fade { opacity: 0; translate: 0 12px; animation: fadeup 1.1s var(--ease) forwards; animation-delay: var(--d, 0.4s); }
@keyframes fadeup { to { opacity: 1; translate: 0 0; } }
.js:not(.reduced) .tile { opacity: 0; translate: 0 24px; }
.js:not(.reduced) .tile.is-in { animation: fadeup 1s var(--ease) forwards; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .w__in, .fade, .tile { opacity: 1 !important; transform: none !important; translate: none !important; filter: none !important; }
}

@media print {
  html, body { background: #fff; color: #111; }
  body::before, .dots, .glow { display: none; }
  a { color: #111; }
}
