/* Tattle's site: dark like the app (it has no light mode), with the players' colours from
   src/game/layout.ts (PLAYER_COLORS) as accents. Don't add colours as hex below: use these. */
:root {
  --bg: #121316;
  --surface: #191b20;
  --card: #1f2128;
  --line: #2c2f38;
  --text: #f4f4f6;
  --muted: #a6a9b4;
  --red: #c0392b;
  --blue: #2471a3;
  --gold: #b7950b;
  --purple: #7d3c98;
  --teal: #17808a;
  --orange: #ca6f1e;
  --green: #1e8449;
  --pink: #a93279;
  --link: #f5b041;
  --life: #2ecc71;
  --radius: 20px;
  --display:
    ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI Variable Display', 'Segoe UI', system-ui,
    sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1,
h2 {
  font-weight: 900;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
}

strong {
  font-weight: 800;
}

.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-inline: 24px;
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.kicker {
  margin: 0 0 12px;
  color: var(--link);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Icons: stroked, with .fill parts filled */
svg use,
.tiles svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

symbol .fill {
  fill: currentColor;
  stroke: none;
}

/* Header and footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

nav a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.site-footer nav a {
  overflow-wrap: anywhere;
}

.site-footer p {
  max-width: 760px;
  margin: 0;
}

.site-footer p a {
  color: var(--text);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
}

/* Four seats' colours glowing under the hero, like the table */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background:
    radial-gradient(
      40% 50% at 12% 20%,
      color-mix(in srgb, var(--red) 28%, transparent),
      transparent
    ),
    radial-gradient(
      40% 50% at 88% 15%,
      color-mix(in srgb, var(--blue) 30%, transparent),
      transparent
    ),
    radial-gradient(
      40% 50% at 85% 85%,
      color-mix(in srgb, var(--gold) 22%, transparent),
      transparent
    ),
    radial-gradient(
      40% 50% at 15% 90%,
      color-mix(in srgb, var(--purple) 26%, transparent),
      transparent
    );
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 104px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.8rem, 7.5vw, 5rem);
  line-height: 1;
}

.seven {
  display: inline-block;
  padding: 0 0.18em;
  border-radius: 0.18em;
  background: var(--red);
  transform: rotate(-4deg);
}

.lead {
  max-width: 540px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.25rem;
}

.availability {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: flex;
  flex-direction: column;
  padding: 10px 22px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
}

.store small {
  font-size: 0.7rem;
  font-weight: 600;
}

.store:hover {
  background: #ffffff;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--life);
}

@media (prefers-reduced-motion: no-preference) {
  .pulse {
    animation: pulse 1.6s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding-bottom: 32px;
}

.phone {
  display: block;
  width: min(300px, 70vw);
  border: 8px solid #000000;
  border-radius: 34px;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 80px rgb(0 0 0 / 0.55);
}

.hero-art .phone {
  transform: rotate(3deg);
}

/* The game log over the phone: its entries arrive one by one, newest on top */
.log-card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(360px, 88%);
  padding: 16px 18px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  backdrop-filter: blur(8px);
}

.log-title {
  margin: 0 0 6px;
  font-weight: 900;
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
}

.log li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0 8px 10px;
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--seat);
  margin-left: -18px;
  padding-left: 14px;
  font-size: 0.9rem;
  line-height: 1.3;
}

.log li:first-child {
  border-top: 0;
}

.log svg {
  width: 20px;
  height: 20px;
}

.log time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.sword {
  color: #e74c3c;
}

.heart {
  color: var(--life);
}

.crown {
  color: #f4d03f;
}

.poison {
  color: #bb8fce;
}

@media (prefers-reduced-motion: no-preference) {
  .log li {
    animation: log-in 450ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--at) both;
  }
}

@keyframes log-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--seat);
  border-radius: var(--radius);
  background: var(--card);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--seat);
  font-size: 1.5rem;
  font-weight: 900;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

/* Screenshot beside text */

.split {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.split .phone {
  transform: rotate(-2deg);
}

.table-split {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 32px;
}

.table-split .phone {
  transform: rotate(2deg);
}

.ticks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding: 0 0 14px 34px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.3em;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--blue);
}

.ticks li:nth-child(4n + 1)::before {
  background: var(--red);
}

.ticks li:nth-child(4n + 3)::before {
  background: var(--gold);
}

.ticks li:nth-child(4n)::before {
  background: var(--purple);
}

/* What it tracks */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.tiles article {
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--seat) 34%, var(--card)),
    var(--card) 70%
  );
  border: 1px solid color-mix(in srgb, var(--seat) 40%, var(--line));
}

.tiles svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  color: var(--text);
}

.tiles p {
  margin: 0;
  color: var(--muted);
}

/* "Never knocks anyone out" */

.callout-section {
  padding-top: 0;
  padding-bottom: 0;
}

.callout {
  padding: 48px;
  border: 2px dashed color-mix(in srgb, var(--link) 60%, transparent);
  border-radius: 28px;
  text-align: center;
}

.callout h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.callout p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Free and Pro */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.plan {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.plan h3 {
  font-size: 1.6rem;
}

.plan-note {
  margin: 0;
  color: var(--muted);
}

.plan.pro {
  border: 2px solid var(--gold);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--gold) 18%, var(--card)),
    var(--card) 60%
  );
}

.plan.pro h3 {
  color: #f7dc6f;
}

.plan.pro .ticks li::before {
  background: var(--gold);
}

/* Closing call to action */

.final {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.final img {
  margin-bottom: 20px;
}

.final .intro {
  margin-bottom: 28px;
}

/* Support and text pages */

.page-head {
  padding-bottom: 32px;
}

.page-head h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
}

.not-found {
  min-height: 50vh;
}

.faq {
  max-width: 820px;
  margin-left: 0;
  padding-bottom: 96px;
}

.faq details {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 22px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--link);
  font-size: 1.5rem;
  font-weight: 700;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
}

.prose {
  max-width: 800px;
  margin-left: 0;
  padding-top: 72px;
  padding-bottom: 96px;
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

/* The date under the title */
.prose h1 + p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.4rem;
}

.prose li {
  margin-bottom: 6px;
}

/* Narrow screens */

@media (max-width: 900px) {
  .hero-inner,
  .split,
  .table-split,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-inner {
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .split,
  .table-split {
    gap: 48px;
  }

  .split .phone,
  .table-split .phone {
    margin: 0 auto;
  }

  /* The text comes first on phones */
  .split > .phone {
    order: 2;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding-inline: 16px;
  }

  .hide-small {
    display: none;
  }

  .log-card {
    position: relative;
    width: 100%;
    margin-top: -120px;
  }

  .hero-art {
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
  }

  .callout,
  .plan {
    padding: 28px 22px;
  }
}
