/* The home page: a living bento with one playable question at the top. */
:root { --paper: #F7F3EA; --ink: #161616; --red: #E2382B; --yellow: #F2B91F; --blue: #1F4FBF; --radius: 22px; --gap: 8px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 66px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Archivo, system-ui, sans-serif; font-weight: 600; line-height: 1.3; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.poster { font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .92; letter-spacing: -.005em; word-spacing: .08em; }

.y { background: var(--yellow); }
.r { background: var(--red); color: var(--paper); }
.bl { background: var(--blue); color: var(--paper); }
.i { background: var(--ink); color: var(--paper); }
.ol { box-shadow: inset 0 0 0 3px var(--ink); }

.owl { display: block; width: 100%; height: auto; overflow: visible; }
.owl .lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }

/* Top bar */
.top { position: fixed; z-index: 50; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px clamp(14px, 3vw, 28px); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-stretch: 66%; font-size: 24px; text-decoration: none; letter-spacing: .02em; }
.logo-owl { width: 34px; }
.top nav { display: none; margin-left: auto; gap: 22px; font-size: 15px; font-weight: 800; }
.top nav a { text-decoration: none; padding: 8px 0; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.soon { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.soon:hover { background: var(--blue); }

main { padding: 62px var(--gap) var(--gap); display: grid; gap: var(--gap); max-width: 1500px; margin: auto; }

/* Hero bento. Tiles wait for their entrance, but never longer than a moment if the script fails. */
.dealing #hero .tile { visibility: hidden; animation: show 0s 1.5s forwards; }
@keyframes show { to { visibility: visible; } }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { border-radius: var(--radius); position: relative; overflow: hidden; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 190px; will-change: transform; }
.label { font-weight: 800; font-size: 15px; position: relative; z-index: 2; }

.t-hero { grid-column: span 2; min-height: 310px; justify-content: flex-end; }
.t-hero h1 { font-size: clamp(66px, 19vw, 150px); line-height: .86; position: relative; z-index: 2; }
.t-hero p { font-size: clamp(17px, 1.5vw, 22px); font-weight: 700; max-width: 32ch; position: relative; z-index: 2; }
.hero-owl { position: absolute; right: -1%; top: -4%; width: clamp(112px, 26%, 200px); transform: rotate(9deg); }

/* The game */
.t-play { grid-column: span 2; min-height: 480px; background: var(--ink); color: var(--paper); justify-content: center; padding: 0; transition: background .5s cubic-bezier(.7, 0, .2, 1); }
.t-play.tone1 { background: var(--blue); }
.t-play.tone2 { background: var(--red); }
.card { padding: clamp(16px, 2vw, 26px); display: grid; gap: 8px; will-change: transform; }
.who { color: var(--yellow); font-weight: 800; font-size: 15px; }
.tone2 .who { color: var(--paper); }
.question { font-size: clamp(25px, 2.5vw, 36px); font-weight: 800; line-height: 1.12; margin-bottom: 8px; }
.opt { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; min-height: 52px; background: var(--paper); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-weight: 800; font-size: clamp(16px, 1.3vw, 18px); transition: transform .15s, background .25s, opacity .25s; }
.opt:hover:not(:disabled) { transform: translateX(4px); }
.opt:active:not(:disabled) { transform: scale(.97); }
.opt:disabled { opacity: .4; cursor: default; }
.opt.real { background: var(--yellow); opacity: 1; transform: scale(1.02); }
.opt.bad { background: var(--red); color: var(--paper); opacity: 1; }
.tone2 .opt.bad { background: var(--ink); }
.shape { flex: none; width: 18px; height: 18px; }
.shape.c { background: var(--red); border-radius: 50%; }
.shape.s { background: var(--blue); }
.shape.t { background: #C98F00; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape.h { background: var(--ink); height: 9px; border-radius: 18px 18px 0 0; }
.opt.bad .shape { background: var(--paper); }
.say { min-height: 2.6em; font-weight: 800; font-size: 16px; }
.result { padding: clamp(16px, 2vw, 26px); display: grid; gap: 8px; justify-items: start; }
.result b { font-weight: 900; font-stretch: 62%; font-size: clamp(110px, 12vw, 190px); line-height: .85; color: var(--yellow); }
.result h2 { font-size: clamp(38px, 4vw, 62px); }
.result p { font-size: clamp(17px, 1.4vw, 20px); font-weight: 700; max-width: 30ch; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; }
.go { background: var(--yellow); color: var(--ink); padding: 15px 22px; border-radius: 12px; font-weight: 900; font-stretch: 66%; font-size: 24px; letter-spacing: .02em; text-transform: uppercase; transition: transform .15s; }
.go:hover { transform: scale(1.04); }
.again { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 10px 2px; }

/* Living tiles */
.t-phone { grid-column: span 2; min-height: 560px; background: var(--paper); box-shadow: inset 0 0 0 3px var(--ink); align-items: center; justify-content: flex-start; }
.t-phone .label { align-self: flex-start; }
.phone { position: relative; width: min(68%, 300px); aspect-ratio: 9 / 19.5; margin-bottom: -120px; background: var(--ink); border-radius: 13% / 6%; padding: 2.4%; box-shadow: 0 30px 70px rgba(22, 22, 22, .28); }
.screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 11% / 5.2%; background: var(--paper); }
.slide { position: absolute; inset: 0; transition: transform .7s cubic-bezier(.7, 0, .2, 1); }
.slide.off { transform: translateX(100%); }
.slide.out { transform: translateX(-100%); }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.score b { font-weight: 900; font-stretch: 62%; font-size: clamp(84px, 8.5vw, 140px); line-height: .85; position: relative; z-index: 2; }
.disc { position: absolute; left: 12%; bottom: -40%; width: 130%; aspect-ratio: 1; border-radius: 50%; background: var(--red); }
.winner { font-weight: 900; font-stretch: 66%; font-size: clamp(28px, 2.6vw, 42px); text-transform: uppercase; line-height: 1; }
.podium { display: flex; align-items: flex-end; gap: 5px; height: 90px; }
.podium i { flex: 1; display: block; transform-origin: bottom; border-radius: 5px 5px 0 0; }
.podium .a { background: var(--yellow); height: 70%; }
.podium .c { background: var(--red); height: 100%; }
.podium .d { background: var(--paper); height: 45%; }
.t-feed, .t-link { grid-column: span 2; }
.feed { position: relative; height: 150px; overflow: hidden; }
.toast { position: absolute; inset: 0 0 auto; background: var(--paper); color: var(--ink); padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 15px; }
.t-link .label { color: var(--yellow); }
.url { font-weight: 900; font-stretch: 70%; font-size: clamp(25px, 2.4vw, 38px); line-height: 1; word-break: break-all; min-height: 1.1em; }
.url::after { content: ""; display: inline-block; width: .08em; height: .85em; background: currentColor; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.copied { font-weight: 800; opacity: 0; transition: opacity .25s; }

/* Sections below the bento */
.head { padding: clamp(50px, 9vh, 100px) 8px 14px; display: grid; gap: 8px; }
.head h2 { font-size: clamp(62px, 10.5vw, 150px); }
.head p { font-size: clamp(17px, 1.7vw, 22px); font-weight: 700; max-width: 44ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.step { border-radius: var(--radius); padding: 18px; min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.step .n { font-weight: 900; font-stretch: 62%; font-size: 44px; line-height: 1; }
.step h3 { font-size: clamp(56px, 6.4vw, 96px); }
.step p { font-size: 17px; font-weight: 700; max-width: 30ch; margin-top: 8px; }

.sets { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.set { border-radius: var(--radius); padding: 16px; min-height: 170px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; position: relative; overflow: hidden; }
.set h3 { font-size: clamp(38px, 5.2vw, 78px); }
.set small { font-size: 15px; font-weight: 800; }
.set ul { list-style: none; margin: 6px 0 0; padding: 0; display: none; font-weight: 700; font-size: 17px; }
.set li { padding: 6px 0; border-top: 2px solid currentColor; }
.set.open { grid-column: span 2; min-height: 360px; }
.set.open ul { display: block; }
.plus { position: absolute; right: 14px; top: 12px; font-size: 30px; font-weight: 900; line-height: 1; transition: transform .25s; }
.set:hover .plus { transform: scale(1.25); }
.set.open .plus { transform: rotate(45deg); }

.prices { display: grid; gap: var(--gap); }
.price { border-radius: var(--radius); padding: 18px; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.price b { font-weight: 900; font-stretch: 62%; font-size: clamp(66px, 8vw, 116px); line-height: .92; display: block; }
.price.i b { color: var(--yellow); }

.end { border-radius: var(--radius); margin-top: var(--gap); padding: clamp(22px, 3vw, 40px); background: var(--red); color: var(--paper); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.end h2 { font-size: clamp(50px, 8.5vw, 130px); }
.end h2 a { text-decoration: none; }
.end h2 a:hover { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .1em; }
.end nav { display: flex; flex-wrap: wrap; gap: 2px 20px; font-weight: 800; }
.end nav a { padding: 8px 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 16px; padding: 6px 8px 4px; }
.credit { padding: 4px 0; font-size: 14px; font-weight: 700; }
.langs { display: flex; flex-wrap: wrap; gap: 2px; margin-right: -8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.langs a { text-decoration: none; padding: 8px; border-radius: 999px; }
.langs a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.langs a[aria-current] { background: var(--ink); color: var(--paper); text-decoration: none; }

@media (max-width: 359px) {
  .soon { padding: 8px 10px; font-size: 12px; }
}
@media (min-width: 700px) {
  .t-hero { min-height: 400px; }
  .steps, .prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price { min-height: 300px; }
  .sets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set.open { grid-column: span 1; grid-row: span 2; }
  .head { grid-template-columns: 1.3fr 1fr; align-items: end; }
}
@media (min-width: 860px) {
  .top nav { display: flex; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); height: calc(100svh - 70px); min-height: 700px; }
  .tile { min-height: 0; }
  .t-hero { grid-column: 1 / 6; grid-row: 1 / 4; }
  .t-hero h1 { font-size: clamp(88px, 8.4vw, 150px); }
  .t-play { grid-column: 6 / 10; grid-row: 1 / 5; }
  .t-phone { grid-column: 10 / 13; grid-row: 1 / 5; }
  .t-phone .phone { width: 82%; margin-bottom: -30%; }
  .score { grid-column: 1 / 3; grid-row: 4 / 7; }
  .podt { grid-column: 3 / 6; grid-row: 4 / 7; }
  .t-feed { grid-column: 6 / 10; grid-row: 5 / 7; }
  .t-link { grid-column: 10 / 13; grid-row: 5 / 7; }
  .feed { height: 100%; min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Language menu: a globe in the top bar that opens the six languages. */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 42px; height: 42px; border: 2.5px solid var(--ink); border-radius: 999px; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary { background: var(--ink); color: var(--paper); }
.lang-list { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; display: grid; gap: 2px; min-width: 156px; padding: 6px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; }
.lang-list a { padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 800; text-decoration: none; }
.lang-list a:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.lang-list a[aria-current] { background: var(--ink); color: var(--paper); }
.top .logo { margin-right: auto; }
/* On a phone the bar holds the logo, the App Store button and the globe: keep them inside. */
@media (max-width: 430px) {
  .top { gap: 8px; }
  .top .soon { padding-inline: 12px; font-size: 13px; }
  .lang-menu summary { width: 38px; height: 38px; }
}
