/* ============================================================
   Ceramiq Games — Let's Play God with Todd
   Light, whimsical, dreamlike
   ============================================================ */

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

:root {
  /* Dreamy palette */
  --bg: #f8f6f1;
  --bg-warm: #faf5ed;
  --bg-cool: #eef2f7;
  --text: #2c2a35;
  --text-muted: #6b6878;
  --accent: #7c5cbf;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 92, 191, 0.15);
  --gold: #c4953a;
  --gold-light: #f0dba8;
  --teal: #3d9b8f;
  --rose: #c7607b;
  --midnight: #1e1b2e;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 20px rgba(44, 42, 53, 0.06);
  --card-shadow-hover: 0 8px 40px rgba(124, 92, 191, 0.12);

  /* Tier colors */
  --tier-core: #3d9b8f;
  --tier-identity: #c4953a;
  --tier-deep: #7c5cbf;

  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-body: 'Quicksand', sans-serif;
  --font-handwritten: 'Caveat', cursive;

  /* Sizing */
  --max-width: 1200px;
  --section-pad: clamp(4rem, 10vw, 8rem);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

/* --- Particles background --- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-glow);
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1);
  }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124, 92, 191, 0.08);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 24px rgba(44, 42, 53, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
}

.logo-accent {
  font-family: var(--font-handwritten);
  font-size: 1.4rem;
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(6rem + 60px) 2rem var(--section-pad);
  min-height: 100vh;
  text-align: center;
}

.hero-content {
  flex: 1;
  max-width: 680px;
}

.hero-tag {
  font-family: var(--font-handwritten);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.hero-title-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
}

.hero-image {
  border-radius: 20px;
  box-shadow: 0 16px 60px rgba(124, 92, 191, 0.15);
  transition: transform 0.4s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

.hero-image-glow {
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  filter: blur(30px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 92, 191, 0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  box-shadow: 0 6px 24px rgba(124, 92, 191, 0.4);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid rgba(124, 92, 191, 0.25);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-handwritten);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* --- Game Section --- */
.section-game {
  background: var(--bg-warm);
}

.game-text {
  max-width: 720px;
  margin-bottom: 3rem;
}

.game-text p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.85;
}

.game-text strong {
  color: var(--text);
}

.game-text em {
  color: var(--accent);
  font-style: italic;
}

.game-mechanics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.mechanic-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}

.mechanic-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

.mechanic-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.mechanic-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.mechanic-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Gods Section --- */
.section-gods {
  background: var(--bg-cool);
}

.gods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.god-card {
  display: flex;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}

.god-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

.god-img-wrap {
  flex: 0 0 160px;
  min-height: 200px;
  overflow: hidden;
}

.god-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.god-card:hover .god-img {
  transform: scale(1.08);
}

.god-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.god-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.god-title {
  font-family: var(--font-handwritten);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.god-domain {
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.god-ability {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Mindscape Section --- */
.section-mindscape {
  background: var(--bg-warm);
}

.tier-section {
  margin-bottom: 2.5rem;
}

.tier-section:last-child {
  margin-bottom: 0;
}

.tier-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 1.2rem;
}

.tier-label-core {
  background: rgba(61, 155, 143, 0.1);
  color: var(--tier-core);
}

.tier-label-identity {
  background: rgba(196, 149, 58, 0.1);
  color: var(--tier-identity);
}

.tier-label-deep {
  background: rgba(124, 92, 191, 0.1);
  color: var(--tier-deep);
}

.mindscape-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}

.mindscape-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  border-top: 3px solid transparent;
}

.mindscape-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

.mindscape-card.tier-core {
  border-top-color: var(--tier-core);
}

.mindscape-card.tier-identity {
  border-top-color: var(--tier-identity);
}

.mindscape-card.tier-deep {
  border-top-color: var(--tier-deep);
}

.mindscape-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.8rem;
}

.mindscape-card h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.mindscape-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Flow / Timeline Section --- */
.section-flow {
  background: var(--bg-cool);
}

.flow-timeline {
  max-width: 680px;
  position: relative;
  padding-left: 3.5rem;
}

.flow-timeline::before {
  content: '';
  position: absolute;
  left: 1.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-light), var(--gold-light), var(--teal));
  border-radius: 2px;
}

.flow-step {
  position: relative;
  margin-bottom: 2.5rem;
}

.flow-step:last-child {
  margin-bottom: 0;
}

.flow-number {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(124, 92, 191, 0.3);
}

.flow-content h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.flow-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- About Section --- */
.section-about {
  background: var(--bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.85;
}

.about-text strong {
  color: var(--text);
}

.about-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--accent);
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-card ul {
  list-style: none;
  padding: 0;
}

.about-card li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--midnight);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer .logo-text {
  color: #fff;
}

.footer .logo-accent {
  color: var(--accent-light);
}

.footer-brand {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-handwritten);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

/* --- Animations on scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: calc(5rem + 40px);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-image-wrap {
    max-width: 100%;
  }

  .gods-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(248, 246, 241, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(124, 92, 191, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .god-card {
    flex-direction: column;
  }

  .god-img-wrap {
    flex: none;
    min-height: 200px;
    max-height: 220px;
  }

  .mindscape-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-timeline {
    padding-left: 3rem;
  }

  .flow-number {
    left: -3rem;
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .mindscape-row {
    grid-template-columns: 1fr;
  }
}
