/* The Lachlan Langley Foundation — shared styles (clean, modern look) */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #fff;
  --bg-2: #f5f5f7;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --link-dark: #2997ff;
  --orange: #b64400;
  --radius: 18px;
  --radius-lg: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 680px; }
.center { text-align: center; }

/* ---------- Global nav ---------- */
.gnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 251, 253, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.gnav-in { display: flex; align-items: center; gap: 18px; max-width: 1000px; height: 48px; margin: 0 auto; padding: 0 22px; }
.gnav-logo { display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.gnav-logo:hover { text-decoration: none; opacity: .8; }
.gnav ul { display: flex; flex: 1; justify-content: flex-end; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; }
.gnav ul a { font-size: 13px; color: var(--ink); opacity: .8; letter-spacing: -0.01em; }
.gnav ul a:hover { opacity: 1; text-decoration: none; }
.gnav ul a[aria-current="page"] { opacity: 1; font-weight: 600; }
.gnav .gnav-donate { padding: 4px 12px; color: #fff; opacity: 1; background: var(--blue); border-radius: 980px; }
.gnav .gnav-donate:hover { background: var(--blue-hover); }
.flood-btn {
  flex: none;
  padding: 5px 13px;
  font: 600 13px var(--font);
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
  border: 0;
  border-radius: 980px;
  background: linear-gradient(90deg, #ff2d7a, #ff9f40);
  box-shadow: 0 2px 10px rgba(255, 45, 122, .35);
}
.flood-btn:hover { filter: brightness(1.08); }
.flood-btn:disabled { opacity: .55; cursor: default; filter: none; }
.logo-short { display: none; }
.gnav-toggle { display: none; margin-left: auto; padding: 6px 2px; font: 600 13px var(--font); color: var(--ink); background: none; border: 0; cursor: pointer; }

.ribbon { padding: 12px 22px; text-align: center; font-size: 14px; color: var(--ink); background: var(--bg-2); }
.ribbon a { white-space: nowrap; }

/* ---------- Buttons & links ---------- */
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.pill {
  display: inline-block;
  padding: 11px 22px;
  font: 400 17px/1.17 var(--font);
  letter-spacing: -0.022em;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 980px;
  cursor: pointer;
  text-align: center;
}
.pill:hover { text-decoration: none; background: var(--blue-hover); }
.pill-ghost { color: var(--link); background: transparent; border-color: var(--link); }
.pill-ghost:hover { color: #fff; background: var(--blue); }
.pill:disabled { color: var(--ink-3); background: #e8e8ed; border-color: #e8e8ed; cursor: default; }
.pill.small { padding: 7px 15px; font-size: 14px; }
.more::after { content: " ›"; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section.grey { background: var(--bg-2); }
.section.dark { color: #f5f5f7; background: #000; }
.section.dark .lede { color: var(--ink-3); }
.section.dark a:not(.pill) { color: var(--link-dark); }
.eyebrow { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--orange); letter-spacing: -0.01em; }
.section.dark .eyebrow { color: #ff9f40; }
h2.big { font-size: clamp(34px, 5vw, 56px); line-height: 1.07; }
.lede { margin: 10px 0 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; color: var(--ink-2); letter-spacing: 0.005em; }

/* ---------- Hero ---------- */
.hero { padding: 70px 22px 80px; text-align: center; background: var(--bg-2); }
.hero h1 { font-size: clamp(44px, 8vw, 80px); line-height: 1.05; letter-spacing: -0.02em; }
.hero-sub { margin: 8px 0 0; font-size: clamp(21px, 3vw, 28px); color: var(--ink-2); letter-spacing: 0.004em; }
.hero-img { max-width: 420px; margin: 46px auto 0; }
.hero-img img { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); }
.hero-img figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-3); font-style: italic; }

/* ---------- Visitor book ---------- */
.vbook h2 .js-visits { color: var(--blue); }
#vbook-form { display: flex; gap: 10px; max-width: 460px; margin: 26px auto 0; }
#vbook-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  font: 17px var(--font);
  letter-spacing: -0.022em;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
}
#vbook-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .15); }
#vbook-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vbook-msg { margin: 14px 0 0; font-size: 15px; color: #1d8a3a; }
.vbook-msg.bad { color: #d70015; }
.vbook-msg:empty, .vbook-total:empty { display: none; }
.vbook-total { margin: 30px 0 12px; font-size: 14px; color: var(--ink-3); }
.vbook-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-height: 220px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; }
.vbook-list:empty { display: none; }
.vbook-list li { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; font-size: 14px; background: #fff; border-radius: 980px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.vbook-list li b { font-weight: 600; overflow-wrap: anywhere; }
.vbook-list li span { font-size: 12px; color: var(--ink-3); }
.vbook-list li.empty { color: var(--ink-3); }

/* ---------- Promo tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 560px;
  padding: 50px 30px 0;
  overflow: hidden;
  text-align: center;
  color: var(--ink);
  background: var(--bg-2);
}
.tile:hover { text-decoration: none; }
.tile h3 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; }
.tile p { margin: 6px 0 0; font-size: 19px; color: var(--ink-2); }
.tile .more { margin-top: 14px; font-size: 17px; color: var(--link); }
.tile:hover .more { text-decoration: underline; }
.tile .tile-img { margin-top: auto; padding-top: 30px; width: 100%; max-width: 320px; }
.tile .tile-img img { width: 100%; border-radius: var(--radius) var(--radius) 0 0; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile-img img { transform: translateY(-8px); }
.tile.wide { grid-column: 1 / -1; min-height: 520px; }
.tile.dark { color: #f5f5f7; background: #000; }
.tile.dark p { color: var(--ink-3); }
.tile.dark .more { color: var(--link-dark); }
.tile.dark .eyebrow { color: #ff9f40; }
.tile .heads { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: auto; padding: 40px 0 60px; }
.tile .heads img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 10px 30px rgba(41, 151, 255, .35); }
.tile .heads img:nth-child(2) { width: 110px; height: 110px; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 50px; }
.stat-grid div { padding-top: 18px; border-top: 1px solid var(--line); }
.stat-grid b { display: block; font-size: clamp(40px, 5vw, 56px); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #0071e3, #9b51e0 60%, #ff2d7a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-grid span { display: block; margin-top: 6px; font-size: 17px; color: var(--ink-2); }

/* ---------- Collection ---------- */
.collection { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 46px; }
.collection figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: #e8e8ed; }
.collection img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; cursor: zoom-in; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.collection figure:hover img { transform: scale(1.04); }

/* ---------- Poll ---------- */
.poll { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.poll label { position: relative; }
.poll input { position: absolute; opacity: 0; pointer-events: none; }
.poll label span { display: inline-block; padding: 10px 20px; font-size: 15px; border: 1px solid var(--line); border-radius: 980px; cursor: pointer; background: #fff; }
.poll input:checked + span { color: #fff; background: var(--ink); border-color: var(--ink); }
.poll input:focus-visible + span { box-shadow: 0 0 0 4px rgba(0, 113, 227, .3); }
.poll .break { flex-basis: 100%; height: 0; }
.poll .pill { min-width: 160px; margin-top: 10px; }
.poll-result { margin: 18px 0 0; font-size: 19px; font-weight: 600; }
.poll-result:empty { display: none; }

/* ---------- Footer ---------- */
.gfoot { padding: 20px 0 30px; font-size: 12px; line-height: 1.33; color: var(--ink-2); background: var(--bg-2); }
.gfoot-note { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.gfoot-cols { display: flex; flex-wrap: wrap; gap: 60px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.gfoot-cols h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink); }
.gfoot-cols ul { margin: 0; padding: 0; list-style: none; }
.gfoot-cols li { margin: 0 0 6px; }
.gfoot-cols a { color: var(--ink-2); }
.gfoot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 14px; }
.gfoot-bottom .js-visits { font-weight: 600; color: var(--ink); }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, .85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-height: 84vh; border-radius: var(--radius); }
.lb p { max-width: 640px; margin: 16px 0 0; color: #f5f5f7; font-size: 17px; text-align: center; }
.lb p:empty { display: none; }

/* ---------- Blog article ---------- */
.article-head { padding: 70px 22px 40px; text-align: center; }
.article-head h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.07; }
.article-head .lede { max-width: 680px; margin-left: auto; margin-right: auto; }
.article-head .eyebrow { color: var(--ink-2); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.article-body { max-width: 720px; margin: 0 auto; padding: 0 22px 60px; }
.shot { margin: 0 0 56px; }
.shot img { width: 100%; border-radius: var(--radius); cursor: zoom-in; }
.shot figcaption { margin: 16px auto 0; max-width: 620px; font-size: 21px; font-weight: 600; line-height: 1.3; text-align: center; }
.signoff { margin: 0; padding: 0 22px 90px; text-align: center; font-size: 19px; color: var(--ink-2); }

/* ---------- Store ---------- */
.store-head { padding: 60px 22px 10px; }
.store-head h1 { font-size: clamp(40px, 6vw, 56px); line-height: 1.07; max-width: 640px; }
.store-head h1 span { color: var(--ink-3); }
.store-note { margin: 18px 0 0; font-size: 15px; color: var(--ink-2); }
.store-bg { padding: 30px 0 90px; background: var(--bg-2); }
.merch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: var(--radius);
  box-shadow: 2px 4px 12px rgba(0, 0, 0, .08); transition: transform .3s cubic-bezier(0, 0, .5, 1), box-shadow .3s cubic-bezier(0, 0, .5, 1); }
.product:hover { transform: scale(1.01); box-shadow: 2px 4px 16px rgba(0, 0, 0, .16); }
.product .stage { position: relative; padding: 10px 10px 0; }
.product svg { display: block; width: 100%; height: auto; }
.product .info { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 6px 22px 22px; }
.product .name { font-size: 19px; font-weight: 600; line-height: 1.2; }
.product .desc { flex: 1; font-size: 14px; color: var(--ink-2); line-height: 1.42; }
.product .price { margin-top: 8px; font-size: 15px; }
.product .price s { margin-right: 6px; color: var(--ink-3); }
.product .pill { align-self: flex-start; margin-top: 10px; }
.product .badge { position: absolute; top: 18px; left: 22px; font-size: 12px; font-weight: 600; color: var(--orange); letter-spacing: 0; }
.product .stamp { position: absolute; top: 16px; right: 16px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border-radius: 980px; }

/* ---------- Game ---------- */
.game-head { padding: 70px 22px 10px; }
.game-head h1 { font-size: clamp(44px, 7vw, 72px); line-height: 1.05; }
.game-wrap { max-width: 480px; margin: 40px auto 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 80px rgba(41, 151, 255, .18); }
.game-wrap canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 480; touch-action: none; cursor: pointer; }
.game-help { max-width: 560px; margin: 26px auto 0; padding-bottom: 20px; font-size: 14px; color: var(--ink-3); text-align: center; }
.game-help b { color: #f5f5f7; font-weight: 600; }

/* ---------- Scroll-in animation ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(.2, .8, .2, 1), transform 1s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Small screens ---------- */
@media (max-width: 834px) {
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 480px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .merch-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 734px) {
  .gnav-toggle { display: block; margin-left: 14px; }
  .flood-btn { margin-left: auto; }
  .gnav.open { background: #fbfbfd; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gnav ul { display: none; position: fixed; top: 48px; left: 0; right: 0; bottom: 0; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; padding: 12px 34px 30px;
    background: #fbfbfd; overflow-y: auto; }
  .gnav.open ul { display: flex; }
  .gnav ul a { display: block; padding: 10px 0; font-size: 21px; font-weight: 600; opacity: 1; }
  .gnav .gnav-donate { display: inline-block; margin-top: 8px; padding: 8px 18px; font-size: 17px; }
  .section { padding: 64px 0; }
  .collection { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tiles { padding: 0; gap: 10px; }
  #vbook-form { flex-direction: column; }
  .gfoot-cols { gap: 30px; }
}
@media (max-width: 480px) {
  .logo-full { display: none; }
  .logo-short { display: inline; }
  .merch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .gnav-in { padding: 0 14px; gap: 10px; }
  .flood-btn { padding: 5px 10px; font-size: 12px; }
  .gnav-toggle { margin-left: 10px; }
}
