/* Landing page only. The cheatsheets and the mobile page carry their own CSS. */

:root {
  color-scheme: light dark;

  --bg: #eef0f4;
  --bg-glow: #dfe4ec;
  --card: #ffffff;
  --card-hover: #ffffff;
  --text: #14161a;
  --muted: #5c6470;
  --accent: #c8102e;
  --border: #dfe3ea;
  --shadow: 0 1px 2px rgba(18, 22, 33, 0.05), 0 10px 30px rgba(18, 22, 33, 0.07);
  --shadow-hover: 0 2px 4px rgba(18, 22, 33, 0.07), 0 16px 40px rgba(18, 22, 33, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-glow: #171c24;
    --card: #171b21;
    --card-hover: #1c2129;
    --text: #e9ecf1;
    --muted: #98a1b0;
    --accent: #ff5a6e;
    --border: #262c36;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% -10%,
    var(--bg-glow),
    transparent 70%
  );
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.home {
  width: 100%;
  max-width: 34rem;
}

/* Masthead ---------------------------------------------------------------- */

.masthead {
  margin-bottom: clamp(1.75rem, 5vw, 2.5rem);
}

.masthead__title {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.masthead__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: var(--accent);
}

.masthead__tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

/* Link cards -------------------------------------------------------------- */

.links {
  display: grid;
  gap: 0.7rem;
}

.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.9rem, 3vw, 1.15rem) clamp(1rem, 3.5vw, 1.35rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, background-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--card-hover);
  box-shadow: var(--shadow-hover);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card:active { transform: translateY(0); }

.card__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.card__title {
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-weight: 600;
}

.card__meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.card__chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.15s ease, color 0.15s ease;
}

.card:hover .card__chevron {
  transform: translateX(3px);
  color: var(--accent);
}

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

.site-footer {
  margin-top: clamp(2rem, 6vw, 3rem);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .card,
  .card__chevron {
    transition: none;
  }
  .card:hover { transform: none; }
  .card:hover .card__chevron { transform: none; }
}
