@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed_700Bold.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(fonts/BarlowCondensed_800ExtraBold.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url(fonts/Poppins_500Medium.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(fonts/Poppins_600SemiBold.woff2) format('woff2'); }

:root {
  --yellow: #F8CD13;   /* the app's band */
  --ink: #1D1B18;
  --muted: #5C584F;
  --cell: #FFFFFF;
  --clue: #ECE8E1;
  --clue-ink: #4A4741;
  --me: #FFF1A8; --me-cur: #FFD43B;            /* your letters and cursor */
  --partner: #F9DCD6; --partner-cur: #F2A99B;  /* your partner's */
  --night: #1F2442; --night-ink: #F2EEE3;      /* the Mahalle film's night */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Poppins', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 500 16px/1.55 var(--text); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: .92; letter-spacing: -.005em; margin: 0; }
h1 { font-size: clamp(54px, 8.4vw, 124px); }
h2 { font-size: clamp(40px, 5.6vw, 76px); }
h3 { font-size: clamp(32px, 3.6vw, 48px); }
p { margin: 0; }

/* ---------------------------------------------------------------- bar and hero */
.bar { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
       padding: 20px var(--gutter); z-index: 3; }
.brand img { width: clamp(132px, 14vw, 168px); height: auto; }

.hero { background: var(--yellow); display: grid; gap: clamp(32px, 5vw, 72px); align-items: center;
        grid-template-columns: minmax(0, 1fr); padding: 104px var(--gutter) clamp(48px, 7vw, 96px); }
@media (min-width: 980px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100svh; } }
.hero-copy { max-width: 620px; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; margin-top: 24px; max-width: 34em; }
.today { margin-top: 14px; color: #574300; font-weight: 600; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-top: 32px; }
.play-now { display: inline-flex; align-items: center; background: var(--ink); color: #fff; text-decoration: none;
            font: 700 22px/1 var(--display); padding: 16px 26px; border-radius: 12px;
            transition: transform .15s ease; }
.play-now:hover { transform: translateY(-2px); }
.play-now.small { font-size: 18px; padding: 11px 18px; border-radius: 10px; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 12px;
         border: 2px solid var(--ink); background: #fff; text-decoration: none; min-width: 178px; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 12px; line-height: 1.2; color: var(--muted); }
.store b { display: block; font: 700 21px/1.05 var(--display); }
.store[aria-disabled='true'] { background: transparent; border-style: dashed; }

/* the live grid: drawn like print, ink rules between the squares */
.live { margin: 0; position: relative; justify-self: center; width: 100%; max-width: 640px; }
.grid { --c: clamp(40px, 11.6vw, 82px); display: grid; grid-template-columns: repeat(7, var(--c)); gap: 3px;
        background: var(--ink); border: 4px solid var(--ink); width: max-content; margin: 0 auto;
        box-shadow: 0 30px 60px -28px rgba(60, 40, 0, .55); position: relative; }
@media (min-width: 980px) { .grid { --c: clamp(52px, 5.4vw, 82px); } }
.cell { width: var(--c); height: var(--c); background: var(--cell); display: grid; place-items: center;
        font: 600 calc(var(--c) * .54)/1 var(--text); transition: background-color .18s ease; }
.cell.clue { background: var(--clue); color: var(--clue-ink); font: 700 calc(var(--c) * .16)/1.12 var(--display);
             text-align: center; padding: 4px; position: relative; letter-spacing: .01em; }
.cell.clue::after { content: ''; position: absolute; right: 2px; top: calc(50% - 5px); border: 5px solid transparent;
                    border-left: 7px solid var(--ink); border-right: 0; }
.cell.me { background: var(--me); } .cell.me.cur { background: var(--me-cur); }
.cell.partner { background: var(--partner); } .cell.partner.cur { background: var(--partner-cur); }
.cell.pop { animation: pop .28s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.6); } to { transform: none; } }
.row-done { animation: flash .6s ease; }
@keyframes flash { 50% { filter: brightness(1.08) saturate(1.3); } }
.flag { position: absolute; left: 0; top: 0; font: 600 13px/1 var(--text); padding: 6px 9px; border-radius: 7px 7px 7px 0;
        color: var(--ink); white-space: nowrap; transition: transform .22s cubic-bezier(.3, 1.2, .5, 1); pointer-events: none;
        box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.flag.me { background: var(--me-cur); } .flag.partner { background: var(--partner-cur); }
.live figcaption { margin-top: 18px; text-align: center; font-size: 14px; color: #574300; }

/* ---------------------------------------------------------------- the stage */
.stage { padding: clamp(64px, 9vw, 128px) var(--gutter); max-width: 1240px; margin: 0 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 36px; }
.tab { font: 700 19px/1 var(--display); padding: 11px 16px; border-radius: 10px; border: 2px solid var(--ink);
       background: #fff; color: var(--ink); cursor: pointer; }
.tab[aria-selected='true'] { background: var(--yellow); }
.tab:hover { background: var(--me); }
.scene { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .scene { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.screen { aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #f6f3ec; border: 3px solid var(--ink);
          display: grid; place-items: center; }
.screen video { width: 100%; height: 100%; object-fit: contain; }
.scene.swap .screen, .scene.swap .scene-copy { animation: swap .5s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
.tiles { display: flex; gap: 4px; margin-bottom: 20px; }
.tiles span { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--ink);
              font: 600 24px/1 var(--text); border-radius: 4px; }
.tiles.me span { background: var(--me-cur); } .tiles.partner span { background: var(--partner-cur); }
.scene-copy p { font-size: 18px; margin: 14px 0 22px; max-width: 30em; }
.text-link { font: 700 21px/1 var(--display); text-decoration-thickness: 3px; text-underline-offset: 6px;
             text-decoration-color: var(--yellow); }
.more { margin-top: 48px; color: var(--muted); max-width: 44em; }

/* ---------------------------------------------------------------- album river */
.album { padding: clamp(56px, 8vw, 112px) 0; background: var(--me); overflow: hidden; }
.album-copy { padding: 0 var(--gutter); max-width: 900px; }
.album-copy p { margin-top: 16px; font-size: 18px; }
.river { margin-top: 44px; display: grid; gap: 18px;
         mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lane { display: flex; gap: 22px; width: max-content; animation: drift 70s linear infinite; }
.lane.back { animation-direction: reverse; animation-duration: 84s; }
.river:hover .lane { animation-play-state: paused; }
.lane img { height: clamp(120px, 14vw, 170px); width: auto; filter: drop-shadow(0 10px 12px rgba(80, 60, 0, .25));
            transition: transform .2s ease; }
.lane img:hover { transform: rotate(0deg) scale(1.08) !important; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- night */
.night { background: var(--night); color: var(--night-ink); display: grid; gap: clamp(32px, 5vw, 80px); align-items: center;
         padding: clamp(64px, 9vw, 120px) var(--gutter); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .night { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } }
.night-film { justify-self: center; width: min(100%, 380px); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden;
              box-shadow: 0 0 0 3px rgba(242, 238, 227, .18), 0 40px 80px -30px #000; }
.night-film video { width: 100%; height: 100%; object-fit: cover; }
.night-copy p { margin-top: 20px; font-size: 18px; max-width: 32em; color: #D9D4C6; }
.night .play-now { background: var(--yellow); color: var(--ink); }
.night .store { background: transparent; color: var(--night-ink); border-color: var(--night-ink); }
.night .store small { color: #B9B3A4; }
.night :focus-visible { outline-color: var(--yellow); }

.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
        padding: 28px var(--gutter); font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flag { display: none; }
}
