/* ==========================================================================
   Aviram Papo: technology for small businesses. main.css

   Subject: a small-business owner's day, lived through the phone (WhatsApp, Google
   listing, calls). The page's one bold moment is a WhatsApp thread at 23:47 that answers
   itself.

   Palette:
     paper   #F4F4F0  page background (cool off-white, not cream)
     ink     #121619  text, dark sections
     online  #0E7556  the "online / it works" green: buttons, links, accents on light
     glow    #8BE3BF  the same green on dark backgrounds
     stone   #E3E5DF  secondary sections
     slate   #4A545E  secondary text
   Type: Secular One (geometric, confident Hebrew display) + Assistant (text).
   Layout: right-aligned (RTL start), big type, generous space, lists instead of card grids.

   CONTRAST (WCAG AA): ink/paper 17:1, slate/paper 7.4:1, white/online 5.7:1,
   online/paper 5.2:1 (never use online text on stone: 4.47), glow/ink 12:1, paper/ink 17:1.
   ========================================================================== */

:root {
  --paper: #F4F4F0;
  --ink: #121619;
  --ink-line: #2C343B;
  --online: #0E7556;
  --online-deep: #0A5A42;
  --glow: #8BE3BF;
  --stone: #E3E5DF;
  --white: #FFFFFF;
  --slate: #4A545E;
  --fog: #B6BEC4;
  --line: #CDD1CA;
  --bubble-out: #D6F1E3;
  --focus: var(--online);

  --font-display: "Secular One", "Arial", sans-serif;
  --font-text: "Assistant", "Arial", sans-serif;

  --step--1: clamp(0.9rem, 0.87rem + 0.1vw, 0.95rem);
  --step-0: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-1: clamp(1.25rem, 1.12rem + 0.5vw, 1.6rem);
  --step-2: clamp(1.55rem, 1.3rem + 1vw, 2.25rem);
  --step-3: clamp(2.3rem, 1.6rem + 3vw, 4.4rem);
  --step-4: clamp(2.6rem, 1.4rem + 5vw, 5.8rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --header-h: 4rem;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
a { color: var(--online); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
.container { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: absolute; top: -10rem; inset-inline-start: 1rem; z-index: 100;
  padding: 0.75rem 1.25rem; background: var(--ink); color: var(--paper);
  border-radius: 6px; text-decoration: none; font-weight: 700; --focus: var(--glow);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.5rem;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 var(--step-0) / 1.2 var(--font-text);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary { background: var(--online); color: var(--white); }
.btn--primary:hover { background: var(--online-deep); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { background: var(--glow); color: var(--ink); }
.btn--light:hover { background: var(--white); color: var(--ink); }
.btn--small { min-height: 2.5rem; padding: 0.45rem 1.1rem; font-size: var(--step--1); }
.btn--big { min-height: 3.75rem; padding: 0.9rem 2rem; font-size: var(--step-1); }
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 244, 240, 0.92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(8px); } }
.site-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; min-height: var(--header-h); }
.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1;
  color: var(--ink); text-decoration: none;
}
/* The "online" dot: the business is always reachable. */
.wordmark__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 4px rgba(14, 117, 86, 0.18); }
.site-nav { margin-inline-start: auto; }
.site-nav__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav__list a:not(.btn) { color: var(--ink); text-decoration: none; padding-block: 0.5rem; font-weight: 600; }
.site-nav__list a:not(.btn):hover { text-decoration: underline; }

.nav-toggle, .motion-toggle {
  display: none; align-items: center; gap: 0.45rem; min-height: 2.5rem; padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 var(--step--1) / 1.2 var(--font-text); cursor: pointer;
}
.nav-toggle__icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.motion-toggle__icon { width: 1rem; height: 1rem; fill: currentColor; }
.js .motion-toggle { display: inline-flex; }
.motion-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.motion-toggle[aria-disabled="true"] { cursor: not-allowed; }

@media (max-width: 959.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav__list {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem; background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .js .site-nav__list.is-open { display: flex; }
  .js .site-nav__list a:not(.btn) { display: block; padding-block: 0.85rem; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
  .js .site-nav__cta { padding-top: 1rem; }
  .js .site-nav__cta .btn { width: 100%; min-height: 3rem; font-size: var(--step-0); }
}
@media (max-width: 419.98px) {
  .motion-toggle span, .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 7vw, 6rem); overflow: hidden; overflow: clip; }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display); font-size: var(--step-4); line-height: 1.02; letter-spacing: -0.01em;
}
.hero__line { display: block; }
@media (min-width: 960px) { .hero__title { font-size: min(var(--step-4), 5.4vw); } .hero__line { white-space: nowrap; } }
.hero__kicker { margin: 0 0 1.25rem; font-size: var(--step-1); font-weight: 700; color: var(--online); }
.hero__lead { max-width: 40ch; margin-bottom: 2rem; font-size: var(--step-1); line-height: 1.55; color: var(--slate); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* Phone mockup (pure CSS, no image) */
.phone { margin: 0; justify-self: center; width: min(100%, 23rem); }
.phone__screen {
  border-radius: 2.2rem; padding: 0.75rem;
  background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(18, 22, 25, 0.55), inset 0 0 0 1px #2A3238;
}
.phone__top {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1rem; border-radius: 1.6rem 1.6rem 0 0;
  background: #1C2328; color: var(--paper);
}
.phone__avatar {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--online); color: var(--white); font-family: var(--font-display); font-size: 1.1rem;
}
.phone__who { display: grid; line-height: 1.25; }
.phone__who b { font-weight: 700; }
.phone__status { font-size: 0.85rem; color: var(--glow); }
.chat {
  display: flex; flex-direction: column; gap: 0.55rem;
  min-height: 25rem; margin: 0; padding: 1rem 0.85rem 1.25rem; list-style: none;
  border-radius: 0 0 1.6rem 1.6rem;
  background: #E9EDE6;
}
.chat__day { align-self: center; padding: 0.2rem 0.7rem; border-radius: 6px; background: rgba(255, 255, 255, 0.75); font-size: 0.8rem; color: var(--slate); }
.msg {
  position: relative; max-width: 82%; padding: 0.55rem 0.8rem 1.35rem;
  border-radius: 12px; font-size: 1rem; line-height: 1.45; color: var(--ink);
  box-shadow: 0 1px 1px rgba(18, 22, 25, 0.08);
}
.msg time { position: absolute; bottom: 0.3rem; inset-inline-end: 0.7rem; font-size: 0.72rem; color: var(--slate); }
.msg--in { align-self: flex-start; background: var(--white); border-start-start-radius: 4px; }
.msg--out { align-self: flex-end; background: var(--bubble-out); border-start-end-radius: 4px; }
.chat__typing { display: none; align-self: flex-end; gap: 4px; padding: 0.75rem 0.9rem; border-radius: 12px; background: var(--bubble-out); }
.chat__typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--slate); opacity: 0.5; }
.phone__caption { margin-top: 1rem; font-size: var(--step--1); color: var(--slate); text-align: center; }

.intro-pending [data-intro] { visibility: hidden; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section__title { margin: 0 0 2rem; font-family: var(--font-display); font-size: var(--step-3); line-height: 1.05; }

/* Pains */
.pains { background: var(--stone); }
.pains__list { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.pains__list li { padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.pains__list h3 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; }
.pains__list p { margin: 0; color: var(--slate); max-width: 36ch; }
@media (min-width: 860px) { .pains__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); } }

/* Services: a big readable list, not a card grid */
.services__list { margin: 0; padding: 0; list-style: none; counter-reset: svc; }
.service {
  display: grid; gap: 0.4rem 3rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service__name { margin: 0; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; }
.service__text { margin: 0; max-width: 46ch; color: var(--slate); }
.service:last-child .service__name { color: var(--online); }
@media (min-width: 860px) {
  .service { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: baseline; }
}

/* Work */
.work { background: var(--ink); color: var(--paper); --focus: var(--glow); }
.work .section__title { color: var(--paper); }
.work__intro { max-width: 52ch; margin-bottom: 2.5rem; color: var(--fog); }
.work__list { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.work__link { display: grid; gap: 1rem; color: var(--paper); text-decoration: none; }
.work__img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: var(--radius); box-shadow: 0 0 0 1px var(--ink-line);
  transition: transform 0.4s ease;
}
.work__link:hover .work__img { transform: translateY(-4px); }
.work__meta { display: grid; gap: 0.15rem; }
.work__name { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; }
.work__line { color: var(--fog); }
.work__link:hover .work__name { text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 860px) { .work__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); } }

/* How */
.steps { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); content: counter(step) / "";
  display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem;
  border-radius: 50%; background: var(--online); color: var(--white);
  font-family: var(--font-display); font-size: 1.4rem;
}
.steps h3 { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; }
.steps p { margin: 0; color: var(--slate); max-width: 34ch; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); } }

/* About */
.about { background: var(--stone); }
.about__grid { display: grid; gap: 1rem 4rem; }
.about__big { font-size: var(--step-2); line-height: 1.4; font-weight: 600; max-width: 30ch; }
.about__text > p:not(.about__big) { color: var(--slate); max-width: 50ch; }
.promises { display: grid; gap: 0.6rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.promises li { display: flex; align-items: baseline; gap: 0.65rem; font-weight: 600; }
.promises li::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--online); transform: translateY(-0.1rem); }
@media (min-width: 860px) {
  .about__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Contact */
.contact { background: var(--online-deep); color: var(--white); padding-block: clamp(4.5rem, 10vw, 8rem); --focus: var(--glow); }
.contact__title { margin: 0 0 1rem; max-width: 16ch; font-family: var(--font-display); font-size: var(--step-4); line-height: 1.05; }
.contact__text { font-size: var(--step-1); color: #CDEBDD; margin-bottom: 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.contact__phone { color: var(--white); font-family: var(--font-display); font-size: var(--step-2); text-decoration: none; }
.contact__phone:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 3rem 2rem; --focus: var(--glow); }
.site-footer a, .site-footer .link-button { color: var(--paper); }
.site-footer__grid { display: grid; gap: 2rem; }
.wordmark--footer { margin: 0 0 0.6rem; color: var(--paper); font-size: 2rem; }
.site-footer__links { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.site-footer__small { grid-column: 1 / -1; margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--ink-line); font-size: var(--step--1); color: var(--fog); }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Legal pages ---------- */
.page-header .site-header__bar { justify-content: space-between; }
.legal { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); }
.legal__body { max-width: 68ch; }
.legal h1 { margin: 0 0 1rem; font-family: var(--font-display); font-size: var(--step-3); line-height: 1.05; }
.legal h2 { margin: 2.5rem 0 0.75rem; font-size: var(--step-2); line-height: 1.25; }
.legal h3 { margin: 1.75rem 0 0.5rem; font-size: var(--step-1); line-height: 1.3; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .updated { color: var(--slate); }
.ph { padding: 0 0.2em; border-radius: 3px; background: #F1E3B3; color: var(--ink); }

#cc-main {
  --cc-font-family: var(--font-text); --cc-bg: var(--white); --cc-primary-color: var(--ink);
  --cc-secondary-color: var(--slate); --cc-btn-primary-bg: var(--online); --cc-btn-primary-color: var(--white);
  --cc-btn-primary-border-color: var(--online); --cc-btn-primary-hover-bg: var(--online-deep);
  --cc-btn-secondary-bg: var(--stone); --cc-btn-secondary-color: var(--ink); --cc-btn-border-radius: 999px;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .work__link:hover .work__img { transform: none; }
}
.motion-off *, .motion-off *::before, .motion-off *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
.motion-off .work__link:hover .work__img { transform: none; }
@media (forced-colors: active) {
  .btn, .motion-toggle, .nav-toggle { border: 2px solid ButtonText; }
  .msg { border: 1px solid CanvasText; }
}
