:root {
  --bg: #0b1220;
  --bg2: #0f1829;
  --surface: #131d31;
  --surface2: #182439;
  --line: #243350;
  --text: #e8edf5;
  --muted: #9aa8bd;
  --gold: #f2c46d;
  --gold2: #ffdf9e;
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold2); }
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
em { font-style: italic; color: var(--gold2); }

/* ── Navigation ── */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 22px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 24px; }
.brand img { border-radius: 9px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.nav nav { display: flex; gap: 28px; }
.nav nav a { color: #cdd6e3; text-decoration: none; font-weight: 700; font-size: 16px; }
.nav nav a:hover { color: var(--gold2); }

/* ── Hero ── */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url('/img/faro-hero.webp') 70% 50% / cover no-repeat;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,13,24,.94) 0%, rgba(8,13,24,.78) 38%, rgba(8,13,24,.15) 70%, rgba(8,13,24,0) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,18,32,0) 28%);
}
.hero-inner { position: relative; max-width: var(--max); width: 100%; margin: 0 auto; padding: 120px 24px 80px; }
.hero-inner > * { max-width: 600px; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; }
.lead { font-size: 21px; color: #cfd8e5; margin: 22px 0 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.small { color: var(--muted); font-size: 15px; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 14px; font-weight: 800; font-size: 18px; text-decoration: none;
  transition: transform .15s, filter .15s, background .15s;
}
.btn.primary { background: linear-gradient(#f7d58a, #e3aa45); color: #241906; box-shadow: 0 5px 0 #9c7426, 0 12px 30px rgba(242,196,109,.25); }
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #9c7426; }
.btn.ghost { color: var(--text); border: 1.5px solid #3a4a68; background: rgba(15,24,41,.55); backdrop-filter: blur(4px); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold2); }

/* ── Sections ── */
main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0 20px; }
.section h2 { font-size: clamp(32px, 4vw, 46px); }
.section-lead { color: var(--muted); font-size: 20px; margin: 10px 0 34px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.feature .ico { font-size: 34px; margin-bottom: 12px; line-height: 1.2; }
.feature .ico.txt { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; color: var(--gold2); }
.feature h3 { font-size: 23px; margin-bottom: 8px; }
.feature p { margin: 0; color: #c1cbd9; font-size: 16.5px; }

/* ── Games ── */
#games h2 { margin-bottom: 30px; }
.game {
  display: grid; grid-template-columns: 1fr; gap: 0;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.game-art { position: relative; display: block; overflow: hidden; background: #000; }
.game-art img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; transition: transform .6s ease; }
.game-art:hover img { transform: scale(1.04); }
.play-badge {
  position: absolute; left: 22px; bottom: 22px; padding: 10px 18px; border-radius: 999px;
  background: rgba(8,13,24,.8); color: var(--gold2); font-weight: 800; border: 1px solid rgba(242,196,109,.4);
  backdrop-filter: blur(4px);
}
.game-body { padding: 34px 40px 38px; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 44px; align-items: start; }
.game-intro, .game-side { min-width: 0; }
.game-side .btn { margin-top: 4px; }
.game-body h3 { font-size: 38px; margin-bottom: 6px; }
.game-tag { font-size: 19px; color: var(--gold2); font-style: italic; margin: 0 0 14px; font-family: 'Playfair Display', Georgia, serif; }
.game-intro > p:not(.eyebrow):not(.game-tag) { color: #c8d1de; font-size: 17px; margin: 0; }
.chips { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #d6deea; }
.strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 24px; }
.strip img { border-radius: 8px; aspect-ratio: 16 / 7; object-fit: cover; border: 1px solid var(--line); }

.coming {
  display: flex; gap: 20px; align-items: center; margin-top: 22px;
  border: 2px dashed #2c3c5c; border-radius: var(--radius); padding: 24px 28px; color: var(--muted);
}
.coming .ico { font-size: 34px; }
.coming h3 { color: var(--text); font-size: 24px; margin-bottom: 4px; }
.coming p { margin: 0; }

/* ── Tips ── */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 60px; }
.tip { display: flex; gap: 14px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.tip span { font-size: 28px; line-height: 1.2; }
.tip p { margin: 0; font-size: 16.5px; color: #c1cbd9; }
.tip b { color: var(--text); }

/* ── FAQ ── */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 24px; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 800; font-size: 20px; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--gold); font-size: 26px; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: #c1cbd9; margin: 12px 0 0; }

/* ── Footer ── */
.foot { max-width: var(--max); margin: 90px auto 0; padding: 30px 24px 50px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 15px; }
.foot p { margin: 0; }
.muted { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .features { grid-template-columns: 1fr 1fr; }
  .game-body { grid-template-columns: 1fr; row-gap: 22px; }
  .tips { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav nav { display: none; }
  .hero { min-height: auto; }
  .hero-bg { background-position: 78% 50%; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(8,13,24,.85) 45%, rgba(8,13,24,.55) 100%); }
  .hero-inner { padding: 110px 20px 50px; }
  .lead { font-size: 18px; }
  .features { grid-template-columns: 1fr; }
  .game-body { padding: 26px 22px; }
  .game-body h3 { font-size: 30px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .btn { width: 100%; justify-content: center; }
  main { padding: 0 18px; }
  .section { padding-top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game-art img, .btn { transition: none; }
}

/* Your progress on this device (filled in by the script at the end of index.html) */
.progress { margin: 14px 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(242, 196, 109, .06); color: var(--muted); font-size: 15.5px; }
.progress b { color: var(--gold2); font-weight: 800; }
.progress.done { border-color: rgba(242, 196, 109, .45); }

/* Account: header button, dialog and toast */
.acct-btn { margin-left: 22px; font: 800 15px 'Nunito', sans-serif; color: var(--text); background: rgba(15,24,41,.55); border: 1.5px solid #3a4a68; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.acct-btn:hover { border-color: var(--gold); color: var(--gold2); }
.acct-btn, .brand span { white-space: nowrap; }
/* Phones: the name and the account button share one line */
@media (max-width: 480px) {
  .nav { padding: 18px 16px; }
  .brand { gap: 8px; font-size: 18px; }
  .brand img { width: 30px; height: 30px; }
  .acct-btn { margin-left: 8px; font-size: 14px; padding: 7px 12px; }
}
@media (max-width: 359px) { .brand { font-size: 16px; } .brand img { display: none; } }
dialog.acct { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog.acct::backdrop { background: rgba(3,6,12,.72); backdrop-filter: blur(3px); }
dialog.acct h2 { font-size: 26px; margin: 0 0 10px; }
dialog.acct p { color: #c1cbd9; margin: 0 0 14px; font-size: 16.5px; line-height: 1.5; }
dialog.acct label { display: block; font-weight: 800; font-size: 14px; margin: 4px 0 6px; color: var(--muted); }
dialog.acct input[type=email] { width: 100%; box-sizing: border-box; font: 17px 'Nunito', sans-serif; color: var(--text); background: #0b1220; border: 1.5px solid #3a4a68; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
dialog.acct input[type=email]:focus { outline: none; border-color: var(--gold); }
dialog.acct .btn { font: 800 17px 'Nunito', sans-serif; padding: 12px 22px; cursor: pointer; }
dialog.acct .btn.primary { border: 0; }
dialog.acct .acct-small { font-size: 14px; color: var(--muted); margin-top: 16px; }
.acct-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 6px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--gold2); text-decoration: underline; cursor: pointer; }
.linkish.danger { color: #ff9d8a; font-size: 14.5px; }
.acct-msg { color: #ff9d8a !important; font-weight: 700; min-height: 0; margin: 10px 0 0 !important; }
.acct-msg:empty { display: none; }
.toast-msg { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); background: #16233c; color: var(--text); border: 1px solid var(--gold); border-radius: 14px; padding: 14px 20px; font-weight: 700; box-shadow: 0 16px 40px rgba(0,0,0,.5); transition: opacity .5s; }
.toast-msg.out { opacity: 0; }
/* Privacy page */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 24px 20px; }
.doc h1 { font-size: 40px; margin: 0 0 6px; }
.doc h2 { font-size: 24px; margin: 34px 0 8px; }
.doc p, .doc li { color: #c1cbd9; font-size: 17.5px; line-height: 1.6; }
.doc ul { padding-left: 22px; }

/* "Your progress" dialog */
dialog.acct h3 { font-size: 19px; margin: 24px 0 10px; display: flex; align-items: baseline; gap: 10px; }
dialog.acct h3 .count { font: 800 14px 'Nunito', sans-serif; color: var(--gold2); }
dialog.acct .where { margin: -4px 0 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: #0b1220; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; }
.stat b { display: block; font: 800 24px 'Playfair Display', Georgia, serif; color: var(--gold2); line-height: 1.15; }
.stat span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.prog-games, .ach { list-style: none; margin: 0; padding: 0; }
.prog-games li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prog-games li:last-child { border-bottom: 0; }
.prog-games a { font-weight: 800; font-size: 17px; text-decoration: none; }
.prog-games a:hover { text-decoration: underline; }
.prog-games small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 13.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; border: 1px solid #3a4a68; color: #cdd6e3; white-space: nowrap; }
.tag.on { border-color: rgba(242,196,109,.6); color: var(--gold2); background: rgba(242,196,109,.08); }
.tag.off { color: var(--muted); border-style: dashed; }
.ach { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0b1220; }
.ach .ic { font-size: 26px; flex: none; width: 34px; text-align: center; }
.ach b { display: block; font-size: 15.5px; }
.ach small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; margin-top: 1px; }
.ach li.got { border-color: rgba(242,196,109,.55); background: rgba(242,196,109,.07); }
.ach li.got b { color: var(--gold2); }
.ach li.locked { opacity: .55; }
.ach li.locked .ic { filter: grayscale(1); }
.acct-box { margin-top: 22px; padding-top: 4px; border-top: 1px solid var(--line); }
.acct-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.acct-line input[type=email] { flex: 1 1 240px; margin-bottom: 0 !important; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .ach { grid-template-columns: 1fr; }
  dialog.acct { padding: 26px 18px 20px; }
}

/* Signed out, the dialog is just the sign-in form */
dialog.acct.narrow { width: min(460px, calc(100vw - 24px)); }
dialog.acct.narrow .acct-box { margin-top: 0; padding-top: 0; border-top: 0; }
