/*
 * Shared design system for the marketing site (/, /about, /contact, /legal/**).
 * Mirrors the Android app theme (dev.hristovski.nikola.android.trifectaword.ui.theme):
 * rich blue drives primary actions, teal is the contrasting accent. No purple.
 *
 * The game itself (/app/**) has its own stylesheets under /app/css/ and does not use this file.
 */
:root {
  color-scheme: light dark;
  /* Light theme */
  --canvas: #F3F9FE;          /* CanvasLight */
  --surface: #EAF5FE;         /* SurfaceContainerLowLight */
  --surface-high: #D6EFFF;    /* SurfaceContainerHighLight */
  --border: #BFE3F2;          /* CyanContainerLight */
  --fg: #0A2A43;              /* OnSurfaceLight */
  --muted: #3F6075;           /* derived cool blue-grey */
  --primary: #0060A9;         /* BlueLight */
  --primary-fg: #ffffff;
  --accent: #00897B;          /* TealLight */
  --accent-cyan: #45D7EE;     /* GameBorderCyan */
  --accent-gold: #E6B84C;     /* GameBorderGold */
  --header-bg: rgba(243, 249, 254, 0.92);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0B1E2B;        /* CanvasDark */
    --surface: #132B3C;       /* SurfaceContainerDark */
    --surface-high: #1B3547;  /* SurfaceContainerHighDark */
    --border: #234153;        /* SurfaceContainerHighestDark */
    --fg: #DCEBF5;            /* OnSurfaceDark */
    --muted: #9FBBCE;         /* derived cool blue-grey */
    --primary: #6FB6F0;       /* BlueDark */
    --primary-fg: #072235;
    --accent: #4DB6AC;        /* TealDark */
    --accent-cyan: #45D7EE;   /* GameBorderCyan */
    --accent-gold: #E6B84C;   /* GameBorderGold */
    --header-bg: rgba(11, 30, 43, 0.92);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--fg);
  line-height: 1.6;
}

a {
  color: var(--primary);
}

/* ---------------------------------------------------------------------
   Site header / navigation
   --------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav a:hover {
  background: var(--surface-high);
  color: var(--fg);
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--surface);
}

.nav-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Shared page layout
   --------------------------------------------------------------------- */

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

main.wide {
  max-width: 900px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--primary);
}

.page-header .accent-bar {
  margin-left: 0;
}

.page-header .tagline {
  text-align: left;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--primary);
}

.accent-bar {
  width: 96px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
}

.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 0 0 24px;
}

h2 {
  margin-top: 0;
  color: var(--accent);
}

h3 {
  margin: 20px 0 6px;
  color: var(--fg);
  font-size: 1.05rem;
}

h3:first-of-type {
  margin-top: 0;
}

ul {
  padding-left: 20px;
  margin-bottom: 0;
}

li {
  margin-bottom: 6px;
}

li::marker {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ---------------------------------------------------------------------
   Hero (landing page)
   --------------------------------------------------------------------- */

.hero {
  text-align: center;
  margin-bottom: 36px;
}

.logo {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(0, 96, 169, 0.25);
}

.hero .accent-bar {
  margin: 0 auto 16px;
}

.hero .tagline {
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.play-now-btn,
.play-store-btn,
.install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
}

.play-now-btn {
  background: var(--primary);
  color: #fff;
}

.play-store-btn {
  background: var(--surface-high);
  color: var(--fg);
  border-color: var(--border);
}

.play-store-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.install-btn {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  font-family: inherit;
  cursor: pointer;
}

.install-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Hidden until js/pwa.js confirms the browser can actually install the app. */
.install-btn[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------
   Contact page
   --------------------------------------------------------------------- */

.contact-methods {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 24px;
}

.contact-method {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.contact-method h3 {
  margin-top: 0;
  color: var(--accent);
}

.contact-method a.email-link {
  display: inline-block;
  font-weight: 700;
  word-break: break-word;
}

/* ---------------------------------------------------------------------
   About page
   --------------------------------------------------------------------- */

.about-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 8px 0 0;
}

.about-stat {
  background: var(--surface-high);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}

.about-stat strong {
  display: block;
  font-size: 1.4rem;
  color: var(--primary);
}

.about-stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------
   Site footer (shared across every page below the app shell)
   --------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 28px 16px 40px;
}

.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 14px;
}

.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
}

.site-footer nav a:hover {
  background: var(--surface-high);
  color: var(--fg);
}

.site-footer p {
  color: var(--muted);
  margin: 4px 0;
  font-size: 0.9rem;
}

.site-footer a.footer-email {
  font-weight: 600;
}

/* Legacy alias kept for the two legal pages' own <footer>-less layout. */
footer.legal-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 20px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .site-header-inner {
    justify-content: center;
  }
  .brand {
    margin-right: 0;
    width: 100%;
    justify-content: center;
  }
  .site-nav {
    width: 100%;
    justify-content: center;
  }
  .nav-play-btn {
    width: 100%;
  }
}
