/* jackandnine.web.app, in the Sapphire Club colours of the game
   (jack_and_nine/lib/app/theme.dart). Fonts are served from here: the pages
   ask nothing of any other site. */

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

:root {
  --ink: #F2EFE6; --mist: #B4C2DA; --muted: #9DAECB;
  --gold: #E3CC93; --brass: #D8C08A;
  --night: #050A17; --navy: #0A1530; --felt: #174C99;
  --hairline: rgba(216, 192, 138, .24);
  --serif: "Playfair", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { display: block; max-width: 100%; }
a { color: var(--gold); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(46px, 8.5vw, 88px); line-height: 1.08; }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.3; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.gold { color: var(--gold); }
.eyebrow { margin-bottom: 8px; color: var(--brass); font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 16px; border-radius: 8px; background: var(--gold); color: #15100A; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------- header */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--serif); font-size: 23px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.brand i { color: var(--gold); }
.top ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.top ul a { display: block; padding: 11px 12px; border-radius: 22px; color: var(--mist); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top ul a:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }

.hero { background: radial-gradient(80% 90% at 50% 0%, #1D4A92, #0B1D3F 50%, var(--night)); }
.hero-in { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: clamp(44px, 6vw, 70px); text-align: center; }

/* The opening cards are dealt into a fan. */
.fan { position: relative; width: 288px; height: 196px; margin-top: 20px; }
.fan img {
  position: absolute; left: var(--x); top: var(--y); width: 108px; height: 151px; border-radius: 7px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .5); transform: rotate(var(--turn));
  transition: translate .25s ease; animation: deal .9s cubic-bezier(.2, .9, .25, 1.15) both; animation-delay: var(--wait);
}
/* From a stack to the fan. The cards stay visible even if it never plays. */
@keyframes deal { from { left: 90px; top: 30px; transform: rotate(0deg); } }

.tagline { color: var(--mist); font-family: var(--serif); font-size: clamp(19px, 2.8vw, 26px); font-style: italic; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.soon, .ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px 26px; border-radius: 40px; text-align: center; line-height: 1.25; }
.soon { background: linear-gradient(#F3E5BE, #D8BC7E 55%, #B8975A); color: #15100A; font-family: var(--serif); font-size: 17px; font-weight: 700; }
.ghost { border: 1px solid rgba(216, 192, 138, .6); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s ease; }
.ghost:hover { background: rgba(216, 192, 138, .13); }

/* ---------------------------------------------------------- sections */

section { padding: clamp(44px, 6vw, 72px) 0; scroll-margin-top: 8px; }
.navy { background: var(--navy); }
.head { margin-bottom: 34px; text-align: center; }
.lead { max-width: 640px; margin: 14px auto 0; color: var(--mist); }
ol, ul.plain { margin: 0; padding: 0; list-style: none; }

.num { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-weight: 700; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.steps .num { margin-bottom: 12px; }
.steps h3 { margin-bottom: 4px; }
.steps p, .rules p { color: var(--mist); font-size: 14px; }

.ranks { display: grid; grid-template-columns: repeat(8, minmax(0, 108px)); justify-content: center; gap: 16px; margin: 0 0 26px; padding: 0; list-style: none; }
.ranks li { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ranks img { width: 100%; height: auto; border-radius: 7px; box-shadow: 0 12px 24px rgba(0, 0, 0, .45); transition: translate .25s ease; }
.points { padding: 2px 11px; border-radius: 11px; background: var(--felt); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.none .points { background: rgba(255, 255, 255, .14); color: var(--mist); }
.note { color: var(--mist); text-align: center; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 60px; }
.rules li { display: flex; align-items: flex-start; gap: 16px; }
.rules h3 { margin-bottom: 4px; font-size: 20px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.features li { padding: 24px; border: 1px solid var(--hairline); border-radius: 18px; background: linear-gradient(160deg, rgba(36, 76, 140, .28), rgba(8, 16, 34, .7)); transition: translate .25s ease, border-color .25s ease; }
.features svg { display: block; margin-bottom: 14px; }
.features h3 { margin-bottom: 4px; }
.features p { color: var(--mist); font-size: 14px; line-height: 1.55; }

.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.answers > div { padding: 20px 0; border-top: 1px solid var(--hairline); }
.answers h3 { margin-bottom: 6px; }
.answers p { color: var(--mist); font-size: 14px; }

.shots { display: flex; gap: 30px; margin-bottom: 38px; }
.device { flex: 1; min-width: 0; margin: 0; padding: 9px; border-radius: 30px; background: linear-gradient(150deg, #3B3F4D, #0C0E14 45%, #262A35); box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07); }
.device img { width: 100%; height: auto; border-radius: 22px; }
.closing { display: flex; justify-content: center; }

@media (hover: hover) {
  .fan img:hover { translate: 0 -10px; }
  .ranks li:hover img { translate: 0 -8px; }
  .features li:hover { translate: 0 -3px; border-color: rgba(216, 192, 138, .55); }
}

/* ---------------------------------------------------------- footer */

footer { padding: 28px 0 40px; border-top: 1px solid rgba(216, 192, 138, .22); color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
footer nav { display: flex; flex-wrap: wrap; column-gap: 18px; }
footer nav a { display: inline-block; padding: 8px 0; text-decoration: none; }
footer nav a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- policy, support */

.plain-top { background: radial-gradient(70% 160% at 50% 0%, #17396F, var(--night)); border-bottom: 1px solid var(--hairline); }
.prose { max-width: 760px; padding: 40px 0 64px; }
.prose h1 { margin-bottom: 8px; color: var(--gold); font-size: clamp(32px, 5vw, 44px); }
.prose h2 { margin: 36px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); font-size: 22px; }
.prose p, .prose ul { margin: 12px 0; color: var(--mist); }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose .when { margin-top: 0; font-size: 14px; }

/* ---------------------------------------------------------- smaller screens */

@media (max-width: 999px) {
  .ranks { grid-template-columns: repeat(4, minmax(0, 108px)); gap: 14px 12px; }
}
@media (max-width: 959px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: 1fr; gap: 22px; }
  .answers { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .shots { flex-direction: column; gap: 18px; }
}
@media (max-width: 619px) {
  body { font-size: 15px; }
  .top { min-height: 62px; }
  .brand { gap: 8px; font-size: 19px; }
  .brand img { width: 32px; height: 32px; }
  .top ul { gap: 0; }
  .top ul a { padding: 11px 8px; font-size: 13px; }
  .top .wide { display: none; }
  .actions { flex-direction: column; align-self: stretch; }
  .head.start { text-align: left; }
  .head.start .lead { margin-inline: 0; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .steps li { flex-direction: row; align-items: flex-start; gap: 14px; text-align: left; }
  .steps .num { margin: 0; }
  .ranks { gap: 12px 8px; }
  .ranks img { border-radius: 5px; }
  .points { padding: 1px 8px; font-size: 10px; }
  .features { grid-template-columns: 1fr; gap: 12px; }
  .features li { padding: 18px; }
  .device { padding: 5px; border-radius: 18px; }
  .device img { border-radius: 13px; }
  .closing .soon { flex: 1; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 359px) {
  .fan { scale: .86; }
}

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

/* ---------------------------------------------------------- invite page */

.invite { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 36px 0 56px; text-align: center; }
.invite h1 { font-size: clamp(34px, 6vw, 56px); }
.invite .lead { margin-top: 0; }
.code-card { width: min(420px, 100%); padding: 20px 22px 22px; border: 1px solid rgba(216, 192, 138, .55); border-radius: 20px; background: linear-gradient(160deg, rgba(36, 76, 140, .4), rgba(8, 16, 34, .8)); }
.code-card[hidden], .invite [hidden] { display: none; }
.code { margin: 2px 0 14px; color: var(--gold); font-family: var(--serif); font-size: clamp(34px, 8vw, 46px); font-weight: 700; letter-spacing: .12em; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: min(760px, 100%); margin: 8px 0; }
.how li { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mist); font-size: 14px; }
.how strong { color: var(--ink); }
.invite .small { max-width: 520px; font-size: 13px; }
button.ghost { background: none; cursor: pointer; font-family: inherit; }
@media (max-width: 640px) { .how { grid-template-columns: 1fr; } }
a.soon { text-decoration: none; }
