/* ===== Caffoy Interactive — Dark Tech Theme ===== */
:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: #151c2c;
  --border: #1e2a3f;
  --text: #e8eef8;
  --text-muted: #8b9bb8;
  --accent: #f0a030;
  --accent-bright: #ffc04d;
  --accent-dim: #c47a1a;
  --blue: #3a7bd5;
  --blue-glow: #4a9eff;
  --orange-glow: rgba(240, 160, 48, 0.35);
  --radius: 12px;
  --font-display: 'Orbitron', system-ui, sans-serif;
  --font-body: 'Rajdhani', system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 123, 213, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 123, 213, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(58, 123, 213, 0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #0a0e17;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  box-shadow: 0 0 24px var(--orange-glow);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 16px var(--orange-glow);
}
.btn-discord {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
}
.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.4);
}
.btn-lg { padding: 1rem 2rem; font-size: 1.15rem; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.85rem 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav-container {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo-link { display: flex; align-items: center; gap: 0.65rem; }
.nav-logo { width: 42px; height: 42px; border-radius: 8px; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
}
.nav { display: flex; gap: 1.75rem; }
.nav-link {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--accent-bright); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { flex-shrink: 0; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: 0.25s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  z-index: 1;
}
.hero-content { max-width: 720px; }
.hero-logo {
  width: 140px; height: 140px;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 28px rgba(240, 160, 48, 0.35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-title {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  background: linear-gradient(180deg, #fff 30%, var(--accent-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title span {
  font-size: 0.55em;
  letter-spacing: 0.28em;
  display: block;
  margin-top: 0.15em;
  -webkit-text-fill-color: var(--text-muted);
  background: none;
}
.hero-tagline {
  font-size: 1.35rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 500;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  background: rgba(240, 160, 48, 0.1);
  border: 1px solid rgba(240, 160, 48, 0.35);
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--accent-bright);
  font-weight: 500;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(240, 160, 48, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 160, 48, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(240, 160, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 160, 48, 0); }
}
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll a {
  display: flex;
  width: 28px; height: 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
  justify-content: center;
  padding-top: 8px;
}
.hero-scroll span {
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-down 1.8s infinite;
}
@keyframes scroll-down {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* Sections */
.section { position: relative; z-index: 1; padding: 5.5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Game */
.game-section {
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.6) 50%, transparent 100%);
}
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.game-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-bright);
}
.game-info p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}
.feature-list { list-style: none; margin-bottom: 2rem; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  font-size: 1.05rem;
}
.feature-icon { font-size: 1.2rem; line-height: 1.4; }
.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.status-pill {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}
.game-visual { display: flex; flex-direction: column; gap: 1rem; }
.asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.asset-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0d121c;
}
.asset-caption {
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.asset-caption strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
.asset-caption span { font-size: 0.9rem; color: var(--text-muted); }
.asset-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

/* Progress */
.progress-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 3rem;
}
.progress-title {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.progress-bars { display: flex; flex-direction: column; gap: 1rem; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.progress-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-bright));
  border-radius: 4px;
  transition: width 1s ease;
}

/* Trailer */
.trailer-block { max-width: 720px; margin: 0 auto; }
.trailer-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.play-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(240, 160, 48, 0.15);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.trailer-placeholder p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
}
.team-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}
.team-avatar {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.team-card h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.team-role { font-size: 0.9rem; color: var(--text-muted); }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-loading, .blog-empty, .blog-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.blog-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
}
.blog-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d121c;
}
.blog-card-body { padding: 1.35rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}
.blog-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.blog-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: rgba(58, 123, 213, 0.15);
  color: var(--blue-glow);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* Contact */
.contact-section { padding-bottom: 6rem; }
.contact-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, #0f1624 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.contact-card h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.contact-card > p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
}
.contact-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.contact-note code {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  color: var(--accent-bright);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-elevated);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.footer-logo { width: 32px; height: 32px; border-radius: 6px; }
.footer-copy { font-size: 0.9rem; color: var(--text-muted); }
.footer-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* Post overlay */
.post-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 2rem;
  overflow-y: auto;
}
.post-overlay[hidden] { display: none; }
.post-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.82);
  backdrop-filter: blur(6px);
}
.post-sheet {
  position: relative;
  width: min(760px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.post-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px; height: 40px;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.post-close:hover { background: var(--border); }
.post-content { color: var(--text); }
.post-content .post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.post-content h1 {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
  color: var(--accent-bright);
}
.post-content .cover {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--border);
}
.post-content .md h2 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}
.post-content .md h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.6rem;
}
.post-content .md p { margin-bottom: 1rem; color: var(--text-muted); font-size: 1.08rem; }
.post-content .md ul, .post-content .md ol {
  margin: 0 0 1rem 1.4rem;
  color: var(--text-muted);
}
.post-content .md li { margin-bottom: 0.35rem; }
.post-content .md code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-content .md pre {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.post-content .md a { color: var(--accent-bright); text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .game-grid, .about-content { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .header.menu-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10, 14, 23, 0.97);
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .header.menu-open .nav-cta {
    display: inline-flex;
    margin: 0.5rem 1.5rem 1rem;
  }
  .header.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .header.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  .hero-logo { width: 110px; height: 110px; }
  .team-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .post-sheet { padding: 2rem 1.25rem; }
}
