/* www.kanekarcade.com
 *
 * Two layouts, designed separately:
 *   PHONE (default)     stacked arcade cards, swipeable game shelves, a sign-in bottom sheet and a
 *                       thumb-reach "Sign in to play" dock. Touch targets are 48px or more and inputs 16px+ (no iOS zoom).
 *   COMPUTER (>= 900px) a full-screen split: stadium on the left, casino hall on the right. Pointing at a
 *                       side widens it and speeds its game reel; sign-in is a centered dialog; shelves become grids.
 * Hover effects only apply on devices that can hover.
 */

@font-face { font-family: 'Bungee'; src: url('/fonts/bungee.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Press Start 2P'; src: url('/fonts/press-start-2p.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #050816;
  --navy: #0b184c;
  --navy-2: #13246a;
  --gold: #ffd21f;
  --gold-deep: #f59e0b;
  --white: #ffffff;
  --muted: #b8c2e8;
  --sports: #2f7bff;
  --sports-glow: #4ade80;
  --casino: #e2263a;
  --casino-glow: #ffd21f;
  --shout: 'Bungee', 'Arial Black', system-ui, sans-serif;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- shared pieces */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  font: 13px/1 var(--pixel); letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
  transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn--ghost { background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .55); }
.btn--gold {
  background: linear-gradient(#ffe46b, var(--gold) 45%, var(--gold-deep));
  color: var(--ink); box-shadow: 0 4px 0 #b45309, 0 0 0 2px var(--ink);
}
.btn--big { min-height: 54px; width: 100%; font-size: 15px; }
.h2 { font: 26px/1.1 var(--shout); margin: 0 0 18px; color: var(--gold); text-shadow: 3px 3px 0 var(--navy); }

/* ================================================================ PHONE (default) */

/* header */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; background: rgba(5, 8, 22, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 210, 31, .25);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__logo { height: 18px; width: auto; }
.brand__word { font: 15px/1 var(--shout); color: var(--gold); letter-spacing: .04em; }
.top__nav { display: none; }
.top__account .btn { min-height: 40px; padding: 0 14px; font-size: 11px; }
.me { display: flex; align-items: center; gap: 8px; }
.me__label { display: none; }
.me__name { font: 11px/1 var(--pixel); color: var(--gold); max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__out { min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* intro */
.intro { padding: 26px 18px 18px; text-align: left; }
.intro__kicker { margin: 0 0 10px; font: 9px/1.6 var(--pixel); color: var(--gold); letter-spacing: .06em; }
.intro__title { margin: 0; font: 36px/1.02 var(--shout); text-shadow: 3px 3px 0 var(--navy-2), 6px 6px 0 rgba(0, 0, 0, .4); }
.intro__sub { margin: 12px 0 0; color: var(--muted); font-size: 15px; max-width: 34em; }

/* arcade cards */
.doors { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 18px; }
.door {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(56svh, 520px); border-radius: 20px; overflow: hidden; isolation: isolate;
  text-decoration: none; border: 3px solid rgba(255, 255, 255, .14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.door__art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.door--sports .door__art { background-image: url('/assets/sports/stadium.webp'); background-position: center 30%; }
.door--casino .door__art { background-image: url('/assets/casino/lobby-tall.webp'); background-position: center 40%; }
.door__shade { position: absolute; inset: 0; z-index: -1; }
.door--sports .door__shade { background: linear-gradient(180deg, rgba(5, 8, 22, .1) 20%, rgba(8, 30, 90, .78) 62%, rgba(5, 8, 22, .97)); }
.door--casino .door__shade { background: linear-gradient(180deg, rgba(5, 8, 22, .1) 20%, rgba(70, 8, 20, .78) 62%, rgba(5, 8, 22, .97)); }
.door--sports { border-color: rgba(74, 222, 128, .45); }
.door--casino { border-color: rgba(255, 210, 31, .5); }
.door__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 18px; }
.door__eyebrow { font: 10px/1 var(--pixel); letter-spacing: .3em; color: var(--muted); }
.door__title { font: 40px/.95 var(--shout); color: var(--white); text-shadow: 3px 3px 0 var(--ink); }
.door--sports .door__title { color: #e9ffe8; text-shadow: 3px 3px 0 #0a3d8f, 5px 5px 0 var(--ink); }
.door--casino .door__title { color: #fff6cf; text-shadow: 3px 3px 0 #8f0a1c, 5px 5px 0 var(--ink); }
.door__desc { font-size: 14px; color: #dfe6ff; max-width: 30em; }
.door__stat { font: 10px/1.6 var(--pixel); color: var(--gold); }
.door__cta {
  margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 54px; border-radius: 12px;
  font: 14px/1 var(--pixel); text-transform: uppercase; color: var(--ink);
  background: linear-gradient(#ffe46b, var(--gold) 45%, var(--gold-deep)); box-shadow: 0 4px 0 #b45309;
}
.door--sports .door__cta { background: linear-gradient(#a7f3c4, var(--sports-glow) 45%, #16a34a); box-shadow: 0 4px 0 #166534; }

/* game reel (top strip of each card) */
.reel { position: absolute; top: 0; left: 0; right: 0; height: 74px; overflow: hidden; z-index: 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.reel__track { display: flex; gap: 8px; width: max-content; padding: 10px 0; animation: reel 38s linear infinite; }
.reel--rev .reel__track { animation-direction: reverse; }
.reel img { width: 132px; height: 54px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .5); }
@keyframes reel { to { transform: translateX(-50%); } }

/* seam badge between the cards */
.seam { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -4px 0; font: 9px/1 var(--pixel); color: var(--gold); letter-spacing: .08em; }
.seam i { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px var(--gold); }

/* how it works */
.how { padding: 34px 18px 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { position: relative; padding: 18px 18px 18px 66px; border-radius: 16px; background: linear-gradient(160deg, var(--navy-2), var(--navy)); border: 2px solid rgba(255, 255, 255, .08); }
.step__n { position: absolute; left: 16px; top: 18px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--gold); color: var(--ink); font: 14px/1 var(--pixel); }
.step h3 { margin: 0 0 4px; font: 16px/1.2 var(--shout); color: var(--white); }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* game shelves: swipe on phones */
.games { padding: 34px 0 10px; }
.games .h2 { padding: 0 18px; }
.shelf { margin-bottom: 22px; }
.shelf__name { margin: 0 18px 10px; font: 11px/1.4 var(--pixel); text-transform: uppercase; }
.shelf__name span { color: var(--muted); margin-left: 8px; }
.shelf__name--sports { color: var(--sports-glow); }
.shelf__name--casino { color: var(--gold); }
.shelf__row {
  list-style: none; margin: 0; padding: 0 18px 6px; display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 18px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shelf__row::-webkit-scrollbar { display: none; }
.shelf__row li { flex: 0 0 62%; scroll-snap-align: start; }
.shelf__row img { width: 100%; aspect-ratio: 480 / 198; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .12); }
.shelf__row span { display: block; margin-top: 6px; font-size: 13px; color: #dfe6ff; }

/* footer */
.foot { padding: 26px 18px calc(110px + var(--safe-b)); text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .08); }
.foot__fine { margin: 0 auto 10px; max-width: 40em; }
.foot__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; }
.foot__links a { color: var(--white); min-height: 44px; display: inline-flex; align-items: center; }
.foot__copy { margin: 0; }

/* thumb-reach dock (signed out only) */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, rgba(5, 8, 22, 0), rgba(5, 8, 22, .92) 30%);
}
body.is-in .dock { display: none; }

/* sign in: bottom sheet */
.signin { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.signin__scrim { position: absolute; inset: 0; background: rgba(2, 4, 14, .72); animation: fade .2s ease-out; }
.signin__panel {
  position: relative; width: 100%; max-height: 92svh; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 18px calc(18px + var(--safe-b)); border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, var(--navy-2), var(--navy) 40%, #081236); border-top: 3px solid var(--gold);
  animation: sheet-up .28s cubic-bezier(.2, .9, .2, 1);
}
.signin__grab { display: block; width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.signin__x { position: absolute; right: 8px; top: 6px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; color: var(--muted); cursor: pointer; }
.signin__title { margin: 0 0 6px; font: 22px/1.1 var(--shout); color: var(--gold); }
.signin__to { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.field { display: block; margin: 12px 0; }
.field span { display: block; margin-bottom: 6px; font: 10px/1 var(--pixel); color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.field input {
  width: 100%; height: 52px; padding: 0 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .35);
  background: #fff; color: var(--ink); font: 17px/1 var(--body);
}
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(255, 210, 31, .35); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: 13px; color: #dfe6ff; line-height: 1.45; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--gold); }
.check a { color: var(--gold); }
.signin__err { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: rgba(226, 38, 58, .18); border: 1px solid rgba(226, 38, 58, .6); color: #ffd4d9; font-size: 14px; }
.signin__panel .btn--big { margin-top: 8px; }
.signin__note { margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60;
  max-width: calc(100vw - 28px); padding: 12px 16px; border-radius: 12px; background: var(--gold); color: var(--ink);
  font: 11px/1.5 var(--pixel); text-align: center; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}
body.is-in .toast { bottom: calc(20px + var(--safe-b)); }

.m-only { display: inline; }

/* ================================================================ COMPUTER (>= 900px) */
@media (min-width: 900px) {
  :root { --top-h: 76px; }
  .m-only { display: none; }

  .top {
    position: fixed; left: 0; right: 0; padding: 0 36px; height: var(--top-h);
    background: linear-gradient(180deg, rgba(5, 8, 22, .85), rgba(5, 8, 22, 0)); border: 0; backdrop-filter: none;
  }
  .brand__logo { height: 26px; }
  .brand__word { font-size: 22px; }
  .top__nav { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; }
  .top__nav a { font: 11px/1 var(--pixel); text-decoration: none; color: #e6ebff; padding: 10px 0; border-bottom: 2px solid transparent; }
  .top__nav a:hover { border-color: var(--gold); color: var(--gold); }
  .top__account .btn { min-height: 44px; font-size: 12px; }
  .me { gap: 12px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(5, 8, 22, .6); border: 2px solid rgba(255, 210, 31, .5); }
  .me__label { display: inline; font-size: 12px; color: var(--muted); }
  .me__name { font-size: 12px; max-width: 220px; }

  /* the split */
  main { position: relative; }
  .intro {
    position: absolute; z-index: 5; top: calc(var(--top-h) + 6px); left: 50%; transform: translateX(-50%);
    width: min(760px, 66vw); padding: 18px 40px 26px; text-align: center; pointer-events: none;
  }
  .intro::before {
    content: ''; position: absolute; inset: -30px -60px -40px; z-index: -1;
    background: radial-gradient(closest-side, rgba(5, 8, 22, .88), rgba(5, 8, 22, .55) 60%, rgba(5, 8, 22, 0));
  }
  .intro__kicker { font-size: 10px; }
  .intro__title { font-size: clamp(34px, 3.6vw, 52px); }
  .intro__sub { margin: 12px auto 0; font-size: 16px; color: #e6ebff; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }

  .doors { position: relative; flex-direction: row; gap: 0; padding: 0; height: 100vh; min-height: 680px; max-height: 1100px; }
  .door { flex: 1 1 0; min-height: 0; border-radius: 0; border: 0; box-shadow: none; transition: flex-grow .6s cubic-bezier(.2, .8, .2, 1); }
  .door__body { padding: 0 clamp(32px, 4vw, 64px) 150px; max-width: 640px; gap: 12px; }
  .door--casino .door__body { margin-left: auto; text-align: right; align-items: flex-end; }
  .door__eyebrow { font-size: 11px; }
  .door__title { font-size: clamp(54px, 5.6vw, 92px); }
  .door__desc { font-size: 17px; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
  .door__stat { font-size: 11px; }
  .door__cta { align-self: flex-start; padding: 0 28px; min-height: 58px; font-size: 15px; transition: transform .2s, filter .2s; }
  .door--casino .door__cta { align-self: flex-end; }
  .door--sports .door__shade { background: linear-gradient(90deg, rgba(5, 8, 22, .25), rgba(5, 8, 22, 0) 60%), linear-gradient(180deg, rgba(5, 8, 22, .55) 0%, rgba(5, 8, 22, 0) 24%, rgba(8, 30, 90, .55) 55%, rgba(5, 8, 22, .96)); }
  .door--casino .door__shade { background: linear-gradient(270deg, rgba(5, 8, 22, .25), rgba(5, 8, 22, 0) 60%), linear-gradient(180deg, rgba(5, 8, 22, .55) 0%, rgba(5, 8, 22, 0) 24%, rgba(70, 8, 20, .55) 55%, rgba(5, 8, 22, .96)); }
  .door--casino .door__art { background-image: url('/assets/casino/lobby-tall.webp'); }

  .reel { top: auto; bottom: 22px; height: 104px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .reel__track { gap: 12px; padding: 0; animation-duration: 60s; }
  .reel img { width: 218px; height: 90px; border-width: 3px; border-radius: 10px; }

  .seam {
    position: absolute; z-index: 6; left: 50%; top: 0; bottom: 0; width: 0; margin: 0;
    flex-direction: column; justify-content: center; gap: 14px; pointer-events: none;
    transition: left .6s cubic-bezier(.2, .8, .2, 1);
  }
  .seam::before { content: ''; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; background: linear-gradient(180deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); box-shadow: 0 0 24px var(--gold); opacity: .8; }
  .seam span { position: relative; padding: 8px 12px; background: var(--ink); border: 2px solid var(--gold); border-radius: 8px; white-space: nowrap; font-size: 10px; }
  .seam i { position: relative; width: 14px; height: 14px; }

  @media (hover: hover) {
    .doors:has(.door--sports:hover) .door--sports,
    .doors:has(.door--casino:hover) .door--casino { flex-grow: 1.45; }
    .doors:has(.door--sports:hover) .seam { left: 59.2%; }
    .doors:has(.door--casino:hover) .seam { left: 40.8%; }
    .door:hover .door__art { transform: scale(1.06); }
    .door:hover .door__cta { transform: translateY(-2px); filter: brightness(1.08); }
    .door:hover .reel__track { animation-duration: 26s; }
    .door:not(:hover) .door__desc { opacity: .85; }
  }

  .how, .games { max-width: 1180px; margin: 0 auto; }
  .how { padding: 80px 36px 20px; }
  .h2 { font-size: 34px; margin-bottom: 26px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .step { padding: 26px 26px 26px 26px; }
  .step__n { position: static; margin-bottom: 14px; width: 42px; height: 42px; }
  .step h3 { font-size: 19px; }
  .step p { font-size: 15px; }

  .games { padding: 60px 36px 30px; }
  .games .h2, .shelf__name { padding: 0; margin-left: 0; margin-right: 0; }
  .shelf { margin-bottom: 36px; }
  .shelf__row { display: grid; gap: 14px; padding: 0; overflow: visible; }
  .shelf:nth-of-type(1) .shelf__row { grid-template-columns: repeat(5, 1fr); }
  .shelf:nth-of-type(2) .shelf__row { grid-template-columns: repeat(4, 1fr); }
  .shelf__row img { transition: transform .2s, border-color .2s; }
  .shelf__row li:hover img { transform: translateY(-3px); border-color: var(--gold); }

  .foot { padding: 40px 36px 48px; }
  .dock { display: none; }

  /* sign in: centered dialog */
  .signin { align-items: center; justify-content: center; }
  .signin__panel { width: 460px; max-height: 90vh; border-radius: 20px; border: 3px solid var(--gold); padding: 28px 30px 26px; animation: pop .22s cubic-bezier(.2, .9, .2, 1); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
  .signin__grab { display: none; }
  .signin__title { font-size: 26px; }
  .toast, body.is-in .toast { bottom: 28px; }
  @keyframes pop { from { transform: scale(.94); opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel__track, .signin__panel, .signin__scrim { animation: none; }
  .door, .door__art, .seam { transition: none; }
}

/* ---------------------------------------------------------------- legal pages */
.legal-page .top--plain { position: sticky; }
.legal { max-width: 760px; margin: 0 auto; padding: 28px 20px 40px; color: #dfe6ff; font-size: 16px; line-height: 1.65; }
.legal h1 { margin: 0 0 6px; font: 30px/1.1 var(--shout); color: var(--gold); }
.legal h2 { margin: 28px 0 8px; font: 13px/1.4 var(--pixel); color: var(--white); text-transform: uppercase; }
.legal a { color: var(--gold); }
.legal__date { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.foot--plain { padding-bottom: calc(30px + var(--safe-b)); }
@media (min-width: 900px) {
  .legal-page .top--plain { position: sticky; background: rgba(5, 8, 22, .92); border-bottom: 1px solid rgba(255, 210, 31, .25); }
  .legal { padding: 56px 36px 60px; font-size: 17px; }
  .legal h1 { font-size: 40px; }
}
