/* ==========================================================================
   Shendy - design tokens
   Light values live on :root, dark values on [data-bs-theme="dark"].
   Logical properties are used throughout so RTL and LTR share one stylesheet.
   ========================================================================== */
:root {
  --c-primary: #2563EB;
  --c-primary-hover: #1D4ED8;
  --c-secondary: #0F172A;
  --c-accent: #06B6D4;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --link: #2563EB;
  --grid: rgba(37, 99, 235, .08);
  --tint: rgba(37, 99, 235, .12);

  --band-bg: #0F172A;
  --band-text: #E2E8F0;
  --band-muted: #94A3B8;

  --wa: #0F7A40;
  --wa-hover: #0B6333;

  --radius: 14px;
  --shadow: 0 14px 32px -14px rgba(15, 23, 42, .25);
  --nav-h: 68px;
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

[data-bs-theme="dark"] {
  --bg: #0B1220;
  --surface: #111B2F;
  --surface-alt: #0E172A;
  --text: #E5EAF3;
  --muted: #9AA8BD;
  --border: #1F2B44;
  --link: #60A5FA;
  --grid: rgba(96, 165, 250, .09);
  --tint: rgba(96, 165, 250, .14);

  --band-bg: #0F1A2E;
  --band-text: #E5EAF3;
  --band-muted: #9AA8BD;

  --shadow: 0 14px 32px -14px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

a {
  color: var(--link);
}

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  z-index: 2000;
  padding: .5rem 1rem;
  background: var(--c-primary);
  color: #fff;
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) - 8px);
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .01em;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--c-primary);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- Navigation ---------- */
.site-nav {
  --bs-navbar-color: var(--muted);
  --bs-navbar-hover-color: var(--text);
  --bs-navbar-active-color: var(--link);
  min-height: var(--nav-h);
  padding-block: .5rem;
  background: var(--bg);
  border-block-end: 1px solid transparent;
  transition: border-color .2s ease;
}

@supports (background: color-mix(in srgb, red, blue)) {
  .site-nav {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.site-nav.is-scrolled {
  border-block-end-color: var(--border);
}

.site-nav .nav-link {
  font-weight: 600;
  padding-inline: 1rem;
}

.site-nav .nav-link.active {
  color: var(--link);
}

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse {
    margin-block-start: .5rem;
    padding-block: .5rem;
    border-block-start: 1px solid var(--border);
  }
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 40px;
  padding: .25rem .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.btn-tool:hover {
  border-color: var(--c-primary);
  color: var(--link);
}

.btn-tool-icon {
  width: 40px;
  padding: 0;
  font-size: 1.1rem;
}

.navbar-toggler.btn-tool {
  --bs-navbar-toggler-focus-width: 0;
}

.icon-sun {
  display: none;
}

[data-bs-theme="dark"] .icon-sun {
  display: inline;
}

[data-bs-theme="dark"] .icon-moon {
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--c-primary);
  --bs-btn-border-color: var(--c-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--c-primary-hover);
  --bs-btn-hover-border-color: var(--c-primary-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--c-primary-hover);
  --bs-btn-active-border-color: var(--c-primary-hover);
}

.btn-wa {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--wa);
  --bs-btn-border-color: var(--wa);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--wa-hover);
  --bs-btn-hover-border-color: var(--wa-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--wa-hover);
  --bs-btn-active-border-color: var(--wa-hover);
}

.btn-ghost {
  --bs-btn-color: var(--text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--link);
  --bs-btn-hover-bg: var(--surface);
  --bs-btn-hover-border-color: var(--c-primary);
  --bs-btn-active-color: var(--link);
  --bs-btn-active-bg: var(--surface);
  --bs-btn-active-border-color: var(--c-primary);
}

.btn-outline-brand {
  --bs-btn-color: var(--link);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--c-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--c-primary);
  --bs-btn-hover-border-color: var(--c-primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--c-primary-hover);
  --bs-btn-active-border-color: var(--c-primary-hover);
  align-self: flex-start;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: calc(var(--nav-h) + 3.5rem) 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

.hero-title {
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem);
  line-height: 1.3;
  margin-block-end: 1.25rem;
  max-width: 18ch;
}

.hero-text {
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--muted);
  margin-block-end: 2rem;
}

.hero-figure {
  margin: 0;
  width: min(100%, 320px);
  padding: 0 14px 14px 0;
  isolation: isolate;
}

[dir="rtl"] .hero-figure {
  padding: 0 0 14px 14px;
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset-block: 14px -14px;
  inset-inline: 14px -14px;
  border: 2px solid var(--c-accent);
  border-radius: 20px;
  z-index: -1;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--c-secondary);
  color: #fff;
  font-size: 5rem;
  font-weight: 700;
}

.name-tag {
  display: flex;
  flex-direction: column;
  margin-block-start: 1.5rem;
  line-height: 1.5;
}

.name-tag strong {
  font-size: 1.15rem;
}

.name-tag span {
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 5rem;
}

.section-alt {
  background: var(--surface-alt);
  border-block: 1px solid var(--border);
}

.section-head {
  margin-block-end: 2.5rem;
}

.section-head h2,
.about h2,
.contact-card h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  margin-block-end: .75rem;
}

.section-head p {
  max-width: 62ch;
  color: var(--muted);
  margin: 0;
}

/* ---------- Service cards ---------- */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-primary);
  box-shadow: var(--shadow);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-block-end: 1rem;
  border-radius: 12px;
  background: var(--tint);
  color: var(--link);
  font-size: 1.35rem;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-block-end: .5rem;
}

.service-card p {
  flex-grow: 1;
  margin-block-end: 1.25rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.75;
}

/* ---------- About ---------- */
.about {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  max-width: 820px;
}

.about p {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.about p:last-child {
  margin-block-end: 0;
}

.about-avatar {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--c-accent);
}

.about-avatar.photo-placeholder {
  font-size: 2.25rem;
}

/* ---------- Why choose ---------- */
.band {
  background: var(--band-bg);
  color: var(--band-text);
}

.band h2 {
  color: var(--band-text);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-list li {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  line-height: 1.7;
}

.why-list .bi {
  flex: 0 0 auto;
  color: var(--c-accent);
  font-size: 1.4rem;
  line-height: 1.5;
}

/* ---------- Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
}

.contact-intro {
  max-width: 48ch;
  margin-block-end: 1.75rem;
  color: var(--muted);
}

.contact-details {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding-inline-start: 2rem;
  border-inline-start: 1px solid var(--border);
}

.contact-details dt {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}

.contact-details dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-details dd a {
  text-decoration: none;
}

.contact-details dd a:hover {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-details {
    padding-inline-start: 0;
    padding-block-start: 1.5rem;
    border-inline-start: 0;
    border-block-start: 1px solid var(--border);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 3rem 5.5rem;
  border-block-start: 1px solid var(--border);
  background: var(--surface-alt);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-tagline {
  max-width: 44ch;
  margin: .75rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--link);
}

.footer-copy {
  margin: 2rem 0 0;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- Floating buttons ---------- */
.float-wa,
.back-top {
  position: fixed;
  z-index: 1030;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .4);
}

.float-wa {
  inset-block-end: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 1.25rem;
  width: 56px;
  height: 56px;
  background: var(--wa);
  color: #fff;
  font-size: 1.7rem;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}

.float-wa:hover {
  background: var(--wa-hover);
  color: #fff;
  transform: scale(1.06);
}

.back-top {
  inset-block-end: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  inset-inline-end: calc(1.25rem + 6px);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}

.back-top:hover {
  border-color: var(--c-primary);
  color: var(--link);
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
  .hero {
    padding-block-end: 3.5rem;
  }

  .section {
    padding-block: 3.5rem;
  }

  .about {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .service-card:hover,
  .float-wa:hover {
    transform: none;
  }
}
