/* The public site of Backgammon Season (landing, privacy, support): the "Club" look of the app — a walnut and brass club
   room at night. One deliberate dark theme. No script anywhere (the pages are served with a CSP that allows only this
   stylesheet, the fonts and the pictures under /legal/). */

@font-face {
  font-family: "Playfair Display";
  src: url("/legal/fonts/PlayfairDisplay.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/legal/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0e0a07;
  --panel: #17110c;
  --panel-raised: #1f1710;
  --walnut: #3a2416;
  --felt: #0f4a36;
  --felt-deep: #0a3326;
  --brass: #d6ad5b;
  --brass-hi: #e8c77e;
  --brass-dim: #8a6a33;
  --ivory: #f4ead6;
  --muted: #b9ab93;
  --faint: rgba(244, 234, 214, 0.55);
  --line: rgba(214, 173, 91, 0.18);
  --good: #7fc79a;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 400 17px/1.65 var(--ui);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-hi); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; margin: 0; }
p { margin: 0; }
.eyebrow {
  font: 600 12px/1.2 var(--ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
.muted { color: var(--muted); }

/* ------------------------------------------------------------ header and footer */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  padding: 20px var(--gutter);
}
.site-header .inner { max-width: var(--wide); margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.wordmark {
  font: 700 21px/1 var(--display);
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin-inline-end: auto;
}
.wordmark span { color: var(--brass); }
.nav { display: flex; align-items: center; gap: 22px; font: 500 14px/1 var(--ui); }
.nav a { color: var(--ivory); text-decoration: none; opacity: 0.85; }
.nav a:hover { opacity: 1; color: var(--brass-hi); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; opacity: 1; color: var(--muted); }
.page .site-header { position: static; border-bottom: 1px solid var(--line); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 36px var(--gutter) 48px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; }
.site-footer .wordmark { font-size: 17px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brass-hi); }
.site-footer .fine { flex-basis: 100%; font-size: 13px; color: var(--faint); }

/* ------------------------------------------------------------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: var(--ink);
  font: 600 16px/1 var(--ui);
  text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(214, 173, 91, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(214, 173, 91, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.button.secondary {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--brass-dim);
  box-shadow: none;
}
.button.secondary:hover { border-color: var(--brass); color: var(--brass-hi); }
.soon {
  display: inline-flex;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 500 15px/1 var(--ui);
}

/* ------------------------------------------------------------ landing: hero */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero picture, .hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 10, 7, 0.92) 0%, rgba(14, 10, 7, 0.7) 38%, rgba(14, 10, 7, 0.05) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(14, 10, 7, 0) 38%),
    linear-gradient(180deg, rgba(14, 10, 7, 0.75) 0%, rgba(14, 10, 7, 0) 22%);
}
.hero .inner { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 140px var(--gutter) 88px; }
.hero .copy { max-width: 36rem; display: grid; gap: 22px; }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.hero h1 em { font-style: italic; font-weight: 500; color: var(--brass); }
.hero .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 32rem; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 6px; }
.promises { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 13px/1.3 var(--ui); color: var(--faint); letter-spacing: 0.02em; }
.promises span::before { content: "✓"; color: var(--good); margin-inline-end: 7px; }

/* ------------------------------------------------------------ landing: sections */

.section { padding: 0 var(--gutter); }
.section > .inner { max-width: var(--wide); margin: 0 auto; }
.section-head { display: grid; gap: 14px; max-width: 40rem; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 18px; }
.spaced { margin-top: 120px; }

/* how a roll is made: a real sequence, so it is numbered */
.roll {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font: 600 34px/1 var(--display);
  color: var(--brass);
  font-variant-numeric: lining-nums;
}
.steps h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }
.steps p { color: var(--muted); font-size: 16px; }
.frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  background: var(--panel);
}
.frame figcaption { padding: 12px 16px; font-size: 13px; color: var(--faint); border-top: 1px solid var(--line); }

/* the app: two phones and what they show */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.phones { display: flex; gap: 18px; justify-content: center; align-items: flex-end; }
.phone {
  width: min(46%, 250px);
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(160deg, #2b211a, #0c0906);
  border: 1px solid rgba(214, 173, 91, 0.25);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 585 / 1266; object-fit: cover; }
.phone.raised { transform: translateY(-36px); }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.features li { display: grid; gap: 4px; padding-inline-start: 22px; border-inline-start: 2px solid var(--brass-dim); }
.features strong { font: 600 18px/1.3 var(--display); color: var(--ivory); }
.features span { color: var(--muted); font-size: 16px; }

/* check it yourself */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tool {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-raised), var(--panel));
  text-decoration: none;
  color: var(--ivory);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tool:hover { border-color: var(--brass-dim); color: var(--ivory); transform: translateY(-2px); }
.tool h3 { font-size: 24px; }
.tool p { color: var(--muted); font-size: 16px; }
.tool .go { color: var(--brass); font: 600 14px/1 var(--ui); margin-top: 8px; }

/* the final call */
.closing {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(36px, 6vw, 72px);
  display: grid;
  gap: 18px;
  justify-items: start;
  isolation: isolate;
}
.closing picture, .closing picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.closing::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 10, 7, 0.94) 0%, rgba(14, 10, 7, 0.72) 55%, rgba(14, 10, 7, 0.35) 100%); }
.closing h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; max-width: 22ch; }
.closing p { color: var(--muted); max-width: 34rem; }

/* ------------------------------------------------------------ privacy and support: reading pages */

.prose { max-width: 46rem; margin: 0 auto; padding: 64px var(--gutter) 0; }
.prose h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 10px; }
.prose h2 { font-size: 24px; line-height: 1.25; margin: 44px 0 12px; color: var(--ivory); padding-top: 22px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose p, .prose li { margin: 12px 0; color: #e6dbc6; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose strong { color: var(--ivory); font-weight: 600; }
.prose .meta { color: var(--muted); font-size: 15px; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: start; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--brass); font: 600 12px/1.3 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; }
.card {
  background: linear-gradient(180deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 22px 0;
}
.lang-switch { float: right; font-size: 14px; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 860px) {
  .roll, .showcase { grid-template-columns: minmax(0, 1fr); }
  .showcase .phones { order: -1; }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .spaced { margin-top: 88px; }
}
@media (max-width: 640px) {
  .nav a:not(.lang):not(.play) { display: none; }
  /* on a phone the table fills the top of the screen and the words sit below it */
  .hero { min-height: auto; }
  .hero .inner { padding: min(64vh, 520px) var(--gutter) 48px; }
  .hero picture, .hero picture img { height: min(78vh, 640px); }
  .hero picture img { object-position: 58% 40%; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(14, 10, 7, 0.55) 0%, rgba(14, 10, 7, 0) 18%, rgba(14, 10, 7, 0) 42%, var(--ink) min(76vh, 620px));
  }
  .phone.raised { transform: translateY(-20px); }
  .steps li { grid-template-columns: 40px minmax(0, 1fr); }
  .steps li::before { font-size: 28px; }
  .tool { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.prose .lang { float: right; font-size: 14px; margin-top: 8px; }

/* a shared moment (/m/<id>): one centred card */
.moment { max-width: 40rem; margin: 0 auto; padding: 72px 0 40px; text-align: center; }
.moment h1 { font-size: clamp(40px, 6vw, 64px); margin: 8px 0 14px; }
.moment .lead { color: var(--ivory); font-size: 19px; margin: 0 auto 10px; max-width: 34rem; }
.moment .muted { margin-bottom: 28px; }
.moment .cta { justify-content: center; }

/* the language switcher (every site page, in the footer): six languages, each named in its own language */
.langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 14px/1.4 var(--ui); }
.langs a[aria-current="page"] { color: var(--ivory); }

/* right-to-left pages (Arabic): the darkening behind the words sits on the right */
[dir="rtl"] .hero::after {
  background:
    linear-gradient(270deg, rgba(14, 10, 7, 0.92) 0%, rgba(14, 10, 7, 0.7) 38%, rgba(14, 10, 7, 0.05) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(14, 10, 7, 0) 38%),
    linear-gradient(180deg, rgba(14, 10, 7, 0.75) 0%, rgba(14, 10, 7, 0) 22%);
}
[dir="rtl"] .closing::after { background: linear-gradient(270deg, rgba(14, 10, 7, 0.94) 0%, rgba(14, 10, 7, 0.72) 55%, rgba(14, 10, 7, 0.35) 100%); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
