/* ==========================================================================
   iPlus Games — studio site
   Shares its palette with the Galaxy Block Puzzle page so the two read as one.
   ========================================================================== */

:root {
  --bg: #0b0620;
  --bg-2: #140b33;
  --panel: rgba(34, 22, 78, 0.55);
  --panel-border: rgba(160, 130, 255, 0.22);
  --text: #f1edff;
  --muted: #b8aee0;
  --violet: #8b5cf6;
  --magenta: #d946ef;
  --cyan: #22d3ee;
  --gold: #fbbf24;
  --gold-deep: #f59e0b;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(139, 92, 246, 0.32), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(217, 70, 239, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

#starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 600; }
p { margin: 0 0 1em; }
strong { color: var(--text); }

.grad {
  background: linear-gradient(90deg, var(--cyan), var(--violet) 45%, var(--magenta) 75%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 0.6em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font: 600 1.05rem var(--font-display);
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn--primary {
  color: #2a1400;
  border: 0;
  background: linear-gradient(180deg, #ffd95a 0%, var(--gold) 45%, var(--gold-deep) 100%);
  box-shadow: 0 6px 0 #b45309, 0 12px 30px rgba(251, 191, 36, 0.35);
}
.btn--primary:active { transform: translateY(3px); box-shadow: 0 3px 0 #b45309; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn--small { padding: 0.5em 1.1em; font-size: 0.95rem; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 6, 32, 0.6);
  border-bottom: 1px solid rgba(160, 130, 255, 0.12);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.2rem var(--font-display); }
.brand__mark { width: 38px; height: 38px; }
.brand b { color: var(--gold); font-weight: 600; }
.nav__links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-weight: 600; transition: color 0.15s; }
.nav__links a:hover { color: var(--text); }
@media (max-width: 760px) {
  .nav__links { display: none; }
  .lang { margin-inline-start: auto; }
}
@media (max-width: 480px) {
  .nav__cta { display: none; } /* "Work with us" in the hero leads to the same place */
}

/* ---------- Hero ---------- */

.hero { padding: clamp(50px, 8vw, 110px) 0 clamp(60px, 8vw, 110px); }
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 34em; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .blocklogo { order: -1; }
}

/* "i+" drawn with game blocks */
.blocklogo {
  --b: clamp(40px, 6.4vw, 78px);
  display: grid;
  grid-template-columns: repeat(5, var(--b));
  grid-template-rows: repeat(5, var(--b));
  gap: calc(var(--b) * 0.08);
  justify-self: center;
  direction: ltr; /* "i+" reads left to right in every language */
  filter: drop-shadow(0 20px 50px rgba(139, 92, 246, 0.5));
}
.blocklogo i { border-radius: 18%; background-size: cover; }
.blocklogo i.on { animation: drop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) backwards; }
.blocklogo i.on:hover { animation: wiggle 0.4s ease; }
@keyframes drop { from { transform: translateY(-120px) scale(0.6); opacity: 0; } }
@keyframes wiggle { 50% { transform: scale(1.12) rotate(6deg); } }

/* ---------- Sections ---------- */

.section { padding: clamp(60px, 9vw, 110px) 0; }
.section--tint { background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.08) 25%, rgba(139, 92, 246, 0.08) 75%, transparent); }
.section__lead { color: var(--muted); max-width: 40em; }

.grid { display: grid; gap: 22px; margin-top: 36px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3 { grid-template-columns: 1fr; } }

.card,
.offer {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover,
.offer:hover { transform: translateY(-4px); border-color: rgba(160, 130, 255, 0.45); }
.card p,
.offer p { color: var(--muted); margin: 0; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(217, 70, 239, 0.25));
  border: 1px solid rgba(160, 130, 255, 0.35);
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: #e9ddff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Game ---------- */

.game {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-top: 28px;
  padding: clamp(26px, 4.5vw, 52px);
  border-radius: 32px;
  background:
    radial-gradient(500px 360px at 0% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(217, 70, 239, 0.16), transparent 70%),
    var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .game { grid-template-columns: 1fr; } }

.game__art { position: relative; justify-self: center; padding: 20px; }
.game__icon { width: clamp(180px, 22vw, 260px); filter: drop-shadow(0 18px 40px rgba(139, 92, 246, 0.55)); animation: float 6s ease-in-out infinite; }
.game__sticker { position: absolute; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45)); }
.game__sticker--a { width: 62%; left: -6%; bottom: 0; transform: rotate(-8deg); }
.game__sticker--b { width: 22%; right: 0; top: 4%; animation: spin 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes spin { 50% { transform: rotate(18deg) scale(1.08); } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font: 600 0.82rem var(--font-display);
  letter-spacing: 0.03em;
  color: #d9cbff;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(160, 130, 255, 0.35);
}
.tag--gold { color: var(--gold); background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.4); }
.game__pitch { font-size: 1.08rem; color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-inline-start: 30px; }
.checks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: url("../galaxy-block-puzzle/assets/img/block-green.webp") center / cover;
}

/* ---------- Partner ---------- */

.offer__num {
  display: block;
  margin-bottom: 10px;
  font: 700 2rem var(--font-display);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold);
}

.process {
  list-style: none;
  counter-reset: p;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 48px 0 0;
  padding: 0;
}
.process li { position: relative; padding-top: 46px; padding-inline-end: 18px; counter-increment: p; }
.process li::before {
  content: counter(p);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font: 700 1rem var(--font-display);
  color: #2a1400;
  background: linear-gradient(180deg, #ffd95a, var(--gold-deep));
  box-shadow: 0 3px 0 #b45309;
}
.process li::after {
  content: "";
  position: absolute;
  top: 16px;
  inset-inline-start: 44px;
  inset-inline-end: 12px;
  border-top: 2px dashed rgba(251, 191, 36, 0.35);
}
.process li:last-child::after { display: none; }
.process b { display: block; font: 600 1.1rem var(--font-display); margin-bottom: 4px; }
.process span { color: var(--muted); font-size: 0.96rem; }
@media (max-width: 820px) {
  .process { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .process li::after { display: none; }
}
@media (max-width: 480px) { .process { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact {
  padding: clamp(30px, 5vw, 64px);
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(251, 191, 36, 0.16), transparent 70%),
    var(--panel);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: var(--shadow);
}
.contact p { color: var(--muted); max-width: 38em; margin-inline: auto; }
.contact__mail { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 1.6em; }
.contact__mail .btn--primary { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.footer { padding: 32px 0 40px; border-top: 1px solid rgba(160, 130, 255, 0.12); color: var(--muted); font-size: 0.92rem; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer nav { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Language menu ---------- */

.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}
.lang:hover { color: var(--text); }
.lang svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 0.92rem var(--font-body);
  cursor: pointer;
  padding: 0 2px;
}
.lang select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 4px; }
.lang option { background: #1c1150; color: var(--text); }

/* ---------- Persian & Arabic ---------- */

html[lang="fa"],
html[lang="ar"] {
  --font-display: "Vazirmatn", "Fredoka", system-ui, sans-serif;
  --font-body: "Vazirmatn", "Nunito", system-ui, sans-serif;
}
/* Letter-spacing breaks the joins between Arabic-script letters */
[dir="rtl"] .eyebrow,
[dir="rtl"] .tag { letter-spacing: 0; }
[dir="rtl"] h1,
[dir="rtl"] h2 { line-height: 1.35; }
[dir="rtl"] body { line-height: 1.8; }
html[lang="fa"] .process li::before { content: counter(p, persian); }
html[lang="ar"] .process li::before { content: counter(p, arabic-indic); }

/* ---------- Game name + the upcoming game (Island Market) ---------- */

.game__name { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; margin-bottom: 0.4em; }

.game--next {
  background:
    radial-gradient(500px 360px at 0% 0%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(251, 191, 36, 0.14), transparent 70%),
    var(--panel);
  border-color: rgba(34, 211, 238, 0.3);
}

.game--next { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 860px) { .game--next { grid-template-columns: 1fr; } }
.game--next .game__art { padding: 0; width: 100%; }
.game__keyart {
  width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 60px rgba(34, 211, 238, 0.18);
  transition: transform 0.4s ease;
}
.game--next:hover .game__keyart { transform: scale(1.02) rotate(-0.6deg); }

/* Planned features: an outlined box instead of a filled block, since they don't exist yet */
.checks--plan li::before {
  background: none;
  border: 2px dashed rgba(34, 211, 238, 0.7);
  border-radius: 5px;
}
