/* podmate.ch's home page. The privacy and account deletion pages use
   style.css. Colours follow the app (src/theme/colors.js); the felt is the
   play mat the phones lie on. */

@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-800-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
}

:root {
  --ink: #0e1013;
  --slate: #161a20;
  --slate-2: #1d222a;
  --felt: #17423e;
  --felt-deep: #0c2422;
  --teal: #3e8e88;
  --gold: #e8b84a;
  --parchment: #efe6d2;
  --ember: #e2683c;
  --line: rgba(239, 230, 210, 0.12);
  --soft: rgba(239, 230, 210, 0.72);

  /* The counters' own colours, as in the app. */
  --c-poison: #a78bfa;
  --c-energy: #2f8cff;
  --c-tax: #ffd60a;
  --c-treasure: #ff9f43;
  --c-experience: #22d3ee;
  --c-rad: #c6f432;
  --c-speed: #ff6b9a;
  --c-storm: #cbd5e1;
  --c-blessing: #39e75f;

  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Instrument Sans', system-ui, sans-serif;

  /* A 1.25 type scale from a 17px body. */
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-h3: 1.3rem;
  --t-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  --t-h1: clamp(2.15rem, 1.4rem + 3.6vw, 3.9rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1140px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--mono);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header ---------------------------------------------------------------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--parchment);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 30px;
  height: 30px;
  transition: transform 0.6s var(--ease);
}

.brand:hover img {
  transform: rotate(72deg);
}

.sites {
  display: flex;
  gap: 22px;
  font-size: var(--t-small);
}

.sites a {
  color: var(--soft);
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
  transition: color 0.2s, background-size 0.3s var(--ease);
}

.sites a:hover {
  color: var(--parchment);
  background-size: 100% 1px;
}

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.langs button {
  font: 700 0.72rem var(--mono);
  color: var(--soft);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.langs button:hover {
  color: var(--parchment);
}

.langs button[aria-pressed='true'] {
  color: var(--ink);
  background: var(--gold);
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 0.95rem var(--mono);
  text-decoration: none;
  border-radius: 12px;
  padding: 14px 22px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
  transition-duration: 0.05s;
}

.btn-gold {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(232, 184, 74, 0);
}

.btn-gold:hover {
  box-shadow: 0 10px 30px -8px rgba(232, 184, 74, 0.55);
}

.btn-gold svg {
  width: 18px;
  height: 18px;
}

.btn-line {
  color: var(--parchment);
  border: 1px solid rgba(62, 142, 136, 0.7);
  background: rgba(62, 142, 136, 0.08);
}

.btn-line:hover {
  background: rgba(62, 142, 136, 0.2);
  border-color: var(--teal);
}

/* Hero: the copy beside a game table seen from above ------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 104px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.hero h1 {
  font-size: var(--t-h1);
  font-weight: 800;
  max-width: 13ch;
}

.hero .lede {
  margin-top: 22px;
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--soft);
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 34px;
}

.hero .note {
  font-size: var(--t-small);
  color: var(--soft);
}

/* The table: felt with a stitched edge, four phones round a d20. */
.table {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 540px);
  margin: 0 auto;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.06), transparent 55%),
    repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 50%, var(--felt), var(--felt-deep) 78%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 80px rgba(0, 0, 0, 0.45),
    0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.table::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1.5px dashed rgba(232, 184, 74, 0.22);
  pointer-events: none;
}

.phone {
  position: absolute;
  width: 25%;
  aspect-ratio: 0.68;
  padding: 7% 0 0;
  border-radius: 16px;
  background: linear-gradient(160deg, #1b2027, #111419);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.7);
  text-align: center;
  font-family: var(--mono);
  transition: box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}

.phone[data-seat='0'] { left: 37.5%; top: 5%; transform: rotate(-3deg); }
.phone[data-seat='1'] { right: 6%; top: 31.6%; transform: rotate(5deg); }
.phone[data-seat='2'] { left: 37.5%; bottom: 5%; transform: rotate(2deg); }
.phone[data-seat='3'] { left: 6%; top: 31.6%; transform: rotate(-6deg); }

/* Whose turn it is: the app's gold frame. */
.phone.turn {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(232, 184, 74, 0.35), 0 18px 30px -12px rgba(0, 0, 0, 0.7);
}

.phone .who {
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  color: var(--soft);
  letter-spacing: 0.04em;
}

.phone .life {
  display: block;
  margin-top: 6%;
  font-size: clamp(1.4rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.phone .life.hit {
  color: var(--ember);
}

.phone .badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 1.4em;
  margin-top: 10%;
  font-size: clamp(0.55rem, 1.4vw, 0.72rem);
  font-weight: 700;
}

.badge-poison { color: var(--c-poison); }
.badge-tax { color: var(--c-tax); }
.badge-treasure { color: var(--c-treasure); }
.badge-cmdr {
  color: var(--ember);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.badge-cmdr.show {
  opacity: 1;
  transform: none;
}

/* The d20 in the middle: tap to roll. */
.d20 {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.d20 img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.35s var(--ease);
}

.d20:hover img {
  transform: rotate(-12deg) scale(1.05);
}

.d20.rolling img {
  animation: roll 0.7s var(--ease);
}

.d20 .face {
  position: absolute;
  font: 800 clamp(0.9rem, 3vw, 1.35rem) var(--mono);
  color: var(--ink);
  background: var(--gold);
  border-radius: 8px;
  padding: 1px 7px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.3s var(--ease);
}

.d20 .face.show {
  opacity: 1;
  transform: none;
}

@keyframes roll {
  0% { transform: rotate(0) scale(1); }
  60% { transform: rotate(560deg) scale(0.85); }
  100% { transform: rotate(720deg) scale(1); }
}

.caption {
  margin: 18px auto 0;
  max-width: 30rem;
  min-height: 3.2em;
  text-align: center;
  font-size: var(--t-small);
  color: var(--soft);
}

/* Section headings ------------------------------------------------------ */

.section {
  padding: clamp(56px, 9vw, 112px) 0;
}

.section h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  max-width: 22ch;
}

.section .intro {
  margin-top: 14px;
  max-width: 36rem;
  color: var(--soft);
}

/* A night, in order ------------------------------------------------------ */

.night {
  border-top: 1px solid var(--line);
}

.steps {
  list-style: none;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  display: grid;
  gap: 36px;
  counter-reset: step;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 56px);
  }
}

.steps li {
  position: relative;
  padding-left: 64px;
}

@media (min-width: 820px) {
  .steps li {
    padding: 72px 0 0;
  }
}

/* The number, and the gold line joining the steps. */
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font: 800 1.1rem var(--mono);
  color: var(--ink);
  background: var(--gold);
  border-radius: 12px;
}

.steps li::after {
  content: '';
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: -30px;
  width: 2px;
  background: linear-gradient(var(--gold), rgba(232, 184, 74, 0));
}

.steps li:last-child::after {
  display: none;
}

@media (min-width: 820px) {
  .steps li::after {
    left: 56px;
    right: -16px;
    top: 21px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), rgba(232, 184, 74, 0));
  }
}

.steps .when {
  font: 700 var(--t-small) var(--mono);
  color: var(--gold);
}

.steps h3 {
  margin-top: 6px;
  font-size: var(--t-h3);
  font-weight: 700;
}

.steps p {
  margin-top: 10px;
  color: var(--soft);
  max-width: 34rem;
}

/* The counter tray -------------------------------------------------------- */

.tray-section {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(62, 142, 136, 0.14), transparent 55%),
    var(--slate);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tray {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(30px, 4vw, 44px);
}

.chip {
  --c: var(--parchment);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  font: 500 0.95rem var(--sans);
  color: var(--parchment);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, transform 0.15s var(--ease), background 0.2s;
}

.chip::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 10px -1px var(--c);
}

.chip:hover {
  border-color: var(--c);
  transform: translateY(-2px);
}

.chip:active {
  transform: translateY(0) scale(0.97);
}

.chip .n {
  min-width: 2ch;
  font: 800 1rem var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--c);
  text-align: right;
}

.chip .n.bump {
  animation: bump 0.3s var(--ease);
}

/* The monarch, the initiative and the like: on or off, no number. */
.chip.toggle .n {
  font-size: 0.8rem;
}

.chip.toggle[aria-pressed='true'] {
  background: color-mix(in srgb, var(--c) 16%, var(--ink));
  border-color: var(--c);
}

@keyframes bump {
  40% { transform: translateY(-5px) scale(1.25); }
}

.tray-note {
  margin-top: 22px;
  font-size: var(--t-small);
  color: var(--soft);
}

/* Free and ProMate ------------------------------------------------------- */

.plans {
  display: grid;
  gap: 18px;
  margin-top: clamp(30px, 4vw, 48px);
}

@media (min-width: 820px) {
  .plans {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.plan {
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: 22px;
  background: var(--slate);
  border: 1px solid var(--line);
}

.plan.pro {
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 184, 74, 0.16), transparent 50%),
    linear-gradient(160deg, var(--felt), var(--felt-deep));
  border-color: rgba(232, 184, 74, 0.45);
}

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

.plan.pro h3 {
  color: var(--gold);
}

.plan .price {
  margin-top: 8px;
  color: var(--soft);
  font-size: var(--t-small);
}

.plan ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.plan li {
  position: relative;
  padding-left: 26px;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--teal);
  transform: rotate(45deg);
}

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

.plan .btn {
  margin-top: 30px;
}

/* Ranked play and stores, side by side ---------------------------------- */

.duo {
  display: grid;
  gap: 18px;
}

@media (min-width: 820px) {
  .duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.duo article {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3.5vw, 36px);
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--slate-2), var(--slate));
}

.duo h2 {
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
}

.duo p {
  color: var(--soft);
}

.duo .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* FAQ ------------------------------------------------------------------- */

.faq-list {
  margin-top: clamp(28px, 4vw, 44px);
  max-width: 50rem;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 2px;
  font: 700 1.02rem var(--mono);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}

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

.faq-list summary:hover {
  color: var(--gold);
}

/* A plus that turns into a cross when open. */
.faq-list summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease), background 0.2s;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
  background: rgba(232, 184, 74, 0.12);
}

.faq-list details p {
  padding: 0 2px 22px;
  max-width: 40rem;
  color: var(--soft);
}

.faq-list details[open] p {
  animation: open 0.35s var(--ease);
}

@keyframes open {
  from { opacity: 0; transform: translateY(-6px); }
}

/* Footer ---------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: var(--t-small);
  color: var(--soft);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 22px;
}

.foot nav a {
  color: var(--parchment);
  text-decoration: none;
}

.foot nav a:hover {
  color: var(--gold);
}

.foot .legal {
  max-width: 46rem;
  font-size: 0.8rem;
  line-height: 1.55;
}

/* Fewer moving parts for those who ask for it. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
