/* Shared styles for every page. No fonts, no scripts, no trackers. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1c1c22;
  --muted: #5b5b66;
  --line: #e3e3e8;
  --surface: #f4f3f8;
  --accent: #ff4b5c;   /* decorative only: too light for text on white */
  --link: #c81e33;     /* accent darkened to pass 4.5:1 on white */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c22;
    --fg: #f4f4f6;
    --muted: #b3b3bd;
    --line: #34343d;
    --surface: #25252d;
    --link: #ff6b79;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 0.3rem; }
h2 { font-size: 1.15rem; margin-top: 2rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
hr { margin: 3rem 0; border: none; border-top: 1px solid var(--line); }

/* The game's table background. Always dark with white text, in both color schemes;
   the charcoal overlay keeps white text readable over the light lavender patch. */
.table {
  background:
    linear-gradient(rgba(28, 28, 34, 0.3), rgba(28, 28, 34, 0.6)),
    #3a2d8c url(/solitaire/img/background.jpg) center / cover;
  color: #fff;
  margin-bottom: 32px;
}
.table a { color: #fff; }
.table .wrap { padding-bottom: 40px; }
.table.slim .wrap { padding-bottom: 0; }
.table h1 { font-size: clamp(2rem, 7vw, 3rem); letter-spacing: -0.02em; line-height: 1.1; }
.table p { font-size: 1.1rem; margin: 0.5rem 0 0; }

.site-nav { padding: 20px 0; }
.site-nav a { font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
}
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; }
  .hero > :last-child { justify-self: center; }
}

/* Three cards held in a hand. */
.fan { position: relative; width: 230px; height: 190px; }
.fan img {
  position: absolute;
  bottom: 0;
  left: 60px;
  width: 110px;
  height: auto;
  transform-origin: 50% 200%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}
.fan img:nth-child(1) { transform: rotate(-14deg); }
.fan img:nth-child(3) { transform: rotate(14deg); }

/* The four aces, laid out like the foundations. */
.foundations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 110px));
  gap: clamp(8px, 3vw, 20px);
  margin-top: 32px;
}
.foundations img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

/* Rounded square with the table behind the logo, like the app icon. */
.app-icon {
  flex: none;
  width: 72px;
  height: 72px;
  padding: 10px;
  border-radius: 18px;
  background: #3a2d8c url(/solitaire/img/background.jpg) center / cover;
}
.app-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.app-icon.large { width: 96px; height: 96px; border-radius: 24px; margin-bottom: 16px; }

.game {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
}
.game h3 { margin: 0; font-size: 1.15rem; }
.game p { margin: 0.2rem 0 0; }

.face-down { width: 110px; height: auto; transform: rotate(-8deg); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }

.site-footer {
  margin-top: 4rem;
  padding-top: 16px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { margin-right: 16px; }
