/* Local Arabic fonts. Refresh with scripts/download-arabic-fonts.sh when needed. */
@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/amiri-normal-400-01.woff2") format("woff2");
}

@font-face {
  font-family: "Amiri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/amiri-normal-700-01.woff2") format("woff2");
}

@font-face {
  font-family: "Amiri";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/amiri-italic-400-01.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/tajawal-normal-300-01.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/tajawal-normal-400-01.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/tajawal-normal-500-01.woff2") format("woff2");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/tajawal-normal-700-01.woff2") format("woff2");
}

/* Shared foundation: design tokens, reset, typography, and global page surface. */
:root {
  --black: #090909;
  --ink: #101010;
  --panel: #171513;
  --obsidian: #0d0d0d;
  --surface: #131313;
  --charcoal: #1a1a1a;
  --charcoal-high: #242321;
  --ivory: #f5f5f0;
  --muted: #d0c5af;
  --dim: rgba(245, 245, 240, 0.62);
  --gold: #d4af37;
  --gold-bright: #f2ca50;
  --gold-light: #f0d06c;
  --gold-deep: #9d7a0b;
  --line: rgba(212, 175, 55, 0.28);
  --soft: rgba(245, 240, 229, 0.1);
  --soft-line: rgba(245, 245, 240, 0.1);
  --wood: #2a1510;
  --image-grade: sepia(0.1) saturate(0.74) contrast(1.08) brightness(0.82);
  --image-grade-hover: sepia(0.06) saturate(0.9) contrast(1.1) brightness(0.96);
  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
  --max: 1440px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-luxury: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--obsidian);
}

body {
  min-height: 100vh;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

[dir="rtl"] body {
  direction: rtl;
}

[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
  text-align: right;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(245, 245, 240, 0.04));
}

.media-frame::before,
.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(245, 245, 240, 0.055) 42%, transparent 72%);
  transform: translateX(-100%);
  animation: luxurySkeleton 1600ms var(--ease-luxury) infinite;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

@keyframes fadeLift {
  from { opacity: 1; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes imageBreath {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}

@keyframes goldTrace {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes luxurySkeleton {
  to { transform: translateX(100%); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-luxury), transform 900ms var(--ease-luxury);
}

.reveal.is-observed {
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .media-frame::before,
  .is-loading::before {
    animation: none;
  }
}

/* =================================================================
   Arabic Typography
   Amiri (display/headings) + Tajawal (body/UI)
   Activated when i18n.js sets html[lang="ar"] + html[dir="rtl"]
   ================================================================= */

html[lang="ar"] {
  --serif: "Amiri", "Traditional Arabic", Georgia, serif;
  --sans: "Tajawal", "Arabic Transparent", Arial, sans-serif;
}

html[lang="ar"] body {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0;
}

html[lang="ar"] h1 {
  line-height: 1.22;
  letter-spacing: 0;
}

html[lang="ar"] h2 {
  line-height: 1.32;
  letter-spacing: 0;
}

html[lang="ar"] h3 {
  line-height: 1.38;
  letter-spacing: 0;
}

/* Arabic script does not use inter-character spacing — reset all
   components that carry letter-spacing in the Latin layout */
html[lang="ar"] .eyebrow,
html[lang="ar"] .kicker,
html[lang="ar"] .mini-label,
html[lang="ar"] .hero-mark,
html[lang="ar"] .brand span,
html[lang="ar"] .nav-links a,
html[lang="ar"] .button,
html[lang="ar"] .stat span,
html[lang="ar"] .showcase-caption span,
html[lang="ar"] .floating-whatsapp span,
html[lang="ar"] .footer-column h4,
html[lang="ar"] .cta-points span {
  letter-spacing: 0;
}

/* Tajawal renders slightly smaller than Montserrat at the same size —
   nudge small-text components up for comfortable Arabic readability */
html[lang="ar"] .eyebrow {
  font-size: 0.84rem;
}

html[lang="ar"] .hero-mark {
  font-size: 0.78rem;
}

html[lang="ar"] .nav-links a {
  font-size: 0.84rem;
}

html[lang="ar"] .button {
  font-size: 0.84rem;
}

html[lang="ar"] .kicker {
  font-size: 0.82rem;
}

html[lang="ar"] .brand span {
  font-size: 0.65rem;
}

html[lang="ar"] .stat span {
  font-size: 0.78rem;
}

html[lang="ar"] .footer-column h4 {
  font-size: 0.8rem;
}

/* Long-form Arabic text needs extra breathing room */
html[lang="ar"] .hero-copy,
html[lang="ar"] .craft-content p,
html[lang="ar"] .section-head p,
html[lang="ar"] .card-body p,
html[lang="ar"] .project-block p,
html[lang="ar"] .export-item p,
html[lang="ar"] .cta-content p,
html[lang="ar"] .contact-note,
html[lang="ar"] .footer-brand p,
html[lang="ar"] .craft-list span {
  line-height: 1.85;
}

/* RTL: eyebrow decorative line should expand right → left
   (natural Arabic reading direction) */
[dir="rtl"] .eyebrow::before {
  transform-origin: right;
}

/* RTL: nav underline collapses/expands in reading-direction order */
[dir="rtl"] .nav-links a::after {
  transform-origin: left;
}

[dir="rtl"] .nav-links a:hover::after,
[dir="rtl"] .nav-links a[aria-current="page"]::after {
  transform-origin: right;
}

/* RTL: footer link hover nudge goes left (toward reading start) */
[dir="rtl"] .footer-column a:hover {
  transform: translateX(-4px);
}
