/* ==============================
   Homepage Overrides (home.css)
   ============================== */

:root {
  /* keeps layout width consistent across pages */
  scrollbar-gutter: stable;
}

html,
body {
  overflow-x: clip; /* stricter than hidden, prevents side leaks */
  width: 100%;
  max-width: 100%;
}

body {
  position: relative;
}
/* 😎Cursor label */
.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  background: var(--color-homepage);
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.cursor-label--visible {
  opacity: 1;
}

.cursor-label--inactive {
  background: var(--color-homepage); /* lighter blue or a different tone */
}
.case-card:has(.case-card__link--nonactive):hover .case-card__inner {
  opacity: 0.6;
  filter: grayscale(20%);
  cursor: default;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* 😎END: Cursor label */
/* --- Header & navigation colors for home --- */
.home .site-header {
  background-color: var(--color-homepage);
}

.home .logo {
  color: white;
}

.home .site-nav a {
  color: white;
}

.home .site-nav a.active {
  color: var(--Colors-Rose-300, #fda4af);
}

.home .site-nav a:hover {
  color: var(--Colors-Rose-300, #fda4af);
}
.site-nav .icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-block;
  vertical-align: middle;
}
/* Home footer: white by default, pink on hover/focus */
.home .site-footer__list a {
  color: white;
  transition: color 0.25s ease;
}

.home .site-footer__list a:hover,
.home .site-footer__list a:focus {
  color: var(--Colors-Rose-300, #fda4af);
}

/* =========================
   Mobile menu — homepage only
   ========================= */
.home .mobile-menu {
  background-color: var(--color-homepage); /* same blue as hero */
}

.home .mobile-menu__nav a {
  color: white;
  transition: color 0.3s ease;
}

.home .mobile-menu__nav a:hover,
.home .mobile-menu__nav a:focus {
  color: var(--Colors-Rose-300, #fda4af); /* pink hover */
}

.home .mobile-menu__nav a.active,
.home .mobile-menu__nav a[aria-current="page"] {
  color: var(--Colors-Rose-300, #fda4af); /* pink active */
}
/* =========================
   Mobile menu close button — homepage only
   ========================= */
.home .menu-close svg path {
  stroke: white !important;
}
/* Homepage hover: pink */
.home .site-nav a.menu__link--resume:hover {
  color: var(--Colors-Rose-300, #fda4af);
}
/* ================================
   Hero section (sticky version)
   ================================ */

/* Old spacer removed to avoid large white gap */
.hero-spacer {
  display: none;
}

.home .hero {
  position: sticky;
  top: 0;
  height: 100svh; /* correct viewport height including browser UI */
  width: 100%;
  background-color: var(--color-homepage);
  padding-block: 40px 60px;
  text-align: left;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  z-index: 0;

  backface-visibility: hidden;
  transform: translateZ(0); /* smooth GPU compositing */
}

/* Fixed header stays above sticky hero */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--color-homepage);
}

/* ================================
   Selected Work section
   ================================ */

.home .selected-work {
  position: relative;
  z-index: 1;
  background-color: var(--color-background);
  padding-top: 50px; /* spacing below hero/header */
  padding-bottom: 80px;
  box-sizing: border-box;
  overflow-x: clip;

  /* ensure no legacy motion or transforms remain */
  transform: none !important;
}

body.scrolled .home .selected-work {
  transform: none !important;
}

.hero-columns {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.home .hero__greeting {
  font-family: "campaign-serif", serif;
  font-size: 36px; /* Figma value */
  line-height: 140%;
  margin-bottom: 10px;
  font-weight: 300;
  color: white;
}

/* 🐧Flower size */
.hero__content_greeting-full {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2vw + 1rem, 36px); /* scales text & flower together */
}

.hero__flower {
  width: 2em; /* proportional to text */
  height: auto;
  flex-shrink: 0;
  transition: width 0.3s ease;
  transform-origin: center center;
  animation: heroFlowerSpin 20s linear infinite; /* smooth endless rotation */
}

@keyframes heroFlowerSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 🐧End of Flower size */

.home .hero__title {
  font-family: "campaign-serif", sans-serif;
  font-size: 70px; /* Figma value */
  font-weight: 500;
  line-height: 100%;
  letter-spacing: 0.5%;
  color: white;
  margin-bottom: 20px;
}

.home .hero__description {
  font-size: 24px; /* Figma value */
  line-height: 1.4;
  margin-bottom: 30px;
  color: white;
  max-width: 312px; /*instead of 340 */
}

.home .hero__info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
  margin-top: 20px;
}

.home .hero__info-text {
  color: white;
  font-family: "Inter", sans-serif;
}

.home .hero__info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 24px;
}

/* Buttons */
.home .hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.home .button--primary {
  background-color: transparent;
  border: 1px solid white;
  color: #fff;
  width: 152px;
  height: 46px;
  margin: 0 auto;
}
.home .button {
  white-space: nowrap; /* keep text + icon together */
  padding: 0;
  border-radius: 8px;
}
/* Inline icon for buttons */
.home .button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px; /* space between text and icon */
  width: 16px;
  height: 16px;
}

.home .button__icon img {
  width: 100%;
  height: auto;
  display: block;
}

.home .button--secondary {
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.home .selected-work__title {
  font-family: "campaign-serif", sans-serif;
  font-size: 42px;
  font-weight: 400;
  margin-bottom: 40px;
  text-align: left;
}
/*🦊 The new card */

/* ✨ Card hover interaction */
.case-card__link:hover {
  transform: translateY(-10px);
  box-shadow: -10px 12px 0px var(--color-homepage);
  /* box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); */
}
/* Different color of the shadow of the card */
.case-card__link-other-color:hover {
  box-shadow: -10px 12px 0px var(--color-accent);
}
/* End: Different color of the shadow of the card */

.case-card__link {
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 10px; /* ensure same radius as inner */
  position: relative;
  overflow: hidden; /* clip pseudo-element */
}

.case-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px; /* same as card corners */
  box-shadow: -10px 12px 0 var(--color-homepage);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.case-card__link:hover {
  transform: translateY(-10px);
}

.case-card__link:hover::after {
  opacity: 1; /* show blue shadow */
}
/* ✨ End of Card hover interaction */

/* Wrapper */
.case-card {
  width: 100%; /* fill available width */
  max-width: 1080px; /* but never exceed 1080px */
  margin: 0 auto 40px;
  box-sizing: border-box;
}

.case-card__inner {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-stone-50, #fafaf9);
}

/* Left side */
.case-card__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px; /* space between blocks */
  padding: 30px; /* ← adjust later */
}

/* Top block (company + title + desc) */
.case-card__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-card__company {
  font-family: "campaign-serif", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: 2%;
  color: var(--Colors-Blue-700, #1d4ed8);
  margin: 0;
  text-transform: uppercase;
}
.case-card__company-2 {
  color: var(--Colors-Fuchsia-700, #a21caf);
}

.case-card__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5%;
  margin: 0;
}

.case-card__description {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.5%;
  margin: 0;
}

/* Button */
.case-card__button {
  align-self: flex-start;
  padding: 14px 16px !important;
  margin-top: 14px;
  height: auto;
}
/* 📚  case buttons*/
/* Base non-active secondary button */
.case-card__button {
  color: var(--Colors-Gray-500, #6b7280);
  border: 1px solid var(--Colors-Gray-500, #6b7280);
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hover effect – mimic secondary button behavior */
.case-card__button:hover {
  border: 1px solid var(--color-homepage);
  color: var(--color-homepage);
  /* background-color: #180cc1;s; */
  /* border: 1px solid #6b7280;
  color: #6b7280; */
}

/* 📚  End case buttons*/

/* 🐧  Wobble the case buttons*/
/* ✨ Gentle idle wobble animation for case card buttons */
@keyframes buttonFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.case-card__button {
  animation: buttonFloat 2s ease-in-out infinite;
}
.case-card__button-nonactive {
  color: var(--Colors-Gray-500, #6b7280);
  border: 1px solid var(--Colors-Gray-500, #6b7280);
  background-color: transparent;
  cursor: default; /* no pointer */
  pointer-events: none; /* ignore clicks */
  animation: none !important; /* stop wobble */
  transition: none !important;
}

/* Keep it visually stable even on hover */
.case-card__button-nonactive:hover {
  color: var(--Colors-Gray-500, #6b7280);
  border-color: var(--Colors-Gray-500, #6b7280);
  background-color: transparent;
}

/* 🐧 End of Wobble thecase buttons*/

/* Stats block */
.case-card__stats {
  display: flex;
  gap: 20px;
}

.case-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.case-stat__icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #dbeafe; /* blue bg */
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-stat__icon img {
  width: 24px;
  height: 24px;
}

.case-stat__text-bold {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5%;
}
.case-stat__text {
  letter-spacing: 0.5%;
}

/* Right side (visual) */

.case-card__visual {
  flex: 1;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25.5px;
  min-width: 0; /* 👈 ensures flex child can shrink */
}

.case-card__visual-2 {
  background: #d3b6d5;
}
/* Case1 animation */
.case-card__image {
  display: block;
  max-width: 100%;
  border-radius: 10px;

  /* Initial state */
  opacity: 0;
  transform: scale(0.01); /* tiny dot */
  transform-origin: center center;
  transition: transform 1000ms ease-out, opacity 1000ms ease-out;
}

/* Final state when revealed */

.case-card__image.animate-in {
  opacity: 1;
  transform: scale(1); /* grow to full size */
}

/* Case1: end animation */

.case-card__phones {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0; /* prevents flex overflow */
}

/* Phone frame */
.case-card__phone {
  width: 224px; /* design size */
  height: auto;
  /* border-radius: 10px; */
  object-fit: contain;
  flex-shrink: 1; /* 👈 allow them to shrink */
  max-width: 100%; /* never overflow */

  opacity: 0;
  transition: transform 1000ms ease-out, opacity 1000ms ease-out;
}

.case-card__image {
  max-width: 100%;
  border-radius: 10px;
  height: auto;
}

/* Initial states */
.case-card__phone--up {
  transform: translateY(120%);
  opacity: 0;
}
.case-card__phone--down {
  transform: translateY(-120%);
  opacity: 0;
}

/* Final states (slid into view, but offset vertically) */
.case-card__phone--up.animate-in {
  transform: translateY(30px); /* stop near bottom */
  opacity: 1;
}
.case-card__phone--down.animate-in {
  transform: translateY(-30px); /* stop near top */
  opacity: 1;
}

/* End Cards home case2 animation */
/* .case-card__visual img {
  max-width: 100%;
  border-radius: 10px;
} */

/*🦊 end new card */

.home .work-card {
  border-radius: 16px;
  padding: 32px;
  gap: 24px;
  transition: all 0.3s ease;
}

.home .work-card__title {
  font-size: 18px;
  text-transform: uppercase;
}

.home .work-card__subtitle {
  font-size: 24px;
  font-weight: 700;
}

.home .work-card__description {
  font-size: 16px;
  line-height: 1.5;
}

.home .work-card__image-wrapper {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

/* Hover refinements */
.home .work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Footer --- */
.home .site-footer {
  padding-block: 20px 40px;
  background: var(--color-homepage);
}
.home .site-footer__name,
.home .site-footer__email,
.home .site-footer__tagline,
.home .site-footer__credit,
.home .site-footer__heading,
.home .site-footer__list li a {
  color: white;
}
.home .site-footer__email {
  text-decoration: underline;
}

/* ==============================
   Homepage Container Utilities
   ============================== */

/* Default .container comes from style.css (1080px wide) */

/* Narrow container – for text-heavy blocks */
.home .container--narrow {
  max-width: 760px; /* match your Figma text column */
  margin: 0 auto;
  padding-inline: 24px; /* keep some breathing room */
}

/* Wide container – for visual-heavy blocks */
.home .container--wide {
  max-width: 1280px; /* wider for hero images or work cards */
  margin: 0 auto;
  padding-inline: 24px;
}

/* Full bleed (edge-to-edge, optional) */
.home .container--full {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 0;
}

.case-card__visual--gradient {
  display: flex; /* center logo */
  justify-content: center;
  align-items: center;
  /* width: 520px; */
  /* width: 520px; */
  height: 520px;
  /* padding-left: 60px;
  padding-right: 60px; */
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    #cbe0ff 0%,
    /* top blue */ #ffbade 100% /* bottom pink */
  );
}

.case-card__image-logo {
  max-width: 400px;
  padding-left: 0 !important;
}

.case-card__company-pink {
  color: #180cc1;
}
.case-card__button-nonactive {
  color: var(--Colors-Gray-500, #6b7280) !important;
  border: 1px solid var(--Colors-Gray-500, #6b7280) !important;
}

/* The hero section button animation */
@keyframes floatButton {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

.hero__button-wrapper {
  display: flex;
  justify-content: center;
  animation: floatButton 2.5s ease-in-out infinite;
  will-change: transform;
  width: 100%;
  margin-top: 100px;
}
.hero__button {
  transition: transform 0.3s ease;
}

.hero__button:hover {
  transform: translateY(-6px);
}
.hero__button .button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s ease;
}

.hero__button:hover .button__icon {
  transform: rotate(360deg);
}

/* ==============================
   Responsive Overrides
   ============================== */

/* flex-direction: column;
   }

	 /* @media (max-width: 1096px) {
			.case-stat {
			display: flex;
			flex-direction: column;
			gap: 12px;
			font-size: 16px;
			align-items: flex-start;
			}
	 } */
@media (max-width: 1280px) {
  .hero-columns {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
  /* 🐞 did not center like this */
  /* .hero__content {
    max-width: 1080px;
  } */
  .hero-columns {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
  }
  .home .hero__greeting {
    font-size: 32px;
  }
  .hero-left {
    max-width: 610px;
  }
  .work-card__icon {
    max-width: 32px !important;
    max-height: 32px !important;
  }
  .home .hero__title {
    font-size: 60px;
  }
  .home .hero__description {
    font-size: 20px;
    /* ;
  max-width: 0; */
    /* overflow: hidden; */
  }
}
/* Tablet and below (≤1080px) */
@media (max-width: 1080px) {
  .home .selected-work__title {
    font-size: 36px;
  }
  .hero__flower {
    width: 1em;
  }
  .hero-columns {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-left {
    max-width: 490px;
  }
  .case-card__stats {
    flex-direction: column;
  }

  .home .hero {
    padding-block: 30px 50px;
  }

  .home .hero__title {
    font-size: 48px;
    line-height: 54px;
  }

  .home .hero__description {
    font-size: 20px;
  }

  /* .home .selected-work__title {
    font-size: 28px;
  } */

  .home .container--narrow,
  .home .container--wide {
    max-width: 100%;
    padding-inline: 20px;
  }

  .case-card__phone {
    width: auto;
    max-width: 224px;
    flex: 1 1 0;
  }
  /* 🐞 with overflowing cards */

  /* 🐞End of the bug with overflowing cards */
}

@media (max-width: 1050px) {
  .hero-left {
    max-width: 370px;
  }
  .home .hero__greeting {
    font-size: 27px;
  }
  .case-card__stats {
    flex-direction: row;
  }
  .case-card__inner {
    flex-direction: column; /* text above, visual below */
    gap: 20px;
  }
  .case-card__visual {
    width: 100%;
    max-height: 443px !important;
    /* max-height: 347px !important; */
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden; /* 👈 crop overflow */
  }
  /* 🐧 */
  .case-card__visual--gradient {
    min-height: 347px !important;
    flex: 0;
  }
  /* 🐞 with cards sliding from left and right down */
  .case-card__image-sq {
    max-width: 320px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Container that holds both phones */
  .case-card__phones {
    display: flex;
    flex-direction: row; /* side by side */
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  /* Shared phone base */
  .case-card__phone {
    width: 224px;
    object-fit: contain;
    opacity: 0;
    transition: transform 1000ms ease-out, opacity 1000ms ease-out;
  }

  /* ✅ Initial animation state — start hidden vertically */
  .case-card__phone--up {
    transform: translateY(120%); /* below view */
  }

  .case-card__phone--down {
    transform: translateY(-120%); /* above view */
  }

  /* ✅ Final animated positions — small offset to stay cropped */
  .case-card__phone--up.animate-in {
    transform: translateY(14px); /* leak below, clipped at bottom */
    opacity: 1;
  }

  .case-card__phone--down.animate-in {
    transform: translateY(-14px); /* leak above, clipped at top */
    opacity: 1;
  }

  /* 🐞 with cards sliding from left and right down */
}

@media (max-width: 774px) {
  .home .selected-work__title {
    font-size: 30px;
  }
  .home .hero__greeting {
    font-size: 24px;
  }
  .hero-left {
    max-width: 370px;
  }
  .home .hero__title {
    font-size: 38px;
    line-height: 44px;
  }
  .home .hero__description {
    font-size: 18px;
  }
  .home .hero__info {
    gap: 10px;
  }
}
@media (max-width: 700px) {
  .hero-columns {
    flex-direction: column;
    align-items: flex-start; /* keeps text left-aligned */
    gap: 24px; /* add a bit more breathing room vertically */
  }
  .hero-left,
  .home .hero__description {
    max-width: 570px;
  }
}
/* Mobile (≤600px) */
@media (max-width: 600px) {
  .hero-left,
  .home .hero__description {
    max-width: 470px;
  }
  .hero__button-wrapper {
    margin-top: 20px;
  }
  .case-card__stats {
    flex-direction: column;
  }
  .home .hero {
    text-align: left;
    padding-block: 20px 40px;
  }

  .home .hero__greeting {
    font-size: 28px;
  }

  .home .hero__title {
    font-size: 36px;
    line-height: 44px;
  }

  .home .hero__description {
    font-size: 18px;
  }

  .home .hero__buttons {
    flex-direction: column;
    gap: 12px;
  }

  .home .selected-work {
    margin-top: 40px;
    /* padding-bottom: 60px; */
  }

  /* .home .selected-work__title {
    font-size: 24px;
    margin-bottom: 24px;
  } */

  .home .work-card {
    padding: 20px;
  }

  .home .work-card__subtitle {
    font-size: 20px;
  }

  .home .container--narrow,
  .home .container--wide {
    padding-inline: 16px;
  }
  .case-card__inner {
    flex-direction: column; /* text on top, visual below */
    gap: 20px;
  }

  /* 🐞Fixing the centered images */
  .case-card__phone {
    width: calc((100% - 8px) / 2); /* dynamic width */
    height: auto;
    object-fit: contain;
  }
  /* 🐞End Fixing the centered images */

  /* fixing hero button leftover seen in the footer */
  .home .hero[data-hidden="true"] {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .home .hero[data-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
}

@media (max-width: 468px) {
  .case-card__image-logo {
    padding: 50px 10px;
    max-width: 80vw;
  }
  /* 🐧 */
  .case-card__visual--gradient {
    height: auto !important;
    flex: 0;
  }
}

/* Small phones (≤380px) */
@media (max-width: 380px) {
  .home .hero {
    padding-block: 16px 32px;
  }

  .home .hero__greeting {
    font-size: 22px;
  }

  .home .hero__title {
    /* font-size: 28px; */
    line-height: 41px;
  }

  .home .hero__description {
    font-size: 16px;
  }

  .home .hero__buttons .button {
    width: 100%;
    text-align: center;
  }

  .home .work-card {
    padding: 16px;
    gap: 16px;
  }

  .home .work-card__subtitle {
    font-size: 18px;
  }
}
/* Force button icons to remain visible at all breakpoints */
.home .button__icon,
.home .button__icon img {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 16px !important;
  height: 16px !important;
  margin-left: 8px;
  flex-shrink: 0;
}
