/* ==========================================================
   Gossiam Games — site styles
   ========================================================== */

:root {
  --ink: #16131f;          /* studio night */
  --ink-2: #221d30;
  --ink-line: #352e47;
  --paper: #f6f4fb;
  --muted: #b8b0c9;
  --orange: #ff590d;       /* from the logo */
  --orange-hot: #ff7a3a;

  /* game worlds */
  --snow-night: #1d2a5c;
  --snow-deep: #131c42;
  --xmas-red: #e2384d;
  --xmas-green: #49b35a;

  --lofi-pink: #f8c9dd;
  --lofi-lilac: #b9a6e6;
  --lofi-plum: #3b2346;

  --abyss: #04101c;
  --abyss-2: #0a2036;
  --glow: #7fe0ff;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  font-family: var(--font-body);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hot); }
.btn-ghost { border-color: var(--ink-line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: block; height: 72px; overflow: hidden; }
.brand img { height: 92px; width: auto; margin-top: -10px; margin-left: -18px; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none; font-weight: 500; padding: .5em .9em; border-radius: 999px; color: var(--muted);
  transition: color .15s, background-color .15s;
}
.site-nav a:hover { color: var(--paper); background: var(--ink-2); }
.site-nav .nav-cta { color: #fff; background: var(--orange); margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--orange-hot); }

.menu-toggle { display: none; }

.header-inner .site-nav { margin-left: auto; }
.lang-toggle {
  margin-left: 10px; padding: .45em .8em; border-radius: 999px;
  border: 2px solid var(--ink-line); background: none; color: var(--paper);
  font: 700 .85rem/1 var(--font-body); letter-spacing: .06em; cursor: pointer;
  transition: border-color .15s;
}
.lang-toggle:hover { border-color: var(--paper); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 110px) 0 0; overflow: hidden; }
.hero::before {
  /* the logo's chevron, blown up as a background mark */
  content: ""; position: absolute; right: -6vw; top: -4vw; width: 46vw; aspect-ratio: 1;
  background: var(--orange); opacity: .06;
  clip-path: polygon(0 0, 38% 0, 100% 50%, 38% 100%, 0 100%, 62% 50%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-place { color: var(--muted); font-weight: 500; margin-bottom: 1.2em; }
.hero-title {
  font-size: clamp(3.2rem, 9vw, 7.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: .9;
  margin-bottom: .32em;
}
.hero-title .chev {
  display: inline-block; width: .5em; height: .62em; margin-right: .12em; vertical-align: .02em;
  background: var(--orange);
  clip-path: polygon(0 0, 38% 0, 100% 50%, 38% 100%, 0 100%, 62% 50%);
}
.hero-title .cursor {
  display: inline-block; width: .42em; height: .12em; margin-left: .06em; background: var(--orange);
  vertical-align: baseline; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 34ch; color: #dcd6e8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }

/* fanned deck of game cards */
.hero-deck { position: relative; height: clamp(320px, 38vw, 470px); }
.card {
  position: absolute; margin: 0; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.card img { width: 100%; height: 100%; object-fit: cover; }
/* three vertical Steam library capsules (2:3), fanned out */
.card { height: 84%; aspect-ratio: 2 / 3; top: 8%; left: 50%; }
.card-a { transform: translateX(-100%) rotate(-10deg) scale(.88); }
.card-b { transform: translateX(0%) rotate(10deg) scale(.88); }
.card-c { transform: translateX(-50%) translateY(-3%); z-index: 2; }
.nowrap { white-space: nowrap; }
.hero-deck:hover .card-a { transform: translateX(-108%) rotate(-13deg) scale(.88); }
.hero-deck:hover .card-b { transform: translateX(8%) rotate(13deg) scale(.88); }
.hero-deck:hover .card-c { transform: translateX(-50%) translateY(-6%) scale(1.03); }

/* page-load: deal the cards in, once */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: deal .9s cubic-bezier(.2,.8,.2,1) both; }
  .card-a { animation-delay: .15s; }
  .card-b { animation-delay: .3s; }
  .card-c { animation-delay: .45s; }
  @keyframes deal { from { opacity: 0; translate: 0 60px; scale: .92; } }
}

.next-up {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin-top: clamp(48px, 7vw, 90px);
  padding: 18px var(--gutter);
  background: var(--orange); color: #fff; text-decoration: none; font-weight: 600;
  font-size: clamp(.95rem, 1.4vw, 1.08rem); text-align: center;
}
.next-up:hover .next-arrow { transform: translateY(3px); }
.next-arrow { transition: transform .2s; }
.next-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.3); }

/* ---------- Games intro ---------- */
.games-intro { padding: clamp(72px, 9vw, 120px) var(--gutter) clamp(36px, 4vw, 56px); }
.games-intro h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; margin-bottom: .3em; }
.games-intro p { color: var(--muted); max-width: 52ch; font-size: 1.15rem; }

/* ---------- Game worlds ---------- */
.world { position: relative; padding: clamp(64px, 9vw, 120px) 0; overflow: hidden; isolation: isolate; }
.world-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.world-grid.reverse { grid-template-columns: .85fr 1.15fr; }
.world-grid.reverse .world-visual { order: 2; }
.world-title { font-size: clamp(2.8rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -0.04em; margin: .15em 0 .25em; }
.world-pitch { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; }
.world-copy > p:not(.world-pitch):not(.world-status) { max-width: 46ch; }
.world-status { margin: 0; }
.pill {
  display: inline-block; font-size: .85rem; font-weight: 600; padding: .3em .85em; border-radius: 999px;
  background: rgba(255,255,255,.14);
}

.facts { list-style: none; padding: 0; margin: 1.6em 0; display: grid; grid-template-columns: repeat(3, auto); gap: 10px 26px; justify-content: start; }
.facts li { font-weight: 600; font-size: .98rem; }
.facts span { display: block; font-weight: 500; font-size: .82rem; opacity: .7; }

.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 10px 18px 10px 14px; border-radius: 12px; font-weight: 700; font-size: 1.05rem; line-height: 1.1;
  transition: transform .15s ease, box-shadow .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store small { display: block; font-weight: 500; font-size: .72rem; opacity: .8; }
.store-steam { background: #171a21; color: #fff; }
.store-xbox { background: #107c10; color: #fff; }
.store-switch { background: #e60012; color: #fff; }

/* video facade */
.player {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9;
  background: #000; box-shadow: 0 30px 70px -25px rgba(0,0,0,.6);
}
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(10,10,14,.78); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px 10px 10px; font: 600 .95rem var(--font-body); cursor: pointer;
  backdrop-filter: blur(6px); transition: background-color .15s;
}
.play span {
  width: 32px; height: 32px; border-radius: 50%; background: var(--orange); position: relative;
}
.play span::after {
  content: ""; position: absolute; left: 12px; top: 9px;
  border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.play:hover { background: rgba(10,10,14,.95); }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.shot { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; background: #000; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.shot:hover img { transform: scale(1.06); }

/* World: Sokoban — winter night */
.world-sokoban {
  background: radial-gradient(120% 90% at 20% 0%, #2c3f86 0%, var(--snow-night) 45%, var(--snow-deep) 100%);
  color: #fff;
}
.world-sokoban .snow {
  position: absolute; inset: 0; z-index: -1; opacity: .55; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90px 120px, #fff 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 160px 60px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 230px 170px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 300px 90px, #fff 50%, transparent 51%);
  background-size: 320px 220px;
}
.world-sokoban::after {
  /* a snow bank along the bottom */
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -60px; height: 140px; z-index: -1;
  background: #eaf1ff; border-radius: 50% 50% 0 0 / 100% 100% 0 0; opacity: .08;
}
.world-sokoban .world-title { color: #fff; text-shadow: 0 4px 0 var(--xmas-red); }
.world-sokoban .pill-soon { background: var(--xmas-red); }
.world-sokoban .world-pitch { color: #bfe8c5; }
.world-sokoban .player { outline: 6px solid #fff; outline-offset: -1px; }

/* World: Lofi Mahjong — sunset haze */
.world-lofi {
  background: linear-gradient(160deg, #ffe0ea 0%, var(--lofi-pink) 35%, var(--lofi-lilac) 100%);
  color: var(--lofi-plum);
}
.world-lofi .world-title { color: var(--lofi-plum); }
.world-lofi .pill { background: var(--lofi-plum); color: #ffe6f0; }
.world-lofi .player, .world-lofi .shot { border-radius: 22px; }
.world-lofi .player {
  border: 8px solid rgba(255,255,255,.7);
  box-shadow: 0 40px 80px -30px rgba(59,35,70,.65), 0 0 0 1px rgba(255,255,255,.4);
}
.world-lofi .shot { border: 3px solid rgba(255,255,255,.6); }
.world-lofi .shot { border-radius: 14px; }
.world-lofi .facts span { opacity: .75; }
.quote { margin: 1.4em 0; padding: 0 0 0 18px; border-left: 3px solid var(--lofi-plum); }
.quote p { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; line-height: 1.4; margin-bottom: .3em; }
.quote cite { font-style: normal; font-weight: 600; font-size: .92rem; }

/* World: AquaDream — the abyss */
.world-aqua {
  background: radial-gradient(70% 60% at 25% 45%, var(--abyss-2) 0%, var(--abyss) 70%);
  color: #d8f2ff;
}
.world-aqua .world-title {
  color: #c9f1ff;
  text-shadow: 0 0 24px rgba(127,224,255,.55), 0 0 2px rgba(127,224,255,.9);
}
.world-aqua .world-pitch { color: var(--glow); }
.world-aqua .pill { background: rgba(127,224,255,.15); color: var(--glow); }
.world-aqua .player { box-shadow: 0 0 0 1px rgba(127,224,255,.25), 0 0 80px -10px rgba(127,224,255,.35); }

/* ---------- Studio ---------- */
.studio { padding: clamp(80px, 10vw, 140px) 0; border-bottom: 1px solid var(--ink-line); }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.studio h2 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); font-weight: 800; }
.studio-copy p { font-size: 1.15rem; color: #dcd6e8; max-width: 48ch; }
.studio-copy strong { color: #fff; }
.studio-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 2em 0 0; }
.studio-stats dt { font-size: .85rem; color: var(--muted); }
.studio-stats dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }

/* ---------- Merch + community ---------- */
.links-band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); }
.merch, .community { border-radius: 22px; padding: clamp(24px, 3.5vw, 40px); }
.merch {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--orange); color: #fff; text-decoration: none;
  position: relative; overflow: hidden;
}
.merch::after {
  content: ""; position: absolute; right: -30px; bottom: -40px; width: 200px; height: 220px;
  background: rgba(0,0,0,.12); clip-path: polygon(0 0, 38% 0, 100% 50%, 38% 100%, 0 100%, 62% 50%);
}
.merch h2, .community h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-weight: 800; margin-bottom: .35em; }
.merch p { font-size: 1.1rem; margin: 0; }
.merch .btn { background: #fff; color: var(--orange); align-self: flex-start; position: relative; z-index: 1; }
.merch:hover .btn { background: var(--ink); color: #fff; }
.community { background: var(--ink-2); }
.community p { color: var(--muted); }
.socials { list-style: none; margin: 1.2em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-block; text-decoration: none; padding: .45em 1em; border-radius: 999px;
  border: 1px solid var(--ink-line); font-weight: 500; font-size: .95rem; transition: border-color .15s, background-color .15s;
}
.socials a:hover { border-color: var(--orange); background: rgba(255,89,13,.1); }

/* ---------- Contact ---------- */
.contact { background: var(--ink-2); padding: clamp(72px, 9vw, 120px) 0; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 80px); }
.contact h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; margin-bottom: .35em; }
.contact-intro p { color: #dcd6e8; max-width: 38ch; }
.mail a { color: var(--orange); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; word-break: break-all; }
.contact-form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--ink-line); background: var(--ink); color: var(--paper);
  font: inherit; transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.field textarea { resize: vertical; min-height: 150px; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.6em; font-weight: 600; }
.form-status.ok { color: #7ee08c; }
.form-status.err { color: #ff8f8f; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0; border-top: 1px solid var(--ink-line); }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.footer-inner p { margin: 0; }
.footer-logo { height: 54px; width: auto; margin: -8px -10px; }
.to-top { margin-left: auto; text-decoration: none; }
.to-top:hover { color: var(--paper); }

/* ---------- Screenshot viewer ---------- */
.viewer { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); }
.viewer::backdrop { background: rgba(8,6,14,.88); }
.viewer img { width: 100%; height: auto; border-radius: 12px; }
.viewer-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .world-grid, .studio-grid, .contact-grid, .links-band { grid-template-columns: 1fr; }
  .world-grid.reverse .world-visual { order: 0; }
  .hero-deck { height: 300px; max-width: 520px; width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; border: 1px solid var(--ink-line); border-radius: 12px; background: transparent; cursor: pointer;
    padding: 0 11px;
  }
  .menu-toggle .bar { display: block; height: 2px; background: var(--paper); border-radius: 2px; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--ink); border-bottom: 1px solid var(--ink-line); padding: 10px var(--gutter) 18px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8em 1em; }
  .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .brand img { height: 80px; margin-top: -4px; margin-left: -14px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .hero-deck { height: 280px; }
  .to-top { margin-left: 0; }
  .next-dot, .next-arrow { display: none; }
  .world-sokoban .player, .world-lofi .player { transform: none; }
  .world-grid.reverse { grid-template-columns: 1fr; }
  .lang-toggle { margin-left: auto; margin-right: 10px; order: 2; }
  .menu-toggle { order: 3; }
}

/* ---------- Privacy page ---------- */
.legal { max-width: 780px; padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(64px, 9vw, 120px); }
.legal h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: .5em; }
.legal h2 { font-size: 1.4rem; font-weight: 700; color: var(--orange); margin: 2em 0 .6em; }
.legal p, .legal li { color: #ddd8e8; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .5em; }
.legal a { color: var(--orange-hot); }
.legal-kicker { font-size: .9rem; color: var(--muted) !important; text-transform: uppercase; letter-spacing: .08em; }
.legal-sep { border: 0; border-top: 1px solid var(--ink-line); margin: clamp(48px, 8vw, 96px) 0; }
.site-footer a { color: inherit; }
@media (max-width: 720px) {
  .site-nav.legal-nav { display: flex; position: static; flex-direction: row; gap: 14px; background: none; padding: 0; box-shadow: none; font-size: .9rem; }
  .legal-nav .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title .cursor { animation: none; }
  .card, .store, .shot img, .btn { transition: none; }
}
