/* ============================================================
   Star Point — digital games studio
   Design tokens, mobile-first, Flexbox/Grid.
   ============================================================ */

:root {
  /* Palette */
  --bg:        #0a0b14;
  --bg-alt:    #10121f;
  --surface:   #171a2b;
  --surface-2: #1e2238;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #eef0f7;
  --muted:     #a5abc4;

  --brand:     #6c5ce7;
  --brand-2:   #00d4ff;
  --accent:    #ff5da2;

  /* Game card accents */
  --g1a: #6c5ce7; --g1b: #00d4ff;
  --g2a: #ff5da2; --g2b: #ff9f43;
  --g3a: #2ecc71; --g3b: #00d4ff;

  /* Spacing / sizing */
  --space:   1rem;
  --radius:  16px;
  --radius-sm: 10px;
  --maxw:    1140px;

  /* Type */
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-2);
  margin-bottom: 0.75rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 20, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 52px;
  width: auto;
  border-radius: 10px;
  display: block;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.nav-cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff !important;
}
.nav-cta:hover { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
  background: radial-gradient(1200px 600px at 50% -10%, rgba(108, 92, 231, 0.25), transparent 60%),
              var(--bg);
}
.hero-glow {
  position: absolute;
  inset: -20% 10% auto 10%;
  height: 420px;
  background: radial-gradient(closest-side, rgba(0, 212, 255, 0.18), transparent);
  filter: blur(30px);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }

/* Big hero logo with an animated orbit ring */
.hero-logo-wrap {
  position: relative;
  width: clamp(180px, 40vw, 300px);
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
}
.hero-logo {
  width: 100%;
  height: auto;
  border-radius: 24px;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.35));
  animation: float 6s ease-in-out infinite;
}
.hero-logo-ring {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 1px dashed rgba(0, 212, 255, 0.35);
  animation: spin 24s linear infinite;
}
.hero-logo-ring::before {
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 12px 2px rgba(0, 212, 255, 0.8);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero-title {
  background: linear-gradient(180deg, #fff 40%, #b9c0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 640px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin: 2rem 0 2.5rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 620px;
  margin-inline: auto;
}
.hero-stats div { text-align: center; }
.hero-stats dt { font-size: 2rem; font-weight: 800; color: var(--text); }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; }

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
  gap: 1.5rem;
}
.game-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.18); text-decoration: none; }
.game-more {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 700;
  color: var(--brand-2);
}
.game-cover { height: 160px; display: grid; place-items: center; overflow: hidden; }
.game-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.accent-1 .game-cover { background: linear-gradient(135deg, var(--g1a), var(--g1b)); }
.accent-2 .game-cover { background: linear-gradient(135deg, var(--g2a), var(--g2b)); }
.accent-3 .game-cover { background: linear-gradient(135deg, var(--g3a), var(--g3b)); }
.game-body { padding: 1.4rem; }
.game-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-2);
  background: rgba(0, 212, 255, 0.1);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.game-genre { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.6rem; }
.game-blurb { color: var(--muted); margin: 0; }

/* ---------- Studio ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.studio-values {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.studio-values li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.studio-panel {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.panel-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.8;
}
.panel-orb  { width: 180px; height: 180px; top: 20%; left: 15%; background: radial-gradient(circle, var(--brand), transparent 70%); }
.orb-2 { width: 140px; height: 140px; bottom: 12%; right: 18%; background: radial-gradient(circle, var(--brand-2), transparent 70%); }
.orb-3 { width: 90px;  height: 90px;  top: 55%; left: 45%; background: radial-gradient(circle, var(--accent), transparent 70%); }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.18); }
.service-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.service-card p { color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-email a { font-size: 1.15rem; font-weight: 700; }
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.92rem; }
.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font: inherit;
  resize: vertical;
}
.field input:focus,
.field textarea:focus { border-color: var(--brand-2); outline: none; }
.form-note {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.form-ok  { background: rgba(46, 204, 113, 0.15); color: #57e39a; }
.form-err { background: rgba(255, 93, 162, 0.15); color: #ff8bc0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { display: flex; gap: 1rem; align-items: center; }
.footer-logo { height: 64px; width: auto; border-radius: 12px; }
.footer-tag { color: var(--muted); margin: 0; font-size: 0.9rem; max-width: 320px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: var(--muted); font-weight: 600; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }

/* ============================================================
   Game detail page
   ============================================================ */
.game-page { padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(3rem, 8vw, 5rem); }
.crumb { margin-bottom: 1.5rem; }
.crumb a { color: var(--muted); font-weight: 600; }
.crumb a:hover { color: var(--text); }

.gp-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(2rem, 6vw, 4rem);
}
.gp-cover {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
}
.gp-cover-initial {
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
  line-height: 1;
}
.gp-intro h1 { margin-top: 0.6rem; }
.gp-genre { color: var(--accent); font-weight: 700; margin-bottom: 1rem; }
.gp-blurb { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }
.gp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.gp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.gp-facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.gp-facts dd { margin: 0; font-weight: 700; }

.gp-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: clamp(2rem, 6vw, 3rem);
}
.gp-about p { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.gp-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.gp-features li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--muted);
}
.gp-features li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--brand-2);
}

.gp-icon {
  width: clamp(120px, 30vw, 200px);
  height: auto;
  border-radius: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.gp-shots { margin-top: clamp(2rem, 6vw, 3rem); }
.gp-shots h2 { margin-bottom: 1.25rem; }
.shot-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.shot-row img {
  height: 380px;
  width: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.notfound { text-align: center; }
.notfound .hero-actions { justify-content: center; }

/* ============================================================
   Responsive — tablet & up
   ============================================================ */
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .studio-grid  { grid-template-columns: 1.1fr 0.9fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .gp-hero      { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
  .gp-body      { grid-template-columns: 1.3fr 0.7fr; gap: 3.5rem; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform 0.28s ease;
    padding: 1rem 1.25rem 1.5rem;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .site-nav a { padding: 0.85rem 1rem; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* ---------- Header scrolled state ---------- */
.site-header.scrolled {
  background: rgba(10, 11, 20, 0.9);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger cards within a grid */
.game-grid [data-reveal].is-visible:nth-child(2)  { transition-delay: 0.08s; }
.game-grid [data-reveal].is-visible:nth-child(3)  { transition-delay: 0.16s; }
.service-grid [data-reveal].is-visible:nth-child(2) { transition-delay: 0.08s; }
.service-grid [data-reveal].is-visible:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
