/* ============================================================
   רעם הדרקון – מופע השקה "נשף המסכות"
   ============================================================ */

/* ---- FbReforma (פונט בתשלום של פונטביט) ---- */
@font-face {
  font-family: 'FbReforma';
  src: url('../assets/fonts/fbreforma-lightwebfont.woff') format('woff');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'FbReforma';
  src: url('../assets/fonts/fbreforma-regularwebfont.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'FbReforma';
  src: url('../assets/fonts/fbreforma-mediumwebfont.woff') format('woff');
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: 'FbReforma';
  src: url('../assets/fonts/fbreforma-boldwebfont.woff') format('woff');
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --bg-black: #070605;
  --bg-deep: #0b0908;
  --paper: #efe6d4;
  --paper-dim: #cfc8bb;
  --gold: #c9a45c;
  --steel: #4d7ba7;
  --steel-hover: #5d8db9;
  --tan: #c8b183;
  --tan-hover: #d8c193;
  --font-display: 'FbReforma', 'Suez One', serif;
  --font-body: 'FbReforma', 'Assistant', sans-serif;
}

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

/* clip ולא hidden – hidden שובר את אנימציות הגלילה (view-timeline) */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: var(--font-body);
  background: var(--bg-black);
  color: var(--paper);
  line-height: 1.6;
  /* בלי overflow-x כאן! זה הופך את body למיכל גלילה
     ושובר את אנימציות הגלילה (view-timeline) */
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* שבירת שורה שמופעלת רק במובייל */
.m-only { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 20;
  transition: background 0.3s;
}

/* רקע כהה לנאב ברגע שגוללים */
.site-header.scrolled {
  background: rgba(7, 6, 5, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 4vw, 56px);
}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #ded7c9;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: #fff; }

.social-list {
  display: flex;
  align-items: center;
  gap: 20px;
  direction: ltr; /* סדר האייקונים כמו בעיצוב */
}

.social-list svg {
  width: 21px;
  height: 21px;
  fill: var(--paper);
  transition: fill 0.2s, transform 0.2s;
}

.social-list a:hover svg,
.social-list a:focus-visible svg {
  fill: var(--gold);
  transform: translateY(-2px);
}

/* המבורגר – מוצג רק במובייל */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* תפריט מובייל – שכבת מסך מלא */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: -1; /* מתחת לנאב – כפתור הסגירה נשאר נגיש */
  background: rgba(5, 4, 4, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12vh;
}

.mobile-menu[hidden] { display: none; }

/* נעילת גלילה כשהתפריט פתוח – בלי לאבד את מיקום הגלילה */
html.menu-open body {
  position: fixed;
  inset-inline: 0;
  width: 100%;
  overflow: hidden;
}

html.menu-open .mobile-menu { touch-action: none; }

.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.mobile-social { gap: 30px; }

.mobile-social svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* ============ הירו ============ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* בלוק הטקסט בצד ימין */
  background: var(--bg-deep) url('../assets/hero-bg.webp') center bottom / cover no-repeat;
  z-index: 2; /* כדי שהקלפים יגלשו מעל הסקשן הבא */
}

.hero-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  width: auto; /* התמונה המלאה, ללא חיתוך */
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, 92%);
  padding: 130px clamp(24px, 4vw, 56px) 170px;
  /* ממורכז בתוך החצי הימני של המסך */
  margin-right: max(0px, calc((50vw - 620px) / 2));
  animation: hero-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(34px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 7.1vw, 102px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-align: right;
  white-space: nowrap;
  /* טקסטורת זהב על האותיות */
  background: url('../assets/gold-texture.webp') center / cover;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.65));
}

.hero-sub {
  font-size: clamp(1.7rem, 3.33vw, 48px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-align: right;
  color: #fff;
  margin-top: -10px;
}

.hero-quote {
  font-size: clamp(1.05rem, 2.22vw, 32px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-align: right;
  color: #fff;
  margin-top: -4px;
}

.event-box {
  margin-top: 34px;
  padding: 10px 30px;
  text-align: center;
  background: #59595933;
  backdrop-filter: blur(6px);
  border-radius: 5px;
}

.event-date {
  font-size: clamp(1.5rem, 2.77vw, 39.93px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.11em;
  text-align: center;
  color: #fff;
}

.event-venue {
  font-size: clamp(1rem, 1.74vw, 25.06px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--paper-dim);
  margin-top: 0;
}

.hero-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--steel);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--steel-hover);
  box-shadow: 0 6px 22px rgba(77, 123, 167, 0.35);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.hero-cards {
  position: absolute;
  z-index: 1;
  bottom: calc(clamp(240px, 22vw, 360px) * -0.25); /* הקלף התחתון גולש לסקשן הבא */
  left: 30%;
  --card-x: -50%;
  transform: translateX(var(--card-x, 0));
  width: clamp(240px, 22vw, 360px);
  aspect-ratio: 700 / 800;
}

.hero-cards .card {
  position: absolute;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}

.card-king {
  width: 64%;
  top: -18%;
  left: 2%;
  transform: rotate(340deg);
  animation: float-king 6s ease-in-out infinite;
}

.card-ace {
  width: 66%;
  bottom: -2%;
  right: 0;
  transform: rotate(29deg);
  z-index: 1;
  animation: float-ace 6s ease-in-out infinite;
}

/* ריחוף בכיוונים מנוגדים – כשהמלך עולה האס יורד */
/* המלך צולל עד הסקשן הבא, האס מטפס גבוה */
@keyframes float-king {
  0%, 100% { transform: translateY(-30px) rotate(340deg); }
  50%      { transform: translateY(140px) rotate(340deg); }
}

@keyframes float-ace {
  0%, 100% { transform: translateY(30px) rotate(29deg); }
  50%      { transform: translateY(-90px) rotate(29deg); }
}

/* גרסאות עדינות למובייל */
@keyframes float-king-m {
  0%, 100% { transform: translateY(-6px) rotate(340deg); }
  50%      { transform: translateY(18px) rotate(340deg); }
}

@keyframes float-ace-m {
  0%, 100% { transform: translateY(6px) rotate(29deg); }
  50%      { transform: translateY(-16px) rotate(29deg); }
}

/* ============ אודות ============ */

.about {
  position: relative;
  background: var(--bg-black) url('../assets/smoke-bg.webp') center / cover no-repeat;
  padding: clamp(80px, 10vw, 130px) clamp(24px, 6vw, 80px);
}

/* בסקשן האודות אין פייד-אין כללי – רק אנימציות הגלילה */
.about-text.reveal,
.about-album.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.about-inner {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: clamp(40px, 5vw, 70px);
  align-items: stretch; /* הטקסט נמתח לגובה האלבום */
  max-width: 1400px;
  margin-inline: auto;
  transform: translateX(5vw); /* פיצוי אופטי – הסטה ימינה */
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* הפסקאות מתפרסות על גובה האלבום */
  /* פיצוי על השוליים השקופים וההשתקפות שבתמונת האלבום */
  padding-top: 9%;
  padding-bottom: 28%;
}

/* כניסת שורות בהדרגה כשהסקשן נגלל לתצוגה */
.about-text p {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-text.visible p {
  opacity: 1;
  transform: none;
}

.about-text.visible p:nth-child(1)  { transition-delay: 0.05s; }
.about-text.visible p:nth-child(2)  { transition-delay: 0.17s; }
.about-text.visible p:nth-child(3)  { transition-delay: 0.29s; }
.about-text.visible p:nth-child(4)  { transition-delay: 0.41s; }
.about-text.visible p:nth-child(5)  { transition-delay: 0.53s; }
.about-text.visible p:nth-child(6)  { transition-delay: 0.65s; }
.about-text.visible p:nth-child(7)  { transition-delay: 0.77s; }
.about-text.visible p:nth-child(8)  { transition-delay: 0.89s; }
.about-text.visible p:nth-child(9)  { transition-delay: 1.01s; }
.about-text.visible p:nth-child(10) { transition-delay: 1.13s; }
.about-text.visible p:nth-child(11) { transition-delay: 1.25s; }

/* בדפדפנים תומכים – שורה אחרי שורה לפי התקדמות הגלילה בסקשן, קדימה ואחורה */
@supports (animation-timeline: view()) {
  .about { view-timeline: --about-tl block; }

  .about-text.reveal { opacity: 1; transform: none; transition: none; }

  .about-text p {
    transition: none;
    animation: line-in linear both;
    animation-timeline: --about-tl;
  }

  .about-text p:nth-child(1)  { animation-range: cover 4%  cover 16%; }
  .about-text p:nth-child(2)  { animation-range: cover 8%  cover 20%; }
  .about-text p:nth-child(3)  { animation-range: cover 12% cover 24%; }
  .about-text p:nth-child(4)  { animation-range: cover 16% cover 28%; }
  .about-text p:nth-child(5)  { animation-range: cover 20% cover 32%; }
  .about-text p:nth-child(6)  { animation-range: cover 24% cover 36%; }
  .about-text p:nth-child(7)  { animation-range: cover 28% cover 40%; }
  .about-text p:nth-child(8)  { animation-range: cover 32% cover 44%; }
  .about-text p:nth-child(9)  { animation-range: cover 36% cover 48%; }
  .about-text p:nth-child(10) { animation-range: cover 40% cover 52%; }
  .about-text p:nth-child(11) { animation-range: cover 44% cover 56%; }
}

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

.about-text p {
  margin-bottom: 0.5em;
  line-height: 1.2; /* רווח קטן בין שורות של אותו משפט */
  font-size: 1.3rem;
  color: #e9e2d4;
}

.about-text strong { color: #fff; }

.about-text .menu-list { line-height: 1.45; }

.about-album {
  position: relative;
  aspect-ratio: 1400 / 1200;
}

.about-album img {
  position: absolute;
  width: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
}

.album-cover {
  top: 0;
  left: 0;
  height: 100%;
  z-index: 2;
}

/* התקליט מוסתר מאחורי העטיפה, ויוצא/נכנס לפי הגלילה */
.album-vinyl {
  top: 4%;
  left: 56%;
  height: 92%;
  z-index: 1;
  transform: translateX(-60%);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

.about-album.visible .album-vinyl {
  transform: translateX(20%);
}

/* בדפדפנים שתומכים – האנימציה צמודה לגלילה עצמה, קדימה ואחורה */
@supports (animation-timeline: view()) {
  .album-vinyl {
    transition: none;
    animation: vinyl-out linear both;
    animation-timeline: view();
    animation-range: entry 15% cover 42%;
  }

  /* במובייל – רק כשהאלבום באמת נראה על המסך */
  @media (max-width: 920px) {
    .album-vinyl {
      animation-range: entry 35% cover 70%;
    }
  }
}

@keyframes vinyl-out {
  from { transform: translateX(-60%); }
  to   { transform: translateX(20%); }
}

@media (prefers-reduced-motion: reduce) {
  .album-vinyl { transform: translateX(0); transition: none; animation: none; }
}

/* ============ טופס קוד קופון ============ */

.coupon {
  background: #050404;
  padding: clamp(80px, 10vw, 130px) 24px 90px;
  scroll-margin-top: 40px;
}

.coupon-inner {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
}

.coupon h2 {
  font-family: var(--font-body);
  font-size: clamp(2.2rem, 5.5vw, 3.3rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.coupon-sub {
  margin-top: 14px;
  font-size: 1.35rem;
  color: var(--paper-dim);
}

#coupon-form {
  margin-top: 40px;
  display: grid;
  gap: 16px;
  text-align: start;
}

#coupon-form input,
#coupon-form textarea {
  width: 100%;
  padding: 13px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#coupon-form input::placeholder,
#coupon-form textarea::placeholder { color: #9a938a; }

#coupon-form input:focus,
#coupon-form textarea:focus {
  outline: none;
  border-color: var(--tan);
  box-shadow: 0 0 0 3px rgba(200, 177, 131, 0.18);
}

#coupon-form input[aria-invalid="true"],
#coupon-form textarea[aria-invalid="true"] {
  border-color: #c26d5a;
}

#coupon-form textarea { resize: vertical; min-height: 130px; }

/* שדה טלפון – מיושר לימין כמו שאר השדות */
#coupon-form input[type="tel"] {
  direction: rtl;
  text-align: right;
}

.btn-submit {
  justify-self: end; /* בצד שמאל, כמו בעיצוב */
  background: var(--tan);
  color: #2a2119;
  font-weight: 700;
  padding: 11px 46px;
}

.btn-submit:hover,
.btn-submit:focus-visible { background: var(--tan-hover); }

.btn-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  min-height: 1.4em;
  font-weight: 600;
  text-align: center;
}

.form-status.success { color: #a9d9a0; }
.form-status.error { color: #e2988a; }

/* ============ פוטר ============ */

.site-footer {
  position: relative;
  background: #050404;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 44px 20px 56px;
  text-align: center;
}

.footer-social { justify-content: center; }

.site-footer .copyright {
  margin-top: 26px;
  font-size: 0.98rem;
  color: var(--paper-dim);
}

/* קרדיט דיסקרטי בפינת הפוטר */
.site-credit {
  position: absolute;
  bottom: 12px;
  left: 18px;
  margin: 0;
  font-size: 0.75rem;
  color: #6e675e;
}

.site-credit a {
  color: #8b847a;
  transition: color 0.2s;
}

.site-credit a:hover,
.site-credit a:focus-visible {
  color: var(--tan-hover);
  text-decoration: underline;
}

/* ============ אנימציות גילוי בגלילה ============ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-content, .card-king, .card-ace { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .about-text p { opacity: 1; transform: none; transition: none; }
}

/* ============ רספונסיב ============ */

/* מסכים בינוניים – לפטופים קטנים */
@media (max-width: 1280px) and (min-width: 921px) {

  .hero-content {
    width: min(540px, 88%);
    padding: 110px clamp(20px, 3vw, 40px) 150px;
  }

  .hero-cards {
    left: 38%;
    width: clamp(220px, 23vw, 300px);
    bottom: calc(clamp(220px, 23vw, 300px) * -0.25);
  }

  .about-inner {
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(30px, 4vw, 50px);
    transform: translateX(2vw);
  }

  .about-text {
    padding-top: 6%;
    padding-bottom: 18%;
  }

  .about-text p { font-size: 1.15rem; }
}

@media (max-width: 920px) {

  /* פאדינג צידי אחיד לכל הסקשנים */
  :root {
    --side-pad: 50px;
    /* גובה המסכה – לפי גובה המסך, עם תקרה לפי רוחב במסכים צרים/שוכבים */
    --mask-h: min(80svh, 190vw);
    /* תחתית הפעמון נמצאת ב-49.5% מגובה תמונת המסכה.
       הכותרת מתחילה שם, כך שהפעמון תמיד מסתיר טיפה את "רעם" – בכל מכשיר */
    --bell-bottom: calc(var(--mask-h) * 0.495 - 27px);
  }

  .nav-links,
  .header-social { display: none; }

  .menu-toggle { display: flex; }

  /* בעברית flex-start = ימין, כמו בעיצוב */
  .site-nav { justify-content: flex-start; padding: 18px 20px; }

  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* התוכן מעוגן לפעמון, לא לתחתית המסך */
    background-position: center top;
    min-height: 100svh; /* לפחות גובה מסך – גדל אם התוכן ארוך במסכים נמוכים */
    height: auto;
    overflow-x: clip; /* חיתוך רק לרוחב – הקלפים גולשים לסקשן הבא */
    overflow-y: visible;
    padding-bottom: 100px; /* הטקסטים גבוהים יותר, מקום לקלפים */
  }

  .hero-mask {
    position: absolute;
    top: -27px;
    left: 0;
    z-index: 3; /* מעל הטקסטים */
    height: var(--mask-h); /* אותו משתנה שמעגן גם את הכותרת */
    width: auto;
    max-width: none;
    margin: 0;
    transform: translateX(-26%);
    min-height: 0;
    object-fit: unset;
  }

  .hero-content {
    position: relative;
    width: 100%;
    padding: 0 var(--side-pad) 40px;
    text-align: center;
    /* ראש הכותרת מתחיל מעט מעל תחתית הפעמון – חפיפה קלה ואחידה בכל מסך */
    margin-top: calc(var(--bell-bottom) - 14px);
  }

  /* רווח נשימה בין הכותרת ל"במופע השקה" */
  .hero-sub { margin-top: 10px; }

  .hero-cta { grid-template-columns: 1fr; }

  .hero-cards {
    position: absolute;
    inset: auto;
    bottom: -50px; /* מציצים בתחתית המסך */
    left: 50%;
    --card-x: -50%;
    transform: translateX(-50%);
    width: min(42%, 170px);
    margin: 0;
    padding-bottom: 0;
  }

  /* שני הקלפים באותו גובה, למטה, עם ריחוף עדין יותר */
  .card-king {
    top: auto;
    bottom: 0;
    animation-name: float-king-m;
  }

  .card-ace {
    animation-name: float-ace-m;
  }

  .about {
    padding-inline: var(--side-pad);
    padding-bottom: 0; /* בלי ריווח תחתון – האלבום נסגר על קצה הסקשן */
    background-position: right center; /* מציג את הצד הימני של רקע העשן */
  }

  .coupon { padding-inline: var(--side-pad); }

  .site-footer { padding-inline: var(--side-pad); }

  .about-inner { grid-template-columns: 1fr; gap: 20px; transform: none; }

  /* במובייל הטקסט לפני התמונה, בלי ריפוד עודף */
  .about-text {
    order: 1;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* האלבום ברוחב מסך מלא, צמוד לטקסטים */
  .about-album {
    order: 2;
    width: calc(100% + 2 * var(--side-pad));
    max-width: none;
    margin-inline: calc(-1 * var(--side-pad));
  }
}

@media (max-width: 920px) {
  .hero-title { white-space: normal; }
}

@media (max-width: 480px) {
  /* שתי שורות כמו בעיצוב */
  .m-only { display: block; }
  .hero-title { font-size: clamp(4.2rem, 22vw, 5.5rem); line-height: 0.66; }

  .hero-sub { font-size: 2.2rem; }
  .hero-quote { font-size: 1.3rem; }

  /* טקסטים גדולים יותר בתיבת התאריך */
  .event-date { font-size: 1.7rem; white-space: nowrap; }
  .event-venue { font-size: 1.2rem; }
  .event-box { padding: 16px 18px; }
}