/* ==========================================================
   WALID FARHA · GENTS SALON
   Clean and sharp: white page, black type. The barber-pole red, white
   and blue appear only as small accents (the logo's pole, the rule under
   section labels, the open/closed dot).
   ========================================================== */
:root {
  --paper: #ffffff;
  --grey: #f4f4f2;          /* alternate section surface */
  --ink: #141414;
  --muted: #5a5a5a;         /* 6.9:1 on white */
  --line: #e3e3df;
  --red: #d21f2b;
  --blue: #1e3fa8;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --space: clamp(64px, 7.5vw, 104px);      /* section padding, top and bottom */
  --gap-head: clamp(28px, 3vw, 40px);       /* heading to its content */
  --gap-more: 32px;                         /* content to the small link under it */
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Barlow for Latin; Arabic text falls through to IBM Plex Sans Arabic (loaded on the Arabic page) */
  --font: "Barlow", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.hero__grid > *, .split > *, .gallery > * { min-width: 0; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ───────── labels and headings ───────── */
.label {
  font-size: 16px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
/* a short barber-pole rule under section labels */
.label--rule::after {
  content: ""; display: block; width: 44px; height: 5px; margin-top: 12px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 4px, #fff 4px 8px, var(--blue) 8px 12px, #fff 12px 16px);
  box-shadow: inset 0 0 0 1px var(--ink);
  animation: pole-turn 2.4s linear infinite;
}
@keyframes pole-turn { to { background-position: 22.63px 0; } }   /* one stripe repeat at 45° */
h2 {
  font-weight: 600; font-size: clamp(30px, 4vw, 42px); line-height: 1.12;
  letter-spacing: -.01em; margin-top: 18px;
}
.head { margin-bottom: var(--gap-head); }
.note { color: var(--muted); font-size: 16px; }
.more { margin-top: var(--gap-more); color: var(--muted); font-size: 16px; }
.more a { color: var(--ink); font-weight: 500; text-underline-offset: 4px; }

/* ───────── buttons ───────── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font: 500 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--ink); transition: background .2s, color .2s;
}
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #333; border-color: #333; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }

/* ───────── header ───────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__in {
  max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; min-width: 0; min-height: 44px; }
.nav__lang { font-size: 16px; font-weight: 500; text-decoration: none; padding: 10px 4px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav__lang:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav__brand img { width: 280px; max-width: 100%; height: auto; }   /* shrinks evenly if space is tight */
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; font-size: 17px; color: var(--muted); padding: 6px 0; }
.nav__links a:hover { color: var(--ink); }

/* ───────── hero ───────── */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(32px, 4vw, 48px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero__logo { margin-top: 22px; }
.hero__logo img { width: 100%; max-width: 640px; }
.hero__line { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; line-height: 1.3; margin-top: 28px; }
.hero__portrait img { width: 100%; max-width: 520px; margin-inline-start: auto; }

.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 16px; font-weight: 500; }
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.is-open .status__dot { background: var(--red); box-shadow: 0 0 0 4px rgba(210, 31, 43, .14); }

/* ───────── Arabic page (dir="rtl") ───────── */
/* letter-spacing breaks the joins between Arabic letters, and Arabic has no capitals */
[dir="rtl"] .label, [dir="rtl"] .map__label, [dir="rtl"] .marquee__item, [dir="rtl"] h2 { letter-spacing: 0; text-transform: none; }
[dir="rtl"] body { line-height: 1.75; }
[dir="rtl"] .hours tr.is-today th::before { content: "← "; }
/* times read left to right even on the Arabic page ("08:00–18:00", not reversed) */
[dir="rtl"] .hours td { direction: ltr; text-align: left; }
/* the ribbon's scrolling maths assumes left-to-right; the Arabic words still read correctly */
[dir="rtl"] .marquee { direction: ltr; }
[dir="rtl"] .marquee__item { font-size: 16px; padding: 0 22px; }

/* ───────── marquee: a thin black ribbon of small capitals ───────── */
.marquee { overflow: hidden; background: var(--ink); color: #f4f4f2; padding: 17px 0; }
.marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee__item {
  font: 500 15px/1 var(--font); letter-spacing: .28em; text-transform: uppercase;
  white-space: nowrap; padding: 0 26px;
}
/* the only colour: small red and blue dots between the words, like the pole */
.marquee__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #e5303b; }
.marquee__dot:nth-of-type(even) { background: #4d6fe0; }

/* ───────── hero depth: parallax on scroll, tilt with the mouse (set by app.js) ───────── */
.hero__text, .hero__portrait { will-change: transform; }
.hero__portrait img { transition: transform .2s linear; transform-origin: 50% 60%; }

/* ───────── headlines rise into place word by word (words wrapped by app.js) ───────── */
.js h2 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.js h2 .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.js h2.is-in .w > span { transform: none; }

/* ───────── service cards lift on hover ───────── */
.services li { transition: transform .4s var(--ease); }
/* the scroll-reveal also sets transform, so this needs to beat .js .reveal.is-in */
@media (hover: hover) { .js .services li.is-in:hover, .services li:hover { transform: translateY(-6px); } }

/* ───────── sections ───────── */
.section { padding: var(--space) 0; }
.section--grey { background: var(--grey); }

/* gallery: two finished cuts, kept small because the source photos are small */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 12px; }
.shot { background: var(--line); overflow: hidden; aspect-ratio: 3 / 4; }

/* The work: only two photos, so the whole section is centred instead of leaving
   an empty right half */
.section--center .head, .section--center .more { text-align: center; }
.section--center .label--rule::after { margin-left: auto; margin-right: auto; }
.section--center .gallery { justify-content: center; }
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* photo + text, side by side */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--text { align-items: start; }
.split__text .facts { margin-top: 32px; }
/* Walid section: text beside a tall 9:16 video */
.split--video { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.clip { position: relative; max-width: 340px; margin-inline-start: auto; width: 100%; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: var(--ink); }
.clip__toggle {
  position: absolute; inset-inline-end: 12px; bottom: 12px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer;
}
.split__side .status { margin-top: 0; }
.split__side .note { margin-top: 20px; }
.split__text > p:not(.label):not(.status) { margin-top: 20px; max-width: 34em; }
.split__text .note { margin-top: 24px; }

.facts { display: flex; flex-wrap: wrap; gap: 16px 40px; padding-top: 24px; border-top: 1px solid var(--ink); }
.facts li { display: flex; flex-direction: column; }
.facts strong { font-weight: 600; font-size: 30px; line-height: 1.1; }
.facts li > span { color: var(--muted); font-size: 16px; }   /* the caption, not the counted number */

/* services: three cards, each with its line drawing; no prices or times */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.services li { border-top: 1px solid var(--ink); padding-top: 20px; }
.service__art { aspect-ratio: 4 / 5; margin-bottom: 20px; }
.service__art img { width: 100%; height: 100%; object-fit: contain; }
.services h3 { font-size: 24px; font-weight: 600; }
.services p { color: var(--muted); font-size: 17px; margin-top: 6px; }

/* hours */
.hours { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 24px; font-size: 17px; }
.hours th, .hours td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: start; font-weight: 400; }
.hours td { text-align: end; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th::before { content: "→ "; }
.hours .closed { color: var(--muted); }
.place { font-style: normal; margin-top: 24px; font-size: 17px; }
.place a { text-decoration: none; }

/* ───────── map: Google's map in black and white, our card on top ───────── */
.map { position: relative; background: var(--grey); }
.map__view { position: relative; height: clamp(340px, 36vw, 480px); overflow: hidden; }
.map__frame {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: grayscale(1) contrast(1.1) brightness(1.04);   /* matches the black-and-white site */
}
/* a red dot with a slow ring. The map is centred on the salon, and Google draws a grey pin
   whose tip is at the centre; the dot sits on that pin's head (about 30 px up) so the two
   read as one red-headed pin */
.map__pin {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -38px 0 0 -8px;
  border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px #fff; pointer-events: none;
}
.map__pin::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--red);
  animation: pin-ring 2.4s ease-out infinite;
}
@keyframes pin-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.map__card {
  position: absolute; bottom: clamp(20px, 3vw, 40px);
  inset-inline-start: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  width: min(360px, calc(100% - 2 * var(--gutter)));
  background: var(--ink); color: #f2f2f2; padding: 26px 28px 28px;
}
.map__label { font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #b5b5b5; }
.map__name { font-size: 24px; font-weight: 600; margin-top: 8px; }
.map__meta { color: #b5b5b5; font-size: 16px; margin-top: 4px; }
.map__meta a { color: #f2f2f2; text-underline-offset: 3px; }
.map__card .btn { margin-top: 20px; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }

/* ───────── footer: one black closing block ───────── */
.footer { background: var(--ink); color: #f2f2f2; padding: clamp(56px, 8vw, 96px) 0 40px; }
.footer__in { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.footer__logo { width: 260px; }
.footer__meta { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: #b5b5b5; text-align: end; }
.footer__meta a { color: #f2f2f2; text-decoration: none; }
.footer__meta a:hover { text-decoration: underline; }

/* ───────── motion: photos rise in as they scroll into view ───────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .label--rule::after { animation: none; }
  .map__pin::after { animation: none; opacity: 0; }
  .js h2 .w > span { transform: none; transition: none; }
  .services li, .services li:hover, .js .services li.is-in:hover { transition: none; transform: none; }
}

/* ───────── phones ───────── */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .hero__grid, .split, .split--video { grid-template-columns: minmax(0, 1fr); }
  .clip { margin: 0 auto; max-width: 320px; }
  .hero__portrait { order: -1; }
  .hero__portrait img { max-width: 300px; margin: 0 auto; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .services li { display: grid; grid-template-columns: 128px minmax(0, 1fr); column-gap: 18px; align-items: center; padding: 18px 0; }
  .services li:last-child { border-bottom: 1px solid var(--line); }
  .service__art { grid-row: span 2; margin: 0; }
  .services h3 { align-self: end; font-size: 21px; }
  .services p { align-self: start; font-size: 16px; }
  .footer__in { flex-direction: column; align-items: flex-start; }
  .map__view { height: 300px; }
  /* on phones the card sits under the map; light, so it doesn't merge with the black footer */
  .map__card { position: static; width: auto; padding: 24px var(--gutter) 32px; background: var(--grey); color: var(--ink); }
  .map__label, .map__meta { color: var(--muted); }
  .map__meta a { color: var(--ink); }
  .map__card .btn { width: 100%; }
  .map__card .btn--light { background: var(--ink); color: #fff; border-color: var(--ink); }
  .footer__meta { text-align: start; }
}
@media (max-width: 420px) {
  .label { letter-spacing: .1em; font-size: 15px; }
  .nav__in { gap: 12px; }
  .nav__brand img { width: 175px; }   /* leaves room for the language switch */
  .btn { width: 100%; }
  .nav .btn { width: auto; }
}
