/* Data by Hisham — editorial consulting design system (v3).
   One stylesheet for every page, English (ltr) and Arabic (rtl). Logical properties keep both directions working. */

/* ── Tokens ── */
:root {
  --paper: #F7F7F4;
  --paper-2: #EFEFEA;
  --ink: #171A20;
  --ink-2: #3A3F48;
  --grey: #565B64;   /* 6.4:1 on paper, so small grey text passes 4.5:1 */
  --line: #DCDCD5;
  --line-strong: #C4C4BC;
  --accent: #2563EB;
  --accent-ink: #1D4ED8;
  --focus: #2563EB;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;

  /* four text sizes */
  --t-display: clamp(40px, 5.4vw, 68px);
  --t-title: clamp(22px, 2.2vw, 28px);
  --t-body: 17px;
  --t-small: 13.5px;

  /* spacing scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;

  --max: 1200px;
  --gutter: 32px;
  --radius: 4px;
  --header-h: 64px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { background: var(--paper); color: var(--ink); font-family: var(--font); font-size: var(--t-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ── Type ── */
.display { font-size: var(--t-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; }
html[lang="ar"] .display { letter-spacing: 0; line-height: 1.25; font-weight: 600; }
.title { font-size: var(--t-title); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
html[lang="ar"] .title { letter-spacing: 0; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.small { font-size: var(--t-small); color: var(--grey); }
.kicker { font-size: var(--t-small); font-weight: 600; color: var(--grey); letter-spacing: .02em; }
.muted { color: var(--grey); }

/* ── Buttons & links ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: var(--radius); font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }
.btn-line { border-color: var(--line-strong); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color .15s, color .15s; }
.more:hover { color: var(--accent); border-color: var(--accent); }
.more::after { content: '→'; }
html[dir="rtl"] .more::after { content: '←'; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 247, 244, .94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.hdr { height: var(--header-h); display: flex; align-items: center; gap: var(--s4); }
.brand { font-size: 17px; white-space: nowrap; }   /* mark + wordmark: see logo.css */
.nav { display: flex; gap: 28px; margin-inline-end: auto; }
.nav a { font-size: 15px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.nav .nav-book { display: none; margin-top: 16px; border: 0; color: #fff; }
.hdr-r { display: flex; align-items: center; gap: var(--s2); }
.lang { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 4px; }
.lang:hover { color: var(--accent); }
.menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: none; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: transform .2s; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; inset-inline-start: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

/* ── Sections ── */
.section { padding: var(--s6) 0; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }

/* ── Hero ── */
.hero { padding: var(--s6) 0 var(--s5); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s5); align-items: end; }
.hero .display { margin-top: var(--s3); max-width: 11em; }
.hero .lead { margin-top: var(--s3); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }
.hero-aside { border-inline-start: 1px solid var(--line); padding-inline-start: var(--s3); display: grid; gap: var(--s3); }
.hero-aside dt { font-size: var(--t-small); color: var(--grey); }
.hero-aside dd { font-size: 16px; font-weight: 500; margin-top: 2px; }
.hero-figure { margin-top: var(--s5); }
.frame { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); overflow: hidden; }
.frame img, .frame video { width: 100%; height: auto; }
figcaption { margin-top: 12px; font-size: var(--t-small); color: var(--grey); display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }

/* ── Service highlights: columns divided by rules, not boxes ── */
.svc3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.svc3 > article { padding: var(--s3) var(--s3) 0 0; display: flex; flex-direction: column; gap: 12px; }
.svc3 > article + article { border-inline-start: 1px solid var(--line); padding-inline-start: var(--s3); }
html[dir="rtl"] .svc3 > article { padding: var(--s3) 0 0 var(--s3); }
html[dir="rtl"] .svc3 > article + article { padding-inline-start: var(--s3); }
.svc3 .n { font-size: var(--t-small); color: var(--grey); font-variant-numeric: tabular-nums; }
.svc3 p { color: var(--ink-2); }
.price { font-size: 16px; font-weight: 600; margin-top: auto; padding-top: 8px; }
.price small { font-weight: 400; color: var(--grey); font-size: var(--t-small); }

/* ── Work grid ── */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
.work-card { display: flex; flex-direction: column; gap: 14px; }
.work-media { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.work-media video, .work-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-card:hover .work-media { border-color: var(--line-strong); }
.work-card h3 { margin-top: 4px; }
.work-card:hover h3 { color: var(--accent); }
.work-card p { color: var(--ink-2); font-size: 16px; }
.demo-note { font-size: 12.5px; color: var(--grey); display: inline-flex; align-items: center; gap: 6px; }
.demo-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); flex: none; }

/* ── Closing CTA ── */
.cta-band { background: var(--ink); color: var(--paper); }
.cta-band .wrap { padding-top: var(--s5); padding-bottom: var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.cta-band p { color: #B9BCC2; margin-top: 8px; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); }
.cta-band .btn-primary:hover { background: #fff; }

/* ── Footer ── */
.site-footer { padding: var(--s4) 0; font-size: var(--t-small); color: var(--grey); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.site-footer nav { display: flex; gap: var(--s3); flex-wrap: wrap; }
.site-footer a:hover { color: var(--ink); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --s6: 80px; }
  .nav { gap: 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s4); align-items: start; }
  .hero-aside { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: var(--s3); grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  :root { --gutter: 20px; --s6: 64px; --s5: 48px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: var(--header-h); inset-inline: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; margin: 0; }
  .menu-open .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a:hover, .nav a[aria-current="page"] { border-color: var(--line); }
  .hdr { gap: var(--s2); }
  .hdr-r { margin-inline-start: auto; }
  .svc3 { grid-template-columns: 1fr; }
  .svc3 > article, html[dir="rtl"] .svc3 > article { padding: var(--s3) 0; }
  .svc3 > article + article { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); }
  .work-grid { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .lead { font-size: 17px; }
  .hdr-r .btn { display: none; }
  .menu-open .nav .nav-book { display: flex; }
  .hero-aside { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
  .cta-band .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ── Inner pages ── */
.page-head { padding: var(--s5) 0 var(--s4); }
.page-head .display { margin-top: var(--s2); font-size: clamp(36px, 4.4vw, 56px); }
.page-head .lead { margin-top: var(--s3); }
.page-head .demo-note { margin-top: var(--s3); }
.page-head .kicker a:hover { color: var(--accent); }
.section-tight { padding-top: 0; }
.section + .section-tight, .page-head + .section-tight { border-top: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.two-col .title { margin-bottom: var(--s3); }
.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-inline-start: 22px; color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; inset-inline-start: 0; top: .72em; width: 10px; height: 1.5px; background: var(--accent); }

/* services */
.svc-list { padding-top: 0; }
.svc-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 8px); }
.svc-row:first-child { border-top: 1px solid var(--ink); }
.svc-meta .n { font-size: var(--t-small); color: var(--grey); }
.svc-meta .title { margin-top: 6px; }
.svc-meta .price { margin-top: 12px; padding: 0; }
.svc-body { display: grid; gap: var(--s3); align-content: start; }
.svc-body > p { color: var(--ink-2); }
.svc-body .btn { justify-self: start; }
.tiers { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); }
.tier { padding: var(--s3); display: grid; gap: 8px; align-content: start; }
.tier + .tier { border-inline-start: 1px solid var(--line); }
.tier h3 { font-size: 18px; font-weight: 600; }
.tier .price { padding: 0; margin: 0; }
.tier .ticks { margin-top: 8px; }
.terms { font-size: 17px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--grey); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* sample pages */
.sample-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s4); align-items: start; }
.sample-text { display: grid; gap: var(--s2); color: var(--ink-2); }
.facts-wrap { margin-top: var(--s2); }
.facts-wrap .title { font-size: 18px; margin-bottom: 10px; color: var(--ink); }
.facts { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.facts th, .facts td { text-align: start; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
html[dir="rtl"] .facts th, html[dir="rtl"] .facts td { padding: 10px 0 10px 8px; }
.facts thead th { font-size: 12.5px; font-weight: 600; color: var(--grey); border-bottom-color: var(--ink); }
.facts tbody th { font-weight: 500; color: var(--ink); }
.facts td { color: var(--ink-2); white-space: nowrap; }
.facts .chg { color: var(--accent); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { background: none; border: 0; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--grey); cursor: pointer; }
.seg button + button { border-inline-start: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.shots .frame:first-child { grid-column: 1 / -1; }
.shots .frame.tall { grid-column: auto; max-width: 360px; justify-self: center; }
.shots[hidden] { display: none; }
.cap { margin-top: 12px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s3); }
.offer-box { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.offer-box .title { margin-top: 6px; }
.offer-box .title a:hover { color: var(--accent); }
.offer-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* before / after slider */
.ba-cmp { position: relative; margin-top: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; user-select: none; background: #fff; direction: ltr; touch-action: pan-y; }
.ba-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-cmp .ba-before { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--ink); transform: translateX(-1px); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); display: grid; place-items: center; }
.ba-cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-cmp:focus-within .ba-knob { outline: 3px solid var(--focus); outline-offset: 3px; }
.ba-tag { position: absolute; top: 12px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 3px; pointer-events: none; background: var(--ink); color: var(--paper); }
.ba-tag.b { left: 12px; } .ba-tag.a { right: 12px; background: var(--accent); }

/* tools */
.tool-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.tool-list li { display: grid; gap: 6px; padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--line); }
html[dir="rtl"] .tool-list li { padding: var(--s3) 0 var(--s3) var(--s4); }
.tool-list li:nth-child(even), html[dir="rtl"] .tool-list li:nth-child(even) { padding-inline: var(--s4) 0; border-inline-start: 1px solid var(--line); }
.tool-name { font-size: 18px; font-weight: 600; }
.tool-list p { color: var(--ink-2); font-size: 15.5px; }
.tool-list .more { justify-self: start; margin-top: 6px; font-size: 14px; }
.tool-check { margin-top: var(--s4); display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }

/* about */
.about-intro { display: grid; gap: var(--s2); font-size: 18px; color: var(--ink-2); }
.timeline { list-style: none; border-top: 1px solid var(--ink); margin-top: var(--s3); }
.timeline li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s3); padding: 18px 0; border-bottom: 1px solid var(--line); }
.tl-date { font-size: var(--t-small); color: var(--grey); padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 17px; font-weight: 600; }
.timeline p { color: var(--ink-2); font-size: 15.5px; margin-top: 2px; }
.edu-h { margin-top: var(--s5); }
.pub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.pub-grid article { display: grid; gap: 12px; align-content: start; }
.pub-grid .title { font-size: 19px; }
.pub-grid p { color: var(--ink-2); font-size: 15.5px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); }
.contact-ways { display: grid; gap: var(--s4); align-content: start; }
.contact-ways > div { display: grid; gap: 10px; justify-items: start; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.contact-ways p { color: var(--ink-2); }
.contact-grid > div > .title { margin-bottom: var(--s3); }
.form { display: grid; gap: var(--s2); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.form input, .form textarea, .form select { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; width: 100%; }
html[dir="rtl"] .form input[dir="ltr"] { text-align: right; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
.form-status { font-size: 14.5px; min-height: 1.6em; }
.form-status.ok { color: #15803D; } .form-status.err { color: #B91C1C; }

@media (max-width: 1024px) {
  .sample-top { grid-template-columns: 1fr; }
  .pub-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .two-col, .contact-grid, .compare { grid-template-columns: 1fr; gap: var(--s4); }
  .svc-row { grid-template-columns: 1fr; gap: var(--s2); }
  .tiers { grid-template-columns: 1fr; }
  .tier + .tier { border-inline-start: 0; border-top: 1px solid var(--line); }
  .tool-list { grid-template-columns: 1fr; }
  .tool-list li, .tool-list li:nth-child(even), html[dir="rtl"] .tool-list li, html[dir="rtl"] .tool-list li:nth-child(even) { padding-inline: 0; border-inline-start: 0; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .pub-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shots .frame.tall { max-width: 280px; }
}
@media (max-width: 560px) {
  .form .row2 { grid-template-columns: 1fr; }
  .form .btn, .offer-ctas .btn { width: 100%; }
  .offer-ctas { width: 100%; }
  .facts { font-size: 13px; }
  .facts td { white-space: normal; }
}

/* ── Booking button: ink at rest, a blue fill sweeps in on hover and the arrow nudges forward ── */
.btn-book { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: var(--paper); border-color: var(--ink); transition: color .2s, border-color .35s, transform .15s; }
.btn-book::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.22, .8, .2, 1); }
html[dir="rtl"] .btn-book::before { transform-origin: right center; }
.btn-book:hover { border-color: var(--accent); }
.btn-book:hover::before, .btn-book:focus-visible::before { transform: scaleX(1); }
.btn-book .arr { display: inline-block; transition: transform .3s cubic-bezier(.22, .8, .2, 1); }
.btn-book:hover .arr { transform: translateX(4px); }
html[dir="rtl"] .btn-book:hover .arr { transform: translateX(-4px); }
.btn-book:active { transform: scale(.97); }
.cta-band .btn-book { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-band .btn-book:hover { color: #fff; }
/* the hero button draws a thin line under itself once, after the page has loaded */
.hero .btn-book::after { content: ''; position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left center; animation: bookLine 1.1s .9s cubic-bezier(.22, .8, .2, 1) forwards; }
html[dir="rtl"] .hero .btn-book::after { transform-origin: right center; }
@keyframes bookLine { 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: .9; } }

/* ── Page entrance: hero text rises in, once ── */
@media (prefers-reduced-motion: no-preference) {
  .hero .kicker, .hero .display, .hero .lead, .hero-ctas, .proof, .page-head .wrap > * { animation: rise .3s ease-out backwards; }
  .hero .display, .page-head .display { animation-delay: .04s; }
  .hero .lead, .page-head .lead { animation-delay: .08s; }
  .hero-ctas, .proof, .page-head .demo-note { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) { .hero .btn-book::after { animation: none; } }

/* ── Home: public projects strip and language chips ── */
.pub-strip { margin-top: var(--s5); border-top: 1px solid var(--line); padding-top: var(--s3); }
.pub-strip .sec-head { margin-bottom: var(--s3); }
.pub-strip .kicker { font-size: var(--t-small); }
.pub-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.pub-card { display: grid; gap: 8px; align-content: start; }
.pub-card .frame { aspect-ratio: 16 / 9; }
.pub-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, .8, .2, 1); }
.pub-card:hover .frame img { transform: scale(1.03); }
.pub-card h3 { font-size: 17px; font-weight: 600; margin-top: 6px; }
.pub-card:hover h3 { color: var(--accent); }
.lang-chip { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; font-size: 12px; font-weight: 600; background: rgba(247, 247, 244, .94); color: var(--ink); padding: 4px 9px; border-radius: 3px; }
.work-media img, .work-media video { transition: transform .6s cubic-bezier(.22, .8, .2, 1); }
.work-card:hover .work-media img, .work-card:hover .work-media video { transform: scale(1.02); }

/* ── Tools directory ── */
.tool-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
.tool-card { display: grid; gap: var(--s2); }
.tool-shot { aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #0A0A0A; }
.tool-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s cubic-bezier(.22, .8, .2, 1); }
.tool-card:hover .tool-shot img { transform: scale(1.03); }
.tool-meta { display: grid; gap: 6px; }
.tool-meta .n { font-size: var(--t-small); color: var(--grey); }
.tool-meta p { color: var(--ink-2); font-size: 15.5px; }
.tool-meta .more { justify-self: start; margin-top: 4px; font-size: 14px; }
.tool-card:hover .tool-name { color: var(--accent); }
.cv-btn { justify-self: start; margin-top: var(--s1); }

@media (max-width: 820px) {
  .pub-row { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .pub-card h3 { font-size: 14.5px; }
  .pub-card .small { display: none; }
  .tool-grid { grid-template-columns: 1fr; gap: var(--s4); }
}
@media (max-width: 560px) {
  .pub-row { grid-template-columns: 1fr; gap: var(--s3); }
  .pub-card .small { display: block; }
  .pub-card h3 { font-size: 16px; }
}

/* ── Sections read as separate blocks: alternating white bands with a hairline top and bottom ── */
main > section.section:not(.section-tight):nth-child(even) { background: #FFFFFF; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
main > section.section:not(.section-tight):nth-child(even) + section { border-top: 0; }
.section .sec-head .title, .section > .wrap > .title:first-child { position: relative; padding-top: 18px; }
.section .sec-head .title::before, .section > .wrap > .title:first-child::before { content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 28px; height: 2px; background: var(--accent); }

/* ── Light pattern on the sides of the page: a hairline grid that fades out before the content ── */
:root { --grid-line: rgba(23, 26, 32, .055); }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) calc(50% - 760px), transparent calc(50% - 600px), transparent calc(50% + 600px), rgba(0,0,0,.55) calc(50% + 760px), #000 100%);
          mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) calc(50% - 760px), transparent calc(50% - 600px), transparent calc(50% + 600px), rgba(0,0,0,.55) calc(50% + 760px), #000 100%); }
@media (max-width: 1240px) { body::before { display: none; } }

/* ── Portrait ── */
.portrait { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait { width: 100%; max-width: 380px; justify-self: end; }
.hero-grid { align-items: center; }
.about-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: var(--s4); align-items: start; }
.about-portrait { max-width: 340px; }
@media (max-width: 1024px) {
  .hero-portrait { order: -1; max-width: 220px; justify-self: start; }
  .about-top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .about-top > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .about-top { grid-template-columns: 1fr; }
  .about-portrait { max-width: 260px; }
  .hero-portrait { max-width: 160px; }
}

/* ── Public project pages ── */
.pub-item { display: grid; gap: 12px; align-content: start; }
.pub-item:hover .title { color: var(--accent); }
.pub-item .more { justify-self: start; font-size: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--s4); border-top: 1px solid var(--ink); }
.stat-row > div { padding: var(--s3) var(--s3) 0 0; display: grid; gap: 6px; }
.stat-row > div + div { border-inline-start: 1px solid var(--line); padding-inline-start: var(--s3); }
.stat-row b { font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; justify-self: start; }
.stat-row span { color: var(--grey); font-size: 15px; }
.proj-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s5); }
.proj-side { display: grid; gap: 10px; align-content: start; color: var(--ink-2); font-size: 16px; }
.proj-side .kicker + p { margin-bottom: var(--s3); }
.findings { list-style: none; counter-reset: f; margin-top: var(--s3); border-top: 1px solid var(--line); }
.findings li { counter-increment: f; display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.findings li::before { content: counter(f, decimal-leading-zero); font-size: var(--t-small); color: var(--accent); font-weight: 600; padding-top: 3px; }
.checks-h { margin-top: var(--s4); }
.checks { margin-top: 12px; color: var(--ink-2); }
.proj-shots .frame:first-child { grid-column: auto; }
@media (max-width: 820px) {
  .proj-body { grid-template-columns: 1fr; gap: var(--s4); }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row > div, .stat-row > div + div { border-inline-start: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
}

/* ── Scroll reveal (site.js adds .rv to blocks and .in when they enter the screen) ── */
@media (prefers-reduced-motion: no-preference) {
  .anim .rv { opacity: 0; transform: translateY(12px); transition: opacity .3s ease-out, transform .3s ease-out; }
  .anim .rv.in { opacity: 1; transform: none; }
}


/* ── Hero proof line: a quiet fact, not a banner ── */
.proof { display: inline-grid; gap: 2px; margin-top: var(--s4); padding-inline-start: 14px; border-inline-start: 2px solid var(--ink); }
.proof b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.proof span { font-size: var(--t-small); color: var(--grey); }
.proof:hover b { color: var(--accent); }

/* ── Home Work section: filter chips and a mixed grid (investigations 3 per row, reports 2 per row) ── */
.work-note { margin-top: 10px; max-width: 46em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s4); }
.chip { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.work-mix { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
.work-mix > .inv { grid-column: span 2; }
.work-mix > .rep { grid-column: span 3; }
.work-mix > [hidden] { display: none; }
.work-mix .inv .title { font-size: 19px; }
.work-mix .inv p { font-size: 15.5px; }
.work-mix .inv .work-media img { object-position: top left; }
html[dir="rtl"] .work-mix .inv .work-media img { object-position: top left; }
.book-this { justify-self: start; align-self: flex-start; margin-top: 6px; font-size: 14px; }
@media (max-width: 1024px) {
  .work-mix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
  .work-mix > .inv, .work-mix > .rep { grid-column: span 1; }
}
@media (max-width: 620px) {
  .work-mix { grid-template-columns: 1fr; }
  .proof b { font-size: 22px; }
}
.site-header { transition: box-shadow .25s; }
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 6px 24px -12px rgba(23, 26, 32, .18); }
.section > .wrap > .title + .shots, .section > .wrap > .title + .ba-cmp { margin-top: var(--s3); }
.form select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27%3E%3Cpath d=%27M1 1l5 5 5-5%27 fill=%27none%27 stroke=%27%236B7079%27 stroke-width=%271.5%27/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
html[dir="rtl"] .form select { background-position: left 14px center; }

/* tools directory: text cards (no screenshots) */
.tool-grid { gap: var(--s3); }
.tool-card { height: 100%; padding: var(--s3) var(--s3) 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; transition: border-color .25s, transform .35s cubic-bezier(.22, .8, .2, 1), box-shadow .35s; }
.tool-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px -22px rgba(23, 26, 32, .5); }
.tool-meta { height: 100%; align-content: start; }
.tool-meta .more { margin-top: 10px; }
@media (min-width: 1025px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
.work-mix .inv .lang-chip { top: auto; bottom: 10px; }

/* ── Tap targets up to 768px: invisible hit areas of at least 44 x 44 px, visual size unchanged ── */
@media (max-width: 768px) {
  .book-this, .sec-head .more, .lang, .logo, .site-footer nav a { position: relative; }
  .book-this::after, .sec-head .more::after, .lang::after, .logo::after, .site-footer nav a::after { content: ''; position: absolute; }
  .book-this::after, .sec-head .more::after { inset: -10px -6px; }
  .lang::after { inset: -6px -8px; }
  .logo::after { inset: -6px 0; }
  .site-footer nav a { min-width: 24px; text-align: center; }
  .site-footer nav a::after { inset: -12px -10px; }
  .site-footer nav { column-gap: 24px; row-gap: 24px; }
}
