/* Imposter: the app's own colours (Theme/AppTheme.swift, AppColors.swift) and its rounded type. */
:root {
  --night: #110d1f;
  --night-2: #1c1635;
  --night-card: #241e50;
  --ink: #1e1245;
  --day: #faf7ff;
  --day-2: #f0ecff;
  --day-3: #e4deff;
  --muted: #6b5fa0;
  --muted-night: #a79dcf;
  --purple: #7c3aed;
  --blue: #3b82f6;
  --green: #10b981;
  --orange: #ff6b35;
  --pink: #ec4899;
  --yellow: #ffd60a;
  --red: #ef4444;
  --spring: cubic-bezier(0.3, 1.45, 0.5, 1);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--round);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* The bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  padding-top: max(10px, env(safe-area-inset-top));
  color: #fff;
  background: rgba(17, 13, 31, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.mark img { border-radius: 8px; }
.bar nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 15px; font-weight: 700; }
.bar nav a { text-decoration: none; color: #d9d2f5; }
.bar nav a:hover { color: #fff; }
.bar nav a.get { color: var(--ink); background: #fff; padding: 7px 14px; border-radius: 999px; font-weight: 800; }
@media (max-width: 680px) { .bar nav a:not(.get) { display: none; } }

/* Night and day */
.night { background: var(--night); color: #fff; position: relative; padding: clamp(64px, 10vw, 124px) 0; }
.day { background: var(--day); color: var(--ink); position: relative; padding: clamp(64px, 10vw, 124px) 0; }
.day.tint { background: var(--day-2); }
.wrap { width: min(1080px, 100% - 2 * clamp(20px, 5vw, 48px)); margin-inline: auto; }
.center { text-align: center; }
.kicker { font-size: 14px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple); margin-bottom: 14px; }
.night .kicker { color: var(--yellow); }
h2 { font-size: clamp(32px, 5.6vw, 58px); }
.copy p, .narrow { color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); margin-top: 18px; max-width: 34em; }
.night .copy p { color: var(--muted-night); }
.narrow { margin-inline: auto; max-width: 30em; }
.fine { font-size: 14px !important; color: var(--muted-night) !important; margin-top: 16px !important; }
.fine.dark { color: var(--muted) !important; }
.two { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 84px); align-items: center; }
.two.flip { grid-template-columns: 0.85fr 1.15fr; }
.two > .phone { justify-self: center; }
@media (max-width: 800px) {
  .two, .two.flip { grid-template-columns: 1fr; }
  .two.flip .copy { order: -1; }
}

/* The stage: one round, played here */
.stage {
  min-height: 100svh;
  padding: calc(74px + env(safe-area-inset-top)) clamp(14px, 4vw, 40px) clamp(36px, 6vw, 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(70% 46% at 50% -6%, rgba(124, 58, 237, 0.55), transparent 70%),
    radial-gradient(60% 40% at 50% 78%, rgba(59, 130, 246, 0.16), transparent 70%),
    var(--night);
}
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 46% at 50% 62%, rgba(239, 68, 68, 0.34), transparent 70%);
  opacity: 0; transition: opacity 0.5s ease;
}
.stage.caught::before { opacity: 1; }
.stage > * { position: relative; }
.eyebrow { font-size: clamp(12px, 1.5vw, 15px); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #c9bdf5; }
h1 { font-size: clamp(42px, 9.6vw, 100px); margin-top: 10px; line-height: 0.96; }
.lie {
  display: inline-block; transform: rotate(-2.5deg); transform-origin: 30% 60%;
  background: linear-gradient(100deg, var(--red), var(--orange) 70%, var(--yellow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 0.08em 0.1em;
}

.game { width: min(760px, 100%, 70svh); margin-top: clamp(18px, 3.4vw, 34px); }
.secret { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.secret-label { font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-night); }
.tiles { display: flex; justify-content: center; gap: clamp(4px, 1vw, 8px); perspective: 600px; min-height: clamp(38px, 10vw, 58px); }
.tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: clamp(30px, 8.4vw, 50px); height: clamp(36px, 9.8vw, 58px);
  background: var(--day); color: var(--ink);
  border-radius: clamp(8px, 2vw, 13px);
  font-size: clamp(19px, 5.4vw, 32px); font-weight: 900;
  box-shadow: 0 4px 0 #b9aaf0, 0 10px 18px rgba(0, 0, 0, 0.3);
  animation: tile-in 0.5s var(--spring) backwards;
  animation-delay: calc(var(--i) * 55ms);
}
@keyframes tile-in { from { opacity: 0; transform: translateY(-16px) rotateX(-90deg); } }

.players {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.2vw, 22px);
  margin-top: clamp(14px, 2.6vw, 26px);
}
.player {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 0; border: 0; background: none; color: #fff;
  -webkit-tap-highlight-color: transparent;
  animation: drop-in 0.7s var(--spring) backwards;
  animation-delay: calc(120ms + var(--i) * 90ms);
}
@keyframes drop-in { from { opacity: 0; transform: translateY(46px) scale(0.86) rotate(calc((var(--i) - 1.5) * 5deg)); } }

.bubble {
  position: relative;
  max-width: 100%;
  margin-bottom: 11px;
  padding: clamp(5px, 1.2vw, 8px) clamp(8px, 2vw, 16px);
  background: #fff; color: var(--ink);
  border-radius: 14px;
  font-size: clamp(13px, 3.3vw, 19px); font-weight: 800; line-height: 1.15;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  opacity: 0; transform: translateY(12px) scale(0.4); transform-origin: 50% 120%;
  transition: opacity 0.2s ease, transform 0.42s var(--spring);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px;
  background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.player.said .bubble { opacity: 1; transform: none; }

.card {
  position: relative; display: block;
  width: 100%; aspect-ratio: 3 / 4;
  border-radius: clamp(16px, 3.2vw, 28px);
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 62%, var(--night-card)), color-mix(in srgb, var(--c) 16%, var(--night-2)));
  border: 2px solid color-mix(in srgb, var(--c) 70%, #fff 8%);
  box-shadow: 0 18px 34px -12px color-mix(in srgb, var(--c) 60%, transparent), 0 10px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--spring), filter 0.4s ease, background 0.2s ease;
}
.card img {
  position: absolute; left: 50%; bottom: -3%;
  height: 106%; width: auto; max-width: none;
  transform: translateX(-50%);
  pointer-events: none; user-select: none;
}
.name { margin-top: 9px; font-size: clamp(14px, 3.4vw, 19px); font-weight: 800; }
.role {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%) scale(0.5);
  padding: 3px 9px; border-radius: 999px;
  font-size: clamp(9px, 2.3vw, 13px); font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  background: #fff; color: var(--blue);
  opacity: 0; transition: opacity 0.2s ease, transform 0.35s var(--spring);
}

/* Waiting for a pick: the players shift on their feet. */
.game.asking .player .card { animation: fidget 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.65s); }
@keyframes fidget { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(calc((var(--i) - 1.5) * 0.9deg)); } }
@media (hover: hover) {
  .game:not(.done) .player:hover .card { animation: none; transform: translateY(-8px) scale(1.04); }
}
.game:not(.done) .player:active .card { animation: none; transform: scale(0.95); }
.game.done .player { cursor: default; }

/* The reveal */
.player.flipping .card { animation: flip 0.46s ease-in-out; }
@keyframes flip { 0% { transform: rotateY(0); } 45% { transform: rotateY(90deg) scale(1.06); } 100% { transform: rotateY(0); } }
.player.imposter .card {
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.28), 0 22px 44px -10px rgba(239, 68, 68, 0.8);
  transform: scale(1.05);
}
.player.civilian .card { filter: saturate(0.55) brightness(0.72); }
.player.civilian .role { opacity: 1; transform: translateX(-50%); }
.player.wrong { animation: shake 0.45s ease; }
@keyframes shake { 20% { transform: translateX(-7px) rotate(-2deg); } 40% { transform: translateX(7px) rotate(2deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }

.stamp {
  position: absolute; left: 50%; bottom: 17%; z-index: 3;
  transform: translate(-50%, 0) rotate(-7deg);
  padding: 0.2em 0.5em;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 10px;
  font-size: clamp(13px, 3.6vw, 26px); font-weight: 900; letter-spacing: 0.04em; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  animation: slam 0.45s cubic-bezier(0.2, 1.7, 0.4, 1) backwards;
  pointer-events: none;
}
.stamp.fooled { background: #fff; color: var(--red); border-color: var(--red); font-size: clamp(11px, 2.9vw, 22px); }
@keyframes slam { from { opacity: 0; transform: translate(-50%, 0) rotate(-24deg) scale(3.2); } }

/* The moment of truth: suspicion on one player, the rest in shadow. */
.game.judging .player .card { filter: brightness(0.55) saturate(0.7); }
.game.judging .player.suspect .card {
  filter: none; transform: translateY(-8px) scale(1.07);
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.35), 0 22px 44px -10px rgba(255, 214, 10, 0.6);
  transition: transform 0.18s var(--spring), filter 0.1s ease;
}
.bit {
  position: absolute; z-index: 5; width: 10px; height: 14px; border-radius: 3px;
  background: var(--c); pointer-events: none;
  animation: burst 1s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
}
@keyframes burst {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

.prompt { margin-top: clamp(12px, 2.2vw, 20px); min-height: 3em; font-size: clamp(15px, 2vw, 19px); font-weight: 700; color: #e6e0fb; text-wrap: balance; }
.game.asking .prompt { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.035); color: #fff; } }
.after { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; margin-top: 2px; }
.score { font-size: 14px; font-weight: 800; color: var(--muted-night); }
.next {
  padding: 9px 20px; border: 0; border-radius: 999px;
  background: var(--purple); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 20px -6px var(--purple);
  transition: transform 0.25s var(--spring);
}
.next:hover { transform: scale(1.05); }
.next:active { transform: scale(0.95); }

/* The way in */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; margin-top: clamp(14px, 2.4vw, 24px); }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start;
  min-width: 176px; padding: 10px 24px 11px;
  background: #fff; color: var(--ink);
  border-radius: 16px; text-decoration: none; line-height: 1.08;
  box-shadow: 0 5px 0 #b9aaf0, 0 16px 30px -10px rgba(124, 58, 237, 0.7);
  transition: transform 0.25s var(--spring), box-shadow 0.2s ease;
}
.store:hover { transform: translateY(-2px); }
.store:active { transform: translateY(4px); box-shadow: 0 1px 0 #b9aaf0; }
.store .small { font-size: 11px; font-weight: 700; }
.store .big { font-size: 21px; font-weight: 900; letter-spacing: -0.01em; }
.android { font-size: 14px; font-weight: 700; color: var(--muted-night); }

/* Phones with real screens */
.phone {
  display: block; position: relative;
  width: min(100%, 268px); aspect-ratio: 660 / 1435;
  margin: 0; padding: 0;
  border: 7px solid var(--ink); border-radius: 40px;
  background: var(--ink); overflow: hidden;
  box-shadow: 0 34px 60px -24px rgba(30, 18, 69, 0.55);
}
.night .phone { border-color: #3a3170; box-shadow: 0 34px 70px -20px rgba(124, 58, 237, 0.55); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.tilt { transform: rotate(3deg); }
.tilt-left { transform: rotate(-3deg); }

.steps { list-style: none; margin: clamp(36px, 6vw, 68px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 48px); }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.holder { position: relative; display: flex; justify-content: center; width: 100%; }
.step-copy { margin-top: 30px; max-width: 19em; }
.num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px;
  border-radius: 50%; background: var(--purple); color: #fff; font-weight: 900; font-size: 18px;
}
.step:nth-child(2) .num { background: var(--blue); }
.step:nth-child(3) .num { background: var(--red); }
.step h3 { font-size: 26px; }
.step p { margin-top: 8px; color: var(--muted); }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 56px; }
  .phone { width: min(72vw, 268px); }
}

.peek .under { position: absolute; inset: 0; }
.peek .cover {
  position: relative; z-index: 1;
  border-radius: 0 0 8% 8% / 0 0 3.7% 3.7%;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.12s linear;
}
/* Once the card is up, the real screenshot of that moment takes over (it has the status bar). */
.peek.up .cover { transform: translateY(-43.25%); opacity: 0; transition: transform 0.6s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.2s linear 0.6s; }
.tap-hint {
  position: absolute; left: 50%; bottom: -14px; z-index: 2; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 800;
  box-shadow: 0 6px 14px rgba(30, 18, 69, 0.25);
  pointer-events: none;
}
.swap .second { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.swap.b .second { opacity: 1; }

/* Packs */
.pills { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li {
  padding: 6px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); color: #e9e3ff;
  font-size: 14px; font-weight: 700;
}
.pills li.free { background: var(--green); color: #04281c; font-weight: 800; }
.pills li.own { background: none; border: 1.5px dashed var(--yellow); color: var(--yellow); }
.reveal .pills li { opacity: 0; transform: scale(0.6); transition: opacity 0.25s ease, transform 0.45s var(--spring); transition-delay: calc(200ms + var(--i) * 22ms); }
.reveal.in .pills li { opacity: 1; transform: none; }

/* Rules */
.twists { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.twists li { padding: 16px 16px 16px 44px; position: relative; background: #fff; border: 1px solid #ede9fe; border-radius: 18px; }
.twists li::before { content: ""; position: absolute; left: 16px; top: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.twists b { display: block; font-weight: 800; font-size: 17px; line-height: 1.25; }
.twists span { display: block; margin-top: 3px; font-size: 15px; color: var(--muted); line-height: 1.35; }
@media (max-width: 520px) { .twists { grid-template-columns: 1fr; } }

/* Free and Premium */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: clamp(30px, 5vw, 52px); }
.tier { padding: clamp(24px, 3.4vw, 36px); background: #fff; border: 1px solid #ede9fe; border-radius: 28px; }
.tier.plus { background: var(--ink); color: #fff; border-color: transparent; }
.tier h3 { font-size: 28px; }
.tier.plus h3 { color: var(--yellow); }
.tier ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.tier li { position: relative; padding-left: 30px; line-height: 1.4; }
.tier li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 19px; height: 19px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.tier.plus li::before { background-color: var(--purple); }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } }

/* The end */
.end { background: radial-gradient(70% 60% at 50% 110%, rgba(239, 68, 68, 0.4), transparent 70%), var(--night); }
.end-icon { margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 18px 40px -10px rgba(124, 58, 237, 0.8); }
.end h2 { font-size: clamp(44px, 9vw, 96px); }
.updates { margin-top: 44px; }
.updates-title { font-weight: 900; font-size: 22px; }
.updates-sub { color: var(--muted-night); margin-top: 6px; }
.signup { display: flex; justify-content: center; gap: 8px; margin: 16px auto 0; max-width: 460px; }
.signup input {
  flex: 1; min-width: 0; padding: 13px 18px;
  font: inherit; color: #fff; background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.2); border-radius: 999px;
}
.signup input::placeholder { color: #8f85b8; }
.signup button { padding: 13px 22px; border: 0; border-radius: 999px; background: var(--purple); color: #fff; font-weight: 800; white-space: nowrap; }
.signup button:disabled { opacity: 0.6; }
.note { min-height: 1.5em; margin-top: 10px; font-size: 15px; color: #e6e0fb; }
@media (max-width: 480px) { .signup { flex-direction: column; } }

footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
  padding: 28px clamp(20px, 5vw, 48px) calc(28px + env(safe-area-inset-bottom));
  background: #0b0816; color: var(--muted-night); font-size: 14px;
}
footer .mark { color: #fff; font-size: 17px; }
footer nav { display: flex; gap: 22px; font-weight: 700; }
footer nav a { text-decoration: none; color: #d9d2f5; }

/* Things arrive as they are scrolled to. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.tilt.reveal { transform: translateY(28px) rotate(0deg); }
.tilt.reveal.in { transform: rotate(3deg); }
.tilt-left.reveal { transform: translateY(28px) rotate(0deg); }
.tilt-left.reveal.in { transform: rotate(-3deg); }

/* Plain pages: privacy and support */
.doc { background: var(--day); min-height: 100svh; padding: 110px 0 80px; }
.doc .wrap { width: min(720px, 100% - 40px); }
.doc h1 { font-size: clamp(36px, 6vw, 54px); margin-bottom: 10px; }
.doc h2 { font-size: 23px; margin: 34px 0 8px; line-height: 1.15; }
.doc p, .doc li { color: #3d3466; }
.doc .date { color: var(--muted); }
.doc a { color: var(--purple); font-weight: 700; }
.doc .button { display: inline-block; margin-top: 18px; padding: 12px 22px; border-radius: 999px; background: var(--purple); color: #fff; text-decoration: none; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .reveal, .reveal .pills li { opacity: 1; transform: none; }
  .tilt.reveal { transform: rotate(3deg); }
  .tilt-left.reveal { transform: rotate(-3deg); }
}
