/*
  Home v3
  Scoped so it won't affect other pages/versions.
  Apply by adding: <body class="home home--v3">
*/

.home.home--v3 {
  /* Base page background for v3 */
  background: var(--color-background, white);
  color: var(--color-text, #1f2937);
}

/* ===== Container helpers (use your existing .container if present) ===== */
.home.home--v3 .container {
  /* If your global .container already exists, this will simply reinforce it */
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* ===== Buttons (lightweight; your global .btn may override) ===== */
/* .home.home--v3 .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  transition:
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
} */

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

.home.home--v3 .btn--primary:hover {
  transform: translateY(-1px);
}

.home.home--v3 .btn--secondary {
  background: #fff;
  border: 1px solid rgba(28, 25, 23, 0.14);
  color: var(--Colors-Stone-900, #1c1917);
}

.home.home--v3 .btn--secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 25, 23, 0.24);
}

/* ===== Hero ===== */
.home.home--v3 .home-hero {
  padding: 34px 0 28px;
}

.home.home--v3 .home-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-hero-block {
  max-width: 730px;
}

.home.home--v3 .home-hero__kicker {
  font-family: "campaign-serif", serif;
  font-size: 20px;
  line-height: 140%;
  /* margin-bottom: 10px; */
  font-weight: 400;
  color: var(--color-text, #1f2937);
  margin: 0;
}
.home-hero__content_greeting-full {
  display: flex;
  gap: 10px;
  align-items: center;
}
.home-hero__kicker-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition:
    text-decoration-thickness 150ms ease,
    text-underline-offset 150ms ease,
    opacity 150ms ease;
}

.home-hero__kicker-link:hover {
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.home-hero__flower {
  max-width: 24px;
  max-height: 24px;
}

.home--v3 h1 {
  font-family: "campaign-serif", serif !important;
  font-weight: 500;
  font-size: clamp(52px, 70px - (880px - 100vw) * 0.04, 70px);
  line-height: 1;
  letter-spacing: var(--casev2-ls);

  color: var(--casev2-text-dark);
}
.home--v3 h2 {
  font-family: "campaign-serif", serif;
  font-weight: 400;
  font-size: clamp(52px, 60px + (100vw - 880px) * 0.04, 60px);
  line-height: 1;
  letter-spacing: var(--casev2-ls);

  color: var(--casev2-text-dark);
}
.home.home--v3 .home-hero__title {
  padding-bottom: 20px;
  font-family: "campaign-serif", sans-serif !important;
}
.home.home--v3 .home-hero__title,
.home.home--v3 .hero__title {
  font-family: "campaign-serif", serif !important;
  font-weight: 500;
}

.home.home--v3 .home-hero__subtitle {
  line-height: 1.4;
  padding-bottom: 20px;
}

.home.home--v3 .home-hero__meta {
  display: flex;
  gap: 10px;
}
/* ===== Responsive tweaks ===== */
@media (max-width: 520px) {
  .home.home--v3 .home-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

.home.home--v3 .home-hero__meta-row {
  font-size: 16px;
  color: var(--Colors-Stone-700, #44403c);
  display: flex;
  gap: 10px;
}
.home.home--v3 .home-hero__meta-row {
  font-family: "Caveat", cursive;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
}

.home.home--v3 .home-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
/* .home.home--v3 .home-hero-backdrop {
  position: relative;
  padding: clamp(28px, 3.5vw, 48px);
  overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(
      rgb(255, 255, 255) 0px,
      rgb(255, 255, 255) 0px,
      rgba(255, 255, 255, 0.35) 380px,
      rgba(255, 255, 255, 0) 650px
    ),
    url(../assets/images/home-hero-bg.png);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position:
    top center,
    center bottom;
  margin-top: -1px;
} */
/* 1) Hero: keep spacing, but DON'T own the backdrop image anymore */
.home.home--v3 .home-hero-backdrop {
  background: none; /* overrides the current background-image */
}

/* 2) Main: shared backdrop that spans hero + first card row */
.home.home--v3 main {
  position: relative;
  isolation: isolate; /* keeps the pseudo-element behind */
}

.home.home--v3 main::before {
  content: "";
  position: absolute;
  top: -190px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;

  /* tweak this until it reaches “partway into the cards” like the design */
  height: clamp(720px, 92vh, 980px);

  background-image:
    linear-gradient(
      rgb(255, 255, 255) 0px,
      rgba(255, 255, 255, 0.35) 380px,
      rgba(255, 255, 255, 0) 780px
    ),
    url("../assets/images/home-hero-bg.png");
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position:
    top center,
    center bottom;
}

/* Lift the hero backdrop on big desktop so it doesn't cut into card text */
@media (min-width: 1200px) {
  .home.home--v3 main::before {
    top: -260px; /* was -190px (lift by 70px) */
  }
}

/* even bigger screens */
@media (min-width: 1440px) {
  .home.home--v3 main::before {
    top: -290px; /* lift a bit more */
  }
}
/* optional: helps the cards “sit into” the backdrop without extra gap */
.home.home--v3 #work {
  padding-top: 0;
}

/* ===== Sections ===== */
.home.home--v3 .home-section {
  padding: 44px 0;
}

.home.home--v3 .home-section--alt {
  padding-top: 34px;
}

.home.home--v3 .home-section__header {
  margin-bottom: 22px;
}

/* .home.home--v3 .home-section__title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
} */

.home.home--v3 .home-section__desc {
  margin: 8px 0 0;
  color: var(--Colors-Stone-600, #57534e);
  font-size: 16px;
  max-width: 62ch;
}

/* ===== Grids ===== */
.home.home--v3 .home-work-grid,
.home.home--v3 .home-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 50px;
  column-gap: 20px;
}

@media (max-width: 900px) {
  .home.home--v3 .home-work-grid,
  .home.home--v3 .home-personal-grid {
    grid-template-columns: 1fr;
    row-gap: 50px;
    column-gap: 20px;
  }
}

/* ===== Card base ===== */
.home.home--v3 .home-card {
  height: 100%;
  /* background-color: white; */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.home.home--v3 .home-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
}

/* no visible border, but add subtle hover lift */
.home.home--v3 .home-card__link:hover {
  transform: translateY(-2px);
}

.home.home--v3 .home-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(28, 25, 23, 0.06);
}

/* Media sizes */
.home.home--v3 .home-card__media--lg {
  height: auto;
  aspect-ratio: 756 / 537;
}

.home.home--v3 .home-card__media--sm {
  height: auto;
  aspect-ratio: 865 / 554;
}

/* If you forget to add a size class, keep it reasonable */
/* .home.home--v3
  .home-card__media:not(.home-card__media--lg):not(.home-card__media--sm) {
  height: clamp(240px, 20vw, 330px);
} */

.home.home--v3 .home-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home.home--v3 .home-card__shots {
  position: absolute;
  inset: 0;
}

/* .home.home--v3 .home-card__shot {
  position: absolute;
  height: auto;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transform: translate3d(0, 0, 0);
} */

/* .home.home--v3 .home-card__shots[data-shots="1"] .home-card__shot--1 {
  max-width: 490px;
  left: 50%;

  top: 10%;
  transform: translateX(-50%);
  display: block;
} */
/* 1-shot cards: use normal layout so the screenshot scales with the media */
.home.home--v3 .home-card__shots[data-shots="1"] {
  display: flex;
  align-items: flex-end; /* stick to bottom */
  justify-content: center; /* centered horizontally */
  height: 100%;
  padding-bottom: 0; /* we’ll crop via transform */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* override absolute rules for the 1-shot case */
/* 1-shot cards: screenshot scales immediately with the media box */
.home.home--v3 .home-card__shots[data-shots="1"] .home-card__shot--1 {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  bottom: auto !important;

  width: 92%; /* THIS is the key */
  max-width: none; /* remove the cap that delays scaling */
  height: auto;
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;

  transform: translateY(5px); /* your bottom crop */
}
.home.home--v3 .home-card__media {
  container-type: inline-size;
}
.home.home--v3 .home-card__shots[data-shots="1"] .home-card__shot--1-many {
  /* position: relative !important; */
  /* left: auto !important; */
  /* top: auto !important; */
  bottom: auto !important;
  width: 111%;
  max-width: none;
  height: auto;
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  /* transform: translateY(5px); */
}
/* Home v3: narrow single screenshot (Sweet Dreams) only */
.home.home--v3 .home-card__shots[data-shots="1"] .home-card__shot--1-narrow {
  /* don’t let old absolute positioning mess with it */
  position: relative !important;

  /* key part: scale off container width */
  width: clamp(140px, 32cqi, 280px);
  height: auto;

  /* prevents sticking out when the cut height shrinks */
  max-height: 88%;
  object-fit: contain;

  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Base shot styling (works for 1-shot and 3-shot) */
.home.home--v3 .home-card__shot {
  display: block;
  height: auto;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* 3-shot layout: flex row inside the overlay */
.home.home--v3 .home-card__shots[data-shots="3"] {
  display: flex;
  align-items: flex-end;
  justify-content: center;

  /* tune with CSS variables per card */
  gap: var(--shots-gap, 4px);
  /* padding: 0 var(--shots-pad-x, 28px) var(--shots-pad-b, 18px); */

  /* keep it in the media overlay */
  width: 100%;
  height: 100%;
}

/* each screenshot width is now proportional + controllable */
.home.home--v3 .home-card__shots[data-shots="3"] .home-card__shot {
  width: var(--shot-w, 157px);
  max-width: 30%;
  flex: 0 0 auto;
  border-radius: 0 !important;
}
@media (max-width: 900px) {
  .home.home--v3 .home-card__shots[data-shots="3"] .home-card__shot {
    width: var(--shot-w, 247px);
    max-width: 30%;
    flex: 0 0 auto;
    border-radius: 0 !important;
  }
  .home.home--v3 .home-card__shots[data-shots="3"] {
    gap: 10px;
  }
}

.home.home--v3 .home-card__shot {
  /* position: absolute; */
  height: auto;
  display: block;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transform: translate3d(0, 0, 0);
}

/* make sure the shots sit above the background image */
.home.home--v3 .home-card__bg {
  z-index: 0;
}
.home.home--v3 .home-card__shots {
  z-index: 1;
}
/* Thriftie: art-direct the middle screenshot */
.home.home--v3 .home-card--thriftie .home-card__shot--2 {
  transform: translate3d(0, -48px, 0);
}

/* optional: if you want a bit more lift on small screens */
@media (max-width: 900px) {
  .home.home--v3 .home-card--thriftie .home-card__shot--2 {
    transform: translate3d(0, -40px, 0);
  }
}
/* Card text */
.home.home--v3 .home-card__content {
  padding: 16px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-card__tags {
  display: flex;
  flex-wrap: wrap;
  row-gap: 12px;
  column-gap: 8px;
  align-items: center;
}
.home-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 10px;
  border-radius: 999px;
  background-color: var(--Colors-Stone-100, #f5f5f4);
  color: var(--Components-Badge-Soft-Gray-Placeholder-Color, #1f2937);
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}
.home-card__tag-color {
  color: #4f4fa1;
  background-color: #f0f0ff;
}
.home.home--v3 .home-card__eyebrow {
  margin: 0;
  font-size: 14px;
  color: var(--Colors-Stone-600, #57534e);
}

.home.home--v3 .home-card__title {
  margin: 0;
  font-family: "campaign-serif", serif;
  font-size: 32px;
  line-height: 100%;
  margin-bottom: 10px;
  font-weight: 400;
}
.home.home--v3 .strong-home-card__title {
  font-weight: 700;
}

.home.home--v3 .home-card__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--Colors-Stone-700, #44403c);
  max-width: 60ch;
}

/* ===== Contact block ===== */
.home.home--v3 .home-contact {
  padding: 56px 0 64px;
}

.home.home--v3 .home-contact__inner {
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(28, 25, 23, 0.1);
  padding: 26px;
}

.home.home--v3 .home-contact__title {
  margin: 0;
  font-size: 24px;
}

.home.home--v3 .home-contact__text {
  margin: 8px 0 16px;
  color: var(--Colors-Stone-600, #57534e);
}

/* ===== Footer ===== */
.home.home--v3 .site-footer {
  padding: 152px 0 44px;
  /* padding: 28px 0 44px; */
}

.home.home--v3 .site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(28, 25, 23, 0.1);
  padding-top: 18px;
}

.home.home--v3 .site-footer__links {
  display: flex;
  gap: 14px;
}

.home.home--v3 .site-footer a {
  color: var(--Colors-Stone-700, #44403c);
  text-decoration: none;
}

.home.home--v3 .site-footer a:hover {
  color: var(--color-accent, #e11d48);
}
.home.home--v3 .site-nav a:hover,
.home.home--v3 .site-nav a.active,
.home.home--v3 .site-nav a[aria-current="page"] {
  color: var(--color-accent, #e11d48);
}

/* Home v3: footer itself has NO background image */
.home.home--v3 .site-footer {
  background: transparent;
}
.home.home--v3 .site-footer__name,
.home.home--v3 .site-footer__tagline,
.home.home--v3 .site-footer__heading,
.home.home--v3 .site-footer__credit {
  color: var(--Colors-Stone-900, #1c1917);
}
.home.home--v3 .site-footer__email {
  font-weight: 600;
  text-decoration: underline !important;
}
.home.home--v3 .site-footer__credit {
  font-family: "caveat", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  color: var(--Colors-Stone-900, #1c1917);
  margin-top: 22px;
}
/* Wrapper creates the “image stuck to bottom” layer */
.home.home--v3 .home-footer-backdrop {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Decorative layer */
/* .home.home--v3 .home-footer-backdrop::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;

  width: 100vw;
  height: 520px;

  background:
    linear-gradient(
      to top,
      rgba(250, 250, 249, 0) 60%,
      rgba(250, 250, 249, 1) 100%
    ),
    url("../assets/images/footer_plus-bg.png") center bottom / cover no-repeat;

  z-index: -1;
  pointer-events: none;
} */
/* ===== Responsive tweaks ===== */
@media (max-width: 520px) {
  .home.home--v3 .container {
    width: min(1120px, calc(100% - 32px));
  }

  /* .home.home--v3 .home-hero__title {
    font-size: 34px;
  } */

  .home.home--v3 .home-hero__subtitle {
    font-size: 20px;
  }
}
/* Homepage v3 container width override */
/* .home.home--v3 .container {
  width: min(1750px, calc(100% - 80px));
  margin-inline: auto;
} */

/* Home v3: footer itself has NO background image */
.home.home--v3 .site-footer {
  background: transparent; /* overrides global Footer.jpg background */
}

/* Wrapper creates the “image stuck to bottom” layer */
.home.home--v3 .home-footer-backdrop {
  position: relative;
  isolation: isolate;
  overflow: visible; /* IMPORTANT: allows the image to show above the footer */
}

/* Decorative layer (sits behind footer and bleeds upward) */
.home.home--v3 .home-footer-backdrop::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;

  width: 100vw;
  height: 520px;
  /* height: clamp(240px, 55vw, 520px); */

  pointer-events: none;
  z-index: 0;

  /* 1) Put a solid white (stone-50) behind the image, so the fade blends into it */
  background-color: #fafaf9;

  /* 2) The actual image */
  background-image: url("../assets/images/footer_plus-bg.png");
  background-repeat: no-repeat;
  background-position: center bottom;

  /* keep your stable scaling */
  background-size: 100% auto;

  /* 3) Fade the IMAGE out at the top (this is the key) */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 12%,
    rgba(0, 0, 0, 0.55) 28%,
    rgba(0, 0, 0, 0.85) 45%,
    black 62%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 12%,
    rgba(0, 0, 0, 0.55) 28%,
    rgba(0, 0, 0, 0.85) 45%,
    black 62%
  );
}
@media (max-width: 600px) {
  .home.home--v3 .home-footer-backdrop::before {
    /* make the image occupy more of the block vertically */
    background-size: cover;

    /* make the fade shorter so you don’t get a huge white band */
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 6%,
      rgba(0, 0, 0, 0.7) 18%,
      black 35%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 6%,
      rgba(0, 0, 0, 0.7) 18%,
      black 35%
    );
  }
}
@media (max-width: 600px) {
  .home.home--v3 .home-section {
    padding: 0;
  }
}
/* Make sure cards/content are always above the footer backdrop */
.home.home--v3 main {
  position: relative;
  z-index: 2;
}

/* Footer backdrop sits behind main */
.home.home--v3 .home-footer-backdrop {
  position: relative;
  z-index: 1;
}

/* Decorative image inside the backdrop stays behind the footer content */
.home.home--v3 .home-footer-backdrop::before {
  z-index: 0; /* keep it non-negative */
}

/* Footer content above its own image */
.home.home--v3 .site-footer {
  position: relative;
  z-index: 1;
}
/* Home v3: header should be transparent at the top (until JS adds bg on scroll up) */
/* 1) Home v3 default: transparent header at the top */
.home.home--v3 .site-header {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 2) When JS adds the “scroll up” class, bring the white bg back */
.home.home--v3 .site-header.site-header--bg-light {
  background: var(--color-background, #fafaf9);
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); */
}
.home.home--v3 .home-section--alt {
  display: none;
}

/* Home v3: smoother card hover */
.home.home--v3 .home-card__link {
  will-change: transform;
  transform: translateZ(0);
  transition: transform 660ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.home.home--v3 .home-card__link:hover {
  transform: translate3d(0, -12px, 0);
}

/* keyboard users get the same “lift” */
.home.home--v3 .home-card__link:focus-visible {
  transform: translate3d(0, -12px, 0);
  outline: 3px solid rgba(225, 29, 72, 0.35);
  outline-offset: 4px;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .home.home--v3 .home-card__link {
    transition: none;
  }
}
