*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    font-size: 16px;
    --color-text: rgb(5 5 5 / 100%);
    --color-bg: #F8F6F3;
    --color-link: rgb(5 5 5 / 86%);
    --color-link-hover: rgb(5 5 5 / 100%);
    --page-padding: 1.5rem;
    --font-body: "Manrope", Arial, sans-serif;
    --font-special: "scale-variable", "Manrope", Arial, sans-serif;
}

body {
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: var(--font-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: url(../img/noise.png);
    background-size: 200px;
}

.no-cursor .cursor {
    display: none;
}

@media (hover: none) {
    .cursor {
        display: none;
    }
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
    content: '';
    position: fixed;
    z-index: 1000;
}

.js .loading::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.js .loading::after {
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    opacity: 0.4;
    background: var(--color-link);
    animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
    to {
        opacity: 1;
        transform: scale3d(0.5, 0.5, 1);
    }
}

a {
    text-decoration: none;
    color: var(--color-link);
    outline: none;
    cursor: pointer;
    opacity: 0.5;
}

a:hover {
    text-decoration: none;
    color: var(--color-link-hover);
    outline: none;
    opacity: 1;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
    /* Provide a fallback style for browsers
	 that don't support :focus-visible */
    outline: none;
}

a:focus-visible {
    /* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
    outline: 2px solid #FE177B;
}

.unbutton {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.unbutton:focus {
    outline: none;
}

.type-small {
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
}

.frame {
    padding: var(--page-padding);
    position: relative;
    display: grid;
    z-index: 800;
    width: 100%;
    height: 100%;
    grid-row-gap: 1rem;
    grid-column-gap: 2rem;
    pointer-events: none;
    justify-items: start;
}

.frame--header {
    grid-template-columns: 100%;
    grid-template-areas: 'title''archive''back''github''sub''sponsor';
}

.frame--footer {
    margin-top: 40vh;
    grid-template-columns: auto auto;
    justify-content: space-between;
}

.frame #cdawrap {
    justify-self: start;
}

.frame a {
    pointer-events: auto;
}

.frame__title {
    grid-area: title;
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

.frame__back {
    grid-area: back;
    justify-self: start;
}

.frame__archive {
    grid-area: archive;
    justify-self: start;
}

.frame__sub {
    grid-area: sub;
}

.frame__github {
    grid-area: github;
}

.tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tags a {
    border: 1px solid;
    padding: 0.25rem 0.25rem 0.15rem 0.25rem;
    line-height: 1;
    border-radius: 3px;
}

.frame__demos {
    grid-area: demos;
    display: flex;
    gap: 1rem;
}

.intro {
    padding: var(--page-padding);
    display: grid;
    place-items: center;
    line-height: 1;
    min-height: 100vh;
    min-height: 100svh;
    margin-bottom: clamp(2.5rem, 6vh, 5rem);
    justify-content: center;
    align-items: center;
}

/* Homepage hero: the header overlays the viewport so the complete hero stays one screen tall. */
body.home-page > main {
    position: relative;
}

body.home-page > main > .header {
    position: absolute;
    top: var(--page-padding);
    left: 50%;
    z-index: 10;
    width: min(calc(100% - (var(--page-padding) * 2)), 1400px);
    transform: translateX(-50%);
}

.intro__heading {
    display: grid;
    gap: 3rem;
}

.intro__heading h1 {
    font-family: var(--font-special);
    font-size: clamp(10rem, 7vw, 4rem);
    font-variation-settings: 'wdth'120, 'wght'200;
    width: 70vw;
    max-width: 1000px;
    min-width: 300px;
    margin: 0;
}

.intro__heading p {
    margin: 0;
    max-width: 400px;
    justify-self: start;
    text-align: justify;
    margin-top: 0.5rem;
}

.content {
    padding: var(--page-padding);
    display: flex;
    flex-direction: column;
    gap: 3vh;

    position: relative;
    min-height: 100vh;
    place-items: center;
    margin-bottom: 70vh;
}

.blur-text {
    width: 70vw;
    max-width: 1000px;
    min-width: 300px;
    line-height: 1.2;
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 5vw, 3rem);
}

.blur-text--1 {
    font-weight: 420;
    letter-spacing: normal;
}

.blur-text--2 {
    font-weight: 400;
}

.blur-text--3 {
    font-weight: 600;
    letter-spacing: -0.05em;
}

.blur-text--4 {
    font-weight: 400;
    letter-spacing: -0.05em;
}

.card-wrap {
    margin-top: 5vh;
    display: grid;
    grid-gap: 2rem;
    grid-auto-flow: row;
    /*grid-template-columns: 250px;*/
}

.card__image {
    display: block;
    border-radius: 7px;
    background-size: cover;
    background-position: 50% 50%;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    filter: none;
}

@media screen and (min-width: 53em) {
    .frame--header {
        grid-template-columns: auto auto auto auto 1fr;
        grid-template-rows: auto;
        grid-template-areas: 'title back archive github sponsor';
    }

    .frame--footer {
        grid-template-columns: auto auto auto;
    }

    .frame #cdawrap,
    .frame__sub {
        justify-self: end;
    }

    .card-wrap {
        grid-template-columns: repeat(1, 800px);
    }
}

.type-small2 {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    max-width: 480px;
}

.margin {
    margin-top: 5vh;
}

.get {
    font-size: 25vh;
    font-family: var(--font-special);
    width: 100%;
    max-width: 100%;
    line-height: 0.9;
    text-align: center;
    text-wrap: balance;
}

.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #FE177B;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease-out;
    will-change: transform;
}

.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
}

.intro__heading h1 {
    font-size: clamp(10rem, 7vw, 10rem);
}

@media (max-width: 768px) {
    .intro__heading {
        width: 100%;
        max-width: 600px;
    }

    .intro__heading h1 {
        width: 100%;
        min-width: 0;
        font-size: clamp(4rem, 20vw, 5.25rem);
        text-align: left;
    }

    /* One shared mobile grid for the introduction and project cards. */
    body.home-page {
        --mobile-content-width: 90%;
    }

    body.home-page .blur-text,
    body.home-page .projects-section .card__image,
    body.home-page .projects-section .card__title {
        width: var(--mobile-content-width);
        min-width: 0;
        max-width: 800px;
        margin-right: auto;
        margin-left: auto;
    }

    body.home-page .projects-section .card__title {
        margin-top: 0.75rem;
        margin-bottom: 0;
    }

    /* Let the introductory copy end naturally before the projects transition. */
    body.home-page .about-section {
        min-height: 0;
    }
}

@media (max-width: 480px) {
    .intro {
        overflow-x: clip;
    }

    .intro__heading,
    .intro__heading h1,
    .blur-text {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .intro__heading h1 {
        font-size: clamp(4rem, 20vw, 5.25rem);
    }
}

@media (max-width: 768px) {
    .get[data-effect-3] {
        font-size: clamp(4.75rem, 22vw, 7rem) !important;
        line-height: 0.92;
    }
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    /* מונע שבירה אבל מאפשר ירידה שורה במובייל */
    justify-content: center;
    /* מרכז את הקישורים */
    gap: 4rem;
    /* מרווח בין הקישורים */
    margin-top: 2rem;
    /* רווח מהחלק העליון */
    font-family: inherit;
    /* שומר על הפונט הקיים */
    text-transform: uppercase;
    /* משאיר את האותיות גדולות */
}

.links-container a {
    text-decoration: none;
    color: inherit;
    /* משאיר את הצבע המקורי */
    font-size: inherit;
    /* משאיר את הגודל המקורי */
    font-weight: inherit;
    /* שומר על המשקל הקיים */
    transition: color 0.3s ease;
}

.content .get {
    height: 40vh;
    display: revert;
    margin-bottom: 0vh;
}

.content2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(3rem, 7vh, 6rem) var(--page-padding);
    text-align: center;
}

/* Homepage CTA: always fill one viewport and center its content on every screen size. */
body.home-page .content2 {
    justify-content: center;
}

body.home-page .cta-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body.home-page .content2 .footer-center {
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
}

@media (max-width: 768px) {
    /* Pull the full-screen CTA into the project transition without moving its centered content. */
    body.home-page .content2 {
        margin-top: clamp(-10rem, -20vh, -5rem);
    }
}

/* Homepage projects: a compact transition with a stronger section label. */
body.home-page .projects-section {
    align-items: center;
    gap: 0;
    min-height: 0;
}

body.home-page .projects-section .content__title {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding-bottom: 0.85rem;
    font-size: clamp(0.78rem, 1vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

body.home-page .projects-section .content__title::after {
    content: '';
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 2.5rem;
    height: 2px;
    background: currentColor;
    transform: translateX(50%);
}

body.home-page .projects-section .card-wrap {
    margin-top: clamp(1.75rem, 4vh, 3rem);
}

@media (max-width: 768px) {
    .content2 .links-container {
        gap: 1.25rem 1.75rem;
        margin-top: 2.5rem;
    }
}

/* שמירה על גובה מרווח בתוך .content */
.content {
    margin: 0;
    /* ביטול מרווחים מיותרים */
    padding: 0;
    /* ביטול רווח פנימי אם יש */
    overflow: hidden;
    /* שומר על גלילה תקינה */
}

/* התאמה ל- .get */
.content .get {
    margin-bottom: 0;
    /* הורדת מרווח תחתון */
    padding: 10px 20px;
    /* רווח פנימי מותאם */
    max-height: 100vh;
    /* קביעת גובה מקסימלי מתאים */
    overflow: visible;
    /* מציג את התוכן */
}

body.home-page .padding-forcont {
    height: clamp(3rem, 8vh, 6rem);
}

footer.footer-center {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 20px;
    padding: 20px;
}

@media (max-width: 768px) {
    footer.footer-center {
        height: auto;
    }
}

.card__image {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    /* 100% רוחב */
    margin: 0 auto;
    /* למרכז את התמונה */
}

.card__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Project cards start fully visible; interaction gently dims and zooms the image. */
.card__image,
.card__title a {
    opacity: 1;
}

.card__image {
    transition: opacity 0.35s ease;
}

.card:hover .card__image,
.card:focus-within .card__image {
    opacity: 0.78;
}

.card:hover .card__image img,
.card:focus-within .card__image img {
    transform: scale(1.035);
}

@media (max-width: 1024px) {
    .card__image {
        max-width: 90%;
        /* 90% רוחב על מסכים קטנים יותר */
    }
}

@media (max-width: 480px) {
    .card__image {
        max-width: 100%;
        /* 100% רוחב על מסכים קטנים מאוד */
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    /* מגביל את הרוחב של הקונטיינר */

    min-height: 3rem;
    position: relative;
    margin: 0 auto;
    /* מרכז את כל התוכן */
}

.header__title {
    font-size: .9rem;
    /* מתאים גודל כותרת */
    font-weight: normal;
    margin: 0;
    text-align: left;
}

.header__nav {
    display: flex;
    gap: 2rem;
    /* רווחים בין הלינקים */
}

.header__link {
    text-decoration: none;
    color: inherit;
    font-size: 1rem;
}

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

.links-container a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.external-icon {
  width: 12px;
  height: 12px;
  position: relative;
  top: -1.5px; /* הזזה אופטית לגובה השורה */
  transition: transform 0.25s ease;
  will-change: transform;
}

.links-container a:hover .external-icon {
  transform: translate(3px, -3px);
}
.coming-soon {
    
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000000;
  margin-top: 0.75rem;
  font-style: italic;

}

.max-text {
    max-width: 1100px;
}

.padding10 {
    padding-bottom: 10px;
    padding-top: 10px;
}



.coming-soon-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.coming-soon-card img {
  width: 100%;
  display: block;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity 0.3s ease;
}

.coming-soon-card:hover img {
  opacity: 0.8;
}

.baking-note {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--tilt, -8deg));
  background: white;
  color: #333;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.cake {
  position: absolute;
  font-size: 1.4rem;
  z-index: 3;
  animation: fly-away 0.8s ease-out forwards;
  pointer-events: none;
  user-select: none;
}

@keyframes fly-away {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(2);
  }
}
.card__title a {
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
}

.coming-soon {
  font-style: italic;
  opacity: 0.6;
  font-weight: normal;
}
.project-nav-section {
  padding: 6rem 1.5rem;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: center;
}

.project-nav-container.two-sides {
  display: flex;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
}

.project-prev,
.project-next {
  flex: 0 0 auto;
}

.project-link-button {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #888;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  color: #111;
  background-color: #fff;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
  opacity: 0.7;
}

.project-link-button:hover {
  border-color: #000;
  background-color: rgba(0, 0, 0, 0.04);
  color: #000;
  /* ❌ ללא תזוזת translateY */
}

.arrow-wrapper {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.project-arrow {
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
}

.project-next .project-link-button:hover .arrow-wrapper {
  transform: translateX(6px);
}

.project-prev .project-link-button:hover .arrow-wrapper {
  transform: translateX(-6px);
}

/* רספונסיביות למובייל */
@media (max-width: 768px) {
  .project-nav-section {
    padding: 3rem 1.25rem;
  }

  .project-nav-container.two-sides {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem; /* ריווח ברור בין הכפתורים */
  }

  .project-prev,
  .project-next {
    width: 100%;
    justify-content: center;
  }

  .project-link-button {
    width: 100%;
    padding: 1rem 1.5rem;
    max-width: none;
    font-size: 1rem;
    border-radius: 8px;
  }
}
.project-prev.hidden {
  visibility: hidden;
  width: 180px; /* או אותו מינימום כמו הכפתור */
}
