/* Rubinny Barber — public site base styles.
   All colors/fonts come from theme variables (--c-*, --font-*), injected per business.
   RTL-first: logical properties only (inline-start = right in Hebrew). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.a11y-text-lg { font-size: 118.75%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: calc(1.0625rem * var(--font-scale, 1));
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--c-link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--c-primary); color: var(--c-on-primary); }

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.wrap.narrow { width: min(44rem, 100% - 2rem); }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--c-primary); color: var(--c-on-primary); padding: .75rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }
.preview-bar { background: var(--c-accent); color: #fff; text-align: center; padding: .4rem; font-size: .9rem; }
.demo-bar { background: #fff4d6; color: #3d2a00; border-bottom: 1px solid #e8cf8a; font-size: .875rem; }
.demo-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-block: .45rem; }
.demo-bar p { margin: 0; }
.demo-bar-links { display: flex; gap: 1rem; }
.demo-bar a { color: #3d2a00; font-weight: 700; text-decoration: underline; }
.demo-bar a:focus-visible { outline: 3px solid #3d2a00; outline-offset: 2px; }
@media (max-width: 600px) { .demo-bar-inner { justify-content: center; text-align: center; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.35rem; border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: var(--c-primary-hover); }
.btn-ghost { background: transparent; color: var(--c-text); border-color: currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, var(--c-text) 8%, transparent); }
.btn-large { min-height: 52px; padding-inline: 1.75rem; font-size: 1.0625rem; }
.btn-small { min-height: 36px; padding: .4rem .9rem; font-size: .9375rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--c-link); text-decoration: underline; cursor: pointer; text-underline-offset: .18em; }

/* Header */
.site-header { border-bottom: 1px solid var(--c-border); background: var(--c-bg); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand svg, .brand .logo-img { height: 52px; width: auto; display: block; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--c-text); text-decoration: none; font-weight: 500; padding-block: .5rem; }
.site-nav a:hover { text-decoration: underline; }
.header-cta { flex-shrink: 0; }
.nav-toggle { display: none; }
body.is-app .header-cta { margin-inline-start: auto; }

@media (max-width: 860px) {
  .header-inner { gap: .75rem; min-height: 64px; }
  .brand svg, .brand .logo-img { height: 42px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .4rem; margin-inline-start: auto; min-height: 44px; min-width: 44px;
    background: none; border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); font: inherit; padding: .35rem .7rem; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .site-nav { position: absolute; inset-inline: 0; top: 100%; background: var(--c-bg); border-bottom: 1px solid var(--c-border); display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 1rem 1rem; }
  .site-nav a { display: block; padding: .75rem 0; border-bottom: 1px solid var(--c-border); }
  .header-cta { padding-inline: .9rem; }
}
@media (max-width: 420px) { .nav-toggle-label { display: none; } }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero-inner { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-split .hero-inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.hero-full { background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.hero-full .hero-inner { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.hero-center .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero-center .hero-actions { justify-content: center; }
.hero-sub { font-size: 1.25rem; color: var(--c-muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
@media (max-width: 860px) { .hero-split .hero-inner, .hero-full .hero-inner { grid-template-columns: 1fr; } }

/* "Next free slots" — the one signature element: a queue ticket with real times */
.next-slots {
  position: relative; background: var(--c-surface); border: 2px solid var(--c-text); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem; max-width: 26rem; width: 100%;
}
.next-slots::before, .next-slots::after {
  /* ticket notches */
  content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  background: var(--c-bg); border: 2px solid var(--c-text); transform: translateY(-50%);
}
.hero-full .next-slots::before, .hero-full .next-slots::after { background: var(--c-surface); }
.next-slots::before { inset-inline-start: -13px; clip-path: inset(0 0 0 50%); }
.next-slots::after { inset-inline-end: -13px; clip-path: inset(0 50% 0 0); }
[dir="rtl"] .next-slots::before { clip-path: inset(0 50% 0 0); }
[dir="rtl"] .next-slots::after { clip-path: inset(0 0 0 50%); }
.next-slots h2 { font-size: 1.375rem; margin-bottom: .15rem; }
.next-slots-service { color: var(--c-muted); font-size: .9375rem; margin-bottom: 1rem; }
.slot-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; border-top: 2px dashed var(--c-border); padding-top: 1rem; }
.slot-list a {
  display: block; text-align: center; padding: .55rem .25rem; border-radius: calc(var(--radius) * .6);
  background: var(--c-bg); color: var(--c-text); text-decoration: none; border: 1px solid var(--c-border);
  font-variant-numeric: tabular-nums;
}
.slot-list a:hover { border-color: var(--c-primary); background: var(--c-primary); color: var(--c-on-primary); }
.slot-list .slot-day { display: block; font-size: .75rem; color: inherit; opacity: .85; }
.slot-list .slot-time { font-weight: 700; font-size: 1.125rem; }
.slot-empty { grid-column: 1 / -1; color: var(--c-muted); }
.next-slots-more { font-weight: 700; }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--c-border); }
.section-cta { margin-top: 2rem; }

/* Services: price board with dot leaders */
.price-group { margin-top: 2rem; }
.price-group h3 { color: var(--c-muted); font-size: 1.0625rem; font-family: var(--font-body); font-weight: 700; border-bottom: 1px solid var(--c-border); padding-bottom: .4rem; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-item { padding-block: .9rem; }
.price-line { display: flex; align-items: baseline; gap: .75rem; }
.price-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; }
.price-leader { flex: 1; border-bottom: 2px dotted var(--c-muted); transform: translateY(-.3em); min-width: 1.5rem; opacity: .7; }
.price-value { font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-meta { color: var(--c-muted); margin: .2rem 0 0; font-size: .9375rem; max-width: 60ch; }
.services-grid .price-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2.5rem; }
.services-list .price-leader { visibility: hidden; }
.services-list .price-item { border-bottom: 1px solid var(--c-border); }
.services-menu .wrap { max-width: 50rem; }

/* Team */
.team-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2.5rem 2rem; }
.team-photo, .team-initial { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; display: grid; place-items: center; margin-bottom: 1rem; }
.team-initial { background: var(--member, var(--c-primary)); color: #fff; font-family: var(--font-heading); font-size: 3.5rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.team-member h3 { margin-bottom: .1rem; }
.team-title { color: var(--c-muted); margin-bottom: .5rem; }
.team-bio { font-size: .9375rem; }
.team-book { font-weight: 700; }

/* Gallery */
.gallery-list { list-style: none; padding: 0; margin: 2rem 0 0; }
.gallery-grid .gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius); }
.gallery-masonry .gallery-list { columns: 3 16rem; column-gap: .75rem; }
.gallery-masonry li { break-inside: avoid; margin-bottom: .75rem; }
.gallery-masonry img { width: 100%; border-radius: var(--radius); display: block; }
.gallery-carousel .gallery-list { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem; }
.gallery-carousel li { flex: 0 0 min(80%, 22rem); scroll-snap-align: start; }
.gallery-carousel img { aspect-ratio: 4/5; object-fit: cover; width: 100%; border-radius: var(--radius); }

/* About */
.about p { font-size: 1.125rem; max-width: 62ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.hours { border-collapse: collapse; width: 100%; max-width: 26rem; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: start; padding: .55rem 0; border-bottom: 1px solid var(--c-border); }
.hours th { font-weight: 500; width: 40%; }
.closures { margin-top: 1.5rem; }
.contact-address { font-size: 1.25rem; font-family: var(--font-heading); }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.social { list-style: none; padding: 0; display: flex; gap: 1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--c-border); background: var(--c-surface); padding-block: 2.5rem 5rem; color: var(--c-text); }
.footer-inner { display: grid; gap: 1.5rem; }
.footer-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.footer-biz p { margin: 0 0 .2rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a, .footer-links .linklike { color: var(--c-text); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; border-top: 1px solid var(--c-border); padding-top: 1.25rem; color: var(--c-muted); font-size: .875rem; }
.footer-copy { margin: 0; }
.site-credit { color: var(--c-muted); }
@media (max-width: 600px) { .footer-bottom { flex-direction: column; justify-content: center; text-align: center; } }

/* Legal */
.legal { padding-block: 3rem 4rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal-meta { color: var(--c-muted); }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9375rem; }
.legal-table th, .legal-table td { border: 1px solid var(--c-border); padding: .6rem; text-align: start; vertical-align: top; }
.legal-table thead th { background: var(--c-surface); }
@media (max-width: 600px) { .legal-table { display: block; overflow-x: auto; } }

/* Apps */
.app-root { min-height: 60vh; }
.app-loading { padding: 3rem 0; color: var(--c-muted); display: flex; gap: .75rem; align-items: center; }
.spinner { width: 1.25rem; height: 1.25rem; border: 3px solid var(--c-border); border-top-color: var(--c-primary); border-radius: 50%; animation: rb-spin .8s linear infinite; }
@keyframes rb-spin { to { transform: rotate(360deg); } }
.noscript-msg { padding: 3rem 0; }

/* Accessibility widget */
.a11y-toggle {
  position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 60; width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-text); color: var(--c-bg); border: 2px solid var(--c-bg); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.a11y-panel {
  position: fixed; inset-inline-start: 1rem; bottom: 4.5rem; z-index: 61; width: min(20rem, 100% - 2rem);
  background: var(--c-surface); color: var(--c-text); border: 2px solid var(--c-text); border-radius: var(--radius); padding: 1rem;
}
.a11y-panel h2 { font-size: 1.125rem; }
.a11y-options { display: grid; gap: .5rem; }
.a11y-options button {
  text-align: start; min-height: 44px; padding: .5rem .75rem; border-radius: calc(var(--radius) * .6);
  border: 1px solid var(--c-border); background: var(--c-bg); color: var(--c-text); font: inherit; cursor: pointer;
}
.a11y-options button[aria-pressed="true"] { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }
.a11y-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }

html.a11y-contrast body { background: #000 !important; color: #fff !important; }
html.a11y-contrast *:not(svg *):not(img) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast .linklike { color: #ffeb3b !important; }
html.a11y-contrast .btn-primary { background: #ffeb3b !important; color: #000 !important; }
html.a11y-links a { text-decoration: underline !important; text-decoration-thickness: 2px !important; outline: 1px dashed currentColor; outline-offset: 2px; }
html.a11y-readable body, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable button, html.a11y-readable input {
  font-family: Arial, "Arial Hebrew", sans-serif !important; letter-spacing: .02em; word-spacing: .08em;
}
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* Cookie consent: reject is as prominent as accept */
.consent {
  position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 70; max-width: 40rem; margin-inline: auto;
  background: var(--c-surface); color: var(--c-text); border: 2px solid var(--c-text); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.consent-inner { padding: 1.25rem; }
.consent h2 { font-size: 1.25rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.consent-prefs fieldset { border: 1px solid var(--c-border); border-radius: calc(var(--radius) * .6); padding: .75rem; display: grid; gap: .5rem; }
.consent-prefs label { display: flex; gap: .5rem; align-items: center; min-height: 32px; }
.consent-prefs input { width: 1.25rem; height: 1.25rem; accent-color: var(--c-primary); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .a11y-toggle, .a11y-panel, .consent, .next-slots { display: none !important; }
}
