/* ChessRoller — "Sky", light.
   Paper background, black ink, serif display, system-blue accent,
   white rounded cards, dark footer with giant wordmark.
   Zero external requests. */

/* Instrument Serif + Inter + IBM Plex Mono (OFL) — self-hosted so the site
   makes zero external requests */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-semibold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/instrument-serif-italic.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --bg: #e9e6da;
  --card: #ffffff;
  --ink: #000000;
  --mono-muted: #45473c;
  --line: rgba(0, 0, 0, 0.25);
  --line-soft: rgba(0, 0, 0, 0.2);
  /* fills sit a touch under iOS blue so white button text holds AA;
     text links darken further to hold AA on the paper bg */
  --accent: #0070e8;
  --accent-hover: #005fc2;
  --accent-ink: #0062c8;
  --on-accent: #ffffff;
  --footer-bg: #181818;
  --footer-ink: #e9e6da;
  --accent-on-dark: #5eabff;
  --serif: 'Instrument Serif', 'Iowan Old Style', Palatino, Georgia, serif;
  --system:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', sans-serif;
  --mono:
    'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, 'Liberation Mono',
    monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--system);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* links inside running text must not rely on color alone (WCAG 1.4.1) */
p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.site-footer :focus-visible {
  outline-color: var(--accent-on-dark);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
}

/* one shared content column */
.col {
  width: min(67.5rem, 100% - 3rem);
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 70px;
  padding: 0.8rem clamp(1.25rem, 4vw, 3.5rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  margin-right: auto;
}
.brand img {
  display: block;
}
.brand:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
}
.site-nav a {
  font-size: 1.125rem;
  color: var(--ink);
}
.site-nav a:hover {
  color: var(--accent-ink);
  text-decoration: none;
}

/* hamburger dropdown — hidden on desktop, replaces .site-nav on mobile */
.nav-menu {
  display: none;
}
.nav-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--ink);
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.menu-panel a {
  padding: 0.9rem 1.5rem;
  font-size: 1.125rem;
  color: var(--ink);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.menu-panel a:hover {
  text-decoration: none;
  color: var(--accent-ink);
}

/* ── Buttons ────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--system);
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.875rem 1.375rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 112, 232, 0.3);
}
.btn-small {
  font-weight: 500;
  padding: 0.6875rem 1.375rem;
}
.btn-wide {
  display: block;
  width: 100%;
  text-align: center;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  /* same 1.5rem gutters as .col so the lede never hugs the viewport edge */
  padding: 3rem 1.5rem 5rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-ink);
}

.hero h1 {
  font-size: clamp(3rem, 6.7vw, 6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lede {
  max-width: 40rem;
  font-size: 1.25rem;
}

.cta-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* screenshot slot — swap the placeholder div for a real <img> at launch */
.app-shot {
  /* hero already provides the gutters */
  width: 100%;
  max-width: 67.5rem;
  aspect-ratio: 1080 / 706;
  margin: 1.5rem auto 0;
  background: var(--card);
  border-radius: 20px;
}

/* ── Sections ───────────────────────────────────────── */

section {
  padding: 5rem 0;
}

h2 {
  font-size: clamp(2.4rem, 4.45vw, 4rem);
  line-height: 1.04;
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Features ───────────────────────────────────────── */

.features .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 1.25rem;
}

/* image slot — swap for a real screenshot crop at launch */
.card figure {
  aspect-ratio: 347 / 235;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  margin-bottom: 1.75rem;
}
.card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.card p {
  font-size: 1.125rem;
}

/* ── Pricing ────────────────────────────────────────── */

.price-card {
  max-width: 33.125rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3rem 3.25rem 3.125rem;
}

.price-card h3 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.04;
  margin-bottom: 1rem;
}
.price {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-term {
  margin: 0.75rem 0 2rem;
}

.price-card hr {
  border: none;
  border-top: 1px solid var(--line);
  margin-bottom: 2rem;
}

.price-card ul {
  list-style: none;
  margin-bottom: 2rem;
}
.price-card li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.25rem 0;
}
.price-card li::before {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  /* white check in a blue disc */
  background-color: var(--accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.price-card .fineprint {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--mono-muted);
  text-align: center;
}

/* ── FAQ ────────────────────────────────────────────── */

.faq {
  background: var(--card);
}

.faq details {
  border-bottom: 2px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.5rem 0;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex: none;
  width: 31px;
  height: 31px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 31 31'%3E%3Cpath d='M15.5 5v19M7.5 16.5l8 8 8-8' fill='none' stroke='%230070e8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(180deg);
}
.faq details p {
  max-width: 50rem;
  padding: 0 0 2.5rem;
  margin-top: -0.9rem;
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 6rem 0 4.3rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 5rem;
}

.link-groups {
  display: flex;
  gap: 5rem;
  flex-wrap: wrap;
}
.link-groups .group-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 1rem;
}
.link-groups ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.link-groups a {
  font-size: 0.875rem;
  color: var(--footer-ink);
}
.link-groups a:hover {
  color: var(--accent-on-dark);
  text-decoration: none;
}

.connect-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  margin-left: auto;
}
.connect-col a {
  font-size: 0.9375rem;
  color: var(--footer-ink);
}
.connect-col a:hover {
  color: var(--accent-on-dark);
  text-decoration: none;
}
.connect-col p {
  font-size: 0.75rem;
}
/* standalone list links (like .link-groups) — no underline needed for AA */
.connect-col .social-row {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.connect-col .social-row a {
  font-size: 0.875rem;
  color: var(--footer-ink);
}
.connect-col .social-row a:hover {
  color: var(--accent-on-dark);
  text-decoration: none;
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
}
.wordmark text {
  font-family: var(--serif);
  font-size: 274px;
  fill: var(--footer-ink);
}

/* ── News ───────────────────────────────────────────── */

.news-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 5.7rem 0 4.8rem;
}
.news-head h1 {
  font-size: clamp(3rem, 6.7vw, 6rem);
  line-height: 1.04;
}
.news-head .lede {
  max-width: none;
}
.news-entry {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
}

.news-date {
  font-family: var(--mono);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mono-muted);
  white-space: nowrap;
  /* pin below the sticky header while its post scrolls by */
  position: sticky;
  top: calc(70px + 2.5rem);
}

.news-body {
  width: min(44.5625rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.news-body h2 {
  font-size: 2.5rem;
  text-align: left;
  margin: 0;
}

/* image slot — swap for a real screenshot at launch */
.news-shot {
  aspect-ratio: 713 / 417;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
}

/* ── Prose (legal / long-form pages) ────────────────── */

/* legal pages set everything in Inter — no serif display */
.prose {
  max-width: 50rem;
  padding: 4rem 0 5rem;
}
.prose h1 {
  font-family: var(--system);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.prose h2 {
  font-family: var(--system);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.3;
  text-align: left;
  margin: 2.5rem 0 1rem;
}
.prose p,
.prose li {
  margin-bottom: 1rem;
}
.prose ul {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.prose em {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--mono-muted);
}

/* ── Motion ─────────────────────────────────────────── */

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s ease forwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn {
    transition: none;
  }
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 1000px) {
  .features .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq summary {
    font-size: 1.5rem;
  }
  .news-entry {
    flex-direction: column;
    gap: 1.5rem;
  }
  /* stacked layout: a stuck date would overlap the body text */
  .news-date {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 1rem;
  }
  .brand {
    font-size: 1.6rem;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .site-nav {
    display: none;
  }
  .nav-menu {
    display: block;
  }
  /* footer stacks into one left-aligned column */
  .footer-top {
    flex-direction: column;
    gap: 2.5rem;
  }
  .link-groups {
    flex-direction: column;
    gap: 2.5rem;
  }
  .connect-col {
    align-items: flex-start;
    margin-left: 0;
  }
  .features .grid {
    grid-template-columns: 1fr;
  }
  .price-card {
    padding: 2rem 1.5rem;
  }
  .faq summary {
    padding: 1.6rem 0;
  }
  .faq details p {
    padding-bottom: 1.6rem;
  }
}
