/* ============================================================
   דניאל הכסטר — פורטפוליו
   ============================================================ */

:root {
  --ink: #15120d;
  --ink-2: #1e1a13;
  --paper: #efe9dc;
  --paper-dim: #b7b0a0;
  --accent: #d19a2f;
  --line: rgba(239, 233, 220, 0.16);
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Heebo", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--ink); }

.mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--paper-dim);
}

/* משפטים שלמים (בניגוד לתוויות של מספר/מילה) — פונט רגיל וגודל קריא */
.hero-scroll,
.form-status,
.site-footer .mono,
.private-note {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* גרעיניות עדינה של פילם על כל העמוד */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- כותרת עליונה ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--paper);
}

.logo-emblem {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: block;
  transition: border-color 0.25s, transform 0.25s;
}

.logo:hover .logo-emblem { border-color: var(--accent); transform: rotate(6deg); }

.logo-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

/* הלוגו המלא בתחתית העמוד — נמזג לרקע עם דהייה עגולה */
.logo-showcase {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vh, 4rem) 1rem 1rem;
  border-top: 1px solid var(--line);
}

.logo-showcase img {
  width: min(340px, 75%);
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
}

.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }

.site-nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover { color: var(--paper); }
.site-nav a.active { color: var(--paper); border-bottom-color: var(--accent); }

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

.lang-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.nav-burger { display: none; }

/* ---------- פתיח ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) clamp(1.2rem, 4vw, 3rem) clamp(3rem, 8vh, 5rem);
}

.hero-kicker { margin-bottom: 1.6rem; }

.hero-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

.hero-name-small { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.1; }

.hero-name-latin { margin-top: 0.9rem; }

.hero-role {
  max-width: 34rem;
  margin-top: 2.2rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: color-mix(in srgb, var(--paper) 82%, var(--paper-dim));
}

.hero-scroll {
  display: inline-block;
  margin-top: 3.2rem;
  color: var(--accent);
  text-decoration: none;
}

.hero-scroll:hover { color: var(--paper); }

.hero-small { padding-bottom: 1rem; }

/* ---------- מקטעים ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 2.4rem; }

.section-num {
  display: block;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  line-height: 1.15;
}

.section-sub {
  margin-top: 0.6rem;
  color: var(--paper-dim);
  max-width: 32rem;
  font-size: 0.95rem;
}

/* ---------- רשת סרטונים ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}

.video-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s;
}

.video-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.4s ease, filter 0.4s;
}

.video-card:hover .video-thumb img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }

.video-play {
  position: absolute;
  inset-inline-end: 0.8rem;
  bottom: 0.8rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(21, 18, 13, 0.8);
  border: 1px solid var(--paper);
  color: var(--paper);
  font-size: 0.7rem;
  transition: background 0.2s, color 0.2s;
}

.video-card:hover .video-play { background: var(--accent); color: var(--ink); border-color: var(--accent); }

.video-meta { padding: 0.9rem 1rem 1rem; }

.video-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
}

.video-sub {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--paper-dim);
}

/* כרטיס "בקרוב" — לסרטון שעוד אין לו לינק */
.video-card.placeholder { cursor: default; }
.video-card.placeholder:hover { transform: none; border-color: var(--line); }

.video-thumb-empty {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(239, 233, 220, 0.035) 14px 15px),
    var(--ink-2);
}

.video-thumb-empty span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--paper-dim);
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
}

/* ---------- כפתורים ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.75rem 1.6rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-solid {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
}

.btn-solid:hover { background: var(--accent); border-color: var(--accent); }

.btn-outline {
  background: none;
  color: var(--paper);
  border: 1px solid var(--paper-dim);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- מקטע אפליקציות (תקציר) ---------- */

.apps-teaser { max-width: 36rem; }

.apps-lede {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 1.8rem;
}

/* ---------- עמוד אפליקציות ---------- */

.app-case {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.app-case-text p { margin-bottom: 1.2rem; max-width: 32rem; }
.app-case-text .btn { margin-top: 0.6rem; }

.private-note {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.7rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 2px;
  color: var(--accent);
  line-height: 1.7;
  max-width: 32rem;
}

.phone-mock {
  width: min(270px, 80%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 0.7rem;
  background: var(--ink-2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(-2.5deg);
}

.phone-screen {
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 1.3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.phone-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 0.4rem;
}

.phone-btn {
  background: #fff;
  border: 1.5px solid #d8d2c4;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  font-weight: 500;
  font-size: 0.98rem;
}

.phone-btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.voice-circle {
  width: 5.2rem;
  height: 5.2rem;
  margin: 0.6rem auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1.6rem;
  box-shadow: 0 0 0 10px rgba(209, 154, 47, 0.12), 0 0 0 22px rgba(209, 154, 47, 0.05);
}

.voice-hint {
  text-align: center;
  color: #6b5d3f;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

/* ---------- יצירת קשר ---------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-line { margin-bottom: 1.4rem; }

.contact-label { display: block; margin-bottom: 0.3rem; }

.contact-value {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
  display: inline-block;
}

.contact-value:hover { color: var(--accent); }

.contact-email { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }

.contact-note { margin-top: 1.6rem; color: var(--paper-dim); font-size: 0.9rem; max-width: 22rem; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }

.contact-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--paper-dim); }

.contact-form input,
.contact-form textarea {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }

.contact-form .btn { align-self: flex-start; }

.form-status { color: var(--accent); }

/* ---------- תחתית ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
}

/* ---------- נגן מוגדל ---------- */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 8, 5, 0.92);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
}

.lightbox-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  inset-inline-end: 1.5rem;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- הופעה הדרגתית בגלילה ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- מובייל ---------- */

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    top: 0;
    inset-inline: 0;
    padding: 5.5rem 2rem 2.5rem;
    flex-direction: column;
    gap: 1.4rem;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    transform: translateY(-105%);
    transition: transform 0.3s ease;
    z-index: -1;
  }

  .site-nav.open { transform: none; }

  .site-nav a { font-size: 1.15rem; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.3rem;
    height: 2.3rem;
    background: none;
    border: 1px solid var(--line);
    border-radius: 2px;
    cursor: pointer;
    padding: 0 0.45rem;
  }

  .nav-burger span { height: 1px; background: var(--paper); display: block; }

  .contact-wrap, .app-case { grid-template-columns: 1fr; }

  .app-case-visual { order: -1; }

  .phone-mock { transform: rotate(0deg); }
}
