/* Towers of Hanoi: marketing site. Colours come from the app logo/theme
   (apps/mobile/src/constants/colors.ts). */
:root {
  --bg-top: #253072;
  --bg-mid: #232b62;
  --bg-bottom: #151847;
  --text: #b8ecf8;
  --text-mid: #8fd3f0;
  --text-soft: #9db6d9;
  --yellow: #f7c240;
  --orange: #ed5f31;
  --wood: #512420;
  --wood-hi: #923f36;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(184, 236, 248, 0.16);
  --disk-blue: #2e4fa3;
  --disk-red: #d94520;
  --disk-yellow: #e5a820;
  --radius: 20px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-bottom) linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%) fixed;
}

a { color: var(--yellow); text-underline-offset: 3px; }
a:hover { color: #ffd978; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.brand .of { color: var(--yellow); }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; font-weight: 700; }
nav a:hover, nav a[aria-current="page"] { color: var(--yellow); }

/* Hero */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
h1 { margin: 0 0 16px; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; color: #e8fbff; text-shadow: 0 3px 0 #5ba2c8, 0 8px 24px rgba(0, 0, 0, 0.35); }
h1 .of { display: block; background: linear-gradient(180deg, var(--yellow), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.lead { font-size: 1.25rem; color: var(--text); max-width: 34ch; margin: 0 0 28px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta a { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.cta a:hover { transform: translateY(-2px); }
.cta img { height: 56px; width: auto; display: block; }
.fine { margin-top: 14px; font-size: 0.85rem; color: var(--text-soft); }

/* Hero illustration */
.board { position: relative; width: 100%; max-width: 440px; margin-inline: auto; aspect-ratio: 1 / 0.9; }
.board svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.disk { animation: bob 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.disk.d2 { animation-delay: -1.2s; }
.disk.d3 { animation-delay: -2.4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Sections */
section { padding: 56px 0; }
h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.15; color: #e8fbff; }
h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--yellow); }
.sub { color: var(--text-soft); max-width: 60ch; margin: 0 0 32px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--text); font-size: 0.98rem; }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; display: block; }

.cta-band { text-align: center; }
.cta-band .cta { justify-content: center; margin-top: 22px; }

/* Document pages (privacy, rules) */
.doc { padding: 24px 0 72px; }
.doc .wrap { width: min(780px, 100% - 32px); }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); text-shadow: 0 2px 0 #5ba2c8; }
.doc h2 { margin-top: 40px; font-size: 1.5rem; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc .updated { color: var(--text-soft); font-size: 0.95rem; }
.panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0; }
.panel.tip { border-color: rgba(247, 194, 64, 0.45); }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.98rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--card-border); vertical-align: top; }
th { color: var(--yellow); }
code { background: rgba(0, 0, 0, 0.25); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }

/* Footer */
.site-footer { border-top: 1px solid var(--card-border); padding: 28px 0 40px; color: var(--text-soft); font-size: 0.95rem; background: rgba(0, 0, 0, 0.15); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text); }
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

.notfound { text-align: center; padding: 96px 0; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .board { order: -1; max-width: 320px; }
  body { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .disk { animation: none; }
  html { scroll-behavior: auto; }
}
