/* Duo Clash — duoclash.app
   The app's own look: its near-black, the red and blue of X and O, the yellow of its buttons, and
   SF Rounded (Nunito where there's no SF). Real screens from the app, not drawings of them. Dense
   enough to take in at a glance. */

:root {
  --ink: #0d0e12;
  --ink-2: #16181d;
  --ink-3: #1f2229;
  --line: #272a31;
  --paper: #f3f3f5;
  --dim: #a2a4ac;
  --mute: #6f727b;
  --red: #ff4a3d;
  --blue: #3d7bff;
  --yellow: #ffc83d;
  --green: #34c759;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--round); font-weight: 900; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(28px, 3.1vw, 40px); line-height: 1.08; }
h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }

/* A section's title: an icon in the app's colours, the title, a line of what it's about */
.title { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico.y { background: var(--yellow); color: var(--ink); }
.ico.r { background: var(--red); color: #fff; }
.ico.b { background: var(--blue); color: #fff; }
.ico.g { background: var(--green); color: #fff; }
.sub { color: var(--dim); font-size: 17px; max-width: 60ch; margin: 0 0 26px 58px; }

/* Buttons */
.store { display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 18px 0 15px; border-radius: 11px; background: #000; color: #fff; text-decoration: none; border: 1.5px solid #8e8e93; transition: transform .2s var(--ease), border-color .2s; }
.store:hover { transform: translateY(-2px); border-color: #fff; }
.store svg { width: 22px; height: 22px; fill: #fff; }
.store span { display: grid; line-height: 1.05; }
.store small { font: 500 10px/1.2 var(--body); }
.store b { font: 600 19px/1.1 var(--body); letter-spacing: -.01em; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 11px; font: 800 15px/1 var(--round); text-decoration: none; background: var(--ink-3); border: 1px solid var(--line); transition: background .2s; white-space: nowrap; }
.btn:hover { background: var(--line); }
.btn.y { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn.y:hover { background: #ffd666; }

/* Header */
.top {
  --s: 0;
  position: sticky; top: 0; z-index: 20;
  background: rgba(13,14,18, calc(.15 + .55 * var(--s)));
  backdrop-filter: blur(calc(4px + 20px * var(--s))) saturate(calc(1 + .8 * var(--s)));
  -webkit-backdrop-filter: blur(calc(4px + 20px * var(--s))) saturate(calc(1 + .8 * var(--s)));
  border-bottom: 1px solid rgba(255,255,255, calc(.09 * var(--s)));
  box-shadow: 0 10px 30px rgba(0,0,0, calc(.35 * var(--s)));
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: calc(66px - 10px * var(--s)); gap: 16px; }
.brand img { transition: transform .4s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 900 20px/1 var(--round); letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; }
.top nav a:not(.btn) { text-decoration: none; color: var(--dim); }
.top nav a:not(.btn):hover { color: var(--paper); }
.top nav .btn { height: 36px; }

/* Hero: three real screens fanned out */
.hero { padding: 40px 0 34px; overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 800 14px/1 var(--round); color: var(--dim); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero h1 { font-size: clamp(40px, 5vw, 66px); line-height: 1.02; margin: 14px 0 16px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero .lead { font-size: 18px; color: var(--dim); max-width: 44ch; margin-bottom: 22px; }
.hero .cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chips span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--dim); background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.chips b { color: var(--paper); font-weight: 700; }

.fan { position: relative; height: 520px; perspective: 1400px; }
.fan .tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); }
.fan .phone { transform: translate3d(0, var(--p, 0px), 0); will-change: transform; }
.phone { position: absolute; width: 230px; border-radius: 34px; padding: 7px; background: #000; box-shadow: 0 0 0 1.5px #34363d, 0 24px 60px rgba(0,0,0,.5); }
.phone img { border-radius: 28px; width: 100%; }
.fan .phone:nth-child(1) { left: 0; top: 60px; rotate: -8deg; }
.fan .phone:nth-child(2) { left: 50%; top: 0; margin-left: -125px; z-index: 2; width: 250px; }
.fan .phone:nth-child(3) { right: 0; top: 60px; rotate: 8deg; }
.fan .tag { position: absolute; z-index: 3; font: 800 13px/1 var(--round); padding: 8px 11px; border-radius: 10px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.fan .tag.t1 { left: 2%; top: 26px; background: var(--red); color: #fff; }
.fan .tag.t2 { right: 0; top: 28px; background: var(--blue); color: #fff; }
.fan .tag.t3 { left: 50%; bottom: 0; translate: -50% 0; background: var(--yellow); color: var(--ink); }

section { padding: 60px 0; }
section + section { border-top: 1px solid var(--line); }

/* How it works: three real screens */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps article { display: grid; grid-template-columns: 128px 1fr; gap: 16px; align-items: center; background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.shot { border-radius: 18px; padding: 4px; background: #000; box-shadow: 0 0 0 1px #34363d; }
.shot img { border-radius: 15px; width: 100%; }
.steps .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 900 14px/1 var(--round); margin-bottom: 10px; }
.steps article:nth-child(1) .n { background: var(--yellow); color: var(--ink); }
.steps article:nth-child(2) .n { background: var(--red); color: #fff; }
.steps article:nth-child(3) .n { background: var(--blue); color: #fff; }
.steps p { color: var(--dim); font-size: 15px; margin-top: 4px; }

/* Games */
.games-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-bottom: 16px; }
.games-top .sub { max-width: 52ch; }
.ask { display: flex; align-items: center; gap: 14px; background: var(--ink-2); border: 1px dashed #3a3d46; border-radius: 16px; padding: 12px 12px 12px 16px; }
.ask p { font-size: 14px; color: var(--dim); max-width: 32ch; }
.ask p b { color: var(--paper); display: block; font: 800 15px/1.3 var(--round); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button { background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; font: 800 14px/1 var(--round); color: var(--dim); transition: .2s; }
.filters button:hover { color: var(--paper); }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.filters button sup { font-size: 10px; margin-left: 3px; opacity: .65; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; cursor: pointer; border: 0; padding: 0; background: var(--ink-3); text-align: left; transition: transform .3s var(--ease); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster:hover { transform: translateY(-3px); }
.poster:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.poster .cap { position: absolute; inset: auto 0 0; padding: 26px 9px 9px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.poster .cap b { display: block; font: 900 15px/1.05 var(--round); letter-spacing: -.01em; }
.poster .cap small { font-size: 11px; color: rgba(255,255,255,.75); font-weight: 600; }
.poster.hide { display: none; }
.poster.soon { border: 1.5px dashed #3a3d46; background: var(--ink-2); display: grid; place-items: center; text-align: center; padding: 12px; text-decoration: none; }
.poster.soon b { font: 900 15px/1.15 var(--round); display: block; }
.poster.soon small { display: block; font-size: 12px; color: var(--dim); margin-top: 6px; }
.poster.soon .plus { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; margin: 0 auto 10px; font: 900 20px/1 var(--round); color: var(--yellow); }

dialog.game { width: min(760px, 100% - 28px); max-height: min(560px, 100% - 28px); padding: 0; border: 0; border-radius: 22px; background: var(--ink-2); color: var(--paper); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
dialog.game[open] { animation: rise .35s var(--ease); }
dialog.game::backdrop { background: rgba(5,6,8,.75); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
dialog.game .inner { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 340px; }
dialog.game .art img { width: 100%; height: 100%; object-fit: cover; }
dialog.game .text { padding: 26px 26px 22px; display: flex; flex-direction: column; overflow: auto; }
dialog.game .kind { font: 800 13px/1 var(--round); color: var(--yellow); }
dialog.game h3 { font-size: 34px; margin: 8px 0 12px; }
dialog.game p { color: #d0d1d6; font-size: 16px; margin-bottom: 18px; }
dialog.game .facts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
dialog.game .facts span { background: var(--ink-3); border-radius: 8px; padding: 5px 10px; font-size: 13px; color: var(--dim); }
dialog.game .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ink-3); font-size: 16px; }
dialog.game .nav { display: flex; gap: 6px; margin-top: 16px; }
dialog.game .nav button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; color: var(--dim); font-size: 13px; }

/* Real screens, side by side */
.strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 14px; margin: 0 -20px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; width: 190px; margin: 0; scroll-snap-align: start; }
.strip .shot { border-radius: 26px; padding: 5px; }
.strip .shot img { border-radius: 21px; }
.strip figcaption { font: 800 14px/1.3 var(--round); margin-top: 10px; }
.strip figcaption span { display: block; font: 400 13px/1.4 var(--body); color: var(--dim); }

/* Two panels of short facts, each with a real screen */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 20px; align-items: center; }
.panel .title { margin-bottom: 4px; }
.panel h2 { font-size: 24px; }
.panel > div > p { color: var(--dim); font-size: 15px; margin-top: 8px; }
.panel ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.panel li { display: flex; gap: 10px; font-size: 15px; color: #d0d1d6; }
.panel li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Questions */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.faq details { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 28px 15px 0; position: relative; font: 800 16px/1.3 var(--round); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 700 22px/1 var(--round); color: var(--yellow); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 0 16px; color: var(--dim); font-size: 15px; }

/* Last call */
.last { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--ink-2); border: 1px solid var(--line); border-radius: 24px; padding: 20px 22px; }
.last .who { display: flex; align-items: center; gap: 16px; }
.last img.icon { width: 60px; height: 60px; border-radius: 14px; }
.last h2 { font-size: 24px; }
.last p { color: var(--dim); font-size: 15px; }

footer { padding: 30px 0 40px; color: var(--mute); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--paper); }

/* Motion: a calm entrance, and things settling in as they come into view */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.reveal.seen { opacity: 1; translate: 0 0; }
.intro .fan .phone { opacity: 0; animation: deal .8s var(--ease) forwards; }
.intro .fan .phone:nth-child(1) { animation-delay: .15s; }
.intro .fan .phone:nth-child(3) { animation-delay: .3s; }
.intro .fan .tag { opacity: 0; animation: in .5s var(--ease) .9s forwards; }
@keyframes deal { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
.intro .fan .tag.t3 { animation-name: in3; }
@keyframes in { to { opacity: 1; } }
@keyframes in3 { to { opacity: 1; } }

/* Legal pages */
.doc { width: min(720px, 100% - 40px); margin: 0 auto; padding: 44px 0 70px; }
.doc h1 { font-size: clamp(36px, 6vw, 52px); margin: 6px 0 6px; }
.doc .when { color: var(--mute); font-size: 14px; margin: 0 0 30px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc p { margin: 0 0 12px; color: #d2d3d8; }
.doc ul { margin: 0 0 12px; padding-left: 22px; color: #d2d3d8; }
.doc li { margin-bottom: 7px; }
.doc a { color: var(--yellow); }
.doc strong { color: var(--paper); font-weight: 650; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.doc .note { color: var(--mute); font-size: 14px; }
.doc .mail { display: inline-block; margin: 10px 0 16px; padding: 12px 18px; border-radius: 10px; background: var(--yellow); color: var(--ink); text-decoration: none; font-weight: 700; }

@media (max-width: 980px) {
  .games-top { grid-template-columns: 1fr; }
  .hero .wrap { grid-template-columns: 1fr; }
  .fan { height: 460px; max-width: 560px; width: 100%; margin-inline: auto; }
  .steps, .duo { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .top nav a:not(.btn) { display: none; }
  .fan { height: 360px; }
  .phone { width: 160px; border-radius: 26px; padding: 5px; }
  .phone img { border-radius: 21px; }
  .fan .phone:nth-child(2) { width: 180px; margin-left: -90px; }
  .sub { margin-left: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .poster .cap b { font-size: 13px; }
  .steps article { grid-template-columns: 100px 1fr; }
  .panel { grid-template-columns: 1fr; }
  .panel .shot { width: 150px; }
  dialog.game .inner { grid-template-columns: 1fr; }
  dialog.game .art { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .intro .fan .phone, .intro .fan .tag { opacity: 1 !important; translate: none !important; }
}

/* Lucide icons (lucide.dev, ISC licence), drawn inline */
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chips svg.i { color: var(--yellow); }
dialog.game .close { display: grid; place-items: center; }
dialog.game .nav button { display: inline-flex; align-items: center; gap: 4px; }
.poster.soon .plus svg.i { width: 18px; height: 18px; stroke-width: 2.6; }

/* Motion that answers the scroll and the pointer */
.title .ico { transition: transform .7s cubic-bezier(.3, 1.6, .5, 1), opacity .5s; }
.title.reveal:not(.seen) .ico { transform: scale(.4) rotate(-20deg); opacity: 0; }
.title h2 { transition: clip-path .8s var(--ease) .1s; clip-path: inset(0 0 0 0); }
.title.reveal:not(.seen) h2 { clip-path: inset(0 100% 0 0); }
.steps article:nth-child(2) { transition-delay: .1s; }
.steps article:nth-child(3) { transition-delay: .2s; }
.steps article .shot { transition: transform .8s var(--ease) .15s; }
.steps article.reveal:not(.seen) .shot { transform: translateY(24px) rotate(-4deg) scale(.94); }
.steps article:hover .shot { transform: rotate(-2deg) scale(1.03); }
.poster.rv { opacity: 0; translate: 0 26px; scale: .94; transition: opacity .6s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s), scale .7s var(--ease) var(--d, 0s), transform .25s var(--ease); }
.poster.rv.seen { opacity: 1; translate: 0 0; scale: 1; }
.poster { transform: perspective(700px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); }
.poster:hover { transform: perspective(700px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.poster img { transition: scale .5s var(--ease); }
.poster:hover img { scale: 1.06; }
.panel .shot, .strip .shot { transition: transform .5s var(--ease); }
.panel:hover .shot { transform: rotate(2deg) translateY(-4px); }
.strip figure:hover .shot { transform: translateY(-6px); }
.chips span { transition: border-color .3s, transform .3s var(--ease); }
.chips span:hover { border-color: #3a3d46; transform: translateY(-2px); }
.store, .btn { transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s; }
.btn.y:hover { box-shadow: 0 8px 22px rgba(255,200,61,.25); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .title.reveal .ico, .title.reveal h2, .steps .shot, .poster.rv { transform: none !important; clip-path: none !important; opacity: 1 !important; translate: none !important; scale: none !important; }
}


/* The strip: drag with the mouse, arrows beside the title */
.strip { cursor: grab; user-select: none; -webkit-user-select: none; scroll-snap-type: none; }
.strip.dragging { cursor: grabbing; }
.strip img { pointer-events: none; }
.strip-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.arrows { display: flex; gap: 8px; }
.arrows button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: background .2s, opacity .2s, transform .2s var(--ease); }
.arrows button:hover:not(:disabled) { background: var(--ink-3); transform: scale(1.06); }
.arrows button:disabled { opacity: .35; cursor: default; }
.arrows svg.i { width: 18px; height: 18px; }
