/* ─────────────────────────────────────────
   CLYREX GAMES — clyrexgames.com
   ───────────────────────────────────────── */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Tokens ── */
:root {
  --bg:       #0c0c10;
  --surface:  #111116;
  --surface2: #17171e;
  --border:   #1f1f28;
  --border2:  #2a2a36;

  --text:     #ededed;
  --text2:    #7a7a88;
  --text3:    #3a3a46;

  --accent:   #e91e63;
  --accent2:  #c2185b;
  --gold:     #d4a645;

  --font-d: 'Space Grotesk', sans-serif;
  --font-b: 'Inter', sans-serif;

  --max: 1200px;
  --pad: clamp(1.5rem, 4vw, 3rem);
}

/* ── Base ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* subtle noise */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--pad);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(8, 8, 9, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  color: var(--text2);
  transition: color 0.2s;
}

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

/* ── Hero ── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: clamp(7rem, 12vw, 10rem) var(--pad) clamp(3rem, 5vw, 4.5rem);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--text3);
  font-weight: 500;
  margin-bottom: 1.75rem;
  text-transform: uppercase;
}

.display-hero {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.word-solid {
  display: block;
  font-size: clamp(4.5rem, 14vw, 13rem);
  color: var(--text);
}

.word-outline {
  display: block;
  font-size: clamp(4.5rem, 14vw, 13rem);
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  text-stroke: 2px var(--accent);
}

.hero-right {
  max-width: 300px;
  padding-bottom: 0.4rem;
}

.hero-right p {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text3);
  transition: color 0.2s;
}

.scroll-hint:hover { color: var(--text2); }

.scroll-arrow {
  display: inline-block;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--border);
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.hero-stat { display: flex; flex-direction: column; }

.stat-n {
  font-family: var(--font-d);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-l {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--text3);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.stat-sep {
  width: 1px;
  height: 44px;
  background: var(--border);
}

/* ── Section Header ── */
.section-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto 4rem;
}

.s-num {
  font-family: var(--font-d);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.s-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.s-label {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--text3);
  font-weight: 500;
  flex-shrink: 0;
}

/* ── Feature ── */
.feature {
  padding: clamp(4rem, 8vw, 6rem) var(--pad);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}

/* Phone mockup */
.screen-wrap {
  position: relative;
  width: 280px;
  height: 600px;
  margin: 0 auto;
}

.phone {
  position: absolute;
  width: 228px;
  height: 494px;
  border-radius: 36px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface2), var(--surface2)) padding-box,
    linear-gradient(145deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 40%, rgba(0,0,0,0.3) 100%) border-box;
  overflow: hidden;
  box-shadow:
    inset 2px 3px 0 rgba(255,255,255,0.07),
    inset -1px -2px 0 rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.03),
    0 28px 60px rgba(0,0,0,0.85),
    0 6px 20px rgba(0,0,0,0.5);
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: var(--border2);
  border-radius: 3px;
  z-index: 2;
}

.phone--back {
  bottom: 0;
  right: 0;
  transform: rotate(5deg);
  opacity: 0.5;
  filter: blur(1.5px);
  z-index: 1;
  transition:
    transform 0.58s cubic-bezier(0.34, 1.46, 0.64, 1),
    opacity   0.45s ease,
    filter    0.45s ease,
    box-shadow 0.45s ease;
  will-change: transform;
}

.phone--front {
  top: 0;
  left: 0;
  z-index: 2;
  transform: rotate(0deg);
  box-shadow:
    inset 2px 3px 0 rgba(255,255,255,0.1),
    inset -1px -2px 0 rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.05),
    0 32px 72px rgba(0,0,0,0.9),
    0 0 48px rgba(233, 30, 99, 0.06);
  transition:
    transform 0.58s cubic-bezier(0.34, 1.46, 0.64, 1),
    opacity   0.45s ease,
    filter    0.45s ease,
    z-index   0s;
  will-change: transform;
}

/* ── Phone swap on hover ── */
.screen-wrap {
  cursor: pointer;
}

.screen-wrap:hover .phone--back {
  transform: translate(-52px, -106px) rotate(0deg);
  opacity: 1;
  filter: blur(0);
  z-index: 3;
  box-shadow:
    inset 2px 3px 0 rgba(255,255,255,0.1),
    inset -1px -2px 0 rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.05),
    0 32px 72px rgba(0,0,0,0.9),
    0 0 52px rgba(233, 30, 99, 0.08);
}

.screen-wrap:hover .phone--front {
  transform: translate(52px, 106px) rotate(5deg);
  opacity: 0.4;
  filter: blur(2px);
  z-index: 1;
}

/* Glass glare — top screen reflection */
.phone-glare {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(
    165deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.03) 35%,
    transparent 70%
  );
  z-index: 6;
  pointer-events: none;
  border-radius: 34px 34px 0 0;
}

/* Finger tap glow — card interaction hint */
.tap-glow {
  position: absolute;
  bottom: 26%;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 110px;
  background: radial-gradient(
    circle at center,
    rgba(233, 30, 99, 0.35) 0%,
    rgba(233, 30, 99, 0.15) 38%,
    transparent 68%
  );
  z-index: 7;
  pointer-events: none;
  animation: tap-pulse 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  transition: opacity 0.3s ease;
}

/* tap glow fades when this phone goes to back */
.screen-wrap:hover .phone--front .tap-glow {
  opacity: 0;
}

@keyframes tap-pulse {
  0%   { opacity: 0.4; transform: translateX(-50%) scale(0.92); }
  50%  { opacity: 1;   transform: translateX(-50%) scale(1.1);  }
  100% { opacity: 0.4; transform: translateX(-50%) scale(0.92); }
}

.phone-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Feature copy */
.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.genre-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text3);
  text-transform: uppercase;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.stars { color: var(--gold); font-size: 0.75rem; }

.r-num {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 0.88rem;
}

.r-count {
  font-size: 0.72rem;
  color: var(--text3);
}

.feature-name {
  font-family: var(--font-d);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}

.feature-sub {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.feature-body {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.85;
  margin-bottom: 1.75rem;
  max-width: 460px;
}

.feature-list {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.feature-list li {
  font-size: 0.83rem;
  color: var(--text2);
  padding-left: 1.4rem;
  position: relative;
}

.feature-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.feature-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1.7rem;
  border-radius: 7px;
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

.pegi {
  display: inline-block;
  border: 1px solid var(--border2);
  color: var(--text3);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-family: var(--font-d);
  font-weight: 600;
}

/* ── Games Grid ── */
.games {
  padding: clamp(4rem, 8vw, 6rem) var(--pad);
  border-bottom: 1px solid var(--border);
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  max-width: var(--max);
  margin: 0 auto;
}

.gcard {
  padding: 2.5rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: background 0.2s;
}

.gcard:hover { background: var(--surface2); }

.gcard:first-child { border-right: 1px solid var(--border); }

.gcard-top {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}

.gcard-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.icon-fallback {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.db-fallback  { background: #0d1f2d; }
.mct-fallback { background: #0d1a0a; }

.gcard-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
  font-family: var(--font-d);
  font-weight: 700;
  text-transform: uppercase;
}

.gcard-body { flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }

.gcard-name {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gcard-genre {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text3);
  text-transform: uppercase;
}

.gcard-desc {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.75;
  flex: 1;
}

.gcard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.gcard-meta {
  font-size: 0.78rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gcard-stars { color: var(--gold); }
.dot { color: var(--text3); }

.gcard-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.2s;
  letter-spacing: 0.02em;
}

.gcard-link:hover { opacity: 0.65; }

/* ── Studio ── */
.studio {
  padding: clamp(4rem, 8vw, 6rem) var(--pad);
  border-bottom: 1px solid var(--border);
}

.studio-grid {
  display: grid;
  grid-template-columns: 3fr 1.5fr;
  gap: clamp(3rem, 7vw, 7rem);
  max-width: var(--max);
  margin: 0 auto;
}

.studio-heading {
  font-family: var(--font-d);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.studio-body {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.85;
  max-width: 540px;
  margin-bottom: 1.2rem;
}

.studio-facts {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-top: 0.25rem;
}

.sfact-n {
  display: block;
  font-family: var(--font-d);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.sfact-l {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--text3);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ── Footer ── */
.footer {
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--border);
}

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

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-logo {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text3);
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
}

.footer-nav a {
  font-size: 0.78rem;
  color: var(--text3);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--text2); }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal:nth-child(2) { transition-delay: 0.12s; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .screen-wrap { width: 240px; height: 520px; }
  .phone { width: 196px; height: 425px; }
}

@media (max-width: 768px) {
  .nav { padding: 1.2rem 1.5rem; }
  .nav-links { gap: 1.5rem; }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 3.5rem;
    padding-top: 6.5rem;
  }

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

  .hero-stats { gap: 2rem; flex-wrap: wrap; }

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

  .gcard:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .studio-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .studio-facts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-inner { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
}

@media (max-width: 480px) {
  .word-solid,
  .word-outline { font-size: clamp(3.5rem, 18vw, 5rem); }

  .feature-name { font-size: clamp(2.5rem, 12vw, 3.5rem); }
}
