/* ============================================
   מוסך משה — Design System
   Dark Premium Automotive
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-bg: #0d1117;
  --color-bg-elevated: #161b22;
  --color-bg-card: #1c2128;
  --color-surface: #21262d;
  --color-gold: #c4a265;
  --color-gold-light: #d4b87a;
  --color-copper: #b87333;
  --color-cream: #faf6f0;
  --color-text: #e6e1d9;
  --color-text-muted: #8b8579;
  --color-slate: #4a4a5a;
  --color-border: rgba(196, 162, 101, 0.15);
  --color-overlay: rgba(13, 17, 23, 0.7);

  --font-display: 'Frank Ruhl Libre', serif;
  --font-body: 'Heebo', sans-serif;

  --section-padding: clamp(4rem, 8vw, 8rem);
  --container-max: 1200px;
  --radius: 2px;

  --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-medium: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-light);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-cream);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: clamp(1.5rem, 4vw, 3rem);
}

/* --- Section Number (Diversity Seed) --- */
.section-number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  color: rgba(196, 162, 101, 0.08);
  line-height: 1;
  margin-bottom: -1.5rem;
  display: block;
  user-select: none;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.75rem;
  position: relative;
}

.section-label::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 2rem;
  height: 1px;
  background: var(--color-gold);
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background var(--transition-medium), padding var(--transition-medium), box-shadow var(--transition-medium);
}

.site-header.scrolled {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--color-gold);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.header-cta:hover {
  background: var(--color-gold-light);
  color: var(--color-bg);
  transform: translateY(-1px);
}

.header-cta.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
}

.header-cta.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('_uploads/ai_a7bf74519820daaa.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 17, 23, 0.6) 0%,
    rgba(13, 17, 23, 0.75) 50%,
    rgba(13, 17, 23, 0.95) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  border: 1px solid rgba(196, 162, 101, 0.3);
  padding: 0.5rem 1.5rem;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .gold {
  color: var(--color-gold);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
}

/* Hero inline form */
.hero-form {
  display: flex;
  gap: 0.75rem;
  max-width: 560px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-form input {
  flex: 1;
  min-width: 160px;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(196, 162, 101, 0.2);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
  direction: rtl;
}

.hero-form input::placeholder {
  color: var(--color-text-muted);
}

.hero-form input:focus {
  border-color: var(--color-gold);
}

.hero-form button {
  padding: 0.85rem 2rem;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  white-space: nowrap;
}

.hero-form button:hover {
  background: var(--color-gold-light);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Sections (generic) --- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.section-divider {
  width: 3rem;
  height: 1px;
  background: var(--color-gold);
  margin-top: 1rem;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 2.5rem 2rem;
  position: relative;
  transition: border-color var(--transition-medium), transform var(--transition-medium);
}

.service-card:hover {
  border-color: rgba(196, 162, 101, 0.35);
  transform: translateY(-4px);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-gold);
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Gallery --- */
.gallery-parallax {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gallery-parallax-bg {
  position: absolute;
  inset: 0;
  background-image: url('_uploads/ai_0644566d1206166a.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.gallery-parallax-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.8);
  z-index: 1;
}

.gallery-parallax-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.gallery-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- About / Team --- */
.team-section {
  background: var(--color-bg-elevated);
}

.team-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.team-text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.team-text p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}

.team-features {
  list-style: none;
  margin-top: 1.5rem;
}

.team-features li {
  padding: 0.6rem 0;
  color: var(--color-text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-features li::before {
  content: '—';
  color: var(--color-gold);
  font-weight: 700;
}

.team-visual {
  position: relative;
}

.team-visual-box {
  aspect-ratio: 4/5;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.team-visual-box .generation-text {
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 10rem);
  font-weight: 700;
  color: rgba(196, 162, 101, 0.06);
  position: absolute;
  line-height: 1;
}

.team-visual-box .generation-label {
  position: relative;
  z-index: 1;
  text-align: center;
}

.team-visual-box .generation-label span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.team-visual-box .generation-label p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* --- Appointment / CTA Banner --- */
.appointment-section {
  background: linear-gradient(135deg, var(--color-bg-elevated), var(--color-bg-card));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.appointment-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.appointment-text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.appointment-text p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.appointment-steps {
  list-style: none;
  counter-reset: steps;
}

.appointment-steps li {
  counter-increment: steps;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.appointment-steps li::before {
  content: counter(steps, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
  min-width: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2.5rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-gold-light);
  color: var(--color-bg);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--color-gold);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2.5rem;
  border: 1px solid var(--color-gold);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--color-gold);
  color: var(--color-bg);
}

/* --- Contact / Footer Form --- */
.contact-section {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-details {
  list-style: none;
}

.contact-details li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.contact-details li .detail-icon {
  color: var(--color-gold);
  width: 20px;
  text-align: center;
}

.contact-form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
  direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-gold);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--color-gold);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-top: 0.5rem;
}

.form-submit:hover {
  background: var(--color-gold-light);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  margin-top: 1rem;
  padding: 1rem;
  font-size: 0.9rem;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.form-message.error {
  display: block;
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #ef5350;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-cream);
}

.footer-logo span {
  color: var(--color-gold);
}

.footer-bottom {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer-signature {
  font-size: 0.75rem;
  text-align: center;
  color: var(--color-text-muted);
  opacity: 0.6;
  margin-top: 1.5rem;
}

.footer-signature a {
  color: inherit;
  border-bottom: 1px dotted currentColor;
  transition: opacity var(--transition-fast);
}

.footer-signature a:hover {
  opacity: 1;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-bg,
  .gallery-parallax-bg {
    background-attachment: scroll;
  }

  .team-content,
  .appointment-content,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-form {
    flex-direction: column;
    padding: 0 1rem;
  }

  .hero-form input,
  .hero-form button {
    min-width: 100%;
  }

  .gallery-stats {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section-number {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .header-cta span.cta-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .gallery-stats {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 0.4rem 1rem;
  }
}
