/* d0do05x - shared site styles (hub + header/footer used by every page) */
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f4f3ef;
  --ink: #141414;
  --ink-soft: #55555c;
  --muted: #8a8a93;
  --line: #141414;
  --card: #ffffff;
  --shadow: #141414;
  --chip: #f0efe9;
  --green: #5d9948;
  --green-hi: #81b64c;
  --amber: #f5a524;
  --radius: 22px;
  --font: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'SF Mono', monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101013;
    --bg-soft: #18181d;
    --ink: #f3f3f6;
    --ink-soft: #b5b5c0;
    --muted: #7d7d89;
    --line: #f3f3f6;
    --card: #1a1a20;
    --shadow: #000000;
    --chip: #24242c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101013;
  --bg-soft: #18181d;
  --ink: #f3f3f6;
  --ink-soft: #b5b5c0;
  --muted: #7d7d89;
  --line: #f3f3f6;
  --card: #1a1a20;
  --shadow: #000000;
  --chip: #24242c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--green-hi); outline-offset: 3px; border-radius: 8px; }

/* ---------------------------------------------------------------- header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 40px);
}
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 15px;
  letter-spacing: -0.06em;
  transform: rotate(-6deg);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.logo:hover .logo-mark { transform: rotate(6deg) scale(1.06); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s;
}
.pill-link:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--shadow); }
.pill-link:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }
.pill-link.coffee { background: #ffdd00; color: #141414; border-color: #141414; box-shadow: 0 3px 0 #141414; }
.pill-link.coffee:hover { box-shadow: 0 5px 0 #141414; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--card);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--shadow); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .when-off, .icon-btn[aria-pressed="false"] .when-on { display: none; }
.icon-btn[aria-pressed="false"] .when-off { display: block; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* ---------------------------------------------------------------- hub */
.hub { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 72px; }
.hero { text-align: center; padding: clamp(28px, 7vw, 72px) 0 clamp(28px, 6vw, 56px); }
.hero h1 {
  margin: 0;
  font-size: clamp(56px, 13vw, 132px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: .9;
}
.hero h1 .zero { display: inline-block; color: var(--green); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.hero h1:hover .zero { transform: rotate(180deg); }
.hero p { margin: 18px auto 0; max-width: 520px; color: var(--ink-soft); font-size: clamp(17px, 2.2vw, 20px); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 7px 0 var(--shadow);
  transform: translateY(0);
  transition: transform .14s cubic-bezier(.3,1.4,.6,1), box-shadow .14s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
a.card:hover, .card.is-hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 11px 0 var(--shadow); }
a.card:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--shadow); transition-duration: .05s; }
.card-art {
  aspect-ratio: 16 / 10;
  border-bottom: 2.5px solid var(--line);
  position: relative;
  overflow: hidden;
}
.card-body { padding: 18px 22px 22px; }
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.card-title .t { white-space: nowrap; }
.card-desc { margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; }
.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 2px solid var(--line);
}
.badge.live { background: var(--green); color: #fff; border-color: var(--green); }
.badge.live::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}
.badge.soon { background: var(--chip); color: var(--ink-soft); border-color: transparent; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* VisiMate card art */
.art-visimate { background: #0d0d11; display: grid; place-items: center; }
.art-visimate svg { width: 100%; height: 100%; }
.art-visimate .vm-arrow { transition: opacity .25s ease; }
.art-visimate .vm-arrow path { stroke-dasharray: 260; stroke-dashoffset: 0; }
.art-visimate .vm-arrow.draw path { animation: draw .55s cubic-bezier(.5,0,.2,1); }
@keyframes draw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
.art-visimate .evalfill { transition: height .5s cubic-bezier(.3,1.3,.5,1), y .5s cubic-bezier(.3,1.3,.5,1); }

/* Bedrock seed cracker art */
.card.teaser { cursor: not-allowed; }
.card.teaser:hover { transform: translateY(-2px); box-shadow: 0 9px 0 var(--shadow); }
.card.teaser.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px) rotate(-1deg); }
  40% { transform: translateX(6px) rotate(1deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.art-bedrock {
  background: linear-gradient(#7cc4f5, #b8e3ff);
  display: grid;
  place-items: center;
}
:root[data-theme="dark"] .art-bedrock { background: linear-gradient(#0f1b3d, #283c6e); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .art-bedrock { background: linear-gradient(#0f1b3d, #283c6e); } }
.art-bedrock svg { width: 46%; height: auto; transition: transform .5s cubic-bezier(.3,1.5,.5,1); filter: drop-shadow(0 10px 0 rgba(0,0,0,.18)); }
.card.teaser:hover .art-bedrock svg { transform: translateY(-6px) rotate(-4deg); }
.seed-readout {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  color: #b6ff8a;
  white-space: nowrap;
}

.card.placeholder {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  color: var(--muted);
  padding: 24px;
}
.card.placeholder strong { display: block; color: var(--ink-soft); font-size: 20px; letter-spacing: -0.02em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 15px;
  transition: opacity .2s ease, transform .25s cubic-bezier(.3,1.5,.5,1);
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  padding: 28px 16px 36px;
  color: var(--muted);
  font-size: 15px;
  border-top: 2px solid var(--bg-soft);
}
.site-footer a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .pill-link.coffee .label-long { display: none; }
  .pill-link { padding: 0 12px; }
  .site-header { padding-top: 14px; }
  .logo-text { display: none; }
}

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