/* SolitaireSorter's site: the green felt table from the app's Felt theme, with the features dealt out as cards. */
:root {
  --felt: #1a7d2c;
  --felt-dark: #0e5520;
  --edge: #08400f;
  --text: #ffffff;
  --muted: #e3f2e5;
  --accent: #3da5ff;
  --red: #d8303f;
  --face: #fbfaf6;
  --ink: #191c21;
  --ink-muted: #535b68;
  --link-on-face: #1a5fb4;
  --screen: #121519;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  background-color: var(--felt);
  /* Felt: soft mottling plus fine grain, drawn by the browser. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0.05 0 0 0 0 0 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0.12 0 0 0 0 0 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

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

.bar {
  background: var(--felt-dark);
  border-bottom: 1px solid var(--edge);
}

header.bar {
  display: flex;
  align-items: center;
  padding: 12px max(16px, calc((100% - 1100px) / 2));
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.wordmark {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 4px;
}
.wordmark span { color: var(--accent); }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 64px 0 56px;
  text-align: center;
}
.hero-text { max-width: 760px; }

h1, h2 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  margin: 0 0 16px;
}
h1 { font-size: clamp(40px, 6vw, 60px); }
h2 { font-size: 36px; }

.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b1220;
  font-weight: 600;
  font-size: 15px;
}
.chip.quiet { background: rgba(0, 30, 8, 0.5); color: var(--muted); border: 1px solid var(--edge); }

/* The trailer box. */
.screen {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--screen);
  border: 6px solid #0b1a0e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.screen-inner {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: #98a1ae;
}
.screen-inner p { margin: 0; font-weight: 500; }
.screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.play {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--screen) center / cover no-repeat;
}
.play span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0b1220;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.play:hover span { transform: scale(1.08); }

.table { padding: 56px 0; }

.hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.card {
  position: relative;
  background: var(--face);
  color: var(--ink);
  border-radius: 12px;
  padding: 44px 24px 26px;
  box-shadow: 0 2px 0 #d9d6cc, 0 12px 26px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease;
}
.card:hover { transform: rotate(0deg) translateY(-4px); }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--ink-muted); }
.card .more { margin-top: 10px; font-weight: 500; }
.card a { color: var(--link-on-face); }
.card a:hover { color: #123f78; }
.card.wide { margin-top: 28px; padding: 22px 24px 22px 60px; }

/* A feature's looping clip, once it has one. */
.loop {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  border-radius: 8px;
  background: var(--screen);
  object-fit: cover;
}

.pip {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 0.9;
}
.pip b { font-size: 16px; }
.card.red .pip { color: var(--red); }

/* Dealing in (the script adds these only when motion is fine). */
.card.waiting { opacity: 0; transform: translate(-60px, -40px) rotate(-14deg); }
.card.dealt {
  opacity: 1;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) var(--delay), opacity 0.3s ease var(--delay);
}
.card.dealt:hover { transform: rotate(0deg) translateY(-4px); transition: transform 0.25s ease; }

.faq { display: grid; gap: 10px; max-width: 760px; }
details {
  background: rgba(0, 30, 8, 0.45);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 14px 18px;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

.foot { padding: 28px 16px; text-align: center; border-top: 1px solid var(--edge); border-bottom: 0; margin-top: 40px; }
.foot p { margin: 4px 0; }
.small { font-size: 14px; color: var(--muted); }

a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 560px) {
  .wordmark { font-size: 19px; letter-spacing: 3px; }
  .hero { padding-top: 40px; }
  .card, .card.dealt, .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card:hover, .play span { transition: none; }
}
