@import url('https://fonts.googleapis.com/css2?family=Playpen+Sans+Hebrew:wght@100..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;600;700;800;900&display=swap');

/* ===== Base / Theme ===== */
:root{
  --brand: #35A8FF;   /* primary */
  --brand-dark: #1E90FF; /* slightly darker variant for footer */
  --accent: #FF8A00;  /* secondary */
  --ink: #111827;     /* text */
  --muted: #6B7280;   /* secondary text */
  --bg: #ffffff;
  --surface: #F5F7FB;
  --radius: 16px;
  --container: 1120px;
  --space: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --header: 72px;     /* sticky header height for scroll offset */
  /* Spacing rhythm */
  --section-gap: clamp(48px, 8vw, 88px);
  --section-gap-xl: clamp(72px, 10vw, 128px);
  /* Shadows */
  --shadow-card: 0 10px 24px rgba(0,0,0,.06);
  --shadow-card-hover: 0 14px 30px rgba(0,0,0,.12);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0; overflow-x: hidden; width:100%;}

/* Prevent media from overflowing on small screens */
img, svg, video{ max-width: 100%; height: auto; display: block; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

.container{max-width:var(--container);margin-inline:auto;padding-inline:var(--space)}

.container--wide {
  max-width: min(1280px, 94vw);
}

.site-header{
  position: sticky; top:0; z-index:30;
  background:#fff; border-bottom:1px solid #eee;
  padding-top: env(safe-area-inset-top);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding-block:10px; }
.logo{ display:flex; align-items:center; gap:8px; font-weight:900; }


/* Menu */
.menu{ display:flex; align-items:center; gap:18px; margin:0; padding:0; list-style:none; }
.nav__link{
  text-decoration:none; color: var(--ink);
  padding:8px 10px; border-radius: 10px;
  transition: background-color 0.25s ease;
}
.nav__link:hover{ background: rgba(0,0,0,.05); }

/* CTA in navbar */
.btn--brand{ background: var(--brand); color:#fff; }
.nav__cta{ padding:10px 16px; border-radius: 999px; }

.btn{
  display:inline-block; border:0; border-radius: var(--radius);
  padding: 12px 20px; font-weight: 700; text-decoration:none; cursor:pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--brand{ background: var(--brand); color:#fff; }
.btn--brand:hover { background: #1E90FF;}

.btn--light{ background: #ffffff; color:#111; }
.btn--light:hover {  background: #f0f0f0; }

/* Removed unused .btn--ghost */

.site-header .nav{
  max-width: none;    /* override container constraint */
  width: 100%;
  padding-inline: 16px;   /* or 24px if you want a bit more breathing room */
  display:flex; align-items:center; justify-content:space-between;
}
.logo{font-weight: 900}

/* Ensure consistent font for brand name, hero title and subtitle across OS */
.logo,
.hero__title,
.hero__subtitle{
  font-family: "Noto Sans Hebrew", "Playpen Sans Hebrew", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

/* Mobile nav toggle */
.nav__toggle{
  display: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
}
.nav__toggle:focus{ outline: 3px solid rgba(53,168,255,.25); }

@media (max-width: 880px){
  .nav__toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .menu{
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 6px);
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
    padding: 10px 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 25;
  }
  .menu.is-open{ display:flex; }
  .nav__cta{ align-self: stretch; text-align:center; }
}

/* ===== Footer ===== */
.site-footer{
  background: var(--brand-dark);
  color: #fff;
  padding-block: clamp(32px, 6vw, 56px);
}
.footer__row{ display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap: wrap; }
.footer__brand{ display:flex; align-items:center; gap:10px; font-weight: 900; }
.footer__links{ list-style:none; display:flex; gap: 18px; margin:0; padding:0; }
.site-footer a{ color:#fff; text-decoration:none; opacity:.92; }
.site-footer a:hover, .site-footer a:focus{ text-decoration: underline; opacity:1; }
.footer__copy{ margin-top: 14px; text-align:center; opacity:.9; }
.site-footer{ padding-bottom: calc(clamp(32px, 6vw, 56px) + env(safe-area-inset-bottom)); }

/* ===== Sections ===== */
#problem { scroll-margin-top: var(--header); }

.section{ padding-block: var(--section-gap); }
@media (max-width: 640px){ .section{ padding-block: var(--space-lg); } }

.section--after-hero {
  padding-top: var(--section-gap-xl);      /* larger gap after hero */
  padding-bottom: var(--section-gap);
  position: relative;
}

.section--after-hero::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(0,0,0,.08), transparent);
}

/* Compact gap specifically between Problem and About */
#problem + #about { padding-top: calc(var(--section-gap) * 0.2); }
.section__title {
    font-family: "Playpen Sans Hebrew", cursive, "Noto Sans Hebrew", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 64px);  /* bigger than before */
  margin-bottom: 14px; 
  text-align: right;  /* ensure RTL headings align right */
}

/* Regular paragraph text */
.section__text {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  font-size: 1.1rem;
   max-width: 85ch;        /* keep line length manageable */
  margin: 0;              /* remove auto-centering */
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.85;
  color: var(--muted);
  text-align: right;   
}

/* Removed unused .lead helper */

/* ===== HERO ===== */
.hero{
  position: relative;
  min-block-size: clamp(54vh, 64vh, 72vh);
  display: grid;
  place-items: center;
  overflow: clip;
}

/* Removed unused .hero__video / .hero__image helpers */

/* Hero background element holds the image */
.hero__bg{
  position: absolute; inset: 0;
  background-image: url("assets/media/hero.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% var(--bgY, 15%); /* start at Y=15% */
  will-change: background-position;
}


.hero__scrim{
  position:absolute; inset:0;
 background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  max-width: 800px;
  margin-inline: auto;
}

.hero__title{
  margin: 0 0 8px;
  font-size: clamp(44px, 7.4vw, 128px);
  font-weight: 900;
  letter-spacing: 0.1px;
  line-height: 1.05;
  text-shadow: 0 8px 24px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.35);
  /* Force single-line title on all screens */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.hero__title::after{
  content: "";
  display: block;
  width: 130px;
  height: 6px;
  /* Increase space to emphasize the title as the primary element */
  margin: 26px auto 0;
  background: linear-gradient(90deg, var(--brand) 0%, #7cc7ff 100%);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(53,168,255,.45);
}

.hero__subtitle{
  margin: 2px 0;
  font-size: clamp(18px, 2.4vw, 24px);
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0,0,0,.65);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
}

.hero__cta {
  margin-top: 80px;          /* more space above the buttons */
  display: flex;
  gap: 46px;                 /* more space between buttons */
  flex-wrap: wrap;
  justify-content: center;
}

.hero__cta .btn {
  font-size: 1.1rem;    /* make hero CTAs slightly more prominent */
  padding: 16px 32px;   /* larger tap target */
}

.hero__scroll{
  margin-top: 60px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  animation: bounce 2s infinite;
}

/* Smooth anchor scroll offset (for sticky header) */
.hero, .section{ scroll-margin-top: var(--header); }

/* ===== Responsive tweaks ===== */
@media (max-width: 720px){
  /* mobile-specific tweaks live here as needed */
}

/* ===== Accessibility / Motion ===== */
@media (prefers-reduced-motion: reduce){
  /* motion-reduction handled per-component (e.g., heartbeat) */
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(6px); }
  60% { transform: translateY(3px); }
}

/* --- Success Swiper reset (namespaced) --- */
.success-swiper { 
  direction: rtl;          /* slider math in LTR to avoid RTL bugs */
  overflow: hidden;
  margin-top: 120px;
}
.success-swiper .swiper-wrapper { 
  transition-timing-function: cubic-bezier(.22,.61,.36,1);
}
.success-swiper .swiper-slide {
  width: 100% !important;  /* exactly one slide visible */
  display: flex;
  justify-content: center;
}

/* Card content stays RTL */
.story-card{
  direction: rtl; text-align: right;
  width: min(900px, 92vw);
  background:#fff;
  border-radius:16px;
  border-top:4px solid var(--brand);
  box-shadow: var(--shadow-card);
  padding:24px 24px 28px;
}
.story__title{ color:var(--brand); margin:0 0 4px; font-weight:700; font-size:1.3rem; }
.story__subtitle{ color:var(--muted); margin:0 0 16px; font-size:1rem; }
.story__text{ color:var(--ink); line-height:1.8; font-size:1.05rem; }

/* Controls & dots with blue accent */
.success-swiper .swiper-button-next,
.success-swiper .swiper-button-prev { color: var(--brand); }
.success-swiper .swiper-pagination-bullet { background:#cfd6df; opacity:1; }
.success-swiper .swiper-pagination-bullet-active { background: var(--brand); }
/* Make pagination respect RTL layout */
.success-swiper .swiper-pagination{ direction: rtl; }
@media (max-width: 740px){
  .success-swiper .swiper-button-next,
  .success-swiper .swiper-button-prev{ display:none; }
}

/* ===== About ===== */
.about { background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%); }
.about .section__text { margin-bottom: 8px; }

.features{
  /* Extra space between subtitle and cards */
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* Larger gap between cards */
  gap: 22px;
}
@media (max-width: 980px){ .features{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .features{ grid-template-columns: 1fr; } }

.feature-card{
  direction: rtl; text-align: right;
  padding: 20px 18px;
  border-radius: 16px;
  color: #0a1726;
  background: #fff;
  box-shadow: var(--shadow-card);
  will-change: transform;
  transform: none;
  transition: transform .22s cubic-bezier(.22,.61,.36,1), box-shadow .22s ease;
}
.feature-card:hover{ box-shadow: var(--shadow-card-hover); }
.feature__title{ margin:0 0 6px; font-weight:800; font-size:1.15rem; }
.feature__text{ margin:0; color:#17324d; line-height:1.7; }

/* Colorful accents per card */
.feature-card--1{ background: linear-gradient(135deg, #E0F2FF 0%, #C3E7FF 100%); }
.feature-card--2{ background: linear-gradient(135deg, #E6FFFA 0%, #CFF9EF 100%); }
.feature-card--3{ background: linear-gradient(135deg, #FFF3E0 0%, #FFE1B7 100%); }
.feature-card--4{ background: linear-gradient(135deg, #F3E8FF 0%, #E3D4FF 100%); }

.about__cta{ display:flex; justify-content:center; /* Extra gap between cards and CTA */ margin-top: 44px; }
.btn--xl{ padding: 20px 40px; font-size: 1.2rem; border-radius: 999px; }

/* More engaging About CTA button */
.about__cta .btn--brand{
  background: linear-gradient(135deg, #35A8FF 0%, #1E90FF 100%);
  box-shadow: 0 10px 24px rgba(30,144,255,.35), inset 0 0 0 1px rgba(255,255,255,.35);
  position: relative;
  animation: breath 2.8s ease-in-out infinite;
}
.about__cta .btn--brand::after{
  /* subtle shine sweep */
  content:""; position:absolute; inset:0; border-radius:inherit;
  background: linear-gradient(120deg, rgba(255,255,255,.0) 0%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.0) 100%);
  transform: translateX(-120%);
  animation: shine 3.8s ease-in-out infinite;
  pointer-events:none;
}
.about__cta .btn--brand:hover{ filter: brightness(1.04); }

@keyframes breath{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.035); } }
@keyframes shine{ 0%{ transform: translateX(-120%); } 100%{ transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce){
  .feature-card{ transition: none; }
  .feature-card:hover{ transform:none; box-shadow: 0 8px 20px rgba(0,0,0,.06); }
}

/* ===== Contact ===== */
.contact { background: var(--surface); }
.contact { margin-top: var(--section-gap-xl); }
.contact .section__text { margin-bottom: 20px; }

.contact__form{
  direction: rtl; text-align: right;
  width: min(920px, 94vw);
  margin-inline: auto;
  background:#fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px clamp(18px, 3vw, 28px) 26px;
  transition: box-shadow .3s ease, outline-color .3s ease;
  position: relative; overflow: hidden;
}

.form__row{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 720px){ .form__row{ grid-template-columns: 1fr; } }

.field{ display:flex; flex-direction: column; gap: 6px; }
.field label{ font-weight: 700; font-size: .95rem; color: var(--ink); }

.field--full { grid-column: 1 / -1; }
/* full-width helper (no animation here to keep layout stable) */

.field input,
.field textarea{
  width: 100%;
  border: 1.5px solid #E5E7EB;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus{
  outline: 3px solid rgba(53,168,255,.18);
  border-color: var(--brand);
}

.form__actions{ display:flex; align-items:center; gap: 16px; margin-top: 22px; justify-content: flex-end; }
.form__actions.submitted{ justify-content: flex-start; }
.form__status{ color: #059669; font-weight: 700; }
.form__note{ color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* Bigger, pulsing CTA in contact */
.contact .btn--brand{
  padding: 18px 36px;
  font-size: 1.15rem;
  border-radius: 999px;
  animation: heartbeat 1.8s ease-in-out infinite;
  will-change: transform;
}
.contact .btn--brand:hover{ transform: none; }

/* Success submission animations */
.form__actions .btn{ transition: transform .28s ease, opacity .28s ease, filter .28s ease; }
.form__actions .btn.is-hidden{ opacity: 0; transform: scale(.9); pointer-events: none; filter: blur(0.3px); }

.form__status{ opacity: 0; transform: translateX(10px); transition: opacity .35s ease, transform .35s ease; position: relative; }
.form__status::before{
  content: '✓';
  display: inline-flex; align-items:center; justify-content:center;
  width: 22px; height: 22px; margin-inline-start: 8px;
  background: #10B981; color:#fff; border-radius: 50%; font-weight:900; font-size: 14px;
  box-shadow: 0 4px 10px rgba(16,185,129,.35);
  opacity: 0; transform: scale(.6);
  transition: opacity .35s ease .1s, transform .35s ease .1s;
}
.form__actions.submitted .form__status{ opacity: 1; transform: translateX(0); }
.form__actions.submitted .form__status::before{ opacity: 1; transform: scale(1); }

.contact__form.submitted{ box-shadow: var(--shadow-card); }
.contact__form.submitted > *:not(.form__success){ opacity: 0; filter: blur(.4px); pointer-events: none; transition: opacity .35s ease, filter .35s ease; }

/* Centered success overlay */
.form__success{
  position: absolute; inset: 0; display:flex; flex-direction: column; align-items:center; justify-content:center; gap: 12px; text-align: center;
  opacity: 0; transform: scale(.98); transition: opacity .35s ease, transform .35s ease; pointer-events: none; z-index: 1;
}
.form__success-icon{
  width: 92px; height: 92px; border-radius: 50%;
  background: #10B981; color:#fff; display:grid; place-items:center; font-size: 44px; font-weight: 900;
  box-shadow: 0 10px 24px rgba(16,185,129,.35);
}
.form__success-text{ color: #065F46; font-weight: 800; font-size: clamp(18px, 2.2vw, 24px); }
.contact__form.submitted .form__success{ opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce){
  .form__row,
  .field--full,
  .form__status,
  .form__status::before,
  .form__actions .btn{ transition: none; }
}

@keyframes heartbeat{
  0%   { transform: scale(1); }
  10%  { transform: scale(1.08); }
  20%  { transform: scale(0.98); }
  30%  { transform: scale(1.06); }
  40%  { transform: scale(1); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce){
  .contact .btn--brand{ animation: none; }
}
