/* PuzzlesTime.com — white, minimal, premium.
   Light only, on purpose. */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #0a0a0a;
  --ink-soft: #5c5f66;
  --ink-faint: #8e9199;
  --line: #ebebeb;
  --line-strong: #dcdcdc;
  --accent: #ec4899;
  --accent-soft: #fdf2f8;
  --accent-ink: #be185d;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -.03em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .89rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 64px; }
/* text-only wordmark: tight, heavy, with the site accent on "Time" */
.brand {
  display: inline-block;
  font-size: 1.24rem; font-weight: 750;
  letter-spacing: -.035em; color: var(--ink);
  line-height: 1;
}
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; opacity: .82; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-size: .94rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: .96rem; font-weight: 500; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262626; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-faint); }
.btn-sm { padding: 9px 17px; font-size: .9rem; }
.btn-block { width: 100%; padding: 13px 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ---------- page wash ---------- */
/* Fixed behind everything and faded out with a mask, so it never ends in the
   hard rectangular edge a clipped block inside the hero produced. */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 760px; z-index: -1;
  background:
    radial-gradient(720px 440px at 6% -8%, #fce7f3 0%, rgba(252,231,243,0) 62%),
    radial-gradient(700px 420px at 97% -4%, #ddf3d4 0%, rgba(221,243,212,0) 60%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 38%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 38%, transparent 100%);
  pointer-events: none;
}

/* ---------- hero ---------- */
.hero { padding: clamp(60px, 9vw, 100px) 0 clamp(38px, 5vw, 56px); text-align: center; }
.hero h1 { max-width: 17ch; margin: 0 auto .5em; }
.hero .accent { color: var(--accent); position: relative; white-space: nowrap; }
.hero .accent::after {
  content: ""; position: absolute; left: 3%; right: 3%; bottom: -.06em; height: .055em;
  background: var(--accent); border-radius: 999px; opacity: .8;
}
.hero .lead {
  font-size: clamp(1rem, 1.9vw, 1.12rem); color: var(--ink-soft);
  max-width: 42ch; margin: 0 auto;
}

/* ---------- catalogue ---------- */
.catalogue { padding: 0 0 clamp(52px, 7vw, 84px); }

/* one panel per title: icon | text | download, all vertically centred */
.games { display: grid; gap: 16px; max-width: 800px; margin: 0 auto; }
.game-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 22px 26px;
  box-shadow: 0 1px 2px rgba(16,18,30,.04), 0 8px 28px rgba(16,18,30,.05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-card:hover {
  transform: translateY(-2px); border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(16,18,30,.05), 0 18px 44px rgba(16,18,30,.09);
}
.game-icon {
  width: 88px; height: 88px; border-radius: 20px;
  object-fit: cover; border: 1px solid var(--line); background: var(--bg-soft);
}
.game-body { min-width: 0; }
.game-title { margin: 0; font-size: 1.14rem; font-weight: 650; letter-spacing: -.02em; }
.game-tagline { margin: 3px 0 0; color: var(--ink-soft); font-size: .92rem; }

/* highlights as compact chips on one row — the stacked two-line version
   made the card tall and left the right side empty */
.game-features { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.game-features li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px;
}
.game-features .fi { font-size: .86rem; line-height: 1; }
.game-features b { font-size: .79rem; font-weight: 550; color: var(--ink); }
.game-features .fnote { display: none; }   /* the sub-note is noise at chip size */

/* download column: fixed width so every badge lines up down the page */
.game-actions {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; margin: 0; flex: 0 0 auto;
}
/* Official Apple badge — Apple asks for a 40px minimum height on the web
   and clear space of at least 25% of its height around it. */
.store-badge { display: block; line-height: 0; transition: opacity .15s ease; }
.store-badge:hover { opacity: .8; text-decoration: none; }
.store-badge img { width: 134px; height: auto; }
.store-price { margin: 0; font-size: .82rem; color: var(--ink-faint); white-space: nowrap; }

/* ---------- "more coming" strip ---------- */
.tease {
  max-width: 800px; margin: 22px auto 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 24px;
}
.tease-copy { flex: 1 1 260px; }
.tease-copy b { display: block; font-size: .98rem; font-weight: 600; }
.tease-copy span { display: block; font-size: .88rem; color: var(--ink-faint); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }

/* ---------- catalogue filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto 20px; max-width: 800px; }
.filter {
  font: inherit; font-size: .89rem; line-height: 1;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.filter:hover { color: var(--ink); border-color: var(--ink-faint); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty-state { text-align: center; color: var(--ink-faint); padding: 40px 0; }

/* ---------- legal / doc pages ---------- */
.doc { padding: clamp(52px, 7vw, 84px) 0 clamp(48px, 6vw, 72px); }
.doc h1 { margin-bottom: .35em; }
.doc .updated { color: var(--ink-faint); font-size: .89rem; margin-bottom: 2.4rem; }
.doc h2 { font-size: 1.28rem; margin-top: 2.6rem; }
.doc h3 { margin-top: 1.8rem; }
.doc ul, .doc ol { color: var(--ink-soft); padding-left: 1.25rem; }
.doc li { margin-bottom: .45rem; }
.doc p { color: var(--ink-soft); }
.doc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc a:hover { text-decoration-color: var(--ink); }
.doc table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: .92rem; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; border-bottom-color: var(--line-strong); }
.doc td { color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }
.callout {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- support FAQ ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-faint); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 22px 20px; color: var(--ink-soft); font-size: .95rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 52px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 500; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--ink-soft); font-size: .92rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--ink-faint); font-size: .86rem;
}
.footer-bottom a { color: var(--ink-faint); }

@media (max-width: 720px) {
  .game-card {
    grid-template-columns: 1fr; justify-items: center; text-align: center;
    gap: 16px; padding: 26px 22px;
  }
  .game-features { justify-content: center; }
  .tease { text-align: center; justify-content: center; }
  .tease-copy { flex-basis: 100%; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { gap: 18px; }
  .nav-links .hide-sm { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
