:root {
  --yellow: #ffd653;
  --yellow-soft: #ffe58b;
  --purple: #7c718d;
  --purple-dark: #5e546d;
  --purple-light: #aaa1b5;

  --ink: #19171c;
  --muted: #68616d;
  --paper: #fffdf8;
  --paper-2: #f5f1e9;
  --white: #ffffff;
  --line: rgba(25, 23, 28, .10);

  --max: 1120px;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper-2);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  padding: 52px 0 72px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.35), transparent 25%),
    radial-gradient(circle at 85% 0%, rgba(255,255,255,.20), transparent 22%),
    var(--yellow);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.typin-logo {
  width: min(52vw, 250px);
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(82, 66, 36, .10));
}

.hero-copy { text-align: center; }
h1, h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.intro {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.6;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.socials a,
.platform-link {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(94, 84, 109, .55);
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: var(--purple-dark);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.socials a svg,
.platform-link svg { width: 20px; height: 20px; fill: currentColor; }
.socials a:hover,
.platform-link:hover {
  transform: translateY(-3px);
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}

.projects-section {
  position: relative;
  padding: 0 0 88px;
  background: var(--paper-2);
}

.project-nav-wrap {
  position: relative;
  z-index: 5;
  background: transparent;
  border: 0;
  transform: translateY(-27px);
  margin-bottom: -27px;
}

.project-tabs {
  width: fit-content;
  min-height: auto;
  margin-inline: auto;
  padding: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow:
    0 10px 30px rgba(65, 53, 37, .10),
    0 2px 6px rgba(65, 53, 37, .06);
  overflow-x: auto;
  scrollbar-width: none;
}
.project-tabs::-webkit-scrollbar { display: none; }

.project-tab {
  min-width: max-content;
  border: 0;
  border-radius: 999px;
  padding: 11px 24px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.project-tab:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.project-tab.active {
  background: var(--purple);
  color: var(--white);
  box-shadow: none;
}

.project-content { padding-top: clamp(42px, 6vw, 72px); }
.project-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(52, 43, 57, .07);
  overflow: hidden;
  animation: panelIn .3s ease both;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

.project-top {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: clamp(34px, 6vw, 72px);
  padding: clamp(28px, 5vw, 58px);
  align-items: center;
}

.project-art {
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 10px 28px rgba(57, 46, 69, .10);
}

.project-keyart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.project-info { max-width: 560px; }
.project-status {
  width: fit-content;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(124, 113, 141, .12);
  color: var(--purple-dark);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}

h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.2rem); }
.project-tagline { margin: 20px 0 10px; font-size: 1.22rem; font-weight: 700; line-height: 1.45; }
.project-description { margin: 0; color: var(--muted); font-size: 1.04rem; }
.project-links { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.platform-link {
  width: 50px;
  height: 50px;
  border-color: rgba(124, 113, 141, .35);
  background: var(--white);
  color: var(--purple-dark);
}

.media-grid {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.video-card,
.screenshots { border-radius: 18px; overflow: hidden; }
.video-card { background: var(--paper-2); border: 1px solid var(--line); }
.video-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--purple-dark); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-label { margin: 0; padding: 13px 16px; color: var(--muted); font-size: .9rem; }

.screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
}

.screenshot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease, filter .2s ease;
}

.screenshots--portrait {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.screenshots--portrait .screenshot { aspect-ratio: 9 / 16; }
.screenshots--portrait .screenshot img { object-fit: contain; }

.screenshot:hover img {
  transform: scale(1.025);
  filter: brightness(.94);
}


.game-legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: .82rem;
  color: var(--muted);
}

.game-legal-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease;
}

.game-legal-links a:hover {
  color: var(--purple-dark);
  text-decoration: underline;
}

.site-footer {
  padding: 30px 0 42px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: .9rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

.lightbox {
  width: 96vw;
  height: 92vh;
  max-width: 1440px;
  max-height: 1000px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #17131b;
  overflow: hidden;
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(17,16,20,.78);
  color: white;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-close { top: 14px; right: 14px; font-size: 1.65rem; }
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(17,16,20,.72);
  color: white;
  font-size: .86rem;
}

@media (max-width: 820px) {
  .site-header { padding: 46px 0 64px; }
  .typin-logo { width: min(60vw, 230px); }
  .project-top { grid-template-columns: 1fr; }
  .screenshots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screenshots--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-info { max-width: none; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .site-header { padding: 38px 0 56px; }
  .typin-logo { width: min(68vw, 210px); }
  .intro { font-size: 1rem; }
  .socials a { width: 44px; height: 44px; }
  .project-nav-wrap { transform: translateY(-24px); margin-bottom: -24px; }
  .project-tabs {
    width: min(100%, max-content);
    max-width: 100%;
    justify-content: flex-start;
    padding: 5px;
  }
  .project-tab { padding: 9px 18px; font-size: .95rem; }
  .project-content { padding-top: 28px; }
  .project-top { padding: 22px; gap: 25px; }
  h2 { font-size: 3.2rem; }
  .project-tagline { font-size: 1.08rem; }
  .media-grid { padding: 0 8px 8px; gap: 8px; }
  .screenshots,
  .screenshots--portrait { grid-template-columns: 1fr; gap: 8px; }
  .lightbox-stage { padding: 54px 14px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .footer-inner { flex-direction: column; gap: 4px; }
}

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


/* Footer links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-links a {
  color: var(--purple-dark);
  text-decoration: none;
  font-weight: 600;
}
.footer-links a:hover { text-decoration: underline; }

/* Legal pages */
.legal-body {
  min-height: 100vh;
  background: var(--paper-2);
}
.legal-header {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.35), transparent 25%),
    radial-gradient(circle at 85% 0%, rgba(255,255,255,.20), transparent 22%),
    var(--yellow);
  padding: 34px 0 64px;
}
.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.legal-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.legal-brand img {
  width: 132px;
  height: auto;
  display: block;
}
.legal-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid rgba(94,84,109,.42);
  border-radius: 999px;
  color: var(--purple-dark);
  background: rgba(255,255,255,.18);
  text-decoration: none;
  font-weight: 700;
  transition: .18s ease;
}
.legal-home:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
  transform: translateY(-2px);
}
.legal-main {
  width: min(calc(100% - 40px), 860px);
  margin: -28px auto 72px;
  position: relative;
  z-index: 2;
}
.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 58px);
  box-shadow: 0 12px 40px rgba(52,43,57,.07);
}
.legal-kicker {
  margin: 0 0 10px;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .78rem;
  font-weight: 800;
}
.legal-card h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.legal-updated {
  margin: 14px 0 34px;
  color: var(--muted);
  font-size: .95rem;
}
.legal-summary {
  margin: 0 0 34px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(124,113,141,.09);
  border: 1px solid rgba(124,113,141,.14);
}
.legal-summary strong { color: var(--purple-dark); }
.legal-card h2 {
  margin: 36px 0 12px;
  font-size: 1.38rem;
  letter-spacing: -.02em;
}
.legal-card p,
.legal-card li { color: var(--muted); }
.legal-card p { margin: 0 0 15px; }
.legal-card ul { padding-left: 1.3rem; }
.legal-card a {
  color: var(--purple-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}
.legal-note {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
.legal-footer {
  width: min(calc(100% - 40px), 860px);
  margin: 0 auto 38px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
@media (max-width: 560px) {
  .legal-header { padding: 26px 0 52px; }
  .legal-header-inner { align-items: center; }
  .legal-brand img { width: 102px; }
  .legal-home { padding: 8px 13px; font-size: .9rem; }
  .legal-main { width: min(calc(100% - 24px), 860px); margin-bottom: 46px; }
  .legal-card { border-radius: 20px; padding: 24px; }
}


/* Store buttons */
.platform-link.store-button {
  width: auto;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.platform-link.store-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.platform-link.store-button span {
  display: inline-block;
}

@media (max-width: 520px) {
  .platform-link.store-button {
    min-height: 48px;
    height: auto;
    padding: 13px 17px;
  }
}
