/* RentAds.lk coming soon. Same tokens as css/app.css: Outfit, one blue accent, flat, 4px and 8px corners. */
:root{
  --ac:#2563EB;
  --ac-hover:#1D4ED8;
  --bg:#FFFFFF;
  --bg3:#F0F0ED;
  --bg4:#E9E9E5;
  --t1:#161616;
  --t2:#5A5852;
  --t3:#6F6C65;
  --r:4px;
  --rlg:8px;
  --fm:'Outfit',sans-serif;
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-l:env(safe-area-inset-left,0px);
  --safe-r:env(safe-area-inset-right,0px);
  color-scheme:light;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
  touch-action:pan-x pan-y;
  background:var(--bg);
}
body{
  font-family:var(--fm);
  font-size:15px;
  line-height:1.55;
  background:var(--bg);
  color:var(--t1);
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  overscroll-behavior:none;
  touch-action:pan-x pan-y;
  -webkit-font-smoothing:antialiased;
  padding:var(--safe-t) var(--safe-r) 0 var(--safe-l);
}

/* Centre block */
.stage{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:32px clamp(18px,5vw,40px) 24px;
}
h1{
  font-size:clamp(2.2rem,6.4vw,3.7rem);
  line-height:1.15;
  font-weight:700;
  letter-spacing:-.025em;
  max-width:16em;
  margin:0;
  animation:rise .6s ease .16s both;
}
.sub{
  margin:18px 0 0;
  font-size:clamp(.88rem,1.6vw,.98rem);
  line-height:1.55;
  color:var(--t2);
  max-width:34em;
  animation:rise .6s ease .24s both;
}
/* Headline: brand line, then "Launching soon" where "soon" pops into "sooon!!" and back */
h1 .brand{display:block;color:var(--ac)}
.soon-word{color:var(--ac);white-space:nowrap}
@property --p{syntax:'<number>';inherits:false;initial-value:0}
.pop{
  --p:0;
  display:inline-block;
  width:calc(var(--w) * var(--p));
  opacity:min(1, calc(var(--p) * 3));
  transform:scale(var(--p));
  transform-origin:50% 78%;
  white-space:nowrap;
  vertical-align:baseline;
  animation:bubble 4.6s infinite both;
}
.pop.o{--w:.6em;animation-delay:0s}
.pop.b1{--w:.3em;animation-delay:.12s}
.pop.b2{--w:.3em;animation-delay:.24s}
@keyframes bubble{
  0%,12%{--p:0;animation-timing-function:linear(0, 0.017, 0.061, 0.128, 0.21, 0.302, 0.399, 0.497, 0.593, 0.684, 0.768, 0.843, 0.91, 0.967, 1.014, 1.052, 1.082, 1.103, 1.117, 1.124, 1.126, 1.124, 1.118, 1.11, 1.099, 1.088, 1.075, 1.063, 1.051, 1.039, 1.029, 1.019, 1.011, 1.004, 0.998, 0.993, 0.99, 0.987, 0.985, 0.984, 1)}
  34%,66%{--p:1;animation-timing-function:cubic-bezier(.65,0,.35,1)}
  86%,100%{--p:0}
}

/* Category strip: same flat tiles as the homepage category row */
.marquee{
  overflow:hidden;
  padding:12px 0;
}
.track{
  display:flex;
  width:max-content;
  animation:scroll 120s linear infinite;
}
.track span{
  flex:none;
  display:inline-flex;
  align-items:center;
  height:44px;
  padding:0 16px;
  margin-right:10px;
  background:var(--bg3);
  border-radius:var(--r);
  font-size:.9rem;
  font-weight:600;
  letter-spacing:-.01em;
  white-space:nowrap;
  color:var(--t1);
}
@keyframes scroll{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}

.foot{
  text-align:center;
  font-size:.8rem;
  color:var(--t3);
  padding:6px 20px calc(18px + var(--safe-b));
}

@keyframes rise{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

/* Main button that opens the beta site */
.beta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  margin-top:26px;
  padding:0 1.8rem;
  border-radius:var(--rlg);
  background:var(--ac);
  color:#fff;
  font:500 .95rem var(--fm);
  text-decoration:none;
  transition:background-color .18s;
  animation:rise .6s ease .3s both;
}
.beta-btn:hover{background:var(--ac-hover)}
.beta-btn:focus-visible{outline:2px solid var(--ac);outline-offset:2px}
@media (max-width:640px){
  .beta-btn{width:100%;max-width:320px;margin-top:22px}
}

/* Small text link that opens the game */
.play-link{
  margin-top:18px;
  background:none;
  border:0;
  font:500 .85rem var(--fm);
  color:var(--t2);
  text-decoration:underline;
  text-underline-offset:3px;
  min-height:36px;
  padding:0 8px;
  cursor:pointer;
  transition:color .18s;
  animation:rise .6s ease .32s both;
}
.play-link:hover{color:var(--ac)}
.play-link:focus-visible,.pbtn:focus-visible,.gbtn:focus-visible,.game-x:focus-visible{outline:2px solid var(--ac);outline-offset:2px}

/* Game */
.game[hidden],.game-msg[hidden],.game-msg p[hidden]{display:none}
.game{
  position:fixed;
  inset:0;
  z-index:50;
  background:var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--safe-t) 16px var(--safe-b);
  overflow:hidden;
  animation:rise .3s ease both;
  user-select:none;
  -webkit-user-select:none;
}
.game-card{width:100%;max-width:560px;display:flex;flex-direction:column;align-items:center}
.game-top{
  width:100%;
  height:56px;
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
}
.game-title{text-align:center;font-weight:700;font-size:1.05rem;letter-spacing:-.015em}
.game-title span{color:var(--ac)}
.game-x{
  width:44px;height:44px;
  display:grid;
  place-items:center;
  background:none;
  border:0;
  color:var(--t1);
  cursor:pointer;
}
.gi{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.g-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin-bottom:12px}
.g-stat{background:var(--bg3);border-radius:var(--rlg);padding:8px 12px;text-align:center}
.g-stat span{display:block;font-size:.74rem;font-weight:500;color:var(--t2)}
.g-stat b{display:block;font-size:1.25rem;font-weight:700;letter-spacing:-.02em;line-height:1.2}
.board-wrap{position:relative;border:1px solid var(--bg4);border-radius:var(--r);overflow:hidden;line-height:0;touch-action:none}
.board-wrap canvas{display:block}
.game-msg{
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.95);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:16px;
  text-align:center;
  line-height:1.4;
}
.game-msg strong{font-size:1.6rem;font-weight:700;letter-spacing:-.02em}
.game-msg p{margin:0;color:var(--t2);font-size:.95rem;max-width:24em}
.game-msg p.joke{color:var(--t1);font-weight:500;margin-top:4px}
.gbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 1.4rem;
  margin-top:12px;
  border:0;
  border-radius:var(--rlg);
  background:var(--ac);
  color:#fff;
  font:500 .9rem var(--fm);
  cursor:pointer;
  transition:background-color .18s;
}
.gbtn:hover{background:var(--ac-hover)}
.pad{
  display:grid;
  grid-template-columns:repeat(3,64px);
  grid-auto-rows:54px;
  gap:8px;
  justify-content:center;
  margin-top:14px;
}
.pbtn{
  display:grid;
  place-items:center;
  background:var(--bg4);
  color:var(--t1);
  border:0;
  border-radius:var(--rlg);
  cursor:pointer;
  touch-action:none;
  transition:background-color .12s;
}
.pbtn:active{background:#DEDED9}
.pbtn.up{grid-column:2;grid-row:1}
.pbtn.left{grid-column:1;grid-row:2}
.pbtn.down{grid-column:2;grid-row:2}
.pbtn.right{grid-column:3;grid-row:2}
.game-help{margin:12px 0 0;font-size:.82rem;color:var(--t3);text-align:center}
@media (pointer:fine){.pad{display:none}}
@media (pointer:coarse){.game-help{display:none}}

/* Phones */
@media (max-width:640px){
  .stage{padding:24px 18px 16px}
  h1{font-size:2.15rem}
  .sub{margin-top:14px;font-size:.9rem;line-height:1.5}
  .track span{height:40px;padding:0 14px;font-size:.86rem}
}
@media (max-width:359px){
  h1{font-size:1.85rem}
}
@media (max-height:520px){
  .stage{padding:16px 18px 8px}
}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .track{flex-wrap:wrap;width:auto;justify-content:center;gap:8px;padding:0 18px}
  .track span{margin:0}
}
