/* ============================================================
   TeddyWars — shared stylesheet
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Matemasie&family=Inter+Tight:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&display=swap');

/* ---- Design tokens ---- */
:root {
  --bg-deep: #3d1d54;
  --purple: #763ba3;
  --purple-dark: #5a2c7d;
  --purple-light: #9b5ec4;

  --accent: #d46745;
  --accent-dark: #a84f34;
  --accent-light: #e87d5c;

  --sand: #e8c5a7;
  --coins: #f2a96a;

  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.14);

  --radius-card: 20px;
  --radius-pill: 999px;

  --maxw: 1080px;
  --gap: clamp(1rem, 4vw, 2.5rem);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: 'Matemasie', system-ui, sans-serif;
  font-weight: 400;
  /* Matemasie clips top/bottom without generous line-height */
  line-height: 1.5;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); margin-bottom: 0.4em; }

p { margin-bottom: 1rem; }

.coins {
  font-style: italic;
  color: var(--coins);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.flow > * + * {
  margin-top: 1rem;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(42, 20, 80, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand img {
  height: 36px;
  width: auto;
}

.brand .wordmark {
  font-family: 'Matemasie', system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
}

.header-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.18s ease;
  margin-right: 20px;
}
.header-nav a:hover { color: var(--text); }

/* ---- Language switcher ---- */
.lang-select {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 2rem 0.45rem 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}
.lang-select:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.lang-select option {
  color: #000;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 2rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px var(--accent-dark);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -6px var(--accent-dark);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }

/* App Store badge link */
.appstore-link {
  display: inline-block;
  transition: transform 0.18s ease;
}
.appstore-link:hover { transform: translateY(-2px); }
.appstore-link img { height: 56px; width: auto; }

/* ============================================================
   Hero (landing)
   ============================================================ */
.hero {
  background: linear-gradient(to bottom, #2a1450, #4a2880, #763ba3);
  text-align: center;
  padding-block: clamp(3rem, 10vw, 6rem);
}

.hero .logo {
  width: clamp(120px, 30vw, 180px);
  margin-inline: auto;
  margin-bottom: 1.5rem;
  border-radius: 40px;
  box-shadow: rgb(0, 0, 0, .4) 0px 10px 10px -10px;
}

.hero h1 {
  margin-bottom: 0.6rem;
}

.tagline {
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 32ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-cta {
  margin-bottom: 2.5rem;
}

.what-it-is {
  font-weight: 300;
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* Feature bullets */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 720px;
  margin-inline: auto;
  list-style: none;
}
.features li {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 300;
}

/* Screenshots */
.screenshots {
  padding-block: clamp(2.5rem, 8vw, 4.5rem);
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 4vw, 2rem);
  justify-items: center;
  max-width: 820px;
  margin-inline: auto;
}
.screenshot-grid img {
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 260px;
}

/* ============================================================
   Long-form content pages
   ============================================================ */
.content {
  padding-block: clamp(2.5rem, 7vw, 4rem);
  flex: 1;
}
.content .container {
  max-width: 760px;
}
.content h1 {
  margin-bottom: 1.5rem;
}

/* Long-form rich content (privacy / terms / support) */
.legal > * + * {
  margin-top: 1rem;
}
.legal h1 {
  margin-bottom: 0.5rem;
}
.legal h2 {
  margin-top: 2.5rem;
  color: var(--sand);
}
.legal h3 {
  margin-top: 1.8rem;
}
.legal p {
  font-weight: 300;
  margin-bottom: 0;
}
.legal .muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.legal ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.legal li {
  font-weight: 300;
  padding-left: 1.5rem;
  position: relative;
}
.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.legal a {
  color: var(--accent-light);
  word-break: break-word;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(42, 20, 80, 0.5);
  padding-block: 2rem;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--text); }
.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

/* ---- Small screens ---- */
@media (max-width: 640px) {
  .header-nav .nav-links { display: none; }
  .site-header .container { flex-wrap: wrap; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
