/* =========================================================================
   WLU Studio — one stylesheet, mobile-first.

   The agency theme was light because it sold to small businesses. This one is
   dark because it sells a game. That flip also fixes the old contrast trap:
   the brand green (#2ee07a) was only ~1.8:1 on white and had to be a fill,
   never text. On this background it clears 12:1, so it can finally be used
   as ink — which is why there is no separate accent token here.
   ========================================================================= */

:root {
  --bg:      #0a0c10;
  --bg2:     #10141b;
  --bg3:     #161c25;
  --line:    #222b37;
  --line2:   #2e3947;

  --tx:      #e9eef4;
  --mut:     #97a4b3;
  /* --dim is the quietest ink on the site (footer labels, timestamps). It was
     #6c7a8a, which measured 3.90:1 on --bg3 and failed AA. This clears 4.9:1 on
     the lightest surface while staying visibly quieter than --mut. */
  --dim:     #7d8b9b;

  --g:       #2ee07a;   /* brand green — text-safe on these surfaces */
  --g-deep:  #17a256;
  --amb:     #ffc23d;   /* CropCorp warmth, used sparingly */

  --wrap:    1180px;
  --r:       14px;
  --r-lg:    20px;

  --ff: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fm: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
}

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--ff);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--g); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.022em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.15rem, 7.4vw, 4.4rem); }
h2 { font-size: clamp(1.65rem, 4.6vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--g);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--g); color: #04140b; padding: 12px 18px; font-weight: 700;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--g {
  background: var(--g);
  color: #04140b;
  box-shadow: 0 8px 26px rgba(46, 224, 122, .24);
}
.btn--g:hover { background: #46eb8d; box-shadow: 0 14px 34px rgba(46, 224, 122, .34); }

.btn--ghost { border-color: var(--line2); color: var(--tx); background: rgba(255, 255, 255, .02); }
.btn--ghost:hover { border-color: var(--g); color: var(--g); }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10, 12, 16, .82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--tx); font-weight: 800; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  /* Solid colour first: a gradient is not a background-color, so without this
     the glyph sits on transparency if the gradient ever fails to paint. */
  background-color: var(--g);
  background-image: linear-gradient(150deg, var(--g), var(--g-deep));
  color: #04140b; font-size: 1.05rem; font-weight: 900;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.08; }
.brand-name b { font-size: 1.02rem; font-weight: 800; }
.brand-name span {
  font-size: .58rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--g); font-weight: 700;
}

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--tx); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg2); border-bottom: 1px solid var(--line);
  padding: 10px 20px 20px;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }

/* Scoped to the menu list on purpose. As `.site-nav a` this outranked
   `.btn--g` (0,1,1 beats 0,1,0) and repainted the CTA button's ink light,
   giving light-on-green at 1.5:1 — invisible, and only on desktop, because on
   mobile the panel is closed. Keep nav-link colour off bare `a`. */
.site-nav ul a {
  display: block; padding: 13px 2px;
  color: var(--tx); font-weight: 600; font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.site-nav ul a:hover, .site-nav .current-menu-item > a { color: var(--g); text-decoration: none; }
.nav-cta { margin-top: 16px; }
.nav-cta .btn { width: 100%; justify-content: center; }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(56px, 12vw, 118px) 0 clamp(48px, 10vw, 96px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

/* Two soft colour fields plus a fine grid. Pure CSS: the hero is the LCP and
   must not wait on a canvas or an image decode. */
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 150%;
  background:
    radial-gradient(58% 48% at 22% 12%, rgba(46, 224, 122, .17), transparent 70%),
    radial-gradient(52% 44% at 82% 4%, rgba(255, 194, 61, .10), transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(72% 62% at 50% 34%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 1; }

.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--g);
  border: 1px solid rgba(46, 224, 122, .3);
  background: rgba(46, 224, 122, .07);
  padding: 7px 14px; border-radius: 999px;
  margin: 0 0 22px;
}
.kicker .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--g);
  box-shadow: 0 0 0 0 rgba(46, 224, 122, .55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(46, 224, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 224, 122, 0); }
}

.hero h1 { max-width: 16ch; margin-bottom: .34em; }
.hero h1 em { font-style: normal; color: var(--g); }

.hero-lead {
  font-size: clamp(1.02rem, 2.5vw, 1.24rem);
  color: var(--mut);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 26px 40px;
  margin-top: 44px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-stats div b {
  display: block; font-size: 1.45rem; font-weight: 800; color: var(--tx); line-height: 1.2;
}
.hero-stats div span {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600;
}

/* --------------------------------------------------------------- sections */

.sec { padding: clamp(52px, 9vw, 96px) 0; }
.sec--alt { background: var(--bg2); border-block: 1px solid var(--line); }

.sec-head { max-width: 62ch; margin-bottom: clamp(30px, 5vw, 48px); }
.sec-head .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--g); margin: 0 0 12px;
}
.sec-head p { color: var(--mut); margin-bottom: 0; }

/* ----------------------------------------------------------- game feature */

.game {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(168deg, var(--bg3), var(--bg2));
  overflow: hidden;
  box-shadow: var(--shadow);
}
.game-shot { position: relative; aspect-ratio: 16 / 9; background: #0d1116; }
.game-shot img { width: 100%; height: 100%; object-fit: cover; }
.game-shot figcaption {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--fm); font-size: .68rem; letter-spacing: .04em;
  color: var(--tx); background: rgba(6, 9, 12, .78);
  border: 1px solid var(--line2); border-radius: 7px; padding: 5px 10px;
}
.game-body { padding: clamp(24px, 5vw, 44px); }

.game-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.game-title h3 { font-size: clamp(1.6rem, 4.2vw, 2.2rem); margin: 0; }
.badge {
  font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  color: var(--amb); background: rgba(255, 194, 61, .1); border: 1px solid rgba(255, 194, 61, .3);
}
.game-tag { color: var(--amb); font-weight: 600; margin-bottom: 16px; }
.game-body > p { color: var(--mut); max-width: 62ch; }

.game-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; padding: 0; list-style: none; }
.game-meta li {
  font-size: .78rem; font-weight: 600; color: var(--mut);
  border: 1px solid var(--line2); border-radius: 999px; padding: 5px 13px;
}

/* -------------------------------------------------------------- card grids */

.grid { display: grid; gap: 18px; }
.grid--1, .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
/* One card should read as a feature, not as a gap where two more failed. */
.grid--1 { max-width: 620px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg2);
  transition: border-color .18s ease, transform .18s ease;
}
.sec--alt .card { background: var(--bg3); }
.card:hover { border-color: var(--line2); transform: translateY(-3px); }

.card-body { padding: 24px; }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--mut); margin-bottom: 0; font-size: .96rem; }

.card-num {
  font-family: var(--fm); font-size: .74rem; font-weight: 700;
  color: var(--g); letter-spacing: .1em; display: block; margin-bottom: 12px;
}

.card--post { overflow: hidden; }
.card--post .card-link { display: block; color: inherit; }
.card--post .card-link:hover { text-decoration: none; }
.card-shot { aspect-ratio: 16 / 9; background: var(--bg3); overflow: hidden; }
.card-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-shot--blank {
  display: grid; place-items: center;
  background:
    radial-gradient(80% 120% at 30% 0%, rgba(46, 224, 122, .16), transparent 65%),
    var(--bg3);
  border-bottom: 1px solid var(--line);
}
.card-shot--blank span { color: var(--g); font-size: 1.7rem; opacity: .55; }
.card--post:hover .card-shot img { transform: scale(1.04); }
.card-meta {
  font-family: var(--fm); font-size: .72rem; color: var(--dim);
  display: flex; gap: 8px; margin-bottom: 10px;
}
.card-excerpt { margin-bottom: 14px !important; }
.card-more { color: var(--g); font-weight: 700; font-size: .9rem; }

/* ---------------------------------------------------------------- CTA band */

.cta {
  border: 1px solid rgba(46, 224, 122, .26);
  border-radius: var(--r-lg);
  background:
    radial-gradient(70% 130% at 12% 0%, rgba(46, 224, 122, .13), transparent 62%),
    var(--bg2);
  padding: clamp(30px, 6vw, 56px);
  text-align: center;
}
.cta h2 { margin-bottom: .4em; }
.cta p { color: var(--mut); max-width: 52ch; margin-inline: auto; margin-bottom: 26px; }
.cta-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ------------------------------------------------------------ page + posts */

.page-hero {
  padding: clamp(44px, 8vw, 76px) 0 clamp(26px, 5vw, 40px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 100% at 20% 0%, rgba(46, 224, 122, .09), transparent 70%);
}
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { color: var(--mut); max-width: 60ch; font-size: 1.08rem; margin: 0; }

.prose { padding: clamp(36px, 7vw, 64px) 0; max-width: 74ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose > *:first-child { margin-top: 0; }
.prose p, .prose li { color: #cdd7e1; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .5em; }
.prose img { border-radius: var(--r); margin: 1.8em 0; border: 1px solid var(--line); }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: .82rem; color: var(--dim); text-align: center; margin-top: .7em; }
.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--g); color: var(--tx); font-size: 1.06rem;
}
.prose code {
  font-family: var(--fm); font-size: .88em;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px;
}
.prose pre {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; overflow-x: auto; font-size: .88rem;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.prose th { background: var(--bg2); font-weight: 700; }

.post-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font-family: var(--fm); font-size: .78rem; color: var(--dim); margin: 0 0 6px;
}
.post-nav {
  display: grid; gap: 12px; padding: 30px 0 0; margin-top: 40px;
  border-top: 1px solid var(--line);
}
.post-nav a { color: var(--mut); font-weight: 600; }
.post-nav a:hover { color: var(--g); }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 clamp(40px, 8vw, 70px); }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--tx); font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--g); color: var(--g); text-decoration: none; }
.pagination .current { background: var(--g); border-color: var(--g); color: #04140b; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg2);
  padding: clamp(40px, 7vw, 62px) 0 28px;
  margin-top: auto;
}
.footer-top { display: grid; gap: 32px; margin-bottom: 36px; }
.footer-about p { color: var(--mut); font-size: .94rem; max-width: 42ch; margin: 16px 0 0; }
.footer-col h4 {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 14px; font-weight: 700;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--mut); font-size: .94rem; }
.footer-col a:hover { color: var(--g); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between;
  font-size: .84rem; color: var(--dim);
}
.footer-bottom a { color: var(--dim); }
.footer-bottom a:hover { color: var(--g); }

/* ------------------------------------------------------------------- misc */

.site { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

.err { text-align: center; padding: clamp(70px, 14vw, 140px) 0; }
.err .code {
  font-family: var(--fm); font-size: clamp(3.4rem, 15vw, 7rem); font-weight: 800;
  color: var(--g); line-height: 1; margin-bottom: 14px;
}
.err p { color: var(--mut); max-width: 46ch; margin-inline: auto; }

/* Scroll reveals are gated behind `.js`, which is set by an inline script in
   the head. Without that gate a JS failure — or a crawler, or a reader-mode
   pass — leaves every card at opacity 0 and the page looks empty below the
   hero. Decoration must never be load-bearing for content. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- >= 620px */

@media (min-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .next { text-align: right; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------- >= 900px */

@media (min-width: 900px) {
  body { font-size: 17.5px; }

  .nav-toggle { display: none; }
  .site-nav {
    display: flex; align-items: center; gap: 6px;
    position: static; background: none; border: 0; padding: 0;
  }
  .site-nav ul { display: flex; align-items: center; gap: 4px; }
  .site-nav ul a { border: 0; padding: 9px 13px; border-radius: 9px; font-size: .95rem; }
  .site-nav ul a:hover { background: rgba(255, 255, 255, .04); }
  .nav-cta { margin: 0 0 0 10px; }
  .nav-cta .btn { width: auto; padding: 11px 20px; font-size: .9rem; }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }

  .game--wide { display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
  .game--wide .game-shot { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .game--wide .game-body { display: flex; flex-direction: column; justify-content: center; }

  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
}

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