/* ============================================
   Calico Forge Games — stylesheet
   ============================================ */

:root {
  --bg: #121010;
  --bg-alt: #181514;
  --surface: #1e1a17;
  --surface-2: #251f1a;
  --border: #322922;
  --text: #f5efe6;
  --text-dim: #b8ab9d;
  --text-faint: #8a7c6f;

  --calico-white: #fffaf3;
  --calico-cream: #f4ece2;
  --calico-ink: #211a16;
  --calico-muted: #74665c;
  --calico-line: #e3d6c8;

  --ember: #e8632c;
  --ember-light: #ff8c4d;
  --amber: #f0a856;

  --font-head: "Fraunces", Georgia, "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(232, 99, 44, 0.12), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(240, 168, 86, 0.06), transparent 60%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

section { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--amber);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-head {
  max-width: 620px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ember-light), var(--ember));
  color: #1a1108;
  box-shadow: 0 8px 24px -8px rgba(232, 99, 44, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(232, 99, 44, 0.7); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(18, 16, 16, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(18, 16, 16, 0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 136px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-logo {
  width: min(320px, 50vw);
  height: 124px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.18));
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--ember);
  border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 18px; }

/* language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 5px 11px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-switch button.active {
  background: var(--ember);
  color: #1a1108;
}
.lang-switch button:not(.active):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 232px 0 110px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 22px;
}
.hero h1 .accent {
  font-style: normal;
  background: linear-gradient(135deg, var(--ember-light), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .dot { color: var(--ember); }
.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 460px;
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.hero-art .glow {
  position: absolute;
  width: 78%; height: 78%;
  background: radial-gradient(circle, rgba(232,99,44,0.35), transparent 70%);
  filter: blur(10px);
}
.hero-logo {
  position: relative;
  width: min(520px, 90%);
  height: auto;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 28px 38px rgba(0, 0, 0, 0.28));
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}

/* ---------- Games section ---------- */
.games {
  padding: 120px 0;
  background:
    radial-gradient(circle at 4% 12%, rgba(232, 99, 44, 0.12) 0 70px, transparent 72px),
    radial-gradient(circle at 96% 86%, rgba(33, 26, 22, 0.06) 0 110px, transparent 112px),
    var(--calico-cream);
  color: var(--calico-ink);
  border-block: 1px solid rgba(255, 250, 243, 0.12);
}

.games .section-head p { color: var(--calico-muted); }
.games .eyebrow { color: var(--ember); }
.games .eyebrow::before { background: var(--ember); }

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.game-card {
  background: var(--calico-white);
  border: 1px solid var(--calico-line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 99, 44, 0.52);
  box-shadow: 0 24px 48px -24px rgba(54, 37, 27, 0.32);
}

.game-art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
}
.game-art svg { width: 100%; height: 100%; transition: transform 0.6s ease; }
.game-card:hover .game-art svg { transform: scale(1.06); }

.game-art .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(18,16,16,0) 40%, rgba(18,16,16,0.75) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.game-card:hover .play-btn { opacity: 1; }
.play-circle {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(245,239,230,0.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,239,230,0.4);
  display: grid;
  place-items: center;
  transform: scale(0.85);
  transition: transform 0.3s ease, background 0.3s ease;
}
.game-card:hover .play-circle { transform: scale(1); }
.play-circle:hover { background: var(--ember); border-color: var(--ember); }
.play-circle svg { width: 18px; height: 18px; margin-left: 3px; }

.game-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(18,16,16,0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245,239,230,0.15);
}

.game-body { padding: 24px 26px 28px; }
.game-body .platforms { display: flex; gap: 8px; margin-bottom: 10px; }
.game-body .platforms span {
  font-size: 0.72rem;
  color: var(--calico-muted);
  border: 1px solid var(--calico-line);
  background: #fff;
  padding: 3px 9px;
  border-radius: 999px;
}
.game-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.game-body p { color: var(--calico-muted); font-size: 0.95rem; margin-bottom: 16px; }
.game-links { display: flex; gap: 14px; }
.game-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.game-links a:hover { gap: 8px; color: #b94318; }

/* ---------- CTA band ---------- */
.cta-band {
  padding: 100px 0 120px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 18px; }
.cta-band p { color: var(--text-dim); max-width: 480px; margin: 0 auto 34px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 34px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-faint); max-width: 320px; font-size: 0.92rem; }
.footer-col h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a { color: var(--text-dim); font-size: 0.94rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  color: var(--text-dim);
}
.social-row a:hover { border-color: var(--ember); color: var(--ember-light); transform: translateY(-2px); }
.social-row svg { width: 16px; height: 16px; }

/* ---------- Modal (trailer) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 8, 7, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  width: 100%;
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h4 { font-size: 1.1rem; }
.modal-close {
  background: none; border: none; color: var(--text-dim);
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-media { aspect-ratio: 16/9; background: var(--bg); position: relative; overflow: hidden; }
.modal-media svg { width: 100%; height: 100%; }

/* ---------- Contact page ---------- */
.page-hero {
  padding: 172px 0 40px;
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin-bottom: 14px; }
.page-hero p { color: var(--text-dim); max-width: 480px; margin: 0 auto; font-size: 1.05rem; }

.contact-simple {
  padding: 30px 0 150px;
  text-align: center;
}
.contact-simple .email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--calico-ink);
  padding: 14px 24px;
  border: 1px solid var(--calico-line);
  border-radius: 999px;
  background: var(--calico-white);
  box-shadow: 0 22px 48px -30px rgba(232, 99, 44, 0.55);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-simple .email-link:hover {
  border-color: var(--ember);
  color: #b94318;
  transform: translateY(-3px);
  box-shadow: 0 28px 56px -30px rgba(232, 99, 44, 0.7);
}
.contact-simple .email-link svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--ember); }
.contact-simple .social-row { justify-content: center; margin-top: 40px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin: 0 auto; order: -1; }
  .games-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .brand-logo {
    width: min(255px, 46vw);
    height: 70px;
  }
  .site-header.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 136px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 28px 28px;
    gap: 20px;
  }
  .hero { padding: 200px 0 70px; }
  .hero-cta { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .contact-simple .email-link { gap: 8px; padding: 13px 17px; font-size: 0.92rem; word-break: normal; }
}
