/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --green: #71b753;
  --green-deep: #2f4a2c;
  --green-deep-2: #24391f;
  --sage: #eef3ee;
  --sage-2: #dcebd2;
  --sage-3: #eaf2e4;
  --cream: #fafaf5;
  --teal: #3e8e7e;
  --ink: #1e251c;
  --white: #ffffff;

  --font-display: "Google Sans", "Segoe UI", sans-serif;
  --font-mono: "Google Sans Code", ui-monospace, monospace;

  --wrap: 80%;
  --radius-sm: 1rem;
  --radius-md: 1.8rem;
  --radius-lg: 2.8rem;

  --shadow-sm: 0 0.2rem 1rem rgba(36, 57, 31, 0.08);
  --shadow-md: 0 1.4rem 4rem rgba(36, 57, 31, 0.14);
  --shadow-lg: 0 2.6rem 7rem rgba(36, 57, 31, 0.22);

  --ease: cubic-bezier(0.22, 0.85, 0.32, 1);
}

/* ============================================================
   Reset
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  /* 10px == 1rem, so any rem value in this file reads as px/10 */
  font-size: 62.5%;
}

body {
  font-family: var(--font-display);
  font-size: 1.6rem;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 2.4rem;
  &.wrap-gallery {
    max-width: 80%;
  }
}

/* subtle grain texture over the whole page */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 245, 0.82);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
  border-bottom: 0.1rem solid rgba(47, 74, 44, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding-block: 1.4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}
.logo-mark {
  width: 2.8rem;
  height: 2.8rem;
  color: var(--green);
  flex-shrink: 0;
}
.logo-mark path {
  fill: currentColor;
}
.brand-name {
  font-size: 1.632rem;
  letter-spacing: -0.01em;
}
html[lang="en"] .brand-name-he {
  display: none;
}
html[lang="he"] .brand-name-en {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.email-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.36rem;
  font-weight: 500;
  padding: 0.8rem 1.4rem;
  border-radius: 99.9rem;
  background: var(--green);
  color: var(--cream);
  transition:
    transform 0.25s var(--ease),
    background 0.25s;
}
.email-btn:hover {
  background: var(--green-deep);
  transform: translateY(-0.1rem);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 1.248rem;
  padding: 0.8rem 1.2rem;
  border-radius: 99.9rem;
  border: 0.1rem solid rgba(47, 74, 44, 0.25);
}
.lang-toggle-sep {
  opacity: 0.4;
}
html[lang="he"] .lang-toggle-he,
html[lang="en"] .lang-toggle-en {
  color: var(--green);
  font-weight: 700;
}
html[lang="he"] .lang-toggle-en,
html[lang="en"] .lang-toggle-he {
  opacity: 0.4;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block-start: 6.4rem;
  padding-block-end: 4rem;
  overflow: hidden;
  background:
    radial-gradient(
      60% 50% at 15% 10%,
      rgba(113, 183, 83, 0.14),
      transparent 70%
    ),
    radial-gradient(
      50% 40% at 90% 20%,
      rgba(62, 142, 126, 0.1),
      transparent 70%
    ),
    var(--cream);
}

.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-decor-shape {
  position: absolute;
  width: 34rem;
  color: var(--green);
  opacity: 0.07;
}
.hero-decor-shape path {
  fill: currentColor;
}
.shape-1 {
  top: -6rem;
  inset-inline-end: -6rem;
  transform: rotate(12deg);
}
.shape-2 {
  bottom: -12rem;
  inset-inline-start: -8rem;
  width: 26rem;
  transform: rotate(-18deg);
  color: var(--teal);
  opacity: 0.08;
}
.shape-3 {
  top: 40%;
  inset-inline-start: 42%;
  width: 18rem;
  transform: rotate(35deg);
  opacity: 0.05;
}

.hero-grid {
  position: relative;
  z-index: 1;
}
.hero-copy {
  max-width: 76rem;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 1.248rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-block-end: 1.8rem;
}

.hero-headline {
  font-size: clamp(3.84rem, 6vw, 6.72rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ink);
  margin-block-end: 2.2rem;
}

.hero-role {
  font-size: 1.68rem;
  font-weight: 500;
  color: var(--teal);
  margin-block-end: 2rem;
}

.hero-bio {
  font-size: 1.728rem;
  max-width: 64rem;
  color: var(--ink);
  opacity: 0.88;
  margin-block-end: 3.2rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block-end: 4rem;
}
.chip {
  font-size: 1.312rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border-radius: 99.9rem;
  background: var(--white);
  border: 0.1rem solid rgba(47, 74, 44, 0.14);
  color: var(--green-deep-2);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 3.04rem;
  font-weight: 600;
  color: var(--green-deep);
}
.stat-label {
  font-size: 1.28rem;
  opacity: 0.6;
}

.hero-divider {
  display: block;
  width: 100%;
  height: 6rem;
  margin-block-start: 4rem;
}
.hero-divider path {
  fill: var(--sage);
}

/* ============================================================
   Projects
   ============================================================ */
.projects {
  background: rgba(62, 142, 126, 0.05);
  padding-block: 5.6rem 9rem;
}
.section-title {
  font-size: clamp(3.2rem, 4vw, 4.48rem);
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: -0.01em;
  margin-block-end: 3.6rem;
}

/* ---- Digital / Print split panels ---- */
.split {
  display: grid;
  grid-template-columns: 90fr 10fr;
  gap: 2rem;
  align-items: stretch;
  transition: grid-template-columns 0.65s var(--ease);
}
.split[data-active="print"] {
  grid-template-columns: 26fr 74fr;
}

.split-panel {
  position: relative;
  min-height: 56rem;
  /* background: var(--white); */
  /* border-radius: var(--radius-lg); */
  /* box-shadow: var(--shadow-sm); */
  overflow: hidden;
}
/*.split-panel.is-active {
   box-shadow: var(--shadow-md); 
}*/

.split-header {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  cursor: pointer;
  color: var(--green-deep);
}
.split-panel.is-active .split-header {
  position: relative;
  width: 100%;
  padding: 3rem 3.2rem 0.8rem;
}
.split-panel:not(.is-active) .split-header {
  position: absolute;
  inset: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-content: flex-start;
  padding: 2.8rem 0;
  transition: background 0.3s var(--ease);
  background: transparent;
}
.split-panel:not(.is-active) .split-header:hover {
  background: var(--sage);
}

.split-header-kicker {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  opacity: 0.65;
}
.split-header-title {
  font-size: 1.92rem;
  font-weight: 700;
}
.split-panel.is-active .split-header-title {
  font-size: clamp(2.24rem, 2.4vw, 3.04rem);
}

.split-body {
  padding: 0.8rem 3.2rem 0rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.split-panel.is-active .split-body {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s var(--ease) 0.2s;
}

.print-coming-soon {
  font-family: var(--font-mono);
  font-size: 1.36rem;
  color: var(--teal);
  margin-block-end: 1.8rem;
}
.print-placeholder-list {
  display: grid;
  gap: 1.4rem;
}
.print-placeholder-item {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius-sm);
  background: var(--sage);
  color: var(--green-deep);
  opacity: 0.8;
}
.print-placeholder-index {
  font-family: var(--font-mono);
  font-size: 1.248rem;
  opacity: 0.7;
}
.print-placeholder-title {
  font-weight: 600;
}

@media (max-width: 899px) {
  .split {
    grid-template-columns: 1fr !important;
    gap: 2.8rem;
  }
  .split-panel {
    min-height: 0;
  }
  .split-panel:not(.is-active) .split-header {
    position: relative;
    inset: auto;
    writing-mode: initial;
    transform: none;
    width: 100%;
    padding: 2.4rem 2.4rem 0.8rem;
    justify-content: flex-start;
  }
  .split-body {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 780px) {
  .split-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .split-body {
    padding-inline: 1.5rem;
  }
  .section-title {
    margin-block-end: 0;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5rem;
}
@media (min-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1600px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

.project-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0.2rem -3rem rgba(36, 57, 31, 0.08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(2.4rem);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    box-shadow 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 5.4rem;
  /* background: linear-gradient(to bottom, rgba(36, 57, 31, 0), rgb(231 239 226)); */
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  pointer-events: none;
  z-index: -1;
}
.project-card.in-view {
  opacity: 1;
  transform: translateY(0);
  border: 0.1rem solid rgba(47, 74, 44, 0.14);
}
.project-card:hover {
  box-shadow: var(--shadow-sm);
}
.project-card:hover .project-cover img,
.project-card:hover .project-cover-video {
  transform: scale(1.06);
}
.project-card:hover .project-cover::after {
  opacity: 1;
}

.project-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sage-2);
  flex: 1;
}
.project-cover img,
.project-cover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.project-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 90%,
    var(--white) 100%
  );
  pointer-events: none;
}
.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(
    135deg,
    rgba(113, 183, 83, 0.35),
    rgba(47, 74, 44, 0.55)
  ); */
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.project-index {
  position: absolute;
  top: 1.4rem;
  inset-inline-start: 1.4rem;
  font-family: var(--font-mono);
  font-size: 1.248rem;
  color: var(--white);
  background: rgba(113, 183, 83, 0.9);
  padding: 0.4rem 1rem;
  border-radius: 99.9rem;
  backdrop-filter: blur(0.4rem);
  z-index: 1;
  direction: ltr;
  unicode-bidi: isolate;
}

.project-body {
  padding: 2.2rem 2.2rem 2rem;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}
.project-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-block-end: 0.8rem;
}
.project-desc {
  font-size: 1.472rem;
  opacity: 0.82;
  margin-block-end: 1.6rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-end: 1.6rem;
}
.project-tag {
  font-size: 1.152rem;
  font-weight: 600;
  color: var(--teal);
  background: rgba(62, 142, 126, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 99.9rem;
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.248rem;
  color: rgba(30, 37, 28, 0.6);
  padding-block-start: 1.4rem;
  border-top: 0.1rem solid rgba(47, 74, 44, 0.1);
}
.project-visit {
  font-weight: 600;
  color: var(--green-deep);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.project-visit:hover {
  color: var(--green);
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 26, 18, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lb-stage {
  width: min(110rem, 92vw);
  max-height: 86vh;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border-radius: 0.8rem;
  box-shadow: 0 3rem 8rem rgba(0, 0, 0, 0.5);
  scrollbar-width: none;
  /* force LTR scroll coordinates regardless of page language, so scrollLeft
     math in main.js (panning) is consistent — the stage only ever holds an
     image, so there's no bidi text here to actually flow RTL */
  direction: ltr;
  transition: width 0.2s var(--ease);
}
/* vertical (portrait) images: a mobile-screenshot-shaped image blown up to
   the full ~1100px stage width looks blurry/oversized, so cap it to a
   sane width instead — horizontal images keep using the full stage. */
.lb-stage.is-portrait {
  width: min(42rem, 92vw);
}

.lb-stage::-webkit-scrollbar {
  display: none;
}
.lb-stage img {
  display: block;
  width: 100%;
  max-width: none; /* override the global img{max-width:100%} reset so zoom can exceed container width */
  height: auto;
  transition:
    width 0.25s var(--ease),
    opacity 0.18s var(--ease);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
/* prev/next navigation fades the image out before swapping src, then back
   in once the new one has loaded — see crossfadeTo() in main.js */
.lb-stage img.is-changing {
  opacity: 0;
}
.lb-stage img.is-zoomed {
  cursor: grab;
}
.lb-stage img.is-panning {
  cursor: grabbing;
  transition: none;
}
.lb-stage img.is-pinching {
  transition: none;
}

.lb-zoom-controls {
  position: absolute;
  top: 2rem;
  inset-inline-start: 2rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 0.1rem solid rgba(255, 255, 255, 0.16);
  border-radius: 99.9rem;
  padding: 0.4rem;
  z-index: 2;
}
.lb-zoom-controls button {
  color: var(--white);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99.9rem;
  opacity: 0.85;
  transition:
    background 0.2s,
    opacity 0.2s;
}
.lb-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}
.lb-zoom-pct {
  font-family: var(--font-mono);
  font-size: 1.152rem;
  width: auto !important;
  padding-inline: 0.8rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.lb-close {
  position: absolute;
  top: 2rem;
  inset-inline-end: 2rem;
  color: var(--white);
  opacity: 0.8;
  padding: 0.8rem;
}
.lb-close:hover {
  opacity: 1;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  opacity: 0.75;
  padding: 1.4rem;
  border-radius: 99.9rem;
  transition:
    opacity 0.2s,
    background 0.2s;
}
.lb-nav:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}
.lb-prev {
  inset-inline-start: 1.2rem;
}
.lb-next {
  inset-inline-end: 1.2rem;
}
[dir="rtl"] .lb-prev svg {
  transform: scaleX(-1);
}
[dir="rtl"] .lb-next svg {
  transform: scaleX(-1);
}

.lb-info {
  position: absolute;
  bottom: 2.2rem;
  inset-inline: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  color: var(--white);
  font-size: 1.36rem;
  opacity: 0.85;
}
.lb-count {
  font-family: var(--font-mono);
  opacity: 0.6;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  padding-block: 8rem 4rem;
  text-align: center;
  overflow: hidden;
}
.footer-logo {
  position: absolute;
  width: 48rem;
  height: 48rem;
  color: var(--cream);
  opacity: 0.04;
  top: -8rem;
  inset-inline-start: 50%;
  transform: translateX(-50%);
}
.footer-inner {
  position: relative;
  z-index: 1;
}
.footer-title {
  font-size: clamp(2.88rem, 4vw, 4.16rem);
  font-weight: 700;
  margin-block-end: 2rem;
}
.footer-email {
  display: inline-block;
  font-size: 1.84rem;
  font-weight: 600;
  color: var(--green);
  padding-block-end: 0.4rem;
  border-bottom: 0.2rem solid rgba(113, 183, 83, 0.4);
  margin-block-end: 5rem;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.footer-email:hover {
  color: var(--cream);
  border-color: var(--cream);
}
.footer-credit {
  font-size: 1.28rem;
  opacity: 0.5;
}

/* ============================================================
   Responsive: hero two-column on desktop
   ============================================================ */
@media (min-width: 1024px) {
  .hero {
    padding-block-start: 9.6rem;
    padding-block-end: 6rem;
  }
  .hero-copy {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  :root {
    --wrap: 100%;
  }
  .wrap.wrap-gallery {
    max-width: 100%;
  }
}

@media (max-width: 599px) {
  :root {
    --wrap: 100%;
  }
  .wrap {
    padding-inline: 1.8rem;
  }
  .header-actions .email-btn span {
    display: none;
  }
  .email-btn {
    padding: 1rem;
  }
  .project-body {
    padding: 1.8rem;
  }
}
