:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7f9;
  --color-text: #16181d;
  --color-muted: #5f6672;
  --color-border: #e7e9ed;
  --color-accent: #0ea5e9;
  --color-accent-2: #ff6b87;
  --color-accent-3: #a78bfa;
  --color-accent-4: #34d399;
  --color-accent-contrast: #ffffff;
  --color-border-ink: #152631;
  --max-width: 720px;
  --space-lg: 7rem;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(14, 165, 233, 0.35);
  --border-w: 3px;
  --shadow-hard-sm: 2px 2px 0 var(--color-border-ink);
  --shadow-hard: 5px 5px 0 var(--color-border-ink);
  --shadow-hard-lg: 8px 8px 0 var(--color-border-ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

h1,
h2 {
  font-family: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Holographic card-foil backdrop — stays put behind the page as you scroll */

.holo-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.55) 0px,
      rgba(255, 255, 255, 0.55) 1px,
      transparent 1px,
      transparent 4px
    ),
    linear-gradient(
      100deg,
      rgba(14, 165, 233, 0.1) 0%,
      rgba(167, 139, 250, 0.09) 17%,
      rgba(255, 107, 135, 0.1) 34%,
      rgba(52, 211, 153, 0.08) 51%,
      rgba(14, 165, 233, 0.09) 68%,
      rgba(255, 107, 135, 0.09) 85%,
      rgba(167, 139, 250, 0.1) 100%
    );
  background-size: 5px 5px, 280% 280%;
  background-blend-mode: overlay, normal;
  opacity: 0.65;
  animation: holo-shimmer 26s ease-in-out infinite;
}

@keyframes holo-shimmer {
  0% { background-position: 0 0, 0% 20%; }
  50% { background-position: 5px 5px, 100% 80%; }
  100% { background-position: 0 0, 0% 20%; }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

a {
  color: inherit;
}

/* Reveal-on-scroll */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background:
    linear-gradient(120deg, rgba(14, 165, 233, 0.12), rgba(255, 107, 135, 0.1)),
    rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--border-w) solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-mark {
  height: 1.75rem;
  width: auto;
}

.logo-mark-photo {
  width: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border-ink);
}

.site-header nav a {
  position: relative;
  margin-left: 1.75rem;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.2s ease;
}

.site-header nav a:hover {
  color: var(--color-text);
}

.site-header nav a:hover::after {
  width: 100%;
}

/* Hero */

.hero {
  position: relative;
  padding: calc(var(--space-lg) + 1rem) 0 var(--space-lg);
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 32rem;
  background:
    radial-gradient(38rem 22rem at 20% 15%, rgba(14, 165, 233, 0.16), transparent 60%),
    radial-gradient(30rem 20rem at 85% 10%, rgba(255, 107, 135, 0.14), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.avatar {
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1.75rem;
  object-fit: contain;
  filter: drop-shadow(5px 5px 0 var(--color-border-ink));
  animation: avatar-float 5.5s ease-in-out infinite;
}

.avatar-photo {
  object-fit: cover;
  border-radius: 50%;
  border: var(--border-w) solid var(--color-border-ink);
  box-shadow: var(--shadow-hard);
  filter: none;
}

@keyframes avatar-float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
  }
  30% {
    transform: translate(2px, -7px) rotate(2deg) scale(1.012);
    animation-timing-function: cubic-bezier(0.4, 0, 0.7, 1);
  }
  55% {
    transform: translate(-1px, 2px) rotate(-1.5deg) scale(0.988);
    animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
  }
  80% {
    transform: translate(1px, -4px) rotate(1deg) scale(1.006);
    animation-timing-function: cubic-bezier(0.4, 0, 0.7, 1);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--color-text) 40%, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Berry Shark Games wordmark — colors pulled from the studio logo */

.brand-wordmark {
  font-family: 'Luckiest Guy', cursive;
}

.hero h1.brand-wordmark {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--color-text);
}

.brand-lines {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.brand-line1,
.brand-line2 {
  display: block;
}

.brand-line2 {
  font-size: 0.5em;
  letter-spacing: 0.03em;
}

.brand-berry {
  color: #e63658;
}

.brand-shark {
  color: #0284c7;
}

.tagline {
  margin: 0 auto 2.25rem;
  max-width: 480px;
  color: var(--color-muted);
  font-size: 1.2rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: var(--color-accent-contrast);
  border-radius: 14px;
  border: var(--border-w) solid var(--color-border-ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-hard);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button svg {
  transition: transform 0.18s ease;
}

.button:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: var(--shadow-hard-lg);
}

.button:hover svg {
  transform: translateX(3px);
}

.button:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.button-light {
  background: var(--color-border-ink);
}

/* Hero buttons */

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button-outline {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Games grid */

.games {
  padding: var(--space-lg) 0;
}

.games h2 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-intro {
  margin: 0 0 2.5rem;
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-card {
  border: var(--border-w) solid var(--color-border-ink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-hard);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02) rotate(-1deg);
  box-shadow: var(--shadow-hard-lg);
}

.game-card:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.game-thumb {
  position: relative;
  height: 200px;
  background-color: var(--color-text);
  background-size: cover;
  background-position: center;
}

.game-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

button.game-thumb {
  display: block;
  width: 100%;
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
}

.gallery-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: var(--color-text);
  border: var(--border-w) solid var(--color-border-ink);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-hard-sm);
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-thumb:hover .gallery-badge {
  transform: translate(-50%, -50%) scale(1.06);
}

.game-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  padding-left: 3px;
  background: #fff;
  color: var(--color-text);
  border: var(--border-w) solid var(--color-border-ink);
  border-radius: 50%;
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.12);
}

.play-button:active {
  transform: translate(-50%, -50%) scale(0.95);
  transition: transform 0.06s ease;
}

.game-card-body {
  padding: 1.5rem;
}

.game-card-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.game-card-body p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.game-card-body p a,
.jam-card-body p a,
.section-intro a,
.about p a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.game-card-body p a:hover,
.jam-card-body p a:hover,
.section-intro a:hover,
.about p a:hover {
  color: var(--color-accent);
}

.studio-card-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.studio-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
}

.studio-card-logo img {
  width: 110px;
  height: 110px;
}

.studio-card-logo-stack {
  flex-direction: column;
  gap: 0.5rem;
}

.studio-card-logo img.work-icon {
  width: auto;
  height: 72px;
}

.work-wordmark {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  text-align: center;
  padding: 0 1.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link + .card-link {
  margin-top: 0.6rem;
}

.card-link-secondary {
  display: block;
  color: var(--color-muted);
  font-weight: 500;
}

.card-link svg {
  transition: transform 0.18s ease;
}

.card-link:hover svg {
  transform: translateX(3px);
}


/* Color-stripe section dividers */

.stripe-top,
.stripe-bottom {
  position: relative;
}

.stripe-top::before,
.stripe-bottom::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--color-accent) 0 24px, var(--color-accent-2) 24px 48px);
  border-top: var(--border-w) solid var(--color-border-ink);
  border-bottom: var(--border-w) solid var(--color-border-ink);
  z-index: 2;
}

.stripe-top::before {
  top: 0;
}

.stripe-bottom::after {
  bottom: 0;
}

/* Game jams */

.jams {
  padding: var(--space-lg) 0;
  background: var(--color-bg-alt);
}

.jams h2 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.jam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.jam-card {
  border: var(--border-w) solid var(--color-border-ink);
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: var(--shadow-hard);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.jam-card:hover {
  transform: translateY(-6px) scale(1.02) rotate(1deg);
  box-shadow: var(--shadow-hard-lg);
}

.jam-card:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.jam-thumb {
  height: 110px;
  border-bottom: var(--border-w) solid var(--color-border-ink);
  background-color: var(--color-bg-alt);
  background-size: cover;
  background-position: center;
}

.jam-card-body {
  padding: 1.5rem;
}

.jam-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--color-border-ink);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.jam-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.jam-card p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.jam-card .card-link {
  margin: 0;
}

/* Press kit callout */

.presskit-callout {
  padding: var(--space-lg) 0;
  background: linear-gradient(135deg, #16181d, #262a35);
  color: #fff;
}

.presskit-callout-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.presskit-callout h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.presskit-callout p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  max-width: 440px;
}

.presskit-callout code {
  background: rgba(255, 255, 255, 0.12);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.section-label-light {
  background: #7dd3fc;
  color: var(--color-text);
}

/* Sections */

.about,
.contact {
  padding: var(--space-lg) 0;
}

.about {
  background: var(--color-bg-alt);
}

.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--color-border-ink);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.section-card {
  background: var(--color-bg);
  border: var(--border-w) solid var(--color-border-ink);
  border-radius: 20px;
  padding: 2.75rem;
  box-shadow: var(--shadow-hard);
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  border: var(--border-w) solid var(--color-border-ink);
  box-shadow: var(--shadow-hard);
}

.about h2,
.contact h2 {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.about p {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.contact {
  text-align: center;
}

.contact p {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.social-links a {
  display: flex;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.social-links a:hover {
  color: var(--color-accent);
}

.social-links svg {
  width: 24px;
  height: 24px;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
}

.site-footer p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* Gallery modal */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.88);
}

.gallery-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: var(--border-w) solid var(--color-border-ink);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}

.gallery-modal-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(90vw, 760px);
  max-height: 70vh;
}

.gallery-modal-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  border: var(--border-w) solid #fff;
  box-shadow: var(--shadow-hard-lg);
}

.gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: var(--border-w) solid var(--color-border-ink);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}

.gallery-modal-prev {
  left: -1.25rem;
}

.gallery-modal-next {
  right: -1.25rem;
}

.gallery-modal-caption {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  max-width: 560px;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.gallery-modal-caption a {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.gallery-modal-caption a:hover {
  color: #fff;
}

/* Responsive */

@media (max-width: 700px) {
  .gallery-modal-prev {
    left: 0.5rem;
  }

  .gallery-modal-next {
    right: 0.5rem;
  }

  .gallery-modal-nav {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: 4.5rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .section-card {
    padding: 2rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
  }

  .site-header nav a {
    margin: 0 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .avatar {
    animation: none;
  }

  .holo-bg {
    animation: none;
  }

  .button,
  .game-card,
  .jam-card {
    transition: box-shadow 0.18s ease;
  }
}
