/* ============================================================================
 * TLnagarut — light theme, warm woodworking palette.
 * Layout uses logical properties (margin-inline, etc.) so it mirrors
 * automatically when the page is set to Hebrew (dir="rtl").
 * ========================================================================== */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-alt: #f3ece1;
  --text: #2b2723;
  --muted: #6b6155;
  --accent: #8a5a37; /* walnut */
  --accent-dark: #6f4423;
  --border: #e7ded2;
  --shadow: 0 10px 30px rgba(58, 38, 21, 0.08);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hebrew: "Heebo", system-ui, sans-serif;

  --maxw: 1100px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* When Hebrew is active, prefer the Hebrew font everywhere. */
html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .brand { font-family: var(--hebrew); }

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; color: var(--text); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 0.5em; }
h3 { font-size: 1.35rem; margin: 0 0 0.4em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.8em;
}
.eyebrow.light { color: #f3d8bd; }

.lede { font-size: 1.18rem; color: var(--text); }
p { color: var(--muted); }
p.lede { color: var(--text); }

/* ----------------------- Buttons ----------------------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  font-family: var(--sans);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
html[dir="rtl"] .btn { font-family: var(--hebrew); }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ----------------------- Header ----------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-links {
  display: flex;
  gap: 26px;
  margin-inline-start: auto;
}
.nav-links a { color: var(--text); font-size: 0.98rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.lang-toggle {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4em 1em;
  font-size: 0.9rem;
  font-weight: 400;
  cursor: pointer;
  font-family: var(--sans);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Hamburger toggle — hidden on desktop, shown on small screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-inline-start: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------- Hero ----------------------- */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: center;
  min-height: 78vh;
}
/* Optional banner photo (content/photos.yml "hero"); covers the plain background. */
.hero-media, .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(43, 26, 13, 0.72), rgba(43, 26, 13, 0.35));
}
.hero-content { position: relative; padding-block: 90px; max-width: 720px; }
.hero h1 { color: #fff; }
.hero-subtitle { font-size: 1.25rem; color: #f4e9dc; max-width: 38ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ----------------------- Sections ----------------------- */
.section { padding-block: 88px; }
.section-alt { background: var(--surface-alt); }
.page-title { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.section-sub { margin-top: 64px; }
.page-short { min-height: 55vh; }
.instagram-handle { margin-top: 18px; }
.projects-more { margin-top: 48px; }

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: center;
}
.stats {
  list-style: none;
  margin: 0;
  padding: 28px;
  display: grid;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stats li { display: flex; flex-direction: column; }
.stat-value { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.stat-label { color: var(--muted); font-size: 0.95rem; }

/* ----------------------- Service cards ----------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.card h3 { color: var(--accent-dark); }
.card p { margin-bottom: 0; }

/* ----------------------- Photo grid (galleries) ----------------------- */
/* Equal 4:3 tiles; photos are already cropped to 4:3 by process-photos. */
.photo-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.photo-tile {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  background: var(--surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo-tile picture,
.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-tile img { transition: transform 0.25s ease; }
.photo-tile:hover img { transform: scale(1.03); }
.photo-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ----------------------- Spray finishing ----------------------- */
.fact-list {
  list-style: none;
  margin: 8px 0 32px;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 62ch;
}
.fact-list li {
  position: relative;
  padding-inline-start: 30px;
  color: var(--text);
}
.fact-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.8em;
  width: 16px;
  height: 2px;
  background: var(--accent);
}

/* ----------------------- Contact ----------------------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; flex-direction: column; }
.contact-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact-value { font-size: 1.15rem; color: var(--text); font-style: normal; }
.contact-list a:hover { color: var(--accent); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.contact-people { display: grid; gap: 18px; margin-top: 6px; }
.contact-person { display: grid; gap: 4px; }
.contact-person-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.contact-person-name { font-weight: 600; color: var(--text); font-size: 1.15rem; }
.contact-person-langs { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.contact-phone-row { display: flex; align-items: center; gap: 12px; }
.contact-phone {
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  font-size: 1rem; /* one step down from the contact-list default (1.15rem) */
}
.contact-list a.whatsapp-link {
  display: inline-flex; align-items: center; justify-content: center;
  color: #25d366; line-height: 0;
  padding: 10px; margin: -10px; /* larger tap target, no layout shift */
  border-radius: 999px;
}
.contact-list a.whatsapp-link:hover { color: #1da851; }
.whatsapp-icon { display: block; }

/* Desktop: name (+ hint) and number share a line; numbers align in a column.
   The name column sizes to the widest name, so all numbers start at the same x. */
@media (min-width: 450px) {
  .contact-people {
    grid-template-columns: max-content auto;
    column-gap: 28px;
    row-gap: 12px;
    align-items: baseline;
  }
  .contact-person { display: contents; }
}

/* ----------------------- Footer ----------------------- */
.site-footer { background: #494037; color: #d8cdbf; padding-block: 10px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }
.footer-build { opacity: 0.5; }

/* ----------------------- Gallery lightbox ----------------------- */
.gallery {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 13, 7, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gallery[hidden] { display: none; }
.gallery-figure { margin: 0; max-width: min(1000px, 92vw); text-align: center; }
.gallery { touch-action: pan-y pinch-zoom; } /* horizontal swipes change photo */
.gallery-figure img {
  max-height: 80vh;
  max-width: 100%;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: 8px;
}
.gallery-figure figcaption { color: #f1e6d8; margin-top: 14px; font-family: var(--serif); font-size: 1.25rem; }
html[dir="rtl"] .gallery-figure figcaption { font-family: var(--hebrew); }
.gallery-close,
.gallery-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-close:hover, .gallery-nav:hover { background: rgba(255, 255, 255, 0.25); }
.gallery-nav[hidden] { display: none; }
.gallery-close { top: 22px; inset-inline-end: 22px; }
.gallery-prev { inset-inline-start: 18px; top: 50%; transform: translateY(-50%); }
.gallery-next { inset-inline-end: 18px; top: 50%; transform: translateY(-50%); }
/* Arrows point the natural reading direction in RTL. */
html[dir="rtl"] .gallery-prev { transform: translateY(-50%) scaleX(-1); }
html[dir="rtl"] .gallery-next { transform: translateY(-50%) scaleX(-1); }

/* ----------------------- Responsive ----------------------- */
@media (max-width: 860px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }

  /* Collapse nav into a tap-to-open panel below the header */
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin-inline-start: 0;
    padding: 8px 24px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 0;
    font-size: 1.05rem;
    border-top: 1px solid var(--border);
  }
  .nav-links a:first-child { border-top: none; }

  /* Hamburger sits at the far (inline-end) edge; language button before it. */
  .lang-toggle { margin-inline-start: auto; }
  .nav-toggle { margin-inline-start: 0; order: 1; }

  .cards { grid-template-columns: 1fr; }
  .photo-grid { gap: 10px; }
  .section-sub { margin-top: 48px; }
  .section { padding-block: 60px; }
  .hero-content { padding-block: 64px; }
}

/* ----------------------- In the workshop ----------------------- */
.photo-note {
  margin: 0;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-weight: 500;
  max-width: 62ch;
}
html[dir="rtl"] .photo-note { border-radius: var(--radius) 0 0 var(--radius); }

/* Long galleries: photos after the first 30 wait behind "show more"
   (only when scripts run — see the inline script in projects.html). */
.photo-more { display: none; margin-top: 28px; }
html.js .photo-more { display: inline-block; }
html.js .photo-extra { display: none; }
