/*!
  Stylish Man — stylesheet (minimal storytelling edition)
  Two-color system only: white/black + opacity for hierarchy, swapped via
  [data-theme]. No gradients, no glow, no decorative motion — the brief for
  this pass is Zara/COS-style restraint. Bilingual (EN default, AR via
  [dir="rtl"]): layout uses CSS logical properties so it mirrors correctly
  without a second stylesheet. Organized: tokens -> reset -> utilities ->
  components (in page order) -> reduced motion.
*/

/* ===================== 0. FONTS (self-hosted, OFL-licensed) =====================
   IBM Plex Sans (Latin) + IBM Plex Sans Arabic — a matched pair from the same
   foundry so English and Arabic sit at a consistent weight/rhythm. Applied via
   :lang(ar), so it follows the <html lang> attribute automatically. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-arabic-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-arabic-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-arabic-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/ibm-plex-sans-arabic-700.woff2') format('woff2'); }

/* ===================== 1. DESIGN TOKENS ===================== */
:root {
  --bg: #ffffff;
  --text: #000000;
  --text-soft: rgba(0,0,0,.62);
  --text-faint: rgba(0,0,0,.42);
  --border: rgba(0,0,0,.14);
  --border-strong: rgba(0,0,0,.34);
  --surface: rgba(0,0,0,.025);
  --surface-hover: rgba(0,0,0,.05);
  --btn-primary-bg: #000000;
  --btn-primary-text: #ffffff;
  --header-bg: rgba(255,255,255,.85);
  --overlay-scrim: rgba(255,255,255,.97);

  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;

  --space-3xs:.25rem; --space-2xs:.5rem; --space-xs:.75rem; --space-sm:1rem;
  --space-md:1.5rem; --space-lg:2.5rem; --space-xl:4rem; --space-2xl:6rem;

  --radius-sm: 4px; --radius-md: 8px; --radius-pill: 999px;

  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-fast: .2s; --dur-theme: .4s;

  --container-w: 1200px;
  --container-w-narrow: 720px;

  --z-header: 50; --z-mobilenav: 55; --z-float: 40; --z-skiplink: 200;
}

[data-theme="dark"] {
  --bg: #000000;
  --text: #ffffff;
  --text-soft: rgba(255,255,255,.62);
  --text-faint: rgba(255,255,255,.42);
  --border: rgba(255,255,255,.16);
  --border-strong: rgba(255,255,255,.36);
  --surface: rgba(255,255,255,.035);
  --surface-hover: rgba(255,255,255,.065);
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #000000;
  --header-bg: rgba(0,0,0,.85);
  --overlay-scrim: rgba(0,0,0,.97);
}

/* ===================== 2. RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--dur-theme) ease, color var(--dur-theme) ease;
}
:lang(ar) { font-family: var(--font-arabic); }

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

::selection { background: var(--text); color: var(--bg); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }

/* Directional icons (e.g. a "forward" arrow) should point toward the reading
   direction's end, not a hardcoded physical side. */
[dir="rtl"] .icon--dir { transform: scaleX(-1); }

/* ===================== 3. UTILITIES ===================== */
.container { width: 100%; max-width: var(--container-w); margin: 0 auto; padding-inline: var(--space-md); }
@media (min-width: 640px) { .container { padding-inline: var(--space-lg); } }
.container--narrow { max-width: var(--container-w-narrow); }

.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;
}

.skip-link {
  position: fixed; top: -100px; inset-inline-start: 1rem; z-index: var(--z-skiplink);
  background: var(--text); color: var(--bg); padding: .75rem 1.25rem;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.icon { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: inline-block; vertical-align: middle; }

.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-soft); font-weight: 600; margin: 0 0 .85rem; }
.eyebrow--center { text-align: center; }

/* Buttons — one simple, restrained style: solid inverted primary, thin
   outline for anything secondary. No shadows, no motion beyond a fast fade. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: opacity var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); }
.btn--primary:hover { opacity: .82; }
.btn--outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--text); background: var(--surface); }
.btn--block { width: 100%; }

/* ===================== 4. HEADER / NAVIGATION ===================== */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }

.brand { display: inline-flex; text-decoration: none; color: var(--text); }
.brand__placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 96px; padding: .5rem 1rem; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-faint);
}

.nav__list { display: none; gap: 2rem; }
@media (min-width: 900px) { .nav__list { display: flex; align-items: center; } }
.nav__link { color: var(--text-soft); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color var(--dur-fast) var(--ease-out); }
.nav__link:hover, .nav__link:focus-visible { color: var(--text); }

.site-header__actions { display: flex; align-items: center; gap: .75rem; }

.lang-switch { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.lang-switch__btn {
  background: none; border: none; border-radius: var(--radius-pill); padding: .3rem .65rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; color: var(--text-soft); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch__btn.is-active { background: var(--text); color: var(--bg); }

.theme-switch {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text);
  cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out);
}
.theme-switch:hover { border-color: var(--border-strong); }
.theme-switch .icon-sun { display: none; }
[data-theme="dark"] .theme-switch .icon-moon { display: none; }
[data-theme="dark"] .theme-switch .icon-sun { display: block; }

.nav__toggle {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer;
}
@media (min-width: 900px) { .nav__toggle { display: none; } }

.mobile-nav {
  position: fixed; inset: 0; z-index: var(--z-mobilenav); background: var(--overlay-scrim);
  display: flex; flex-direction: column; padding: 1.1rem var(--space-md) var(--space-lg);
  transform: translateY(-100%); transition: transform .45s var(--ease-out); visibility: hidden;
}
.mobile-nav.is-open { transform: translateY(0); visibility: visible; }
.mobile-nav__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-xl); }
.mobile-nav__list { display: flex; flex-direction: column; gap: .1rem; flex: 1; overflow-y: auto; }
.mobile-nav__link { display: block; padding: 1rem 0; font-size: 1.5rem; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-nav__socials { display: flex; gap: 1.25rem; padding-top: var(--space-lg); color: var(--text); }
body.nav-open { overflow: hidden; }

/* ===================== 5. HERO — minimal opening ===================== */
.hero { padding: var(--space-2xl) 0; text-align: center; }
.hero__content { max-width: 640px; margin: 0 auto; }
.hero__brand { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; margin: 0 0 .5rem; color: var(--text-soft); }
.hero__headline { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -.01em; margin: 0 0 1.5rem; }
.hero .story-text { margin-inline: auto; }

.full-band { margin: 0; width: 100%; aspect-ratio: 21 / 9; overflow: hidden; }
.full-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .full-band { aspect-ratio: 4 / 3; } }

/* ===================== 6. SECTION SHELL ===================== */
.section { padding: var(--space-2xl) 0; }
.section--tight { padding: var(--space-lg) 0; }
.section--alt { background: var(--surface); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1.25rem; }

.story-text { color: var(--text-soft); font-size: 1.05rem; line-height: 1.75; max-width: 62ch; }
.story-text:last-of-type { margin-bottom: 0; }

/* ===================== 7. IMAGE PLACEHOLDERS ===================== */
.image-pair { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 720px) { .image-pair { grid-template-columns: 1fr 1fr; } }
.image-placeholder {
  aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin: 0;
  background: var(--surface);
}
.image-placeholder figcaption { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }

/* ===================== 8. TIMELINE ===================== */
.timeline { position: relative; margin: var(--space-lg) 0 0; padding-inline-start: 2.25rem; display: flex; flex-direction: column; gap: var(--space-md); }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: .4rem; top: .3rem; bottom: .3rem; width: 2px;
  background: var(--border-strong);
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: ""; position: absolute; inset-inline-start: -2rem; top: .3rem; width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text);
}
.timeline__year { display: block; font-weight: 600; margin-bottom: .25rem; }
.timeline__item p { margin: 0; color: var(--text-soft); max-width: 44ch; }

/* ===================== 9. CONTACT / BUSINESS INQUIRY ===================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); margin-top: var(--space-xl); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }

.contact-emails { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-sm) var(--space-md); margin: 0 0 var(--space-lg); }
.contact-emails li { display: flex; flex-direction: column; gap: .2rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.contact-emails li span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.contact-emails li a { color: var(--text); text-decoration: none; font-size: .93rem; }
.contact-emails li a:hover { text-decoration: underline; }

.contact-details { display: flex; flex-direction: column; gap: var(--space-sm); margin: 0 0 var(--space-lg); }
.contact-details li { display: flex; align-items: center; gap: .7rem; color: var(--text); font-size: .93rem; }
.contact-details a { color: inherit; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }

.socials { display: flex; gap: .6rem; margin-bottom: var(--space-lg); }
.socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text); transition: border-color var(--dur-fast) var(--ease-out); }
.socials a:hover { border-color: var(--text); }

.map-placeholder {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: var(--space-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  text-align: center; color: var(--text-faint); font-size: .8rem; min-height: 150px;
}

.contact-form { display: flex; flex-direction: column; gap: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-lg); }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row--split { flex-direction: row; gap: var(--space-md); }
.form-row--split > div { flex: 1; display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.form-row label { font-size: .78rem; color: var(--text-soft); font-weight: 500; }
.form-row label span:last-child { opacity: .7; font-weight: 400; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .75rem .9rem; color: var(--text); font-size: .92rem; font-family: inherit;
}
.form-row input:focus-visible, .form-row select:focus-visible, .form-row textarea:focus-visible { border-color: var(--text); }
.form-row select { appearance: none; -webkit-appearance: none; padding-inline-end: 2.5rem; }
.form-row textarea { resize: vertical; min-height: 110px; }
.hp-field { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: .85rem; min-height: 1.2em; margin: 0; }
.form-msg.is-success { color: var(--text); font-weight: 600; }
.form-msg.is-error { color: var(--text-soft); }
@media (max-width: 560px) { .form-row--split { flex-direction: column; } .contact-emails { grid-template-columns: 1fr; } }

/* ===================== 10. FOOTER ===================== */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-2xl) 0 var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr repeat(3,1fr); } }
.footer-brand p { color: var(--text-soft); font-size: .9rem; margin: 1rem 0 1.25rem; max-width: 32ch; }
.footer-col h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin: 0 0 1rem; font-weight: 600; }
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a { color: var(--text); text-decoration: none; font-size: .92rem; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-direction: column; gap: .75rem; align-items: center; text-align: center; padding-top: var(--space-lg); margin-top: var(--space-xl); border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-faint); }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; text-align: start; } }
.footer-bottom__links { display: flex; gap: var(--space-md); }
.footer-bottom__links a { color: var(--text-faint); text-decoration: none; }
.footer-bottom__links a:hover { color: var(--text); }

/* ===================== 11. FLOATING UTILITY BUTTONS ===================== */
.back-to-top, .whatsapp-float {
  position: fixed; bottom: var(--space-md); width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
}
.back-to-top:hover, .whatsapp-float:hover { border-color: var(--text); }
.back-to-top { inset-inline-end: var(--space-md); opacity: 0; visibility: hidden; z-index: var(--z-float); }
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.whatsapp-float { inset-inline-start: var(--space-md); z-index: var(--z-float); }

/* ===================== 12. REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===================== 13. SMALL-SCREEN FALLBACKS ===================== */
@media (max-width: 380px) {
  .contact-emails { grid-template-columns: 1fr; }
}