@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --studio-bg: #07090c;
  --studio-surface: #10141a;
  --studio-text: #f6f7f8;
  --studio-muted: #aeb5bf;
  --studio-line: rgba(255, 255, 255, 0.14);
  --studio-accent: #71cfdf;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--studio-bg);
  color: var(--studio-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header,
.about-header,
.blog-header,
.games-header,
.projects-header,
.press-header,
.jobs-header,
.contact-header,
.virus-header,
.beetle-header {
  position: relative;
  z-index: 50;
  display: flex;
  width: 100%;
  min-height: 82px;
  height: auto;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.6rem clamp(1rem, 3.5vw, 3.5rem);
  border: 0;
  border-bottom: 1px solid var(--studio-line);
  background: rgba(7, 9, 12, 0.96);
  backdrop-filter: blur(14px);
}

.brand,
.footer-brand,
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 18%;
  object-fit: cover;
}

.footer-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 18%;
  object-fit: cover;
}

.brand-wordmark {
  color: #ffffff;
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.header-actions {
  --nav-accent: #4f9663;
  gap: clamp(0.8rem, 1.6vw, 1.7rem);
}

.site-header .nav-button {
  position: relative;
  min-height: 40px;
  padding: 0.4rem 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: #c9ced6;
  font-size: clamp(0.73rem, 0.85vw, 0.84rem);
  font-weight: 600;
  letter-spacing: 0.035em;
  transition: color 150ms ease;
}

.site-header .nav-button::after {
  position: absolute;
  right: 0;
  bottom: 0.12rem;
  left: 0;
  width: auto;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--nav-accent), #7eaa62);
  content: "";
  transform: scaleX(0) skewX(-18deg);
  transform-origin: left;
  transition: transform 150ms ease;
}

.site-header .nav-button:hover {
  color: #ffffff;
}

.site-header .nav-button.active {
  border: 0 !important;
  background: transparent !important;
  color: #ffffff;
  box-shadow: none;
}

.site-header .nav-button:hover::after,
.site-header .nav-button.active::after {
  transform: scaleX(1) skewX(-18deg);
}

.social-menu {
  position: relative;
  flex: 0 0 auto;
}

.social-menu-toggle {
  display: inline-flex;
  align-items: center;
}

.social-menu::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 0.6rem;
  content: "";
}

.social-menu:hover .social-menu-toggle,
.social-menu:focus-within .social-menu-toggle {
  color: #ffffff;
}

.social-menu:hover .social-menu-toggle::after,
.social-menu:focus-within .social-menu-toggle::after {
  transform: scaleX(1) skewX(-18deg);
}

.social-menu-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 100;
  display: grid;
  width: 210px;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  background: rgba(10, 13, 17, 0.98);
  box-shadow: none;
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.social-menu:hover .social-menu-panel,
.social-menu:focus-within .social-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.social-menu-panel a {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0;
  color: #d9dde3;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 150ms ease, color 150ms ease;
}

.social-menu-panel a::before {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
  background-color: var(--nav-accent);
  content: "";
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.social-menu-panel a[href*="discord.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/discord.svg");
  mask-image: url("/assets/socials/discord.svg");
}

.social-menu-panel a[href*="bluesky.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/bluesky.svg");
  mask-image: url("/assets/socials/bluesky.svg");
}

.social-menu-panel a[href*="youtube.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/youtube.svg");
  mask-image: url("/assets/socials/youtube.svg");
}

.social-menu-panel a[href*="tiktok.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/tiktok.svg");
  mask-image: url("/assets/socials/tiktok.svg");
}

.social-menu-panel a[href*="instagram.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/instagram.svg");
  mask-image: url("/assets/socials/instagram.svg");
}

.social-menu-panel a[href*="patreon.bioloom.studio"]::before {
  -webkit-mask-image: url("/assets/socials/patreon.svg");
  mask-image: url("/assets/socials/patreon.svg");
}

.social-menu-panel a span {
  color: var(--nav-accent);
}

.social-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.social-menu-panel a:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: -2px;
}

.site-header .nav-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.studio-button:focus-visible {
  outline: 2px solid var(--studio-accent);
  outline-offset: 4px;
}

.home-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--studio-line);
  background: var(--studio-bg);
}

.footer-brand .brand-wordmark {
  font-size: 1.6rem;
}

.home-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--studio-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.home-footer-links a:hover {
  color: #ffffff;
}

.faq-section {
  --faq-accent: var(--studio-accent);
  --faq-border: var(--studio-line);
}

.faq-heading {
  display: grid;
  max-width: 720px;
  gap: 0.8rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.faq-eyebrow {
  margin: 0;
  color: var(--faq-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faq-heading h2 {
  margin: 0;
  color: #ffffff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  text-align: left;
}

.faq-intro {
  margin: 0;
  color: var(--studio-muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.65;
}

.faq-list {
  border-top: 1px solid var(--faq-border);
}

.faq-item {
  border-bottom: 1px solid var(--faq-border);
}

.faq-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 1.5rem;
  align-items: center;
  padding: 1.45rem 0;
  color: #ffffff;
  cursor: pointer;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--faq-border);
  border-radius: 50%;
  color: var(--faq-accent);
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item summary:hover {
  color: var(--faq-accent);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--faq-accent);
  outline-offset: 5px;
}

.faq-answer {
  max-width: 760px;
  padding: 0 3.5rem 1.5rem 0;
  color: var(--studio-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--faq-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.studio-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.studio-button .button-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
  object-fit: contain;
}

.studio-button svg.button-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.studio-button .button-icon--dark-on-light {
  filter: brightness(0);
}

.studio-button.primary {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: none;
  color: #090b0e;
}

.studio-button:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.studio-button.primary:hover {
  background: #d7d9dc;
  border-color: #d7d9dc;
  box-shadow: none;
}

.about-cta,
.contact-cta,
.games-cta,
.projects-cta,
.press-cta,
.download-link,
.jobs-cta {
  border-radius: 4px;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0;
}

.about-hero h1,
.blog-hero h1,
.contact-hero h1,
.jobs-hero h1,
.press-hero h1 {
  max-width: 900px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

@media (max-width: 980px) {
  .site-header .nav-press,
  .site-header .nav-jobs,
  .site-header .nav-contact {
    display: none;
  }

  .site-header .nav-button.active {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 72px;
    gap: 0.75rem;
    padding: 0.45rem 0.8rem;
  }

  .brand,
  .footer-brand {
    gap: 0.55rem;
  }

  .brand img,
  .footer-brand img {
    width: 36px !important;
    height: 36px;
  }

  .brand .brand-wordmark {
    font-size: 1.05rem;
  }

  .header-actions {
    gap: 0.8rem !important;
  }

  .faq-item summary {
    gap: 0.85rem;
    padding-block: 1.2rem;
  }

  .faq-answer {
    padding-right: 0;
  }

  .site-header .nav-about,
  .site-header .nav-blog {
    display: none;
  }

  .site-header .nav-button.active {
    display: inline-flex;
  }

  .site-header .nav-button {
    min-height: 36px;
    padding-inline: 0 !important;
    font-size: 0.68rem !important;
  }

  .social-menu-panel {
    width: min(210px, calc(100vw - 1.6rem));
  }

  .home-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .site-header .nav-projects:not(.active) {
    display: none;
  }

  .header-actions {
    gap: 0.65rem !important;
  }
}

@media (max-width: 360px) {
  .brand .brand-wordmark {
    display: none;
  }
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav-enhanced .site-header {
    min-height: 72px;
  }

  .nav-enhanced .mobile-nav-toggle {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    cursor: pointer;
  }

  .nav-enhanced .mobile-nav-toggle:hover {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-enhanced .mobile-nav-toggle:focus-visible {
    outline: 2px solid var(--nav-accent, #71cfdf);
    outline-offset: 3px;
  }

  .nav-enhanced .mobile-nav-toggle span,
  .nav-enhanced .mobile-nav-toggle span::before,
  .nav-enhanced .mobile-nav-toggle span::after {
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 150ms ease, opacity 150ms ease;
  }

  .nav-enhanced .mobile-nav-toggle span {
    position: relative;
  }

  .nav-enhanced .mobile-nav-toggle span::before,
  .nav-enhanced .mobile-nav-toggle span::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .nav-enhanced .mobile-nav-toggle span::before {
    transform: translateY(-6px);
  }

  .nav-enhanced .mobile-nav-toggle span::after {
    transform: translateY(6px);
  }

  .nav-enhanced .mobile-nav-open .mobile-nav-toggle span {
    background: transparent;
  }

  .nav-enhanced .mobile-nav-open .mobile-nav-toggle span::before {
    transform: rotate(45deg);
  }

  .nav-enhanced .mobile-nav-open .mobile-nav-toggle span::after {
    transform: rotate(-45deg);
  }

  .nav-enhanced .site-header .header-actions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1;
    display: grid;
    max-height: calc(100vh - 72px);
    grid-template-columns: 1fr;
    gap: 0 !important;
    padding: 0.55rem clamp(1rem, 4vw, 2rem) 0.8rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--studio-line);
    background: rgba(7, 9, 12, 0.99);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  }

  .nav-enhanced .site-header.mobile-nav-open .header-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .nav-enhanced .site-header .header-actions > .nav-button,
  .nav-enhanced .site-header .header-actions > .social-menu,
  .nav-enhanced .site-header .social-menu-toggle {
    display: flex;
    width: 100%;
  }

  .nav-enhanced .site-header .header-actions > .nav-button,
  .nav-enhanced .site-header .social-menu-toggle {
    min-height: 46px;
    justify-content: flex-start;
    padding: 0.7rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 0.78rem !important;
  }

  .nav-enhanced .site-header .nav-button::after {
    right: auto;
    bottom: 0;
    width: 46px;
  }

  .nav-enhanced .site-header .social-menu::after,
  .nav-enhanced .site-header .social-menu-panel {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
