/* Just Poker — the support site.
   Light on purpose. This is a game people play with their friends on a sofa,
   and the previous version was dressed like a compliance document. */

:root {
  /* The whole page, in both senses. Without this a browser in dark mode is
     free to invert the thing itself - which is what happened, and why a page
     with no dark styles at all still came out black on somebody's Mac.
     "only light" says there is one version and this is it. */
  color-scheme: only light;

  --ground:    #FDFAF6;   /* warm paper */
  --surface:   #FFFFFF;
  --line:      #ECE4D9;
  --ink:       #201D1A;
  --ink-soft:  #5F5850;
  --ink-faint: #8C8378;
  --accent:    #B93A33;   /* the red chip; 5.4:1 on paper, so it can carry text */
  --accent-lift: #C8443C;

  /* Taken off the app icon rather than invented: its four cards are red,
     purple, green and orange, and a page keyed to anything else would look
     like a different product. The vivid ones are for shapes; the darker ones
     carry text, because #00C000 is 2.4:1 on paper and unreadable. */
  --card-red:    #E02020;
  --card-purple: #6A1FE0;
  --card-green:  #12B23A;
  --card-orange: #E8A400;
  --ink-red:     #B5231F;
  --ink-purple:  #5B21C0;
  --ink-green:   #157F35;
  --ink-orange:  #9A6200;

  /* SF Pro Rounded on an iPhone, which is where this gets read. Rounded
     because the app is a card game with friends, not a bank. */
  --display: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --data: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 680px; margin: 0 auto; padding: 44px 22px 72px; }

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---- hero ---- */
.hero { text-align: center; margin-bottom: 46px; }
.chips { display: flex; gap: 7px; justify-content: center; margin-bottom: 20px; }
.chips i {
  width: 15px; height: 15px; border-radius: 50%;
  display: block; border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 1.5px currentColor;
}
.chips i:nth-child(1) { color: var(--card-red);    background: var(--card-red); }
.chips i:nth-child(2) { color: var(--card-purple); background: var(--card-purple); }
.chips i:nth-child(3) { color: var(--card-green);  background: var(--card-green); }
.chips i:nth-child(4) { color: var(--card-orange); background: var(--card-orange); }

/* The app icon, so the page and the thing on the home screen are obviously
   the same. Drawn at 112 and shipped at 320, for a retina screen. */
.appicon {
  width: 112px; height: 112px;
  border-radius: 25%;
  display: block; margin: 0 auto 18px;
  box-shadow: 0 6px 20px rgba(32,29,26,0.14);
}

h1 {
  font-family: var(--display);
  font-size: clamp(38px, 9vw, 54px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 10px;
}
.hero p {
  margin: 0 auto;
  max-width: 26ch;
  font-size: 19px;
  color: var(--ink-soft);
}

/* ---- sections ---- */
section { margin-bottom: 44px; }
h2 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}

/* ---- the three steps. Numbered because it genuinely is an order: you
       cannot share a PIN you have not made. ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: baseline;
}
.steps .n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--accent);
}
.steps b { font-family: var(--display); font-size: 18px; font-weight: 600; display: block; }
.steps span { color: var(--ink-soft); font-size: 15.5px; }

/* ---- what you get ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.tile b { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; margin-bottom: 2px; }
.tile span { color: var(--ink-soft); font-size: 15px; }

/* ---- questions ---- */
.qa { display: grid; gap: 4px; }
.qa details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 2px 18px;
}
.qa summary {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16.5px;
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  font-size: 20px;
  color: var(--ink-faint);
  font-weight: 400;
  line-height: 1;
}
.qa details[open] summary::after { content: "\2013"; }
.qa p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15.5px; }

/* ---- contact ----
   One line rather than a card. It is a way to reach somebody when the
   questions above have not helped, not an invitation to write in. */
.contact-line {
  text-align: center;
  color: var(--ink-faint);
  font-size: 15px;
  margin: -20px 0 44px;
}
.contact-line a { font-weight: 600; }
.contact-line noscript { display: block; margin-top: 4px; }

code {
  font-family: var(--data);
  font-size: 0.88em;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

/* ---- the policy, which is prose rather than a page of cards ---- */
.policy h1 { font-size: clamp(30px, 7vw, 40px); }
.policy h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 32px 0 10px;
}
.policy p { margin: 0 0 13px; }
.policy ul { padding-left: 20px; margin: 0 0 13px; color: var(--ink-soft); }
.policy li { margin-bottom: 6px; }
.policy .stamp { font-family: var(--data); font-size: 12.5px; color: var(--ink-faint); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 46px;
  padding-top: 16px;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: baseline;
  color: var(--ink-faint);
  font-size: 14px;
}
footer .sep { flex: 1 1 auto; }


/* ---- the little drawings ----
   Inline SVG, stroked in currentColor, so each one takes the colour of the
   thing it belongs to and there is no image to fail to load. */
/* Not on the baseline. An SVG is a replaced element, so its baseline is its
   bottom edge - baseline-aligning it against a line of text hangs the whole
   drawing above the words. Opted out, and nudged so its middle sits on the
   middle of the heading's first line: 26px of icon against an 18px heading at
   1.55 line-height is a line box of about 28, so a single pixel centres it. */
.ico {
  width: 26px; height: 26px; flex: none;
  align-self: start;
  margin-top: 1px;
}
.steps li { grid-template-columns: 30px 26px 1fr; }
.steps li:nth-child(1) .ico { color: var(--ink-red); }
.steps li:nth-child(2) .ico { color: var(--ink-purple); }
.steps li:nth-child(3) .ico { color: var(--ink-green); }

.tile { display: grid; grid-template-columns: 26px 1fr; gap: 13px; align-items: start; }
.tile:nth-child(1) .ico { color: var(--ink-red); }
.tile:nth-child(2) .ico { color: var(--ink-purple); }
.tile:nth-child(3) .ico { color: var(--ink-green); }
.tile:nth-child(4) .ico { color: var(--ink-orange); }
