/* BeeZ Games: light grey, white panels, honey accent, Baloo 2. */
:root {
  --ground: #e9eaec;      /* wing grey */
  --panel: #ffffff;
  --panel-2: #f4f4f5;
  --ink: #0e1216;         /* logo outline */
  --muted: #555b63;
  --line: #d5d7db;
  --honey: #ffc800;       /* logo yellow */
  --honey-hi: #ffd633;
  --honey-deep: #e0a800;

  --font: "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --small: 0.9375rem;
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --head: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

  --column: 620px;
  --wide: 1080px;
  --margin: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: var(--body); font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  display: flex; flex-direction: column; min-height: 100svh;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; text-decoration-color: var(--honey-deep); }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--honey); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 10px 18px; border-radius: var(--pill); background: var(--ink); color: #fff; font-weight: 600; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.skip:focus { clip-path: none; width: auto; height: auto; }

.column { width: 100%; max-width: calc(var(--column) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }
.wide { width: 100%; max-width: calc(var(--wide) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 4px 30px 0; border: 0; border-radius: var(--pill);
  background: var(--honey); color: var(--ink); font-weight: 700; font-size: var(--body); text-decoration: none; cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn--white { background: var(--panel); }
.btn .arrow { display: inline-block; transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--honey-hi); }
  .btn--white:hover { background: var(--panel-2); }
  .btn:hover .arrow, .link:hover .arrow { transform: translateX(4px); }
}
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-decoration-color: var(--honey-deep); }
.link .arrow { display: inline-block; transition: transform 220ms var(--ease-out); }
.label { justify-self: start; display: inline-block; padding: 4px 14px 2px; border-radius: var(--pill); background: var(--panel); font-size: var(--small); font-weight: 600; }

/* ---------- Home: first screen ---------- */
.hero {
  position: relative; isolation: isolate; min-height: 100svh; display: grid; place-items: center; padding: 48px var(--margin) 120px; text-align: center;
}
/* faint honeycomb, fading out toward the bottom of the first screen */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 0v34' fill='none' stroke='%230e1216' stroke-opacity='.07' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 56px 100px; background-position: center top;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
          mask-image: linear-gradient(#000 60%, transparent);
}
/* honey glow: the honeycomb under the cursor lights up (mouse devices only) */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 0v34' fill='%23ffc800' fill-opacity='.10' stroke='%23e0a800' stroke-opacity='.9' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 56px 100px; background-position: center top;
  -webkit-mask-image: radial-gradient(circle 150px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
          mask-image: radial-gradient(circle 150px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  transition: opacity 400ms var(--ease-out);
}
.hero.is-glowing::after { opacity: 1; }
.hero__inner { display: grid; justify-items: center; gap: 28px; }
.hero__logo { width: clamp(220px, 30vw, 340px); animation: bob 3.2s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.hero h1 { line-height: 0; }
.hero__line { font-size: var(--lead); font-weight: 500; max-width: 30ch; line-height: 1.35; hyphens: none; }
.hero__cue {
  position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 0; font-weight: 600; text-decoration: none; color: var(--muted);
  transition: color 160ms var(--ease-out);
}
.hero__cue:hover { color: var(--ink); }
.hero__cue .down { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- Home: games column ---------- */
.games { display: grid; gap: 96px; padding-top: clamp(80px, 12vw, 160px); scroll-margin-top: 24px; }
.games > h2 { font-size: var(--head); text-align: center; }
.game-entry { display: grid; gap: 18px; }
.game-entry__art { display: block; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.game-entry__art img { width: 100%; transition: transform 900ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .game-entry__art:hover img { transform: scale(1.03); } }
.game-entry h3 { font-size: var(--head); margin-top: 4px; }
.game-entry__tagline { font-size: var(--lead); font-weight: 500; line-height: 1.35; }
.game-entry__text { color: var(--muted); }
.game-entry__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 6px; }
.studio-note { margin-top: 96px; text-align: center; color: var(--muted); max-width: 44ch; margin-inline: auto; }

/* ---------- Inner pages ---------- */
.mini-head { padding-block: 28px 0; }
.mini-head a { display: inline-block; border-radius: 12px; transition: transform 160ms var(--ease-out); }
.mini-head a:hover { transform: rotate(-4deg); }
.mini-head a:active { transform: scale(0.94); }
.mini-head img { width: 64px; }
.page-title { padding-top: clamp(40px, 6vw, 80px); display: grid; gap: 14px; }
.page-title h1 { font-size: var(--head); }
.page-title p { font-size: var(--lead); font-weight: 500; line-height: 1.35; color: var(--muted); max-width: 40ch; }
.page-title--center { text-align: center; justify-items: center; }

/* Updates: cards with pictures */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 48px; }
.card { flex: 0 1 340px;
  display: grid; grid-template-rows: auto 1fr; background: var(--panel); border-radius: var(--radius); overflow: hidden; text-decoration: none;
  transition: transform 220ms var(--ease-out);
}
.card:hover { transform: translateY(-4px); }
.card:active { transform: scale(0.98); }
.card__pic { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--panel-2); }
.card__pic--mark { object-fit: contain; padding: 12%; }
.card__body { display: grid; gap: 8px; align-content: start; padding: 22px 24px 26px; }
.card time { font-size: var(--small); color: var(--muted); font-weight: 600; }
.card h2 { font-size: var(--lead); line-height: 1.2; }
.card p { color: var(--muted); }
.empty { padding: 28px; background: var(--panel); border-radius: var(--radius); color: var(--muted); }

/* About: short centered story */
.story { display: grid; justify-items: center; gap: 28px; text-align: center; padding-top: clamp(32px, 5vw, 64px); }
.story__mark { width: 140px; }
.story h1 { font-size: var(--head); }
.story__text { display: grid; gap: 22px; text-align: left; }
.story__text h2 { font-size: var(--lead); line-height: 1.25; }
.story__text section { display: grid; gap: 6px; }

/* Contact: one white card */
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-top: 40px;
  padding: clamp(24px, 4vw, 40px); background: var(--panel); border-radius: var(--radius);
}
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: var(--small); padding: 0; }
.field input, .field textarea {
  width: 100%; border: 0; border-radius: 12px; background: var(--panel-2); color: var(--ink);
  padding: 14px 16px; font-size: var(--body); line-height: 1.5;
  outline: 2px solid transparent; outline-offset: -2px;
  transition: background-color 160ms var(--ease-out), outline-color 160ms var(--ease-out);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #80868e; }
.field input:hover, .field textarea:hover { background: #ececee; }
.field input:focus, .field textarea:focus { outline-color: var(--honey-deep); background: #fff; }
.field [aria-invalid="true"] { outline-color: #c62828; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.pills input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pills label {
  padding: 8px 18px 6px; border-radius: var(--pill); background: var(--panel-2); font-size: var(--small); font-weight: 600; cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.pills label:hover { background: #e4e5e8; }
.pills label:active { transform: scale(0.96); }
.pills input:checked + label { background: var(--honey); }
.pills input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.form__error { grid-column: 1 / -1; color: #b3261e; font-weight: 600; font-size: var(--small); }
.form__error:empty { display: none; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.form__done { margin-top: 40px; padding: clamp(24px, 4vw, 40px); background: var(--panel); border-radius: var(--radius); display: grid; gap: 12px; justify-items: start; }
.form__done h2 { font-size: var(--head); }
.form__done p { color: var(--muted); }
.form__done .btn--white { background: var(--panel-2); }
.form__done .btn--white:hover { background: #e4e5e8; }
.contact-alt { margin-top: 24px; text-align: center; color: var(--muted); }
.contact-alt a { color: var(--ink); font-weight: 600; }

/* Game page */
.game-page { display: grid; gap: 24px; padding-top: clamp(32px, 5vw, 64px); }
.game-page__art { border-radius: var(--radius); overflow: hidden; }
.game-page h1 { font-size: var(--head); }
.game-page .game-entry__actions { margin-top: 0; }
.facts { display: grid; gap: 8px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px 10px; background: var(--panel); border-radius: 12px; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 600; text-align: right; }

/* Post page */
.post { display: grid; gap: 22px; padding-top: clamp(32px, 5vw, 64px); }
.post h1 { font-size: var(--head); }
.post__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-weight: 600; }
.post__cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.post__cover img { width: 100%; height: 100%; object-fit: cover; }
.post__summary { font-size: var(--lead); font-weight: 500; line-height: 1.35; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.post__nav a { display: grid; gap: 4px; padding: 20px 22px; background: var(--panel); border-radius: var(--radius); text-decoration: none; transition: transform 200ms var(--ease-out); }
.post__nav a:hover { transform: translateY(-3px); }
.post__nav small { color: var(--muted); font-size: var(--small); font-weight: 600; }
.post__nav strong { font-weight: 700; line-height: 1.25; }
.post__nav a:last-child { text-align: right; }

.prose { display: grid; gap: 1em; }
.prose h2 { font-size: var(--lead); margin-top: 0.8em; }
.prose h3 { font-size: var(--body); margin-top: 0.6em; }
.prose ul { display: grid; gap: 6px; }
.prose li { padding-left: 24px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 10px; height: 10px; border-radius: 50%; background: var(--honey); }
.prose blockquote { padding: 18px 22px; background: var(--panel); border-radius: var(--radius); font-size: var(--lead); font-weight: 500; line-height: 1.35; }
.prose img { width: 100%; border-radius: var(--radius); }
.prose code { background: var(--panel); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: var(--panel); }

/* ---------- Footer: the only navigation ---------- */
.footer { margin-top: clamp(96px, 12vw, 160px); padding: 48px var(--margin) 36px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.footer__mark { width: 56px; transition: transform 200ms var(--ease-out); }
.footer a:hover .footer__mark { transform: rotate(-6deg); }
.footer__nav, .footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.footer__nav a { padding: 6px 14px 4px; border-radius: var(--pill); font-weight: 700; font-size: var(--lead); text-decoration: none; transition: background-color 160ms var(--ease-out); }
.footer__nav a:hover, .footer__nav a[aria-current="page"] { background: var(--panel); }
.footer__social a { padding: 4px 12px; border-radius: var(--pill); color: var(--muted); font-weight: 600; text-decoration: none; }
.footer__social a:hover { color: var(--ink); background: var(--panel); }
.footer__email { font-weight: 600; text-decoration: none; }
.footer__email:hover { text-decoration: underline; }
.footer small { color: var(--muted); font-size: var(--small); }

/* ---------- Entrances ---------- */
.js [data-reveal] > * { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in > * {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] > * { opacity: 1; transform: none; transition: none; }
  .hero__logo, .hero__cue .down { animation: none; }
  .game-entry__art img, .card, .post__nav a { transition: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .hero { padding-bottom: 110px; }
  .hero .btn, .game-entry__actions .btn { width: 100%; }
  .games { gap: 72px; }
  .card { flex-basis: 100%; }
  .form { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .post__nav { grid-template-columns: 1fr; }
  .post__nav a:last-child { text-align: left; }
}
