/* QAF LTD — Premium IT Services (Dubai) */
:root {
  --bg: #0c0e12;
  --bg-elevated: #14181f;
  --bg-soft: #1a1f29;
  --surface: rgba(26, 31, 41, 0.72);
  --text: #f2efe8;
  --text-muted: #a8a296;
  --gold: #c9a227;
  --gold-bright: #e0c15a;
  --gold-deep: #9a7b1a;
  --line: rgba(201, 162, 39, 0.22);
  --line-soft: rgba(242, 239, 232, 0.08);
  --danger: #e8a0a0;
  --ok: #9dcea8;
  --radius: 1.1rem;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-h: 4.25rem;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-ar: "Cairo", "Segoe UI", sans-serif;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(900px 500px at 0% 20%, rgba(40, 70, 110, 0.18), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body,
html[dir="rtl"] body {
  font-family: var(--font-ar);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--gold);
  color: #111;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(12, 14, 18, 0.78);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

html[lang="ar"] .brand-name {
  font-family: var(--font-ar);
  font-weight: 700;
  letter-spacing: 0;
}

.brand-tag {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

html[lang="ar"] .brand-tag {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.72rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(201, 162, 39, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle,
.nav-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(201, 162, 39, 0.08);
  color: var(--text);
  border-radius: 999px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.95rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-toggle:hover,
.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.16);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: inherit;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(12, 14, 18, 0.96);
  padding: 0.75rem 1rem 1.1rem;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 0.65rem;
}

.mobile-nav a:hover {
  background: rgba(201, 162, 39, 0.1);
}

@media (min-width: 920px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #14110a;
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.28);
}

.btn-primary:hover {
  color: #0c0e12;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92vh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 14, 18, 0.35) 0%, rgba(12, 14, 18, 0.55) 40%, rgba(12, 14, 18, 0.92) 100%),
    linear-gradient(90deg, rgba(12, 14, 18, 0.75) 0%, rgba(12, 14, 18, 0.25) 55%, rgba(12, 14, 18, 0.55) 100%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 3.5rem;
  max-width: 40rem;
  animation: riseIn 0.9s var(--ease) both;
}

html[dir="rtl"] .hero-content {
  margin-inline-end: auto;
  margin-inline-start: max(1rem, calc((100% - var(--max)) / 2));
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 0.95;
  margin: 0 0 1rem;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

html[lang="ar"] .hero-brand {
  font-family: var(--font-ar);
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
  max-width: 22ch;
}

html[lang="ar"] .hero h1 {
  font-family: var(--font-ar);
  font-weight: 700;
  max-width: 28ch;
}

.hero-lead {
  margin: 0 0 1.6rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36ch;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

html[lang="ar"] .eyebrow {
  letter-spacing: 0.06em;
  text-transform: none;
}

.section-head h2,
.page-hero h1,
.legal-wrap h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
}

html[lang="ar"] .section-head h2,
html[lang="ar"] .page-hero h1,
html[lang="ar"] .legal-wrap h1 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.section-head p,
.page-hero p {
  margin: 0;
  color: var(--text-muted);
}

.page-hero {
  padding: 3.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.5rem;
}

/* Service grid — interaction containers, restrained */
.service-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.07), transparent 45%),
    var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  min-height: 100%;
}

.service-card:hover {
  border-color: var(--line);
  transform: translateY(-3px);
  color: inherit;
}

.service-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.85rem;
  border: 1px solid var(--line-soft);
}

.service-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--gold-bright);
}

html[lang="ar"] .service-card h3 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  flex: 1;
}

.service-card .more {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Split about */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }
}

.split-media {
  border-radius: calc(var(--radius) + 0.2rem);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.split-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.split-copy h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

html[lang="ar"] .split-copy h2 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.split-copy p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold-bright);
  line-height: 1.1;
}

html[lang="ar"] .stat strong {
  font-family: var(--font-ar);
}

.stat span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* CTA band */
.cta-band {
  margin: 1rem 0 0;
  padding: 2.5rem 1.5rem;
  border-radius: calc(var(--radius) + 0.15rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(201, 162, 39, 0.18), transparent 60%),
    var(--bg-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

html[lang="ar"] .cta-band h2 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.cta-band p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36ch;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 880px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
  }
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-list li {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.contact-list strong {
  display: block;
  color: var(--gold-bright);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--gold-bright);
}

.form {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line-soft);
  background: #0f1218;
  color: var(--text);
  font: inherit;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
}

.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: var(--danger); }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Legal */
.legal-wrap {
  padding: 2.5rem 0 4rem;
  max-width: 48rem;
}

.legal-wrap h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  color: var(--gold-bright);
  font-family: var(--font-display);
}

html[lang="ar"] .legal-wrap h2 {
  font-family: var(--font-ar);
}

.legal-wrap p,
.legal-wrap li {
  color: var(--text-muted);
}

.legal-wrap ul {
  padding-inline-start: 1.2rem;
}

.legal-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line-soft);
  background: #090b0e;
  padding: 2.75rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  object-fit: cover;
}

.footer-brand strong {
  display: block;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.25rem;
}

html[lang="ar"] .footer-brand strong {
  font-family: var(--font-ar);
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

html[lang="ar"] .footer-col h3 {
  letter-spacing: 0.04em;
  text-transform: none;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  min-height: 40px;
}

.footer-col a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 34rem;
  margin-inline-end: auto;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(20, 24, 31, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
  animation: riseIn 0.45s var(--ease);
}

html[dir="rtl"] .cookie-banner {
  margin-inline-end: 0;
  margin-inline-start: auto;
}

.cookie-banner p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-actions .btn {
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img,
  .reveal,
  .hero-content,
  .cookie-banner.is-visible {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Service detail pages */
.crumb {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.crumb:hover {
  color: var(--gold-bright);
}

.detail-panels {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

@media (min-width: 800px) {
  .detail-panels {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-panel {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--bg-elevated);
}

.detail-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--gold-bright);
}

html[lang="ar"] .detail-panel h2 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.detail-list {
  margin: 0;
  padding-inline-start: 1.15rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.55rem;
}

.detail-fit {
  margin-top: 1.5rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.08), transparent 50%),
    var(--bg-soft);
}

.detail-fit h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-bright);
}

html[lang="ar"] .detail-fit h2 {
  font-family: var(--font-ar);
  font-weight: 700;
}

.detail-fit p {
  margin: 0;
  color: var(--text-muted);
}

.service-grid-mini .service-card p {
  display: none;
}

.service-grid-mini .service-card img {
  aspect-ratio: 16 / 10;
}
