/* FootCare Insoles — mobile-first, RTL, no build step. */

:root {
  /* One accent for actions; green is reserved for small brand highlights. */
  --accent: #243a7d;
  --accent-hover: #2d489b;
  --accent-press: #1b2c61;
  --green: #7ac453;
  --green-700: #2e7d1a; /* green that passes 4.5:1 as text on light surfaces */

  --ink: #1d1d1f;
  --text: #424245;
  --muted: #6e6e73;
  --bg: #f5f5f7;
  --surface: #fff;
  --fill: #e8e8ed;
  --dark: #0f1a3d;
  --hairline: rgb(0 0 0 / 0.1);
  --separator: #e0e0e5;
  --field-line: #86868b; /* 3:1 against white for input boundaries */

  /* Floating chrome (header, menu, dock) is a translucent material, not an opaque bar. */
  --material: rgb(255 255 255 / 0.72);
  --blur: saturate(180%) blur(20px);
  --shadow-float: 0 8px 32px rgb(0 0 0 / 0.14), 0 0 0 0.5px rgb(0 0 0 / 0.08);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --r-card: 24px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); /* room for the floating dock */
  font: 400 1.0625rem/1.47 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, video { display: block; max-width: 100%; height: auto; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Type: tracking tightens and leading closes up as size grows. */
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 9.5vw, 4.75rem); font-weight: 700; line-height: 1.07; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 12px; background: var(--ink); color: #fff;
}
.skip:focus { top: 0.5rem; }

svg[hidden] { display: none; } /* the hidden attribute alone does not hide SVG */
.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons: feedback lands on press, eases back on release ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.6rem 1.4rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
  transition: background-color 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-outline { border-color: var(--accent); color: var(--accent); }
.btn-fill { background: var(--fill); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0.3rem 1rem; font-size: 0.9rem; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-outline:hover { background: var(--accent); color: #fff; }
  .btn-fill:hover { background: #dedee3; }
}

/* ---------- Header: translucent, content scrolls underneath ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--hairline); }
/* The material sits on a pseudo-element so the menu sheet inside can blur the page too. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--material); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand img { height: 44px; width: auto; }
.menu-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-inline-start: auto;
  border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
  transition: background-color 0.35s;
}
.menu-toggle:active { background: var(--fill); transition-duration: 0s; }
.menu-toggle .icon { width: 24px; height: 24px; stroke-width: 1.75; }

/* Menu sheet: materialises out of the toggle's corner and leaves the same way, faster. */
.site-nav {
  position: absolute; inset-inline: 0.5rem; top: calc(100% + 0.5rem);
  display: flex; flex-direction: column; padding: 0.5rem; border-radius: 20px;
  background: var(--material); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-float);
  visibility: hidden; opacity: 0;
  transform: scale(0.94) translateY(-6px); transform-origin: top left; /* the toggle's corner in RTL */
  transition: opacity 0.2s, transform 0.2s ease-in, visibility 0s 0.2s;
}
.site-header[data-open] .site-nav {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity 0.25s, transform 0.4s var(--ease), visibility 0s;
}
.site-nav a {
  display: flex; align-items: center; min-height: 48px; padding-inline: 1rem; border-radius: 12px;
  font-weight: 600; color: var(--ink); text-decoration: none; transition: background-color 0.35s;
}
.site-nav a:active { background: rgb(0 0 0 / 0.08); transition-duration: 0s; }
.header-cta { display: none; }

@media (min-width: 860px) {
  :root { --header-h: 56px; }
  body { padding-bottom: 0; }
  .menu-toggle { display: none; }
  .site-nav {
    position: static; flex-direction: row; gap: 0.25rem; margin-inline: auto; padding: 0;
    background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .site-nav a { min-height: 36px; padding-inline: 0.85rem; border-radius: 999px; font-size: 0.9375rem; font-weight: 500; }
  .header-cta { display: inline-flex; }
}
@media (min-width: 860px) and (hover: hover) {
  .site-nav a:hover { background: rgb(0 0 0 / 0.05); }
}
/* Scroll edge effect: the hairline only appears once content is actually under the bar. */
@supports (animation-timeline: scroll()) {
  .site-header { animation: edge linear both; animation-timeline: scroll(root); animation-range: 0 64px; }
  @keyframes edge { from { border-bottom-color: transparent; } }
}

/* ---------- Hero ---------- */
.hero { background: var(--surface); text-align: center; }
.hero .container {
  display: flex; flex-direction: column; align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
}
.eyebrow { display: block; margin-bottom: 0.6rem; font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--green-700); }
.lead { max-width: 38rem; margin-top: 1.25rem; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.4; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero .actions { justify-content: center; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.75rem; margin-top: 2rem; }
.trust li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.trust .icon { color: var(--green-700); }
.hero-visual {
  display: flex; align-items: flex-end; justify-content: center; gap: 6%;
  width: min(100%, 46rem); aspect-ratio: 4 / 3; margin-top: clamp(2.5rem, 6vw, 4rem); padding: 7% 8%;
  border-radius: 28px; background: var(--bg);
}
.hero-visual img { min-width: 0; width: auto; filter: drop-shadow(0 18px 20px rgb(0 0 0 / 0.18)); }
.hero-visual .scanner { height: 100%; }
.hero-visual .kit { height: 66%; }
@media (min-width: 700px) { .hero-visual { aspect-ratio: 2 / 1; padding: 4.5% 8%; } }

/* ---------- Sections: hierarchy comes from surface contrast, not outlines ---------- */
.section { padding-block: clamp(4rem, 10vw, 7.5rem); }
.section.alt { background: var(--surface); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { margin-top: 0.9rem; font-size: 1.2rem; line-height: 1.4; color: var(--muted); }

.grid { display: grid; gap: 1.25rem; }
.card { padding: 1.75rem; background: var(--surface); border-radius: var(--r-card); }
.section.alt .card { background: var(--bg); }
.card p { margin-top: 0.6rem; }
.badge-icon { margin-bottom: 1.25rem; color: var(--green-700); }
.badge-icon .icon { display: block; width: 36px; height: 36px; stroke-width: 1.5; }

/* Phones: swipeable rows with native momentum and edge bounce instead of long stacks. */
@media (max-width: 699px) {
  .snap {
    grid-auto-flow: column; grid-auto-columns: 84%; gap: 0.75rem;
    margin-inline: -1rem; padding-inline: 1rem; padding-bottom: 0.5rem; scroll-padding-inline: 1rem;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  }
  .snap > * { scroll-snap-align: start; }
}
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Services ---------- */
.media-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.media-card video, .media-card img { width: 100%; object-fit: cover; background: var(--ink); }
.media-card video { aspect-ratio: 9 / 16; }
.media-card img { aspect-ratio: 16 / 9; }
.media-card .body { padding: 1.5rem 1.75rem 1.75rem; }
.services .grid + .grid { margin-top: 1.25rem; }

/* ---------- About ---------- */
.prose > p { max-width: 50rem; }
.prose p + p { margin-top: 1rem; }
.types { display: grid; gap: 1.25rem; margin-block: 2.25rem; counter-reset: type; }
.types li { padding: 1.5rem 1.75rem; background: var(--surface); border-radius: var(--r-card); counter-increment: type; }
.types li::before { content: "0" counter(type); display: block; margin-bottom: 0.5rem; font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.types strong { display: block; margin-bottom: 0.35rem; font-size: 1.2rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
@media (min-width: 700px) { .types { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Testimonials ---------- */
.quote { display: flex; flex-direction: column; gap: 1.5rem; margin: 0; }
.quote blockquote { margin: 0; font-size: 1.15rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.quote figcaption { margin-top: auto; font-weight: 600; color: var(--ink); }
.quote figcaption span { display: block; font-size: 0.9rem; font-weight: 400; color: var(--muted); }

/* ---------- Branches: one grouped list, each row is a single tap-to-call target ---------- */
.branches { display: grid; gap: 1px; overflow: hidden; border-radius: var(--r-card); background: var(--separator); }
.branches li { display: flex; }
.branches .home { grid-column: 1 / -1; }
.branches a {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 68px; padding: 0.75rem 1.25rem;
  background: var(--surface); text-decoration: none; transition: background-color 0.35s;
}
.branches a:active { background: var(--fill); transition-duration: 0s; }
.branches a:focus-visible { outline-offset: -3px; border-radius: 12px; }
.branches strong { display: block; font-weight: 600; color: var(--ink); }
.branches small { display: block; font-size: 0.875rem; color: var(--muted); }
.branches .num { font-weight: 500; white-space: nowrap; color: var(--accent); }
@media (hover: hover) { .branches a:hover { background: #fafafc; } }
@media (min-width: 700px) { .branches { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Contact ---------- */
.contact { color: #d5dbee; background: var(--dark); }
.contact .container { display: grid; gap: 2.5rem; }
.contact h2 { color: #fff; }
.contact .eyebrow { color: var(--green); }
.contact .lead { font-size: 1.15rem; line-height: 1.47; }
.contact-list { display: grid; gap: 0.25rem; margin-top: 1.5rem; }
.contact-list a, .contact-list span {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font-weight: 500; color: #fff; text-decoration: none;
}
.contact-list .icon { color: var(--green); stroke-width: 1.75; }
.contact a:focus-visible { outline-color: #fff; }

.form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 28px; background: var(--surface); color: var(--text); }
.form a:focus-visible { outline-color: var(--accent); }
.field { display: grid; gap: 0.4rem; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; min-height: 52px; padding: 0.6rem 1rem;
  border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.0625rem; /* 16px+ stops iOS zooming on focus */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input.ltr { text-align: right; }
.field input:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgb(36 58 125 / 0.2); }
.check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.check input { flex: none; width: 20px; height: 20px; margin: 0.15rem 0 0; accent-color: var(--accent); }
.send { margin: 0; padding: 0; border: 0; }
.send legend { padding: 0; margin-bottom: 0.6rem; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.send div { display: grid; gap: 0.6rem; }
.form-status { min-height: 1.5em; font-size: 0.95rem; font-weight: 500; color: var(--green-700); }
.form-status[data-error] { color: #b42318; }
@media (min-width: 480px) { .send div { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .contact .container { grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.25rem; font-size: 0.875rem; color: var(--muted); }
.site-footer .container { display: grid; gap: 1.25rem; }
.site-footer img { height: 48px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.site-footer small { font-size: inherit; }
@media (hover: hover) { .footer-nav a:hover { color: var(--ink); text-decoration: underline; } }
@media (min-width: 860px) { .site-footer .container { grid-template-columns: auto 1fr auto; align-items: center; gap: 2.5rem; } }

/* ---------- Dock: floating material toolbar on phones, a single WhatsApp pill on desktop ---------- */
.dock {
  position: fixed; z-index: 60; inset-inline: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: auto auto 1fr; gap: 0.25rem; padding: 0.375rem;
  border-radius: 999px;
  background: var(--material); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow-float);
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 48px; padding-inline: 0.9rem; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 600; white-space: nowrap; color: var(--accent); text-decoration: none;
  touch-action: manipulation; transition: background-color 0.35s, transform 0.3s var(--ease);
}
.dock a:active { background: rgb(0 0 0 / 0.08); transform: scale(0.97); transition-duration: 0s, 0.1s; }
.dock .details { background: var(--accent); color: #fff; }
.dock .details:active { background: var(--accent-press); }
@media (max-width: 359px) { .dock .icon { display: none; } }
@media (min-width: 860px) {
  .dock { inset-inline: 1.25rem auto; bottom: 1.25rem; display: block; padding: 0.25rem; }
  .dock a:not(.wa) { display: none; }
  .dock .wa { min-height: 44px; padding-inline: 1.1rem; }
}
@media (min-width: 860px) and (hover: hover) { .dock .wa:hover { background: rgb(0 0 0 / 0.05); } }

/* ---------- Motion and accessibility preferences ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @supports (animation-timeline: view()) {
    .section-head, .card, .types li {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
  }
}
/* Reduced motion keeps the fades and colour feedback, drops the movement. */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .dock a:active { transform: none; }
  .site-nav, .site-header[data-open] .site-nav { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --material: #fff; --blur: none; }
}
@media (prefers-contrast: more) {
  :root { --material: #fff; --blur: none; --hairline: #6e6e73; --separator: #6e6e73; --muted: #424245; }
  .card, .types li, .branches, .dock, .site-nav { outline: 1px solid var(--hairline); }
}
