/* Reset some defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #1d1b1c;
}



/* ----------------------- Typography ----------------------- */
.montserrat {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.playwrite-no {
  font-family: "Playwrite NO", cursive;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
}

.indie-flower-regular {
  font-family: "Indie Flower", cursive;
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: "Montserrat";
  line-height: 1.5;
  color: #fdfcfc;
}

@media (max-width: 768px) {
  body {
    max-width: 95vw;
    margin: 0 auto;
    padding-top: 80px;
  }
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-family: "Playwrite NO";
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2rem);
  margin-bottom: 10px;
  font-family: "Indie Flower", cursive;
  font-weight: 300;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

p {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
}

.quote {
  margin-top: 30px;
  font-family: "Playwrite NO";
  font-size: 1.25rem;
}

h2.title-stylized {
  color: #EA718F;
  font-size: 2rem;
  margin-bottom: 0;
}

h2.title {
  color: #fdfcfc;
  font-family: "Montserrat", sans-serif;
}

@media (max-width: 768px) {
  .title-stylized {
    font-size: 1.6rem;
  }
}

/* ----------------------- Nav Bar ----------------------- */
.main-nav {
  font-family: "Montserrat";
  font-weight: 300;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.navbar {
  padding: 20px;
  position: sticky;
  top: 0;
  align-items: center;
  background-color: #1d1b1c;
  box-shadow: #EA718F 0px 2px 4px;
  z-index: 1000;
  display: flex;
  justify-content: flex-start;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 70px;
  pointer-events: auto;
}

.main-nav a {
  text-decoration: none;
  color: #fdfcfc;
  transition: transform 170ms;
  display: flex;
  align-items: center;
  gap: 5px;
  transform-origin: center;
  will-change: transform;
}

.main-nav li a:hover {
  transform: scale(1.10);
}

/* ----------------------- Desktop Nav Logo ----------------------- */
.desktop-nav-logo {
  font-family: "Playwrite NO", cursive;
  font-size: 1.2rem;
  color: #fdfcfc;
  display: flex;
  align-items: center;
  gap: 5px;
}

.desktop-nav-logo svg {
  vertical-align: middle;
  margin-left: 5px;
}

/* ----------------------- Hamburger Menu ----------------------- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: #1d1b1c;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  position: fixed;
  right: 20px;
  top: 3%;
  margin-top: 10px;
  transform: translateY(-50%);
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: #EA718F;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 6.5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-50deg) translate(5px, -3.5px);
}

/* ----------------------- Mobile Navigation Logo ----------------------- */
.mobile-nav-logo {
  display: none;
  position: fixed;
  left: 20px;
  top: 3%;
  margin-top: 10px;
  transform: translateY(-50%);
  z-index: 1001;
  font-family: "Playwrite NO", cursive;
  font-size: 1.2rem;
  color: #fdfcfc;
  align-items: center;
  gap: 5px;
}

.mobile-nav-logo svg {
  vertical-align: middle;
  margin-left: 5px;
}

/* ----------------------- Mobile Navigation ----------------------- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 999;
  padding: 80px 20px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav.active {
  transform: translateX(0);
  display: flex;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
  flex: 1;
  justify-content: center;
}

.mobile-nav a {
  text-decoration: none;
  color: #fdfcfc;
  font-family: "Montserrat";
  font-size: 1.5rem;
  font-weight: 300;
  transition: color 0.3s ease;
}

.mobile-nav a:hover {
  color: #EA718F;
}

.mobile-nav-legal {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(234, 113, 143, 0.3);
  width: 100%;
  max-width: 300px;
}

.mobile-nav-legal a {
  font-size: 0.9rem;
  color: rgba(253, 252, 252, 0.7);
}

.mobile-nav-legal a:hover {
  color: #EA718F;
}

@media (max-width: 950px) {
  .main-nav {
    display: none;
  }

  .desktop-nav-logo {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav-logo {
    display: flex;
  }

  .mobile-nav {
    display: block;
    background-color: #1d1b1c;
  }

  .navbar {
    box-shadow: #EA718F 0px 2px 4px;
    width: 100vw;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    z-index: 1000;
  }
}

/* ----------------------- buttons ----------------------- */

a.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 20px;
  color: #EA718F;
  font-family: "Indie Flower", cursive;
  font-size: clamp(1.6rem, 3vw, 2rem);
  transition: border-color 180ms ease, color 180ms ease;
}

a.link:hover,
a.link:focus {
  border-color: #fdfcfc;
  color: #fdfcfc;
}

a.link svg path {
  transition: fill 180ms ease;
}

a.link:hover svg path,
a.link:focus svg path {
  fill: #fdfcfc;
}

@media (max-width: 768px) {
  a.link {
    justify-content: center;
  }
}

a {
  color: #EA718F;
}

/* ----------------------- home Section ----------------------- */
.home {
  display: flex;
  align-items: stretch;
  color: #fdfcfc;
  padding-bottom: 0;
  margin-top: 50px;
  min-height: 90vh;
}

.home .stylized {
  font-family: "Indie Flower", cursive;
  color: #EA718F;
}

.home-content {
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  box-sizing: border-box;
}

.home-text h1 {
  margin-top: 20px;
}

.home-photo {
  flex: 0 0 35%;
  max-height: 80vh;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  align-self: center;
  margin-left: 50px;
  margin-right: 150px;
}

.bounce_photo {
  animation: bouncephoto 0.5s ease;
}

@keyframes bouncephoto {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(0.9);
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.home-text {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.home h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.bounce {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.3);
  }

  50% {
    transform: scale(0.9);
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .home {
    min-height: auto;
    margin-bottom: 150px;
  }

  .home-content {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }

  .home-photo {
    flex: 0 0 auto;
    width: 100%;
    max-height: 50vh;
    margin-left: 0;
    margin-right: 0;
    object-fit: cover;
  }

  .home-text {
    flex: 0 0 auto;
    padding-top: 0;
    text-align: center;
  }

  .home h1 {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 481px) and (max-width: 1024px) {
  .home {
    margin-bottom: 150px;
  }

  .home-content {
    flex-direction: column;
    padding: 1.5rem;
  }

  .home-photo {
    flex: 0 0 auto;
    width: 100%;
    max-height: 60vh;
    margin-left: 0;
    margin-right: 0;
  }

  .home-text {
    flex: 0 0 auto;
    padding-top: 1rem;
    text-align: center;
  }
}


@media (min-width: 1025px) and (max-width: 1400px) {
  .home-photo {
    flex: 0 0 45%;
    margin-right: 50px;
  }

  .home {
    min-height: 0vh;
    margin-bottom: 100px;
  }
}

/* ----------------------- socials ----------------------- */
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  text-decoration: none;
  align-items: center;
  border-radius: 80px;
  transition: transform 220ms;
  transform-origin: center;
  will-change: transform;
}

.social-links a:hover {
  transform: scale(1.20);
}

a svg.socials path {
  fill: #fdfcfc;
}

.socials {
  width: 24px;
  height: 24px;
  display: block;
}

/* ----------------------- work ----------------------- */
.work {
  padding-bottom: 50px;
  align-items: center;
  text-align: center;
}

.work h1.chapter {
  text-align: center;
}

.work h2 {
  text-align: center;
}

/* Carousel Styles */
.work-carousel {
  width: 90vw;
  margin: 0 auto;
  position: relative;
  height: 75vh;
  /* Adjust height as needed */
  min-height: 500px;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.work-carousel-track-container {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.work-carousel-track {
  padding: 0;
  margin: 0;
  list-style: none;
  transition: transform 0.8s ease-in-out;
  height: 100%;
}

.work-item {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-shrink: 0;
}

/* Navigation Buttons */
.carousel-nav {
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  padding: 10px;
  transition: transform 0.2s;
  filter: drop-shadow(0 0px 4px rgba(234, 113, 143, 0.3));
}

.carousel-nav:hover {
  transform: scale(1.2);
}

.carousel-nav.prev {
  margin-bottom: 10px;
}

.carousel-nav.next {
  margin-top: 10px;
}

/* Side Navigation Container */
.carousel-side-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
  z-index: 20;
}

/* Indicators */
.carousel-indicators {
  /* Removed absolute positioning, now handled by container */
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  align-items: center;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(253, 252, 252, 0.3);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.carousel-indicator:hover {
  background-color: rgba(253, 252, 252, 0.6);
  transform: scale(1.1);
}

.carousel-indicator.active {
  background-color: #EA718F;
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .carousel-side-controls {
    display: none;
    /* Hide container on mobile if space is tight */
    right: 5px;
  }
}

.carousel-pause {
  /* Removed absolute positioning to let it flow in flex column */
  position: static;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
  transition: transform 0.2s ease;
  padding: 5px;
  border-radius: 50%;
  filter: drop-shadow(0 0px 4px rgba(234, 113, 143, 0.3));
  margin-top: 10px;
  /* Add space between dots and button */
  display: flex;
  /* Ensure SVG is centered */
  align-items: center;
  justify-content: center;
}

.carousel-pause:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.4);
}

/* Work Item Content */
.work-item-content {
  flex: 1;
  padding: 20px;
}

.work-item-content.right {
  text-align: right;
}

.work-item-content.left {
  text-align: left;
}

.work-item p {
  margin-top: 15px;
  color: #fdfcfc;
}

p.work-tags {
  color: #EA718F;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-family: "Indie Flower", cursive;
  margin-bottom: 50px;
}

.work-item-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.work-item-image img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  /* Optional rounded corners */
}

@media (max-width: 768px) {
  .work {
    padding: 0 0;
    margin: auto;
  }

  .work-carousel {
    width: 100vw;
    height: auto;
    min-height: auto;
    padding: 20px 0 60px 0;
    /* Add bottom padding for controls */
  }

  .work-carousel-track-container {
    overflow: hidden;
    /* Show all items on mobile if preferred, or keep as carousel */
    height: auto;
  }

  /* If you want to KEEP carousel on mobile but fix layout: */
  /* .work-carousel-track {} removed empty ruleset */

  /* RE-ENABLING STACKED LAYOUT FOR MOBILE AS IT IS USUALLY BETTER UX
     OR ADAPTING CAROUSEL. User asked for "smooth scrolling box", implying carousel behavior.
     I will keep carousel logic but adjust item layout.
  */

  .work-carousel {
    height: 80vh;
    /* Give valid height for mobile carousel */
  }

  .work-carousel-track-container {
    overflow: hidden;
    height: 100%;
  }

  .work-item {
    flex-direction: column;
    width: 100%;
    /* margin: 0; removed margin as it breaks carousel flow */
  }

  .work-item-content {
    flex: 0 0 auto;
    text-align: center !important;
    order: -1;
    margin-bottom: 20px;
  }

  .work-item-image {
    flex: 1;
    width: 100%;
    margin: 0 auto;
    align-items: flex-start;
    /* Align image better */
  }

  .work-item-image img {
    width: 90vw;
    max-height: 40vh;
    /* Prevent image from taking too much space */
  }

  /* Reposition Controls for Mobile */
  .carousel-side-controls {
    display: flex;
    right: auto;
    top: auto;
    bottom: 10px;
    /* Position at bottom */
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    /* Horizontal layout for dots */
    align-items: center;
    padding: 5px 15px;
    border-radius: 20px;
    gap: 15px;
    z-index: 50;
  }

  .carousel-indicators {
    flex-direction: row;
    gap: 10px;
  }

  .carousel-pause {
    margin-top: 0;
  }

  /* Arrows */
  .carousel-nav {
    position: absolute;
    top: auto;
    /* Remove vertical centering */
    bottom: 15px;
    /* Align with side controls */
    transform: none;
    padding: 10px;
    z-index: 30;
  }

  .carousel-nav.prev {
    left: 20px;
    margin: 0;
  }

  .carousel-nav.next {
    right: 20px;
    margin: 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Adjusted for mid-size screens if needed */
}


/* ----------------------- about ----------------------- */
.about-sec {
  padding: 50px 20px;
}

.about {
  display: flex;
  max-width: 85vw;
  margin: auto;
  gap: 0;
}

.about-titles {
  max-width: 100%;
  text-align: center;
}

.about-body {
  flex: 1;
  max-width: 50%;
  align-self: center;
  text-align: left;
}

.about-img {
  flex: 1;
  max-width: 30%;
  margin: auto;
}

.about img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .about-sec {
    padding: 30px 15px;
  }

  .about {
    flex-direction: column;
    gap: 20px;
  }

  .about-img {
    text-align: center;
    max-width: 100%;
  }

  .about img {
    max-width: 70%;
  }

  .about-body {
    max-width: 100%;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .about {
    max-width: 95vw;
    gap: 30px;
  }

}

@media (min-width: 769px) {
  .about {
    flex-wrap: wrap;
    gap: 70px;
  }

  .about-titles {
    flex: 1 1 100%;
  }

  .about-img {
    flex: 1 1 45%;
  }

  .about-body {
    flex: 1 1 45%;
  }

  .about-sec.page .about-img {
    max-width: 70vw;
  }
}

/* ----------------------- beyond design / game gallery ----------------------- */
.beyond-design {
  width: 90vw;
  margin: auto;
  padding: 50px 0;
  margin-top: 70px;
}

.beyond-design h1 {
  text-align: center;
}

.beyond-design h2 {
  text-align: center;
  margin-bottom: 15px;
  margin-top: 70px;
  color: #fdfcfc;
}

.beyond-design p.description {
  text-align: center;
  width: 70%;
  margin: 30px auto;
}

.game-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  width: 70%;
  margin: 0 auto;
}

.game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.game-item img {
  width: 100%;
  height: auto;
}

.game-caption {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.3rem, 0.8vw, 1rem);
  margin: 0;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) and (min-width: 769px) {
  .game-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .game-gallery {
    width: 90vw;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
}

@media (min-width: 575px) and (max-width: 767px) {
  .game-gallery {
    width: 70vw;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .beyond-design p.description {
    width: 90vw;
  }
}

/* ----------------------- contact ----------------------- */
.contact {
  text-align: center;
  margin-top: 70px;
}

/* ----------------------- case study page ----------------------- */
.case-study-header {
  width: 90vw;
  margin: auto;
  margin-top: 50px;
  height: 100vh;
}

.case-study-header img {
  width: 90%;
}

.case-study-description {
  margin-top: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
}

.case-study-description-content {
  flex: 30%;
}

.case-study-description p {
  font-size: 1rem;
}

.case-study-description-image {
  flex: 50%;
}

.case-study {
  width: 90vw;
  margin: auto;
}

.case-study-process {
  width: 100vw;
  display: flex;
}

.case-study-content {
  flex: 30%;
}

.case-study-content p {
  font-size: 1rem;
}

.case-study h2 {
  font-family: "Indie Flower", cursive;
  font-size: 3rem;
}

.case-study-image {
  flex: 60%;
  align-content: right;
}

.case-study-image img {
  width: 80%;
}

/* ----------------------- footer ----------------------- */

.site-footer {
  border-top: 1px solid rgba(234, 113, 143, 0.3);
  margin-top: 50px;
  padding: 30px 20px;
  text-align: center;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: #fdfcfc;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

@media (max-width: 480px) {
  .site-footer {
    padding: 30px 15px;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 10px;
  }
}

/* ----------------------- legal stuff ----------------------- */
.legal {
  margin-top: 15px;
}

.legal p {
  font-size: 1rem;
}

.legal h2 {
  margin-top: 50px;
}

.legal h3 {
  margin-top: 10px;
  font-size: 1rem;
}