/* =========================================================
   Wildercroft Interactive Studio — base styles
   ========================================================= */

:root {
  --bg-cream: #f6f2ea;
  --bg-cream-2: #efe9dc;
  --bg-dark: #0b0b0c;
  --bg-dark-2: #15151a;
  --text-dark: #16160f;
  --text-muted: #56534a;
  --text-light: #f6f2ea;
  --text-light-muted: #b9b6ad;
  --amber: #e2a542;
  --amber-dark: #c8862a;
  --teal: #4fd1c5;

  --container-w: 1240px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-cream);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin: 0 0 16px;
}
.eyebrow--light { color: var(--amber); }

.h2 {
  font-size: clamp(32px, 4.2vw, 52px);
}
.h2--center { text-align: center; margin: 0 auto; }
.h2--light { color: var(--text-light); }

.h3 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 20px;
}

.body-lg {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 30px;
  border-radius: var(--radius-pill);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color .25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--amber { background: var(--amber); color: #1a1204; }
.btn--amber:hover { background: var(--amber-dark); }

.btn--dark { background: var(--text-dark); color: var(--text-light); }
.btn--dark:hover { background: #000; }

.btn--ghost {
  background: transparent;
  color: var(--text-light);
  border-color: rgba(246, 242, 234, 0.45);
}
.btn--ghost:hover { border-color: var(--text-light); background: rgba(255,255,255,0.08); }

.btn--sm { padding: 11px 22px; font-size: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 2px;
}
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background-color 0.35s var(--ease), padding 0.35s var(--ease), box-shadow .35s var(--ease);
}
.nav.is-scrolled {
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.nav__mark { width: 34px; height: 34px; }
.nav__word {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--text-light);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__link {
  color: var(--text-light-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s var(--ease);
}
.nav__link:hover { color: var(--text-light); }

.nav__cta { flex-shrink: 0; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 60%;
  transform: scale(1.06);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,8,0.55) 0%, rgba(6,6,8,0.35) 35%, rgba(6,6,8,0.75) 100%),
    linear-gradient(90deg, rgba(6,6,8,0.75) 0%, rgba(6,6,8,0.15) 55%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 80px;
}
.hero__title {
  font-size: clamp(40px, 6.4vw, 84px);
  color: var(--text-light);
  max-width: 16ch;
}
.hero__sub {
  margin-top: 26px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-light-muted);
  max-width: 52ch;
}
.hero__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 42px;
}

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(246,242,234,0.5);
  border-radius: var(--radius-pill);
}
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--text-light);
  border-radius: 2px;
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* =========================================================
   STUDIO STRIP
   ========================================================= */
.studio {
  background: var(--bg-cream);
  padding: 130px 0;
}
.studio__grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 80px;
  align-items: center;
}
.studio__art img {
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(20,18,10,0.35);
}
.studio__copy .body-lg { margin-bottom: 18px; }
.studio__copy .h2 { margin-bottom: 26px; }

/* =========================================================
   GAMES INTRO
   ========================================================= */
.games-intro {
  background: var(--bg-cream-2);
  padding: 90px 0 20px;
  text-align: center;
}
.games-intro .eyebrow { text-align: center; }

/* =========================================================
   GAME BLOCKS
   ========================================================= */
.game-block {
  background: var(--bg-cream-2);
  padding: 90px 0;
}
.game-block__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.game-block--reverse .game-block__grid {
  grid-template-columns: 1fr 1fr;
}
.game-block--reverse .game-block__copy { order: 1; }
.game-block--reverse .game-block__art { order: 2; }

.game-block__art { position: relative; }
.game-block__art img {
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -18px rgba(20,18,10,0.35);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.game-block__floatcard {
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 40px -14px rgba(0,0,0,0.5);
  min-width: 220px;
}
.game-block__floatcard strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
}
.game-block__floatcard span {
  display: block;
  font-size: 12px;
  color: var(--text-light-muted);
  margin-top: 2px;
}
.game-block__floatcard-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(226,165,66,0.2);
}
.game-block__floatcard-dot--teal {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(79,209,197,0.2);
}

.game-block__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* =========================================================
   NEWS
   ========================================================= */
.news {
  background: var(--bg-cream-2);
  padding: 100px 0 110px;
}
.news .h2 { margin-bottom: 48px; }
.news__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.news__item {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px -28px rgba(20,18,10,0.35);
  display: flex;
  flex-direction: column;
  animation: news-in .5s var(--ease) both;
}
.news__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-cream-2);
}
.news__body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
@keyframes news-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.news__date {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-dark);
}
.news__title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  line-height: 1.25;
  margin: 12px 0 12px;
}
.news__text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news__item .link-arrow { margin-top: auto; padding-top: 18px; align-self: flex-start; border-bottom: 0; }
.news__item .link-arrow span { transition: transform .25s var(--ease); }
.news__item .link-arrow:hover span { transform: translateX(3px); }
.news__more { background: none; border: 0; cursor: pointer; font-size: 16px; padding-left: 0; padding-right: 0; }
.news__item.is-open .news__text { -webkit-line-clamp: unset; overflow: visible; }
.news__full { display: none; }
.news__item.is-open .news__full { display: block; animation: news-in .4s var(--ease) both; }
.news__full .news__text { margin-top: 14px; white-space: pre-line; }
.news__full .news__visit { margin-top: 16px; padding-top: 0; }

.news__pager {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 44px;
}
.news__pager[hidden], .news__arrow[hidden] { display: none; }
.news__arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(22,22,15,0.25);
  background: transparent;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.news__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news__arrow:hover { border-color: var(--amber-dark); color: var(--amber-dark); transform: translateY(2px); }
#news-newer:hover { transform: translateY(-2px); }

/* =========================================================
   COMMUNITY
   ========================================================= */
.community {
  background: var(--bg-dark);
  padding: 130px 0;
  text-align: center;
}
.community__sub {
  margin: 22px auto 0;
  color: var(--text-light-muted);
  max-width: 50ch;
  text-align: center;
}
.community__socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}
.community__icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
}
.social-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(246,242,234,0.25);
  color: var(--text-light);
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease), color .25s var(--ease);
}
.social-icon svg { width: 21px; height: 21px; }
.social-icon:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(226,165,66,0.08);
  transform: translateY(-2px);
}
.community__icons + .community__socials { margin-top: 22px; }

.social-pill {
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(246,242,234,0.25);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.social-pill:hover {
  border-color: var(--amber);
  background: rgba(226,165,66,0.08);
  transform: translateY(-2px);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(246,242,234,0.1);
  padding-top: 56px;
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 40px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.footer__mark { width: 28px; height: 28px; }
.footer__links {
  display: flex;
  gap: 28px;
}
.footer__links a {
  color: var(--text-light-muted);
  text-decoration: none;
  font-size: 15px;
  transition: color .2s var(--ease);
}
.footer__links a:hover { color: var(--text-light); }

.footer__socials {
  display: flex;
  gap: 16px;
}
.footer__socials a {
  color: var(--text-light-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s var(--ease);
}
.footer__socials a:hover { color: var(--amber); }
.footer__icon { display: inline-flex; }
.footer__icon svg { width: 18px; height: 18px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding: 22px 32px 28px;
  border-top: 1px solid rgba(246,242,234,0.08);
  font-size: 13px;
  color: var(--text-light-muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .studio__grid,
  .game-block__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .game-block--reverse .game-block__copy { order: 2; }
  .game-block--reverse .game-block__art { order: 1; }
  .studio { padding: 90px 0; }
  .game-block { padding: 64px 0; }
  .community { padding: 90px 0; }
}

@media (max-width: 900px) {
  .news__list { grid-template-columns: 1fr; max-width: 640px; }
  .news { padding: 90px 0; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .nav__cta { display: none; }
  .nav__links { margin-left: auto; }
}

@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 16px;
    right: 16px;
    background: rgba(11,11,12,0.96);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-md);
    padding: 20px;
    gap: 6px;
  }
  .nav.is-open .nav__link { padding: 10px 4px; }
  .nav.is-open .nav__cta {
    display: inline-flex;
    position: fixed;
    top: 232px;
    left: 32px;
  }

  .container { padding: 0 22px; }
  .hero__content { padding-top: 100px; }
  .footer__inner { flex-wrap: wrap; }
  .footer__bottom { flex-direction: column; gap: 6px; padding: 18px 22px 24px; }
  .game-block__floatcard { left: 12px; bottom: -18px; padding: 12px 16px; min-width: 190px; }
}

@media (max-width: 480px) {
  .hero__actions .btn { width: 100%; }
  .community__socials { flex-direction: column; align-items: stretch; }
}
