/* ============================================================
   SHIMRIT EDRI · Architecture & Design
   Palette derived from the SED logo
   ============================================================ */
:root {
  --charcoal: #2b2b2b;
  --ink: #1c1c1c;
  --taupe: #9c8b7a;
  --taupe-soft: #b9ab9c;
  --sand: #efeae3;
  --bg: #faf9f7;
  --bg-alt: #f3f0eb;
  --line: rgba(43, 43, 43, 0.12);
  --white: #ffffff;
  --muted: #6f6a63;

  --font-heb: 'Assistant', sans-serif;
  --font-lat: 'Jost', sans-serif;

  --wide: 1280px;
  --pad: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-heb);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="en"] body { font-family: var(--font-lat); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--taupe); color: #fff; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-lat);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--taupe);
  margin-bottom: 1.4rem;
}
html[dir="rtl"] .eyebrow { font-family: var(--font-heb); letter-spacing: 0.28em; }

.section-title {
  font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}
.section-lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Layout ---------- */
.section { padding: clamp(70px, 11vw, 150px) var(--pad); }
.section-head { max-width: 640px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head .section-lead { margin-inline: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 60;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
  padding: 22px 0;
}
.site-header.scrolled {
  background: rgba(250, 249, 247, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.header-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.site-header.scrolled .brand { opacity: 1; pointer-events: auto; }
.brand-mark { width: 40px; height: auto; }
.brand-name {
  font-size: 0.95rem; letter-spacing: 0.16em; color: var(--charcoal); font-weight: 400;
}
html[lang="en"] .brand-name { text-transform: uppercase; }

.nav { display: flex; gap: clamp(20px, 3vw, 42px); }
.nav a {
  position: relative; font-size: 0.9rem; letter-spacing: 0.08em; color: var(--charcoal);
  font-weight: 400; padding: 6px 0; transition: color .3s;
}
.site-header:not(.scrolled) .nav a { color: rgba(255,255,255,0.92); }
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: inline-start;
  transition: transform .4s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  font-family: var(--font-lat); background: none; border: 1px solid currentColor;
  color: var(--charcoal); border-radius: 40px; padding: 6px 14px; font-size: 0.72rem;
  letter-spacing: 0.14em; cursor: pointer; transition: all .3s var(--ease);
}
.site-header:not(.scrolled) .lang-toggle { color: #fff; border-color: rgba(255,255,255,0.6); }
.lang-toggle:hover { background: var(--taupe); border-color: var(--taupe); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 1.5px; background: var(--charcoal); transition: .3s var(--ease); }
.site-header:not(.scrolled) .nav-toggle span { background: #fff; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; height: 100svh; min-height: 560px; display: grid; place-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: heroZoom 14s var(--ease) forwards; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,16,.45) 0%, rgba(20,18,16,.28) 40%, rgba(20,18,16,.5) 100%);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 20px; }
.hero-mark { width: clamp(120px, 20vw, 210px); margin: 0 auto 30px; animation: fadeUp 1s var(--ease) both .2s; }
.hero-title {
  font-weight: 200; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: 0.22em;
  margin-bottom: 14px; animation: fadeUp 1s var(--ease) both .4s;
}
html[lang="en"] .hero-title { text-transform: uppercase; }
.hero-sub {
  font-weight: 300; font-size: clamp(.85rem, 2vw, 1.1rem); letter-spacing: 0.34em;
  color: rgba(255,255,255,.85); animation: fadeUp 1s var(--ease) both .6s;
}
html[lang="en"] .hero-sub { text-transform: uppercase; }

.scroll-cue { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-cue span {
  display: block; width: 22px; height: 36px; border: 1px solid rgba(255,255,255,.6); border-radius: 20px; position: relative;
}
.scroll-cue span::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 3px; background: #fff; animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,12px)} 100%{opacity:0} }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg); }
.about-grid {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center;
}
.about-media { overflow: hidden; }
.about-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform 1.2s var(--ease); }
.about-media:hover img { transform: scale(1.04); }
.about-text p { margin-bottom: 1.2rem; color: #47433d; }
.link-underline {
  display: inline-block; margin-top: 12px; font-weight: 400; letter-spacing: .04em; color: var(--charcoal);
  border-bottom: 1px solid var(--taupe); padding-bottom: 3px; transition: color .3s, border-color .3s;
}
.link-underline:hover { color: var(--taupe); }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio { background: var(--bg-alt); }
.gallery {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 20px);
  grid-auto-flow: dense;
}
.gallery-item { overflow: hidden; cursor: pointer; position: relative; background: var(--sand); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; transition: transform 1s var(--ease), filter .6s; }
.gallery-item.span-2 { grid-column: span 2; }
.gallery-item.span-2 img { aspect-ratio: 3/2; }
.gallery-item::after {
  content: ""; position: absolute; inset: 0; background: rgba(43,43,43,0); transition: background .5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover::after { background: rgba(43,43,43,.08); }
.credit {
  max-width: var(--wide); margin: 28px auto 0; text-align: center;
  font-family: var(--font-lat); font-size: .78rem; letter-spacing: .12em; color: var(--muted);
}
html[dir="rtl"] .credit { font-family: var(--font-heb); }

/* ============================================================
   PROCESS · sketch → 3D (animated line drawing)
   ============================================================ */
.process { background: var(--bg); }
.process-head { max-width: 640px; margin: 0 auto clamp(34px, 5vw, 60px); text-align: center; }
.sketch { max-width: 940px; margin: 0 auto; }
.sketch svg { width: 100%; height: auto; overflow: visible; }
.sketch .d {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.sketch.in .d { stroke-dashoffset: 0; }
/* draw the 3D volume just after the plan */
.sketch svg > g > g:nth-of-type(n+4) .d,
.sketch.in svg > g > g:nth-of-type(n+4) .d { transition-delay: .5s; }

/* ============================================================
   SERVICES
   ============================================================ */
.services { background: var(--charcoal); color: #efeae3; }
.services .section-title { color: #fff; }
.services .eyebrow { color: var(--taupe-soft); }
.services-grid {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 48px);
}
.service { padding-top: 26px; border-top: 1px solid rgba(255,255,255,.16); }
.service-num {
  font-family: var(--font-lat); font-size: .82rem; letter-spacing: .2em; color: var(--taupe-soft); margin-bottom: 18px;
}
.service h3 { font-weight: 400; font-size: 1.2rem; letter-spacing: .03em; margin-bottom: .8rem; color: #fff; }
.service p { font-size: .96rem; color: rgba(239,234,227,.72); line-height: 1.7; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--bg); }
.contact-grid {
  max-width: var(--wide); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start;
}
.contact-list { list-style: none; margin: 34px 0 0; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 2px;
  transition: padding-inline .35s var(--ease);
}
.contact-list a:hover { padding-inline-start: 12px; }
.ci-label { font-size: .82rem; letter-spacing: .16em; color: var(--taupe); text-transform: uppercase; }
html[dir="rtl"] .ci-label { text-transform: none; letter-spacing: .06em; }
.ci-value { font-size: 1rem; color: var(--charcoal); }

.contact-quick { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Icon buttons */
.contact-icons { display: flex; gap: 16px; margin-top: 36px; }
.contact-icons a {
  width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; color: var(--charcoal); transition: all .35s var(--ease);
}
.contact-icons a:hover { background: var(--charcoal); color: #fff; border-color: var(--charcoal); transform: translateY(-3px); }
.contact-icons svg { width: 22px; height: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; font-size: .9rem; letter-spacing: .06em; font-weight: 400;
  border-radius: 2px; cursor: pointer; transition: all .35s var(--ease); border: 1px solid transparent;
  font-family: inherit;
}
.btn-solid { background: var(--charcoal); color: #fff; width: 100%; }
.btn-solid:hover { background: var(--taupe); }
.btn-wa { background: var(--taupe); color: #fff; }
.btn-wa:hover { background: var(--charcoal); }
.btn-ghost { background: transparent; color: var(--charcoal); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--charcoal); }

/* Form */
.contact-form-wrap { background: var(--bg-alt); padding: clamp(26px, 4vw, 46px); }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: .8rem; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 2px; font-family: inherit; font-size: 1rem; color: var(--ink); font-weight: 300;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--taupe); }
.field textarea { resize: vertical; min-height: 96px; }
.form-status { margin-top: 16px; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: #4f7a52; }
.form-status.err { color: #b1553f; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: rgba(239,234,227,.8); padding: clamp(50px,7vw,80px) var(--pad) 30px; }
.footer-inner {
  max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px;
  justify-content: space-between; align-items: flex-start; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-mark { width: 84px; margin-bottom: 18px; }
.footer-name { font-size: 1.05rem; letter-spacing: .14em; color: #fff; }
html[lang="en"] .footer-name { text-transform: uppercase; }
.footer-tag { font-size: .82rem; letter-spacing: .2em; color: var(--taupe-soft); margin-top: 4px; }
html[lang="en"] .footer-tag { text-transform: uppercase; }
.footer-links { display: flex; flex-direction: column; gap: 12px; text-align: end; }
.footer-links a { font-size: .92rem; letter-spacing: .04em; transition: color .3s; }
.footer-links a:hover { color: #fff; }
.footer-icons { display: flex; gap: 14px; }
.footer-icons a {
  width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%;
  display: grid; place-items: center; color: rgba(239,234,227,.82); transition: all .35s var(--ease);
}
.footer-icons a:hover { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-3px); }
.footer-icons svg { width: 20px; height: 20px; }
.footer-bottom {
  max-width: var(--wide); margin: 0 auto; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .76rem; letter-spacing: .06em; color: rgba(239,234,227,.5);
}
.credit-link { font-family: var(--font-lat); letter-spacing: .18em; color: var(--taupe-soft); transition: color .3s; }
.credit-link:hover { color: #fff; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20,18,16,.94);
  display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-img { max-width: 88vw; max-height: 86vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer; opacity: .8; transition: opacity .3s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 24px; inset-inline-end: 30px; font-size: 2.6rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 0 22px; }
.lb-prev { inset-inline-start: 10px; }
.lb-next { inset-inline-end: 10px; }
html[dir="rtl"] .lb-prev { transform: translateY(-50%) scaleX(-1); }
html[dir="rtl"] .lb-next { transform: translateY(-50%) scaleX(-1); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media img { aspect-ratio: 16/10; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.span-2 { grid-column: span 2; }
}

@media (max-width: 720px) {
  .nav, .lang-toggle { display: none; }
  .nav-toggle { display: flex; }
  .nav.open {
    display: flex; position: fixed; inset: 0; background: rgba(250,249,247,.98);
    flex-direction: column; align-items: center; justify-content: center; gap: 30px; z-index: 55;
  }
  .nav.open a { color: var(--charcoal); font-size: 1.4rem; letter-spacing: .12em; }
  .site-header.menu-open .nav-toggle span { background: var(--charcoal); }
  .site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .footer-inner { flex-direction: column; }
  .footer-links { text-align: start; }
}

@media (max-width: 540px) {
  .services-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-item.span-2 { grid-column: span 1; }
  .gallery-item img, .gallery-item.span-2 img { aspect-ratio: 3/2; }
  .contact-quick .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sketch .d { stroke-dashoffset: 0 !important; transition: none; }
}
