/* Shared by every page of the site (support, privacy). Colors follow
   lib/ui/theme.dart, so the pages look like the game. */
@font-face {
  font-family: 'Lilita One';
  src: url('/common/LilitaOne-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --navy: #14254f;
  --blue: #2f6be6;
  --blue-light: #5b95ff;
  --blue-dark: #1d47b3;
  --bg-top: #3b78f0;
  --bg-bottom: #1f4fc4;
  --panel: #eaf2ff;
  --ink: #1b2b52;
  --ink-soft: #46557a;
  --line: #dfe8f7;
  --field: #c5d5f2;
  --gold: #ffc928;
  --gold-dark: #e29400;
  --red: #f2405a;
  --red-dark: #b81e3a;
  --green-top: #7be35a;
  --green-bottom: #34b52e;
  --green-edge: #1e7a22;
  --blue-top: #6fa6ff;
  --blue-edge: #1a3f9e;

  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC',
    'Hiragino Sans', 'Apple SD Gothic Neo', 'Microsoft YaHei', 'Yu Gothic', 'Malgun Gothic',
    'Noto Sans CJK SC', sans-serif;
  --outline: 0 2px 0 var(--navy), 0 -2px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy),
    2px 2px 0 var(--navy), -2px 2px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy);
}

/* Set by the script in <head> until lang.js has put in the translation. */
.translating body {
  visibility: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg-bottom);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.07' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 22h18m-6-6 6 6-6 6'/%3E%3Cpath d='M58 50H40m6-6-6 6 6 6'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

a {
  color: var(--blue-dark);
  font-weight: 600;
}

/* Heading font: Lilita One only covers Latin without Vietnamese accents,
   so the other languages use a heavy system font instead. */
.display,
.section-title,
.btn {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
}

html:not([data-lang='en']) :is(.display, .section-title, .btn) {
  font-family: var(--ui);
  font-weight: 800;
  letter-spacing: 0;
}

/* Header */

.top {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 16px 28px;
  text-align: center;
  color: #fff;
}

.langs {
  position: absolute;
  top: 14px;
  right: 16px;
  display: none;
  align-items: center;
}

.js .langs {
  display: flex;
}

.langs svg {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  pointer-events: none;
}

.langs select {
  min-height: 38px;
  padding: 0 34px 0 36px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: rgba(20, 37, 79, 0.4)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    right 13px center no-repeat;
  color: #fff;
  font: 600 15px/1 var(--ui);
  cursor: pointer;
  appearance: none;
}

.langs select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.langs option {
  color: var(--ink);
  background: #fff;
}

.app-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border: 3px solid var(--navy);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--navy);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 64px);
  font-weight: 400;
  text-transform: uppercase;
}

.logo-title {
  font-size: 1em;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 3px 0 var(--navy), 0 -3px 0 var(--navy), 3px 0 0 var(--navy), -3px 0 0 var(--navy),
    3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy),
    0 7px 0 var(--navy);
}

/* Sized against the title like in GameLogo: 270×54 under a 58 px title. */
.logo-arrow {
  display: block;
  width: 4.65em;
  height: 0.93em;
  margin-top: 0.06em;
}

.logo-sub {
  margin-top: 10px;
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-shadow: var(--outline), 0 3px 0 var(--navy);
}

.lede {
  margin: 18px auto 20px;
  max-width: 30em;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

/* Chunky 3D buttons, like GameButton in the app. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px 4px;
  border: 3px solid var(--navy);
  border-radius: 16px;
  font-size: 21px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  text-shadow: var(--outline);
  cursor: pointer;
  box-shadow: inset 0 -5px 0 var(--edge), 0 4px 0 var(--navy);
  background: linear-gradient(180deg, var(--top), var(--bottom));
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 -3px 0 var(--edge), 0 1px 0 var(--navy);
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.btn[disabled] {
  cursor: progress;
  filter: saturate(0.4) brightness(0.95);
  transform: none;
}

.btn-gold {
  --top: #ffe680;
  --bottom: var(--gold);
  --edge: var(--gold-dark);
}

.btn-green {
  --top: var(--green-top);
  --bottom: var(--green-bottom);
  --edge: var(--green-edge);
}

.btn-blue {
  --top: var(--blue-top);
  --bottom: var(--blue);
  --edge: var(--blue-edge);
}

/* Layout */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border: 3px solid var(--navy);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--navy);
}

.section-title {
  margin: 12px 0 14px;
  font-size: 30px;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  text-shadow: var(--outline), 0 4px 0 var(--navy);
}

/* Footer */

footer {
  padding: 22px 16px 32px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-bottom: 10px;
  font-size: 15px;
}

footer nav a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

footer nav a:hover {
  text-decoration: underline;
}

footer nav a[aria-current='page'] {
  color: var(--gold);
}

footer p {
  margin: 0;
}

@media (min-width: 640px) {
  .top {
    padding-top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::after {
    transition: none !important;
  }
}
