/* Wave Games — site styles */
:root {
  --blue-center: #0d91f5;
  --blue-edge: #0468f1;
  --blue-deep: #0356c9;
  --white: #ffffff;
  --white-80: rgba(255, 255, 255, .82);
  --white-60: rgba(255, 255, 255, .62);
  --white-20: rgba(255, 255, 255, .2);
  --white-12: rgba(255, 255, 255, .12);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--blue-edge);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, var(--blue-center) 0%, rgba(13, 145, 245, 0) 100%),
    var(--blue-edge);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-edge);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 28px);
  padding: clamp(64px, 12vh, 140px) var(--gutter) clamp(40px, 8vh, 96px);
  text-align: center;
}

.brand { margin: 0; line-height: 0; }

.brand img {
  width: clamp(220px, 58vw, 600px);
  height: auto;
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}

.tagline {
  margin: 0;
  font-size: clamp(.8rem, 1.6vw, .95rem);
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--white-80);
  padding-left: .32em; /* optically re-centre letter-spaced text */
  animation: rise .9s .12s cubic-bezier(.2, .8, .2, 1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: clamp(6px, 1.5vw, 14px);
  padding: 0 30px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-edge);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(3, 70, 170, .35), 0 14px 30px rgba(2, 40, 120, .25);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .9s .24s cubic-bezier(.2, .8, .2, 1) both;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(3, 70, 170, .35), 0 18px 34px rgba(2, 40, 120, .28); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(3, 70, 170, .35), 0 8px 18px rgba(2, 40, 120, .22); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  font-size: .875rem;
  color: var(--white-80);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  padding: 6px 0;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white-12);
  border: 1px solid var(--white-20);
  transition: background .2s ease, transform .2s ease;
}
.social svg { width: 18px; height: 18px; }
.social:hover { background: var(--white-20); transform: translateY(-2px); }

.footer-links { justify-content: center; }
.copyright { margin: 0; color: var(--white-60); }

.hero .social {
  margin-top: 4px;
  animation: rise .9s .36s cubic-bezier(.2, .8, .2, 1) both;
}

/* ---------- Waves (decorative) ---------- */
.waves {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: clamp(120px, 22vh, 220px);
  pointer-events: none;
  overflow: hidden;
}
.waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  max-width: none;
}
.waves .w1 { fill: rgba(255, 255, 255, .06); animation: drift 22s linear infinite; }
.waves .w2 { fill: rgba(255, 255, 255, .08); animation: drift 15s linear infinite reverse; height: 78%; }
.waves .w3 { fill: rgba(3, 86, 201, .35); animation: drift 30s linear infinite; height: 52%; }

@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Legal / text pages ---------- */
.page {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) var(--gutter) clamp(48px, 10vh, 120px);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px var(--gutter);
  position: relative;
  z-index: 1;
}
.page-header .home { display: inline-block; line-height: 0; border-radius: 8px; }
.page-header img { width: clamp(110px, 18vw, 150px); height: auto; }
.back {
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white-80);
}
.back:hover { color: var(--white); }

.card {
  background: var(--white);
  color: #10233f;
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 20px 60px rgba(2, 40, 120, .25);
}
.card h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.2;
  color: var(--blue-edge);
  letter-spacing: -.01em;
}
.card .meta { margin: 0 0 28px; color: #5b6b82; font-size: .9rem; }
.card h2 { margin: 32px 0 8px; font-size: 1.15rem; color: #0b2a57; }
.card p, .card li { color: #33445d; overflow-wrap: anywhere; }
.card a { color: var(--blue-edge); }
.card .table-wrap { overflow-x: auto; margin: 16px 0; }
.card table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.card th, .card td { padding: 8px 12px 8px 0; text-align: left; vertical-align: top; color: #33445d; border-bottom: 1px solid #e3e9f2; }
.card th { color: #0b2a57; font-weight: 700; white-space: nowrap; }

/* 404 */
.notfound .code {
  margin: 0;
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}

/* ---------- Responsive ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: 24px; padding-bottom: 12px; gap: 10px; }
  .brand img { width: clamp(180px, 32vw, 380px); }
  .btn { min-height: 44px; margin-top: 2px; }
  .site-footer { padding-top: 8px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); gap: 2px; }
  .waves { height: 90px; }
}

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

@media print {
  .waves, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
