/*
Theme Name: Infinity Quest Studio
Theme URI: https://infinityquest.xyz
Author: Infinity Quest Studio
Description: Animated single-page WordPress theme for a mobile gaming studio with contact form and privacy page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: infinity-quest-studio
*/

:root {
  --ink: #101317;
  --text: #f8fbff;
  --muted: #64707d;
  --paper: #f5f7fb;
  --line: rgba(16, 19, 23, 0.12);
  --dark-line: rgba(255, 255, 255, 0.16);
  --aqua: #00d4d8;
  --lime: #b9ff39;
  --orange: #ff7a1a;
  --blue: #2d63ff;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow: 0 30px 90px rgba(16, 19, 23, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: fixed;
  inset: 18px clamp(16px, 4vw, 54px) auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 60px rgba(16, 19, 23, 0.16);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(113, 52, 170, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(16, 19, 23, 0.68);
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-links a,
.nav-cta,
.primary-btn,
.secondary-btn,
.contact-form button {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-cta:hover,
.primary-btn:hover,
.secondary-btn:hover,
.contact-form button:hover {
  transform: translateY(-2px);
}

.nav-cta,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.nav-cta,
.primary-btn {
  background: var(--ink);
  color: var(--text);
  box-shadow: 0 16px 34px rgba(16, 19, 23, 0.24);
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 132px clamp(18px, 5vw, 72px) 54px;
  overflow: hidden;
  background: #101317;
}

.hero-gallery,
.hero-frame,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 900ms ease, transform 4200ms ease;
}

.hero-frame.is-active {
  opacity: 1;
  transform: scale(1.12);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 8, 11, 0.92), rgba(5, 8, 11, 0.52) 52%, rgba(5, 8, 11, 0.16)),
    linear-gradient(0deg, rgba(16, 19, 23, 0.98), transparent 44%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 6vw, 86px);
  align-items: end;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--lime);
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--text);
  font-size: 6.3rem;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero-copy p:not(.kicker) {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

section {
  padding: clamp(72px, 9vw, 126px) clamp(18px, 5vw, 72px);
}

.section-head {
  width: min(940px, 100%);
  margin-bottom: 34px;
}

.section-head h2,
.studio-copy h2,
.contact-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 4rem;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.games-section {
  background:
    linear-gradient(180deg, #f5f7fb, #ffffff),
    var(--paper);
}

.game-grid {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.game-feature {
  position: relative;
  min-height: 520px;
  display: grid;
  align-content: end;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.game-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(16, 19, 23, 0.92), rgba(16, 19, 23, 0.14) 62%);
}

.game-feature:hover img {
  transform: scale(1.06);
}

.game-feature div {
  position: relative;
  z-index: 1;
  padding: 26px;
  color: var(--text);
}

.game-feature span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: #17200b;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.game-feature h3 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1;
}

.game-feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.studio-section {
  background: #ffffff;
}

.studio-board {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}

.studio-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.studio-images img {
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.studio-images img:nth-child(2) {
  margin-top: 70px;
}

.studio-copy p:not(.kicker),
.contact-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.cap-list span {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 850;
}

.process-section {
  background:
    linear-gradient(120deg, rgba(0, 212, 216, 0.13), transparent 42%),
    #111820;
  color: var(--text);
}

.process-section .section-head h2 {
  color: var(--text);
}

.process-grid {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.process-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--dark-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  transition: transform 200ms ease, background 200ms ease;
}

.process-card:hover {
  transform: translateY(-7px);
  background: rgba(255, 255, 255, 0.12);
}

.process-card b {
  color: var(--lime);
  font-size: 1.8rem;
}

.process-card h3 {
  margin: 32px 0 10px;
  font-size: 1.24rem;
}

.process-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.contact-section {
  background:
    linear-gradient(90deg, rgba(255, 122, 26, 0.12), transparent 34%),
    #f5f7fb;
}

.contact-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 0.88fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.contact-copy,
.contact-form,
.content-article {
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.contact-copy {
  padding: clamp(28px, 5vw, 54px);
}

.contact-copy a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 42px);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(16, 19, 23, 0.68);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--text);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.form-notice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 850;
}

.form-notice.success {
  background: rgba(0, 212, 216, 0.16);
  color: #04575a;
}

.form-notice.error {
  background: rgba(255, 122, 26, 0.16);
  color: #7d3100;
}

.content-page {
  min-height: 100vh;
  padding: 132px clamp(18px, 5vw, 72px) 78px;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 212, 216, 0.18), transparent 30%),
    radial-gradient(circle at 80% 14%, rgba(185, 255, 57, 0.18), transparent 25%),
    var(--paper);
}

.content-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
}

.content-article {
  padding: clamp(26px, 5vw, 58px);
}

.content-article h1 {
  margin: 0 0 24px;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-content {
  color: rgba(16, 19, 23, 0.76);
}

.page-content h2,
.page-content h3 {
  margin: 34px 0 12px;
  color: var(--ink);
  line-height: 1.15;
}

.page-content h2 {
  font-size: 1.55rem;
}

.page-content h3 {
  font-size: 1.18rem;
}

.page-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content ul,
.page-content ol {
  padding-left: 1.3rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 72px);
  background: #101317;
  color: rgba(255, 255, 255, 0.72);
}

.footer a {
  color: var(--aqua);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero-inner,
  .studio-board,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .section-head h2,
  .studio-copy h2,
  .contact-copy h2 {
    font-size: 3.7rem;
  }

  .game-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    inset: 12px 12px auto;
  }

  .brand span:last-child {
    max-width: 150px;
    line-height: 1.05;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding-top: 118px;
  }

  .hero h1,
  .section-head h2,
  .studio-copy h2,
  .contact-copy h2,
  .content-article h1 {
    font-size: 2.65rem;
  }

  .hero-copy p:not(.kicker) {
    font-size: 1.05rem;
  }

  .game-grid,
  .process-grid,
  .studio-images {
    grid-template-columns: 1fr;
  }

  .game-feature {
    min-height: 420px;
  }

  .studio-images img:nth-child(2) {
    margin-top: 0;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
