@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
  --navy: #1a2e44;
  --aqua: #2a9d8f;
  --sand: #f4f1eb;
  --gold: #e9c46a;
  --white: #ffffff;
  --text: #1a2e44;
  --text-light: #4a6080;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(26, 46, 68, 0.12);
  --shadow-hover: 0 8px 32px rgba(26, 46, 68, 0.2);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--aqua);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
a:hover { color: var(--navy); }

/* ── Nav ── */
.site-nav {
  background: var(--navy);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-brand {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--gold) !important;
  margin-right: auto;
  text-decoration: none;
}
.nav-brand:hover { color: var(--white) !important; }

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 24px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--aqua);
  color: var(--white);
}
.nav-links .main-site-link a {
  border: 2px solid var(--gold);
  color: var(--gold);
}
.nav-links .main-site-link a:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: 2.5rem 0 4rem;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1f33 60%, #163548 100%);
  color: var(--white);
  padding: 4rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--sand);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.hero h1 {
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero p {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 3px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--aqua);
  color: inherit;
}

.card-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.card h3 { color: var(--navy); }
.card p { color: var(--text-light); font-size: 0.95rem; }

.card-cta {
  margin-top: auto;
  display: inline-block;
  background: var(--aqua);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 24px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  align-self: flex-start;
  transition: background 0.2s, transform 0.1s;
}
.card-cta:hover {
  background: var(--navy);
  transform: scale(1.03);
}

/* ── Section headers ── */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-header h2 { margin-bottom: 0.5rem; }
.section-header p { color: var(--text-light); font-size: 1rem; }

/* ── Bubble decoration ── */
.bubbles {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}
.bubble {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--aqua);
  opacity: 0.5;
  animation: bob 2s ease-in-out infinite;
}
.bubble:nth-child(2) { animation-delay: 0.3s; opacity: 0.7; }
.bubble:nth-child(3) { animation-delay: 0.6s; opacity: 0.4; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: 32px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--aqua);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(42, 157, 143, 0.4);
}
.btn-primary:hover {
  background: #238a7e;
  color: var(--white);
  box-shadow: 0 6px 20px rgba(42, 157, 143, 0.5);
}
.btn-secondary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(233, 196, 106, 0.4);
}
.btn-secondary:hover {
  background: #d4b05a;
  color: var(--navy);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2.5px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
  font-family: 'Nunito', sans-serif;
}
.site-footer a {
  color: var(--gold);
  font-weight: 700;
}
.site-footer a:hover { color: var(--white); }

.ta-disclaimer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ── Blog ── */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 6px solid var(--aqua);
  transition: transform 0.2s;
}
.post-card:hover { transform: translateX(4px); }
.post-card h3 { font-size: 1.3rem; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--aqua); }
.post-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
}
.post-excerpt {
  color: var(--text-light);
  font-size: 0.98rem;
  margin: 0;
}

/* ── Blog post ── */
.blog-post {
  max-width: 760px;
  margin: 0 auto;
}
.blog-post h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}
.post-date {
  color: var(--text-light);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.blog-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  font-size: 1.05rem;
  line-height: 1.75;
}
.blog-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  color: var(--aqua);
}
.blog-content ul, .blog-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.blog-content li { margin-bottom: 0.4rem; }
.blog-nav {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Games page ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.game-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.game-header {
  background: linear-gradient(135deg, var(--navy), #2a4a6a);
  color: var(--white);
  padding: 1.5rem 1.75rem 1.25rem;
}
.game-header h2 {
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.game-header p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  font-family: 'Inter', sans-serif;
  margin: 0;
}

.game-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.game-area {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0d1f33;
  position: relative;
  touch-action: none;
}

.game-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.game-score {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero { padding: 3rem 1rem 4rem; }
  .blog-content { padding: 1.5rem; }
  .nav-inner { gap: 0.5rem; }
  .nav-links a { padding: 0.35rem 0.75rem; font-size: 0.9rem; }
}

@media (max-width: 400px) {
  .nav-brand { font-size: 1.1rem; }
}
