/* page CSS for the Hebrew, right-to-left site. The kit (assets/system.css) gives the base; this file holds the
   look the client chose: white ground, the logo's navy and gold, bold headings, pill buttons. */

/* the logo's two colours, set once; every navy and gold on the site comes from here */
:root {
  --brand-navy: #0b2545;
  --brand-gold: #a8741a;
  --brand-shadow: rgba(11, 37, 69, .12);
  --r-btn: 50px;
}

/* RTL: every arrow points the reading way (left) and nudges left on hover; the skip link sits on the start line */
[dir="rtl"] .m-arrow { margin-right: 0; margin-left: -2px; }
[dir="rtl"] .m-arrow__stem { transform-origin: calc(100% - 1px) 50%; }
@media (hover: hover) and (pointer: fine) { [dir="rtl"] :is(a, button):hover > .m-arrow .m-arrow__head { transform: translateX(-3px); } }
[dir="rtl"] :is(a, button):focus-visible > .m-arrow .m-arrow__head { transform: translateX(-3px); }
html[dir="rtl"][data-buttons] { --btn-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M10.5 6H2M5.5 2.5 2 6l3.5 3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[dir="rtl"] .link::after, [dir="rtl"] .btn--arrow::after { content: "\2190"; }
@media (hover: hover) and (pointer: fine) {
  html[dir="rtl"]:not([data-motion="off"]) :is(.btn--arrow, .link):hover::after,
  html[dir="rtl"] .btn:hover::after { transform: translateX(-3px); }
}
html[dir="rtl"]:not([data-motion="off"]) :is(.btn--arrow, .link):focus-visible::after { transform: translateX(-3px); }
[dir="rtl"] .skip-link { left: auto; right: max(var(--gut), (100% - var(--container)) / 2); }
[dir="rtl"] .rows__value { text-align: left; }

/* type and buttons */
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }
h2 { color: var(--p-accent); }
.btn { font-weight: 700; padding-inline: 28px; }

/* the menu bar: white, taller, tabs at 18px/600 */
.nav { --nav: 88px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 6px 20px rgba(11,37,69,.06); }
.nav .nav__link { font-size: 18px; font-weight: 600; color: #1a1919; padding-inline: 14px; }
.nav .nav__link:hover { color: var(--p-accent); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__name { display: grid; font: 700 20px/1.1 var(--font-text); }
.brand__name small { font: 500 13px/1.4 var(--font-text); color: var(--muted); }
@media (max-width: 639px) { .nav { --nav: 64px; } .brand__name small { display: none; } }

/* a row's description under its name */
.rows__name small { display: block; margin-top: var(--s-1); font-size: var(--t-body); color: var(--muted); font-weight: 400; }

/* articles: rows that link to the article */
.articles-list .rows__name { text-decoration: none; color: var(--ink); }
.articles-list .rows__name:hover { text-decoration: underline; text-underline-offset: 3px; }

.disclaimer { margin: var(--s-5) 0 0; max-width: 90ch; }

/* ---------------------------------------------------------------- the plain one-page site (index.html)
   sections take their content's height, white ground, a navy contact band */
.page-plain main > section { height: auto; min-height: 0; }
html.page-plain main > .plain-hero { padding: calc(var(--nav) + 96px) 0 96px; }
html.page-plain .plain-hero > .wrap.hero-art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); gap: var(--s-6); align-items: center; }
.hero-center { display: grid; gap: var(--s-5); justify-items: center; text-align: center; }
.plain-hero .kicker { margin: 0; color: var(--p-accent); font-weight: 600; font-size: 17px; }
.plain-hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.15; color: var(--p-accent); }
.plain-hero .lead { margin: 0; font-size: 20px; line-height: 1.7; max-width: 60ch; }
.plain-hero .btn-row { justify-content: center; margin-top: var(--s-3); }

html.page-plain main > .plain-section { padding: 96px 0; }
.plain-section--surface { background: var(--p-surface); }
.plain-section h2 { margin: 0 0 var(--s-5); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; }
.section-lead { font-size: 19px; line-height: 1.75; max-width: 70ch; margin: 0 0 var(--s-7); }

.v-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.v-card { background: #fff; border-radius: 18px; box-shadow: 0 10px 34px rgba(11,37,69,.11); padding: 32px 28px; display: grid; gap: var(--s-3); align-content: start; }
.v-card h3 { margin: 0; font-size: 22px; color: var(--p-accent); }
.v-card p { margin: 0; line-height: 1.7; }

.c-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.c-list li { background: #fff; border-radius: 18px; padding: 28px 24px; display: grid; gap: var(--s-3); align-content: start; line-height: 1.6; }
.c-list b { display: block; font-size: 20px; color: var(--p-accent); margin-bottom: 4px; }

html.page-plain main > section > .wrap.about { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 64px; align-items: start; }
/* the portrait is shown at 300px at most, under the 400px file, so it stays sharp */
.about__photo { margin: 0; width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 10px 34px rgba(11,37,69,.14); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.about__story { max-width: 68ch; }
.about__story > p { font-size: 18px; line-height: 1.8; margin: 0 0 var(--s-5); }
.tb-box { border-inline-start: 4px solid var(--p-accent); background: var(--p-surface); border-radius: 12px; padding: 24px 28px; margin: var(--s-6) 0; display: grid; gap: var(--s-3); }
.tb-box p { margin: 0; font-size: 18px; line-height: 1.75; }

.plain-section--navy { background: var(--p-inv-bg); color: #fff; }
.plain-section--navy h2 { color: #fff; margin-bottom: var(--s-3); }
.plain-section--navy p { color: #fff; font-size: 19px; margin: 0; }
html.page-plain main > section > .wrap.contact { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; }

.btn--wa { gap: 10px; }
.btn--wa img { flex: none; }
.btn--wa::after { content: none !important; }
.plain-section--navy .btn--wa { background: #fff; color: var(--p-accent); border-color: #fff; }
.btn--lg { height: 56px; font-size: 18px; padding-inline: 32px; }

.plain-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); }
.plain-footer p { margin: 0 0 6px; }
.plain-footer a { color: var(--ink); }

@media (max-width: 1023px) {
  .v-cards { grid-template-columns: 1fr; }
  .c-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.page-plain main > section > .wrap.about { grid-template-columns: 1fr; gap: 32px; }
  .about__photo { max-width: 200px; }
}
@media (max-width: 639px) {
  html.page-plain main > .plain-hero { padding: calc(var(--nav) + 56px) 0 64px; }
  .plain-hero .lead { font-size: 18px; }
  html.page-plain main > .plain-section { padding: 64px 0; }
  .c-list { grid-template-columns: 1fr; }
  html.page-plain .wrap.contact .btn { width: 100%; }
  /* the WhatsApp button inside the open phone menu: the logo only */
  .nav .btn--wa { font-size: 0; gap: 0; padding-inline: 12px; }
  .nav .btn--wa img { width: 22px; height: 22px; }
}

/* article pages */
.article__meta { margin: 0 0 var(--s-4); }
.article__body p { font-size: 18px; line-height: 1.8; margin: 0 0 var(--s-5); max-width: 62ch; }
.page-simple main > section { height: auto; min-height: 100svh; }

html.page-plain .wrap.contact > div { flex: 1 1 420px; }

/* the plain page on a phone: sections keep their content's height; the bar's WhatsApp button waits in the menu */
@media (max-width: 1023px) {
  html.page-plain main > section { min-height: 0 !important; display: block; }
  html.page-plain .plain-hero > .wrap.hero-art { grid-template-columns: 1fr; align-content: start; }
  .hero-art__side { display: none; }
}
@media (max-width: 639px) {
  html .nav:not(.is-open) .nav__actions { display: none !important; }
}

/* the client's logo: the mark in the bar, the full logo in the footer */
.brand__mark { height: 48px; width: auto; display: block; }
@media (max-width: 639px) { .brand__mark { height: 32px; } }
.plain-footer .footer__logo { display: block; width: 200px; height: auto; margin-bottom: var(--s-4); }

/* the hero's line art (client's choice, option 2): the assets on the right run in toward the heading, and arrive
   at one gold point on the left, like the dot in the logo. Navy lines, one gold point; drawn once on load. */
.hero-art__side { width: 100%; max-width: 240px; height: auto; justify-self: center; overflow: visible; }
.hero-art__side .ha-lines path { fill: none; stroke: var(--brand-navy); stroke-width: 1.4; stroke-linecap: round; opacity: .35; }
.hero-art__side .ha-icons path, .hero-art__side .ha-icons ellipse { fill: none; stroke: var(--brand-navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-art__side .ha-ring { fill: none; stroke: var(--brand-navy); stroke-width: 3; }
.hero-art__side .ha-ring--faint { stroke-width: 1.2; opacity: .25; stroke-dasharray: 3 6; }
.hero-art__side .ha-gold { fill: var(--brand-gold); }
.hero-art__side .ha-dot { fill: var(--brand-navy); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .hero-art__side .ha-lines path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: ha-draw 1.4s cubic-bezier(.2,.7,.2,1) .3s forwards; }
  .hero-art__side--out .ha-lines path { animation-delay: .9s; }
  .hero-art__side--out .ha-gold { transform-origin: 90px 160px; transform: scale(.4); opacity: 0; animation: ha-pop .6s cubic-bezier(.2,.7,.2,1) 1.9s forwards; }
}
@keyframes ha-draw { to { stroke-dashoffset: 0; } }
@keyframes ha-pop { to { transform: scale(1); opacity: 1; } }
@media (max-width: 1199px) {
  .hero-art__side { display: none; }
  html.page-plain .plain-hero > .wrap.hero-art { grid-template-columns: 1fr; }
}
html.page-plain main > section { min-height: 0 !important; }

/* ---------------------------------------------------------------- motion the client asked for
   the logo and the hero's line art draw themselves once on load; only the hero's dashed ring keeps turning (40 s).
   The card icons draw themselves once as they come on screen.
   Anyone who asks their system for less motion sees everything still. */
.brand__mark--anim { height: 48px; width: auto; display: block; overflow: visible; }
@media (max-width: 639px) { .brand__mark--anim { height: 32px; } }
.bm-pill { fill: none; stroke: var(--brand-navy); stroke-width: 10; }
.bm-bar { stroke: var(--brand-navy); stroke-width: 6; stroke-linecap: round; }
.bm-dot { fill: var(--brand-gold); }
@media (prefers-reduced-motion: no-preference) {
  .bm-pill { stroke-dasharray: 100; stroke-dashoffset: 100; animation: bm-draw 1.1s cubic-bezier(.65,0,.35,1) .15s forwards; }
  .bm-bar { opacity: 0; animation: bm-fade .4s ease-out forwards; }
  .bm-bar--a { animation-delay: .9s; } .bm-bar--b { animation-delay: 1s; }
  .bm-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: bm-pop .6s cubic-bezier(.34,1.56,.64,1) 1.15s forwards; }

  .ha-ring--faint { transform-box: fill-box; transform-origin: center; animation: ha-turn 40s linear infinite; }
}
@keyframes bm-draw { to { stroke-dashoffset: 0; } }
@keyframes bm-fade { to { opacity: 1; } }
@keyframes bm-pop { to { transform: scale(1); } }
@keyframes ha-turn { to { transform: rotate(360deg); } }

/* social links */
.socials-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.socials-row a, .socials-row span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px var(--brand-shadow); transition: transform .2s ease; }
.socials-row a:hover { transform: translateY(-2px); }
.socials-row img { width: 22px; height: 22px; }
.plain-footer .socials-row { margin-bottom: var(--s-4); }
.contact .socials-row { margin-top: var(--s-5); }

/* an article's own page: a calmer title over a wider text column */
.article { max-width: 820px; }
.article h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.25; margin: 0 0 var(--s-6); color: var(--p-accent); }

/* the card icons: navy lines that draw once as the card comes on screen, then one gold accent appears,
   in the spirit of the logo's gold dot; on hover the accent grows a little */
.v-card .ai, .c-list .ai { width: 48px; height: 48px; overflow: visible; }
.ai-lines > * { fill: none; stroke: var(--brand-navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ai-gold { fill: var(--brand-gold); transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.v-card:hover .ai-gold, .c-list li:hover .ai-gold { transform: scale(1.18); }
@media (prefers-reduced-motion: no-preference) {
  .js-ai .ai-lines > * { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js-ai .ai-gold { transform: scale(0); }
  .js-ai .is-in .ai-lines > * { animation: ai-draw 1.3s cubic-bezier(.65,0,.35,1) forwards; }
  .js-ai .is-in .ai-lines > :nth-child(2) { animation-delay: .15s; }
  .js-ai .is-in .ai-lines > :nth-child(3) { animation-delay: .3s; }
  .js-ai .is-in .ai-gold { animation: ai-pop .6s cubic-bezier(.34,1.56,.64,1) 1.1s forwards; }
  .js-ai .is-in:hover .ai-gold { animation: none; transform: scale(1.18); }
}
@keyframes ai-draw { to { stroke-dashoffset: 0; } }
@keyframes ai-pop { to { transform: scale(1); } }
@media (max-width: 639px) { .v-card .ai, .c-list .ai { width: 42px; height: 42px; } }

/* the opening art on tablets and phones: one compact row above the heading (about 55px tall), drawn once on load */
.hero-art__mini { display: none; width: min(100%, 290px); height: auto; overflow: visible; }
.hero-art__mini .ha-lines path { fill: none; stroke: var(--brand-navy); stroke-width: 1.2; stroke-linecap: round; opacity: .35; }
.hero-art__mini .ha-icons path, .hero-art__mini .ha-icons ellipse { fill: none; stroke: var(--brand-navy); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-art__mini .ha-ring { fill: none; stroke: var(--brand-navy); stroke-width: 2; }
.hero-art__mini .ha-gold { fill: var(--brand-gold); }
@media (max-width: 1199px) { .hero-art__mini { display: block; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-art__mini .ha-lines path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: ha-draw 1.2s cubic-bezier(.2,.7,.2,1) .3s forwards; }
  .hero-art__mini .ha-gold { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: bm-pop .6s cubic-bezier(.34,1.56,.64,1) 1.3s forwards; }
}

/* the legal pages: terms, privacy, accessibility */
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.25; margin: 0 0 var(--s-2); color: var(--p-accent); }
.legal__date { color: var(--muted); font-size: 15px; margin: 0 0 var(--s-7); }
.legal h2 { font-size: 22px; margin: var(--s-7) 0 var(--s-3); color: var(--p-accent); }
.legal p, .legal li { font-size: 17px; line-height: 1.8; }
.legal p { margin: 0 0 var(--s-4); }
.legal ul { margin: 0 0 var(--s-4); padding-inline-start: 22px; }
.plain-footer a { white-space: nowrap; }
.tel { white-space: nowrap; unicode-bidi: isolate; }

/* article images: a cover under the title, figures between paragraphs, a thumbnail in the list */
.article__cover, .article__figure { margin: 0 0 var(--s-6); }
.article__cover img, .article__figure img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 8px 28px rgba(11,37,69,.10); }
.article__cover img { aspect-ratio: 16 / 9; object-fit: cover; }
.article__figure figcaption { margin-top: var(--s-2); font-size: 15px; color: var(--muted); line-height: 1.6; }
.articles-list .article-row.has-thumb { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.article-thumb { display: block; border-radius: 10px; overflow: hidden; }
.article-thumb img { display: block; width: 128px; height: 84px; object-fit: cover; transition: transform .3s ease; }
.article-row:hover .article-thumb img { transform: scale(1.03); }
@media (max-width: 639px) {
  .articles-list .article-row.has-thumb { grid-template-columns: 88px minmax(0, 1fr); }
  .articles-list .article-row.has-thumb .rows__value { grid-column: 2; }
  .article-thumb img { width: 88px; height: 64px; }
}
/* rows with a thumbnail: each part in its own column (the kit pins .rows__value to column 2) */
.articles-list .article-row.has-thumb > .article-thumb { grid-column: 1; grid-row: 1 / span 2; }
.articles-list .article-row.has-thumb > .rows__name { grid-column: 2; grid-row: 1; }
.articles-list .article-row.has-thumb > .rows__value { grid-column: 3; grid-row: 1; }
@media (max-width: 639px) {
  .articles-list .article-row.has-thumb > .rows__value { grid-column: 2; grid-row: 2; text-align: start; max-width: none; }
}
