:root {
  --bg: #F4F3EE;
  --text: #14110F;
  --text-soft: rgba(20, 17, 15, 0.62);
  --text-faint: rgba(20, 17, 15, 0.10);
  --pink: #FF3575;
  --ink: #111111;
  --line: #000000;
  --light: #F4F3EE;
  --nav-h: 88px;
  --max-w: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: var(--nav-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: url('site-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.intro-active,
body.hscroll-mode,
body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

@media (max-width: 700px) {
  body.no-scroll-responsive {
    overflow: auto;
    height: auto;
  }
}

h1, h2 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}

a { color: inherit; }
button { font-family: inherit; }

main { padding-top: var(--nav-h); }
body.hscroll-mode main,
body.no-scroll main { padding-top: 0; }

/* ---------- custom cursor ---------- */

#trail-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 998;
  display: none;
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 999;
  display: none;
}

body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a,
body.has-custom-cursor button { cursor: none; }
body.has-custom-cursor #trail-canvas,
body.has-custom-cursor #custom-cursor { display: block; }

/* ---------- VHS scanline overlay ---------- */

.vhs-overlay {
  position: fixed;
  inset: 0;
  z-index: 2005;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(20, 17, 15, 0.05) 0px,
    rgba(20, 17, 15, 0.05) 1px,
    transparent 1px,
    transparent 48px
  );
  background-size: 100% 48px;
  mix-blend-mode: multiply;
  animation: vhsScroll 9s linear infinite;
}

@keyframes vhsScroll {
  from { background-position: 0 0; }
  to { background-position: 0 720px; }
}

@media (prefers-reduced-motion: reduce) {
  .vhs-overlay { animation: none; }
}

/* ---------- edge blur ---------- */

.edge-blur {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 60;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.edge-blur-left {
  left: 0;
  mask-image: linear-gradient(to right, black, transparent);
  -webkit-mask-image: linear-gradient(to right, black, transparent);
}

.edge-blur-right {
  right: 0;
  mask-image: linear-gradient(to left, black, transparent);
  -webkit-mask-image: linear-gradient(to left, black, transparent);
}

@media (max-width: 860px) {
  .edge-blur { width: 60px; }
}

/* ---------- intro (stays dark/dramatic regardless of site theme) ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(20,17,15,0.07) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-click {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.intro-logo {
  width: min(30vw, 260px);
  height: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity .6s ease;
  z-index: 2001;
}

.intro.is-leaving .intro-logo { opacity: 0; }

.intro-cta {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: opacity .3s;
}

.intro.is-leaving .intro-cta { opacity: 0; }

#dissolve-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1999;
  pointer-events: none;
}

/* ---------- fixed corner texts ---------- */

.corner {
  position: fixed;
  z-index: 90;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  max-width: 260px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .7s ease;
}

body.chrome-visible .corner { opacity: 1; }

.corner a { pointer-events: auto; text-decoration: none; }
.corner a:hover { color: var(--pink); }

.corner-tl,
.corner-tr {
  top: 112px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
}

.corner-tl { left: 32px; text-align: left; }
.corner-tr { right: 32px; text-align: right; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.lang-switch button {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s;
}

.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: var(--pink); cursor: default; }
.lang-switch .lang-sep { color: var(--text-soft); opacity: 0.5; }

.corner-social {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.corner-social a,
.corner-social .social-disabled {
  display: inline-flex;
  pointer-events: auto;
  color: var(--text-soft);
  transition: color .2s;
}

.corner-social a:hover { color: var(--pink); }
.corner-social .social-disabled { opacity: 0.4; cursor: default; }
.corner-social svg { width: 20px; height: 20px; display: block; }

.corner-bottom {
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.corner-copyright {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-soft);
  opacity: 0.75;
}

@media (max-width: 860px) {
  .corner-tl, .corner-tr, .corner-bottom { display: none; }
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.nav.is-visible { opacity: 1; pointer-events: auto; }

.nav-inner {
  position: relative;
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo-mark-img { height: 60px; width: auto; flex-shrink: 0; }
.logo-wide-img { height: 50px; width: auto; flex-shrink: 0; }

.nav-link {
  position: relative;
  text-decoration: none;
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding-bottom: 5px;
  transition: color .2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transition: transform .35s ease;
}

.nav-link:not(.nav-cta)::after { transform-origin: right; }
.nav-cta::after { transform-origin: left; }

.nav-link:hover { color: var(--pink); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  color: var(--text);
}


/* ---------- horizontal scroll engine ---------- */

#hscroll-viewport { position: relative; }

.hscroll-mode #hscroll-viewport { height: 100vh; overflow: hidden; }

#hscroll-track { display: block; }

.hscroll-mode #hscroll-track {
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.panel { width: 100%; }

.hscroll-mode .panel {
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hscroll-mode .panel:nth-of-type(1) { transform: translateY(0); }
.hscroll-mode .panel:nth-of-type(2) { transform: translateY(-34px); }
.hscroll-mode .panel:nth-of-type(3) { transform: translateY(26px); }

.hscroll-hint {
  position: fixed;
  bottom: 60px;
  right: 32px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  opacity: 0;
  transition: opacity .7s ease;
}

body.chrome-visible .hscroll-hint { opacity: 1; }

.hscroll-hint svg { animation: hintnudge 1.8s ease-in-out infinite; }

@keyframes hintnudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hscroll-hint svg { animation: none; }
}

@media (max-width: 860px) {
  .hscroll-hint { display: none; }
}

/* ---------- hero ---------- */

.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14vh 32px 12vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hscroll-mode .hero { max-width: none; padding: 0 8vw; }

.hero h1 { font-size: clamp(36px, 6vw, 72px); color: var(--pink); }

.hero-sub {
  max-width: 46ch;
  margin: 26px 0 0;
  font-size: 18px;
  color: var(--text-soft);
}

.scroll-cue {
  margin-top: 60px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: none;
  border: none;
  cursor: pointer;
}

.scroll-cue svg { flex-shrink: 0; }

/* ---------- games carousel ---------- */

.games-panel { position: relative; }

.games-title {
  text-align: center;
  font-size: clamp(24px, 3vw, 34px);
  flex-shrink: 0;
  margin: 0 0 2vh;
}

body:not(.hscroll-mode) .games-panel {
  height: 100vh;
  box-sizing: border-box;
  padding: calc(var(--nav-h) + 20px) 24px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body:not(.hscroll-mode) .games-carousel {
  flex: 1;
  width: 100%;
  min-height: 0;
}

body:not(.hscroll-mode) .games-hint {
  flex-shrink: 0;
  margin-top: 12px;
}

.games-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.games-arc {
  position: relative;
  width: 100%;
  height: 100%;
  transition: opacity .5s ease, transform .5s ease;
  transform-style: preserve-3d;
}

.games-carousel.has-selection .games-arc {
  opacity: 0;
  pointer-events: none;
  transform: scale(.9);
}

.game-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(19vw, 300px);
  border: none;
  cursor: pointer;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.game-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(20,17,15,0.18);
}

.game-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }
.game-card:hover .game-card-image img { filter: brightness(1.1); }

.game-card-label {
  margin-top: 12px;
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}

.games-hint {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
  transition: opacity .3s ease;
}

#games-carousel.has-selection ~ .games-hint { opacity: 0; }

.game-detail {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease .1s;
}

.games-carousel.has-selection .game-detail { opacity: 1; pointer-events: auto; }

.game-detail-image {
  width: 100%;
  aspect-ratio: 7 / 4;
  max-height: 100%;
  overflow: hidden;
  border-radius: 12px;
  transform: scale(.92);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 24px 48px rgba(20,17,15,0.2);
}

.games-carousel.has-selection .game-detail-image { transform: scale(1); }

.game-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.game-detail-text { padding: 0 8vw 0 5vw; }

.game-tag {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 12px;
}

.game-detail-text h2 { font-size: clamp(48px, 6.5vw, 84px); }

.game-detail-text p {
  max-width: 46ch;
  color: var(--text-soft);
  font-size: 16px;
  margin: 18px 0 0;
}

.steam-link {
  display: block;
  width: fit-content;
  margin-top: 26px;
  transition: transform .2s ease;
}

.steam-link:hover { transform: scale(1.03); }

.steam-link img {
  height: 48px;
  width: auto;
  display: block;
}

.game-back {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.game-back:hover { color: var(--pink); }

@media (max-width: 860px) {
  .game-card { width: min(52vw, 220px); }
  .game-detail {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    row-gap: 16px;
    padding: calc(var(--nav-h) + 10px) 24px 10px;
  }
  .game-detail-image { max-width: 100%; aspect-ratio: 4 / 3; margin: 0; justify-self: center; }
  .game-detail-text { padding: 0; text-align: center; }
  .game-detail-text p { margin-left: auto; margin-right: auto; }
  .game-back { margin-left: auto; margin-right: auto; }
}

/* ---------- about ---------- */

.about {
  margin: 0 auto;
  padding: 10vh 32px;
  text-align: center;
}

.hscroll-mode .about { padding: 0 8vw; }

.about-text { max-width: 760px; margin: 0 auto; }
.about-text h2 { font-size: 32px; margin-bottom: 22px; color: var(--pink); }
.about-text p {
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-soft);
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 16px;
}

/* ---------- contact cta ---------- */

.contact-cta {
  margin: 0;
  padding: 10vh 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hscroll-mode .contact-cta {
  width: 100vw;
  height: 100%;
  justify-content: center;
}

.contact-cta h2 { font-size: clamp(30px, 4vw, 52px); color: var(--pink); }
.contact-cta p { color: var(--text-soft); margin: 14px 0 34px; }

.cta-button {
  display: inline-block;
  background: var(--pink);
  color: var(--ink);
  text-decoration: none;
  padding: 15px 34px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, color .2s;
}

.about-text .cta-button { margin-top: 8px; }

.cta-button:hover { background: var(--ink); color: var(--light); }

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 32px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-soft);
}

.footer-links { display: flex; gap: 18px; align-items: center; }

.footer-links a, .footer-links .social-disabled {
  display: inline-flex;
  color: var(--text-soft);
  transition: color .2s;
}

.footer-links a:hover { color: var(--pink); }
.footer-links .social-disabled { opacity: 0.4; cursor: default; }
.footer-links svg { width: 18px; height: 18px; display: block; }

/* ---------- reveal on scroll (contact / merci pages) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- focus ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* ---------- contact page ---------- */

.contact-page {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100vh;
  box-sizing: border-box;
  padding: calc(var(--nav-h) + 16px) 32px 24px;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 48px;
  align-items: center;
}

.contact-mark { display: flex; justify-content: center; }
.contact-mark img { width: 100%; max-width: 350px; height: auto; }

.contact-form-wrap h1 { font-size: clamp(28px, 3.6vw, 38px); }

.contact-intro {
  max-width: 55ch;
  color: var(--text-soft);
  font-size: 15px;
  margin: 12px 0 22px;
}

.contact-form { max-width: 460px; }

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }

.field input,
.field textarea {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 10px 14px;
  border: 2px solid var(--text);
  border-radius: 10px;
  background: var(--text-faint);
  color: var(--text);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(20, 17, 15, 0.38); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pink);
  background: rgba(20, 17, 15, 0.05);
}

.contact-form button.cta-button {
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin-top: 2px;
}

.contact-alt { margin-top: 16px; font-size: 13px; color: var(--text-soft); }

.contact-alt a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- merci page ---------- */

.merci-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18vh 32px;
  display: flex;
  justify-content: center;
}

.merci-content { text-align: center; display: flex; flex-direction: column; align-items: center; }
.merci-content img { width: 90px; height: auto; margin-bottom: 28px; }

.merci-content p {
  max-width: 46ch;
  color: var(--text-soft);
  font-size: 17px;
  margin: 18px 0 36px;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .contact-page { grid-template-columns: 1fr; height: auto; min-height: 100vh; padding-bottom: 40px; }
  .contact-mark { justify-content: flex-start; }
  .contact-mark img { max-width: 120px; }
}

@media (max-width: 860px) {
  .logo-wide-img { height: 32px; }
  .nav-link:not(.nav-cta) { display: none; }
  .about { text-align: center; }
}
