/* ============================================================
   SoapGames — Indie Android game developer
   Stylesheet
   ============================================================ */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #07090e;
  --surface: #111722;
  --surface-strong: #172131;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --text: #f4f7fb;
  --muted: #a3adbf;
  --muted-soft: #7b859a;

  /* Accents */
  --cyan: #47d8ff;
  --lime: #92f05f;
  --amber: #ffbf5f;
  --rose: #ff5f91;
  --violet: #9d7bff;

  /* Effects */
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.28);
  --ring: 0 0 0 1px var(--line);
  --radius: 16px;
  --radius-sm: 10px;

  --content: min(1180px, calc(100% - 40px));

  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(71, 216, 255, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 4%, rgba(255, 95, 145, 0.12), transparent 28rem),
    radial-gradient(circle at 50% 120%, rgba(157, 123, 255, 0.12), transparent 40rem),
    linear-gradient(180deg, #07090e 0%, #0d1119 48%, #06080d 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 9, 14, 0.78);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: var(--content);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #061017;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 12px 34px rgba(71, 216, 255, 0.28);
  font-weight: 900;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links a.nav-cta {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.nav-links a.nav-cta:hover {
  border-color: var(--cyan);
  background: rgba(71, 216, 255, 0.1);
}

main {
  overflow: hidden;
}

/* ---------- Hero ---------- */
.hero {
  width: var(--content);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: 72px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 20px;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #c7d3e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.7vw, 1.26rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--muted-soft);
  font-size: 0.9rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.hero-meta span.dev::before {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

/* ---------- Buttons ---------- */
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease,
    background 180ms ease, box-shadow 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #061017;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 18px 48px rgba(71, 216, 255, 0.22);
}

.button.primary:hover {
  box-shadow: 0 22px 56px rgba(71, 216, 255, 0.34);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  border-color: var(--cyan);
  background: rgba(71, 216, 255, 0.08);
}

.button.disabled {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  cursor: not-allowed;
}

.button.disabled:hover {
  transform: none;
}

/* ---------- Hero showcase ---------- */
.hero-showcase {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.phone-stack {
  position: relative;
  width: min(410px, 100%);
  aspect-ratio: 0.72;
}

.phone {
  position: absolute;
  width: 64%;
  aspect-ratio: 9 / 19.5;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
}

.phone.one {
  left: 0;
  bottom: 2%;
  transform: rotate(-8deg);
  animation: float-a 7s ease-in-out infinite;
}

.phone.two {
  right: 0;
  top: 0;
  transform: rotate(7deg);
  animation: float-b 8s ease-in-out infinite;
}

@keyframes float-a {
  50% {
    transform: rotate(-8deg) translateY(-12px);
  }
}

@keyframes float-b {
  50% {
    transform: rotate(7deg) translateY(12px);
  }
}

.stat-strip {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.stat {
  min-width: 0;
  padding: 16px 10px;
  background: rgba(17, 23, 34, 0.92);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

/* ---------- Sections ---------- */
.section {
  width: var(--content);
  margin: 0 auto;
  padding: 80px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.section-head p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Games grid ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-card {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 33, 49, 0.9), rgba(12, 16, 24, 0.94));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease,
    box-shadow 220ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4);
}

.game-top {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 20px 14px;
}

.game-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  background: #05070a;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-title {
  min-width: 0;
}

.game-title h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tag {
  display: inline-flex;
  align-items: center;
  margin-top: 9px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #071017;
  background: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tag.puzzle {
  background: var(--lime);
}

.tag.soon {
  background: var(--amber);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tags .tag {
  margin-top: 0;
}

.tag.free {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-strong);
}

.game-card > p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  line-height: 1.62;
  min-height: 96px;
}

.screenshots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 10px;
  padding: 0 20px 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.screenshots img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #070a10;
}

/* Landscape games (e.g. Dashbound Rogue Run) show wide screenshots */
.screenshots.landscape {
  grid-auto-columns: 88%;
}

.screenshots.landscape img {
  aspect-ratio: 16 / 9;
}

.game-actions {
  display: flex;
  margin-top: auto;
  padding: 0 20px 20px;
}

.game-actions .button {
  width: 100%;
  min-height: 48px;
}

/* ---------- Studio / about ---------- */
.studio-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.studio {
  width: var(--content);
  margin: 0 auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 48px;
  align-items: center;
}

.studio h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.studio-body p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.04rem;
}

.studio-body p:last-child {
  margin-bottom: 0;
}

.studio-links {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Footer ---------- */
footer {
  width: var(--content);
  margin: 0 auto;
  padding: 36px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

footer .footer-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 0.95rem;
}

footer small {
  font-size: 0.88rem;
  color: var(--muted-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 56px;
  }

  .hero-showcase {
    min-height: 430px;
  }

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

  .game-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    align-items: start;
  }

  .game-actions {
    grid-column: 1 / 2;
  }

  .screenshots {
    grid-row: 1 / span 3;
    grid-column: 2 / 3;
    height: 100%;
    grid-auto-columns: 34%;
    align-content: center;
    padding-top: 18px;
  }

  .screenshots.landscape {
    grid-auto-columns: 78%;
  }

  .studio {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 700px) {
  :root {
    --content: calc(100% - 32px);
  }

  .nav {
    min-height: 64px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding-top: 42px;
    gap: 34px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-showcase {
    min-height: 360px;
  }

  .phone-stack {
    width: min(330px, 100%);
  }

  .stat-strip {
    left: 0;
    right: 0;
  }

  .section {
    padding: 56px 0;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 14px;
  }

  .game-card {
    display: block;
  }

  .game-card > p {
    min-height: 0;
  }

  .screenshots {
    grid-auto-columns: 48%;
    height: auto;
    padding-top: 0;
  }

  footer {
    display: block;
  }

  footer small {
    display: block;
    margin-top: 12px;
  }
}

/* ---------- Legal pages ---------- */
.legal {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.legal .eyebrow {
  margin-bottom: 14px;
}

.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

.legal .updated {
  color: var(--muted-soft);
  font-size: 0.9rem;
  margin: 0 0 36px;
}

.legal h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 38px 0 12px;
}

.legal p,
.legal li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.legal ul {
  padding-left: 22px;
  margin: 12px 0;
}

.legal li {
  margin-bottom: 8px;
}

.legal a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--lime);
}

.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.legal .back-link:hover {
  color: var(--text);
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--muted-soft);
  transition: color 160ms ease;
}

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

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: none;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(13, 17, 25, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 280px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.cookie-banner p a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.cookie-actions .button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .cookie-actions .button {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
