@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Syne:wght@500;600;700;800&display=swap");

:root {
  --bg-deep: #0a0c10;
  --bg-elevated: #131820;
  --bg-soft: #eceae4;
  --bg-paper: #f7f5f0;
  --text-on-dark: #eceae4;
  --text-muted-dark: #9da8b8;
  --text-on-light: #0f1218;
  --text-muted-light: #4a5360;
  --accent: #2fa68e;
  --accent-hover: #249578;
  --accent-soft: rgba(47, 166, 142, 0.12);
  --border-dark: rgba(236, 234, 228, 0.1);
  --border-light: rgba(15, 18, 24, 0.12);
  --radius: 4px;
  --nav-height: 72px;
  --max-width: 1180px;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "Syne", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-on-light);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-height);
  padding-top: env(safe-area-inset-top, 0);
  display: flex;
  align-items: center;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: blur(10px);
  border-color: var(--border-light);
}

.header-inner {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.brand-logo--light {
  display: none;
}

.site-header.is-scrolled .brand-logo--dark {
  display: none;
}

.site-header.is-scrolled .brand-logo--light {
  display: block;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--text-on-dark);
  transition: color 0.25s ease;
}

.site-header.is-scrolled .brand-text {
  color: var(--text-on-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled .site-nav a {
  color: var(--text-muted-light);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-on-dark);
  border-color: var(--accent);
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a.is-active {
  color: var(--text-on-light);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.65rem;
  margin: -0.65rem -0.65rem -0.65rem 0;
  cursor: pointer;
  color: var(--text-on-dark);
  min-width: 44px;
  min-height: 44px;
}

.site-header.is-scrolled .nav-toggle {
  color: var(--text-on-light);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 99;
  background: var(--bg-deep);
  padding: 0.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border-dark);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: 1rem 0;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9375rem;
  color: var(--text-on-dark);
  border-bottom: 1px solid var(--border-dark);
}

.mobile-nav a.is-active {
  color: var(--accent);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 2.5rem) 1.25rem 3rem;
  background: var(--bg-deep);
  color: var(--text-on-dark);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  right: -12%;
  top: 8%;
  background: radial-gradient(circle, rgba(47, 166, 142, 0.35) 0%, transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  min-height: calc(100vh - var(--nav-height) - 5rem);
}

.hero-brand {
  padding-bottom: 1rem;
}

.hero-logo {
  width: min(360px, 100%);
  margin-bottom: 1.75rem;
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}

.location-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 166, 142, 0.25);
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-headline {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(236, 234, 228, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--text-on-dark);
  border-color: var(--border-dark);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 42%, transparent 42%, transparent 58%, var(--accent) 58%, var(--accent) 100%);
  opacity: 0.9;
}

.section {
  padding: clamp(4rem, 8vw, 6.5rem) 1.25rem;
}

.section-label {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-on-light);
}

.section-intro {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted-light);
  line-height: 1.7;
}

.about {
  background: var(--bg-paper);
  border-top: 1px solid var(--border-light);
}

.about-layout {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about-intro .section-intro {
  margin-top: 1.25rem;
  max-width: 28rem;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--text-on-light);
}

.service-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.service-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  margin-top: 0.1rem;
  border: 3px solid #ebebeb;
  border-radius: 50%;
  background-color: #f3f3f3;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px auto;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.service-row:hover .service-icon {
  background-color: var(--accent);
  border-color: rgba(47, 166, 142, 0.35);
}

.service-icon--games {
  background-image: url("../img/icons/responsive.png");
}

.service-icon--web {
  background-image: url("../img/icons/minimalist.png");
}

.service-icon--media {
  background-image: url("../img/icons/free.png");
}

.service-body h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.service-body p {
  margin: 0;
  font-size: 0.9875rem;
  color: var(--text-muted-light);
  line-height: 1.65;
}

.portfolio {
  background: var(--bg-soft);
}

.portfolio-layout {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.portfolio-intro .section-intro {
  margin: 1rem 0 1.75rem;
}

.store-link {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.store-link:hover {
  opacity: 0.85;
}

.store-link img {
  width: 180px;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.game-card {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--text-on-light);
  box-shadow: 8px 8px 0 rgba(15, 18, 24, 0.08);
}

.game-card--a {
  transform: rotate(-0.6deg);
}

.game-card--b {
  margin-left: clamp(0rem, 8vw, 4rem);
  transform: rotate(0.5deg);
}

.game-card--c {
  margin-right: clamp(0rem, 6vw, 3rem);
  transform: rotate(-0.35deg);
}

.game-card img {
  width: 100%;
}

.partners {
  padding: clamp(3.5rem, 7vw, 5rem) 1.25rem;
  background: var(--text-on-light);
  color: var(--text-on-dark);
}

.partners-layout {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem 3rem;
  align-items: center;
}

.partners-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  color: var(--accent);
}

.tool-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 1.25rem 1.5rem;
  align-items: center;
  justify-items: center;
}

.tool-logos img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(1) brightness(1.35);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.tool-logos img:hover {
  opacity: 1;
  filter: none;
}

.contact {
  background: var(--bg-paper);
  border-top: 1px solid var(--border-light);
}

.contact-layout {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem 3rem;
  align-items: start;
}

.contact-blurb {
  margin: 0 0 1.5rem;
  max-width: 26rem;
  color: var(--text-muted-light);
}

.contact-email-img {
  display: block;
  width: 40vw;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.profile-card {
  display: none;
  width: min(300px, 100%);
  padding: 0 0 1.5rem;
  background: #fff;
  border: 2px solid var(--text-on-light);
  box-shadow: 10px 10px 0 var(--accent-soft);
  overflow: hidden;
  text-align: center;
}

.profile-card.is-visible {
  display: block;
}

.profile-card img {
  width: 100%;
}

.profile-card h3 {
  margin: 1.25rem 1rem 0.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.profile-card .role {
  margin: 0 1rem;
  font-weight: 600;
  color: var(--accent);
}

.profile-card .subtitle {
  margin: 0.25rem 1rem 1rem;
  color: var(--text-muted-light);
  font-size: 0.95rem;
}

.profile-card .social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--border-light);
  color: var(--text-on-light);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.profile-card .social:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-footer {
  padding: 1.75rem 1.25rem;
  background: var(--bg-deep);
  color: var(--text-muted-dark);
  text-align: left;
  font-size: 0.875rem;
}

.site-footer p {
  width: min(var(--max-width), 100%);
  margin: 0.35rem auto;
}

.site-footer a {
  color: var(--text-on-dark);
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--accent);
}

#spacer {
  display: none;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 1.5rem) 1rem 2.5rem;
  }

  .hero::before {
    width: 90vw;
    height: 90vw;
    right: -30%;
    top: -5%;
    opacity: 0.85;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    min-height: auto;
  }

  .hero-copy {
    order: 1;
  }

  .hero-brand {
    order: 2;
    padding-bottom: 0;
    text-align: center;
  }

  .hero-logo {
    width: min(280px, 78vw);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
  }

  .hero-location {
    justify-content: center;
  }

  .hero-headline {
    max-width: none;
    font-size: clamp(1.65rem, 7vw, 2.25rem);
    line-height: 1.12;
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-rule {
    height: 4px;
    background: linear-gradient(
      90deg,
      var(--accent) 0%,
      var(--accent) 35%,
      transparent 35%,
      transparent 65%,
      var(--accent) 65%,
      var(--accent) 100%
    );
  }

  .section {
    padding: 3.25rem 1rem;
  }

  .about-layout,
  .portfolio-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-intro .section-intro {
    max-width: none;
  }

  .services-list {
    margin-top: 0.5rem;
  }

  .portfolio-layout {
    gap: 2.5rem;
  }

  .portfolio-intro .section-intro {
    margin-bottom: 1.25rem;
  }

  .store-link img {
    width: 160px;
  }

  .games-list {
    gap: 1.25rem;
  }

  .game-card {
    box-shadow: 4px 4px 0 rgba(15, 18, 24, 0.08);
  }

  .game-card--b,
  .game-card--c {
    margin-left: 0;
    margin-right: 0;
  }

  .game-card--a,
  .game-card--b,
  .game-card--c {
    transform: none;
  }

  .partners {
    padding: 3rem 1rem;
  }

  .partners-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .partners-title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 1.5rem;
    text-align: left;
  }

  .tool-logos {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .tool-logos img {
    height: 32px;
  }

  .contact-layout {
    gap: 2rem;
  }

  .contact-main {
    text-align: left;
  }

  .contact-blurb {
    max-width: none;
  }


  .profile-card {
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 6px 6px 0 var(--accent-soft);
  }

  .site-footer {
    padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0));
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  html {
    scroll-padding-top: calc(var(--nav-height) + 16px);
  }

  body {
    font-size: 1rem;
  }

  .header-inner {
    width: calc(100% - 2rem);
  }

  .brand-logo {
    height: 30px;
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .brand-text {
    display: none;
  }

  .site-header.is-scrolled {
    background: rgba(247, 245, 240, 0.97);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .service-row {
    grid-template-columns: 48px 1fr;
    gap: 0.85rem 1rem;
    padding: 1.35rem 0;
    align-items: start;
  }

  .service-icon {
    width: 48px;
    height: 48px;
    background-size: 26px auto;
  }

  .section-title {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }
}

@media (max-width: 380px) {
  .tool-logos {
    grid-template-columns: repeat(3, 1fr);
  }
}
