/* ═══════════════════════════════════════════════════════════════
   مطبعة الموصلي — MOUSLI PRESS
   "The Press Sheet" Design System
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=Cairo:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&family=Lemonada:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  /* Brand Colors */
  --purple-deep:    #3B0066;
  --purple-mid:     #5A189A;
  --purple-light:   #7B2FBE;
  --gold-warm:      #F5A623;
  --gold-dark:      #E69500;
  --gold-glow:      rgba(245, 166, 35, 0.25);
  --paper-white:    #FAFAF8;
  --ink-black:      #1A1A1A;
  --ink-soft:       #2D2D2D;
  --ink-muted:      #666666;

  /* CMYK — chrome only, NEVER for content */
  --cyan:    #00A0E3;
  --magenta: #E5007E;
  --yellow:  #FFED00;
  --key:     #1A1A1A;

  /* Functional */
  --bg-primary:     var(--paper-white);
  --bg-dark:        var(--purple-deep);
  --bg-gradient:    linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-mid) 100%);
  --text-primary:   var(--ink-black);
  --text-on-dark:   var(--paper-white);
  --text-muted:     var(--ink-muted);
  --accent:         var(--gold-warm);
  --accent-hover:   var(--gold-dark);

  /* Typography Scale */
  --font-arabic-display: 'Aref Ruqaa', serif;
  --font-arabic-body:    'Cairo', sans-serif;
  --font-mono:           'JetBrains Mono', monospace;

  --fs-hero:    clamp(2.5rem, 6vw, 5rem);
  --fs-h1:      clamp(2rem, 4vw, 3.5rem);
  --fs-h2:      clamp(1.5rem, 3vw, 2.5rem);
  --fs-h3:      clamp(1.2rem, 2vw, 1.75rem);
  --fs-body:    clamp(1rem, 1.2vw, 1.125rem);
  --fs-small:   clamp(0.8rem, 1vw, 0.875rem);
  --fs-micro:   0.6875rem;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  8rem;

  /* Layout */
  --content-width:   1200px;
  --content-padding: clamp(1.5rem, 4vw, 3rem);
  --chrome-inset:    20px;
  --calibration-width: 28px;
  --nav-height:      72px;

  /* Shadows */
  --shadow-card:       0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 12px 32px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1);
  --shadow-elevated:   0 20px 60px rgba(59,0,102,0.2);

  /* Motion */
  --ease-mechanical: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-snap:       cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast:   200ms;
  --duration-normal: 350ms;
  --duration-slow:   600ms;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .halftone-effect,
  .cmyk-separation,
  .color-sep-ghost {
    display: none !important;
  }
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  font-family: var(--font-arabic-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--purple-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-warm); border-radius: 3px; }

/* Selection */
::selection {
  background: var(--gold-warm);
  color: var(--purple-deep);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════ */

h1, h2, h3, .display-text {
  font-family: var(--font-arabic-display);
  font-weight: 700;
  line-height: 1.3;
}

.display-hero {
  font-size: var(--fs-hero);
  font-family: var(--font-arabic-display);
  font-weight: 700;
  line-height: 1.2;
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }

.body-text {
  font-size: var(--fs-body);
  line-height: 1.8;
}

.mono-text {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.05em;
  direction: ltr;
  text-align: left;
}

/* ═══════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════ */

.container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.section {
  padding-block: var(--space-3xl);
  position: relative;
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--gradient {
  background: var(--bg-gradient);
  color: var(--text-on-dark);
}

.section--paper {
  background: var(--paper-white);
}

/* ═══════════════════════════════════════
   PRESS SHEET CHROME
   ═══════════════════════════════════════ */

/* --- Registration Marks (⊕ in corners) --- */
.chrome-registration-marks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.reg-mark {
  position: absolute;
  width: 24px;
  height: 24px;
}

.reg-mark svg {
  width: 100%;
  height: 100%;
}

.reg-mark--tl { top: var(--chrome-inset);  left: var(--chrome-inset); }
.reg-mark--tr { top: var(--chrome-inset);  right: var(--chrome-inset); }
.reg-mark--bl { bottom: var(--chrome-inset); left: var(--chrome-inset); }
.reg-mark--br { bottom: var(--chrome-inset); right: var(--chrome-inset); }

/* --- Crop Marks --- */
.chrome-crop-marks {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  display: none; /* shown on desktop only */
}

@media (min-width: 1024px) {
  .chrome-crop-marks { display: block; }
}

.crop-mark {
  position: absolute;
  stroke: rgba(0, 0, 0, 0.15);
  stroke-width: 0.5px;
}

/* --- Calibration Bar (Scroll Progress) --- */
.chrome-calibration-bar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--calibration-width);
  z-index: 9997;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px;
}

.calibration-strip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
}

.calibration-step {
  width: 100%;
  height: 12px;
  opacity: 0.15;
  transition: opacity var(--duration-fast) var(--ease-mechanical);
}

.calibration-step.filled {
  opacity: 1;
}

.calibration-step--c { background: var(--cyan); }
.calibration-step--m { background: var(--magenta); }
.calibration-step--y { background: var(--yellow); }
.calibration-step--k { background: var(--key); }

/* --- Bleed Line --- */
.chrome-bleed-line {
  position: fixed;
  inset: 8px;
  border: 1px dashed rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 9996;
}

/* --- Micro Label --- */
.chrome-micro-label {
  position: fixed;
  bottom: 10px;
  left: 36px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(0, 0, 0, 0.25);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 9999;
  direction: ltr;
  writing-mode: horizontal-tb;
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--content-padding);
  transition: background var(--duration-normal) var(--ease-mechanical),
              box-shadow var(--duration-normal) var(--ease-mechanical);
}

.nav.scrolled {
  /* Solid background instead of backdrop-filter: blur() — Chromium can
     clip/glitch position:absolute descendants (like .mega-panel) that
     extend outside a backdrop-filter ancestor's box, especially mid
     background-transition. Solid color avoids that class of bug. */
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  z-index: 1001;
}

.nav__logo-icon {
  height: 62px;
  width: auto;
  opacity: 1;
  transition: opacity var(--duration-normal) var(--ease-mechanical), height var(--duration-normal) var(--ease-mechanical);
}

@media (max-width: 480px) {
  .nav__logo-icon {
    height: 50px;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-arabic-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--purple-deep);
  opacity: 0.9;
  transition: color var(--duration-fast) var(--ease-mechanical),
              opacity var(--duration-fast) var(--ease-mechanical);
  position: relative;
}

.nav__link:hover {
  opacity: 1;
  color: var(--gold-dark);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold-warm);
  transition: width var(--duration-fast) var(--ease-mechanical);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 8px 24px;
  background: var(--purple-deep);
  color: var(--paper-white);
  font-weight: 700;
  font-size: var(--fs-small);
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 1;
  transition: all var(--duration-fast) var(--ease-mechanical);
}

.nav__cta:hover {
  background: var(--purple-light);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   MEGA MENU (Services / Products)
   ═══════════════════════════════════════ */
.nav__dropdown {
  position: relative;
}

.nav__dropdown > .nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav__dropdown-arrow {
  width: 9px;
  height: 9px;
  transition: transform var(--duration-fast) var(--ease-mechanical);
}

.nav__dropdown:hover .nav__dropdown-arrow,
.nav__dropdown:focus-within .nav__dropdown-arrow {
  transform: rotate(180deg);
}

.mega-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 50%;
  transform: translate(50%, 8px);
  min-width: 560px;
  background: var(--paper-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  padding: var(--space-md);
  display: flex;
  gap: var(--space-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-mechanical),
              transform var(--duration-normal) var(--ease-mechanical),
              visibility var(--duration-normal);
  z-index: 1001;
}

/* Registration-mark stripe on top of every mega panel — ties into the
   print-shop chrome (CMYK calibration bar) used elsewhere on the site. */
.mega-panel::before {
  content: '';
  position: absolute;
  top: 0;
  right: var(--space-md);
  left: var(--space-md);
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 25% 50%, var(--yellow) 50% 75%, var(--key) 75% 100%);
  border-radius: 0 0 2px 2px;
}

.nav__dropdown:hover .mega-panel,
.nav__dropdown:focus-within .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(50%, 0);
}

.mega-panel__grid {
  flex: 1 1 340px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  align-content: start;
}

.mega-panel__grid--single {
  grid-template-columns: 1fr;
}

.mega-panel__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-mechanical);
}

.mega-panel__item:hover {
  background: rgba(59, 0, 102, 0.05);
}

.mega-panel__dot {
  flex-shrink: 0;
  margin-top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mega-panel__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-panel__title {
  font-family: var(--font-arabic-body);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--purple-deep);
}

.mega-panel__desc {
  font-family: var(--font-arabic-body);
  font-size: var(--fs-micro);
  color: var(--text-muted);
  line-height: 1.5;
}

.mega-panel__promo {
  flex: 1 1 160px;
  background: var(--bg-gradient);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--paper-white);
}

.mega-panel__promo-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  color: var(--gold-warm);
  text-transform: uppercase;
}

.mega-panel__promo-title {
  font-family: var(--font-arabic-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.mega-panel__promo p {
  font-size: var(--fs-micro);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 4px;
}

.mega-panel__promo .btn {
  font-size: var(--fs-micro);
  padding: 8px 16px;
}

@media (max-width: 1024px) {
  .mega-panel { display: none; }
}

/* Mobile Nav Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-deep);
  border-radius: 1px;
  transition: transform var(--duration-normal) var(--ease-mechanical),
              background var(--duration-normal) var(--ease-mechanical),
              opacity var(--duration-fast);
}

.nav__toggle.active span {
  background: var(--paper-white) !important;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.nav__mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(59, 0, 102, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  padding-block: calc(var(--nav-height) + var(--space-lg)) var(--space-lg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-mechanical),
              visibility var(--duration-normal);
  z-index: 999;
}

.nav__mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.nav__mobile-menu a {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-h2);
  color: var(--paper-white);
  text-align: center;
  max-width: 90vw;
  transition: color var(--duration-fast);
}

.nav__mobile-menu a:hover {
  color: var(--gold-warm);
}

.mobile-link--sub {
  font-family: var(--font-arabic-body) !important;
  font-size: var(--fs-body) !important;
  font-weight: 600;
  color: rgba(250, 250, 248, 0.7) !important;
  margin-top: -6px;
}

.mobile-link--sub:hover {
  color: var(--gold-warm) !important;
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta.desktop-only { display: none; }
  .nav__toggle { display: flex; }
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 36px;
  font-family: var(--font-arabic-body);
  font-weight: 700;
  font-size: var(--fs-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-mechanical);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gold-warm);
  color: var(--purple-deep);
  box-shadow: 0 4px 15px var(--gold-glow);
}

.btn--primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--gold-glow);
}

.btn--secondary {
  background: transparent;
  color: var(--purple-deep);
  border: 2px solid var(--purple-deep);
}

.btn--secondary:hover {
  background: var(--purple-deep);
  color: var(--paper-white);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--paper-white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn--ghost:hover {
  border-color: var(--gold-warm);
  color: var(--gold-warm);
  transform: translateY(-2px);
}

.btn--large {
  padding: 18px 48px;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper-white);
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* CMYK Ghost layers for registration animation */
.hero__cmyk-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}

.hero__cmyk-layer--c {
  color: var(--cyan);
  mix-blend-mode: multiply;
}
.hero__cmyk-layer--m {
  color: var(--magenta);
  mix-blend-mode: multiply;
}
.hero__cmyk-layer--y {
  color: var(--yellow);
  mix-blend-mode: multiply;
}
.hero__cmyk-layer--k {
  color: var(--key);
}

.hero__content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding-inline: var(--content-padding);
}

.hero__logo-container {
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
}

.hero__logo {
  width: clamp(200px, 30vw, 360px);
  height: auto;
  position: relative;
  z-index: 2;
}

/* Halftone overlay for ink-hitting-paper effect */
.hero__halftone-overlay {
  position: absolute;
  inset: -20px;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.5s var(--ease-mechanical);
}

.hero__halftone-overlay.resolved {
  opacity: 0;
}

.hero__headline {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-hero);
  color: var(--purple-deep);
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-mechanical) 1.2s,
              transform 0.8s var(--ease-mechanical) 1.2s;
}

.hero__headline.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__subtitle {
  font-family: var(--font-arabic-body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--ink-muted);
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s var(--ease-mechanical) 1.5s,
              transform 0.8s var(--ease-mechanical) 1.5s;
}

.hero__subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s var(--ease-mechanical) 1.8s,
              transform 0.8s var(--ease-mechanical) 1.8s;
}

.hero__ctas.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Golden pillars / M icon */
.hero__pillars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-mechanical) 0.5s,
              transform 1s var(--ease-mechanical) 0.5s;
}

.hero__pillars.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__pillar {
  width: 12px;
  height: 80px;
  background: linear-gradient(180deg, var(--gold-warm) 0%, var(--gold-dark) 100%);
  border-radius: 6px 6px 2px 2px;
  transform-origin: bottom;
}

/* ═══════════════════════════════════════
   TRUST BAR
   ═══════════════════════════════════════ */

.trust-bar {
  background: var(--bg-dark);
  padding-block: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.trust-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.trust-bar__icon {
  width: 48px;
  height: 48px;
  color: var(--gold-warm);
}

.trust-bar__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.trust-bar__title {
  font-family: var(--font-arabic-body);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--paper-white);
}

.trust-bar__separator {
  width: 1px;
  background: rgba(255,255,255,0.1);
  align-self: stretch;
}

@media (max-width: 768px) {
  .trust-bar__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .trust-bar__grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   STORY / TIMELINE SECTION
   ═══════════════════════════════════════ */

.story {
  background: var(--paper-white);
  padding-block: var(--space-3xl);
}

.story__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.story__title {
  color: var(--purple-deep);
  margin-bottom: var(--space-sm);
}

.story__subtitle {
  color: var(--ink-muted);
  font-size: var(--fs-body);
  max-width: 600px;
  margin-inline: auto;
}

/* Paper feed path timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin-inline: auto;
  padding-block: var(--space-xl);
}

.timeline__track {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--purple-deep) 0px,
    var(--purple-deep) 10px,
    transparent 10px,
    transparent 16px
  );
  transform: translateX(50%);
}

.timeline__node {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-2xl);
}

.timeline__node:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: left;
}

.timeline__dot {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-warm);
  border: 4px solid var(--paper-white);
  box-shadow: 0 0 0 3px var(--purple-deep);
  z-index: 2;
}

.timeline__content {
  width: 42%;
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--gold-warm);
  font-weight: 500;
  margin-bottom: 4px;
  direction: ltr;
  display: inline-block;
}

.timeline__text {
  font-size: var(--fs-body);
  color: var(--ink-black);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .timeline__track {
    right: var(--space-md);
    transform: none;
  }
  .timeline__dot {
    right: var(--space-md);
    transform: translateX(50%);
  }
  .timeline__node,
  .timeline__node:nth-child(odd) {
    flex-direction: column;
    align-items: flex-start;
    padding-right: calc(var(--space-md) + 24px);
    text-align: right;
  }
  .timeline__content {
    width: 100%;
  }
}

.story__cta-wrapper {
  text-align: center;
  margin-top: var(--space-xl);
}

/* ═══════════════════════════════════════
   PRODUCTS SECTION
   ═══════════════════════════════════════ */

.products {
  background: linear-gradient(180deg, var(--paper-white) 0%, #F0EDE8 100%);
  padding-block: var(--space-3xl);
}

.products__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.products__header {
  text-align: center;
  flex: 1 1 320px;
}

.products__title {
  color: var(--purple-deep);
  margin-bottom: var(--space-sm);
}

.products__3d-visual {
  display: none;
}

@media (min-width: 1024px) {
  .products__header-row {
    text-align: right;
  }
  .products__header {
    text-align: right;
  }
  .products__header .gold-divider {
    margin-inline: 0;
  }
  .products__3d-visual {
    display: block;
    flex: 0 0 340px;
    width: 340px;
    height: 340px;
  }
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

/* --- Product Card: Physical Paper --- */
.product-card {
  position: relative;
  background: var(--paper-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-mechanical),
              box-shadow var(--duration-normal) var(--ease-mechanical);
  /* Paper grain texture overlay */
  transform-style: preserve-3d;
  perspective: 800px;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 1;
  border-radius: var(--radius-md);
}

.product-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  box-shadow: var(--shadow-card-hover);
}

.product-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-mechanical);
}

.product-card:hover .product-card__image {
  transform: scale(1.03);
}

.product-card__body {
  padding: var(--space-md);
  position: relative;
  z-index: 2;
}

.product-card__name {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-h3);
  color: var(--purple-deep);
  margin-bottom: var(--space-xs);
}

.product-card__desc {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  line-height: 1.6;
}

.product-card__arrow {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-deep);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity var(--duration-fast) var(--ease-mechanical),
              transform var(--duration-fast) var(--ease-mechanical);
}

.product-card:hover .product-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .products__grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════
   SERVICES SECTION
   ═══════════════════════════════════════ */

.services {
  background: var(--bg-gradient);
  padding-block: var(--space-3xl);
  overflow: hidden;
}

.services__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.services__title {
  color: var(--paper-white);
  margin-bottom: var(--space-sm);
}

.services__subtitle {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-body);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

/* Registration target service card */
.service-card {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  transition: background var(--duration-normal) var(--ease-mechanical),
              border-color var(--duration-normal) var(--ease-mechanical),
              transform var(--duration-normal) var(--ease-mechanical);
}

.service-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold-warm);
  transform: translateY(-4px);
}

/* Registration target decoration */
.service-card__target {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  position: relative;
}

.service-card__target svg {
  width: 100%;
  height: 100%;
}

.service-card__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
}

.service-card__name {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-h3);
  color: var(--paper-white);
  margin-bottom: var(--space-sm);
}

.service-card__desc {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.service-card__link {
  color: var(--gold-warm);
  font-weight: 600;
  font-size: var(--fs-small);
  transition: color var(--duration-fast);
}

.service-card__link:hover {
  color: var(--gold-dark);
}

@media (max-width: 768px) {
  .services__grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

/* ═══════════════════════════════════════
   PORTFOLIO SECTION
   ═══════════════════════════════════════ */

.portfolio {
  background: var(--paper-white);
  padding-block: var(--space-3xl);
  overflow: hidden;
}

.portfolio__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.portfolio__title {
  color: var(--purple-deep);
  margin-bottom: var(--space-sm);
}

.portfolio__carousel {
  position: relative;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.portfolio__track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-md);
}

.portfolio__track::-webkit-scrollbar { display: none; }

.portfolio__slide {
  flex: 0 0 350px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-normal) var(--ease-mechanical);
}

.portfolio__slide:hover {
  transform: scale(1.02);
}

.portfolio__slide-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.portfolio__slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(59,0,102,0.9));
  color: var(--paper-white);
}

.portfolio__slide-name {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-h3);
}

.portfolio__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.portfolio__nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--purple-deep);
  transition: all var(--duration-fast) var(--ease-mechanical);
}

.portfolio__nav-btn:hover {
  background: var(--purple-deep);
  color: var(--paper-white);
}

@media (max-width: 768px) {
  .portfolio__slide {
    flex: 0 0 280px;
  }
}

/* ═══════════════════════════════════════
   ORDER CTA / PRINT JOB TICKET
   ═══════════════════════════════════════ */

.order-cta {
  background: var(--bg-dark);
  padding-block: var(--space-3xl);
  position: relative;
}

.order-cta__container {
  max-width: 700px;
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.order-cta__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.order-cta__title {
  color: var(--paper-white);
  margin-bottom: var(--space-sm);
}

.order-cta__subtitle {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-body);
}

/* Print Job Ticket styling */
.job-ticket {
  background: var(--paper-white);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  position: relative;
  box-shadow: var(--shadow-elevated);
}

/* Perforated top edge */
.job-ticket::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 5%;
  right: 5%;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--bg-dark) 0px,
    var(--bg-dark) 6px,
    transparent 6px,
    transparent 12px
  );
}

.job-ticket__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed rgba(0,0,0,0.1);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
}

.job-ticket__label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  direction: ltr;
}

.job-ticket__serial {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--gold-warm);
  direction: ltr;
}

/* Form Fields */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group__label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--ink-black);
  margin-bottom: var(--space-xs);
}

.form-group__input,
.form-group__select,
.form-group__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E3E0;
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic-body);
  font-size: var(--fs-body);
  color: var(--ink-black);
  background: white;
  transition: border-color var(--duration-fast) var(--ease-mechanical),
              box-shadow var(--duration-fast) var(--ease-mechanical);
  direction: rtl;
}

.form-group__input:focus,
.form-group__select:focus,
.form-group__textarea:focus {
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(90,24,154,0.1);
}

.form-group__textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group__select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

.form-group__file {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-group__file-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  border: 2px dashed #E5E3E0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-muted);
  font-size: var(--fs-small);
  transition: border-color var(--duration-fast),
              color var(--duration-fast);
}

.form-group__file-label:hover {
  border-color: var(--purple-mid);
  color: var(--purple-mid);
}

.form-group__file input[type="file"] {
  display: none;
}

.form__submit {
  width: 100%;
  margin-top: var(--space-md);
}

.form__error {
  color: var(--magenta);
  font-size: var(--fs-small);
  margin-top: 4px;
  display: none;
}

.form__error.visible {
  display: block;
}

/* Success State */
.form__success {
  display: none;
  text-align: center;
  padding: var(--space-xl);
}

.form__success.visible {
  display: block;
}

.form__success-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.form__success-text {
  font-family: var(--font-arabic-display);
  font-size: var(--fs-h3);
  color: var(--purple-deep);
  margin-bottom: var(--space-sm);
}

/* WhatsApp alternative */
.order-cta__whatsapp {
  text-align: center;
  margin-top: var(--space-lg);
}

.order-cta__whatsapp-text {
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-small);
  margin-bottom: var(--space-sm);
}

.order-cta__whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  background: #25D366;
  color: white;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast),
              transform var(--duration-fast) var(--ease-mechanical);
}

.order-cta__whatsapp-btn:hover {
  background: #1da851;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

.footer {
  background: #1E003A;
  padding-block: var(--space-2xl) var(--space-lg);
  color: rgba(255,255,255,0.7);
}

.footer__container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__brand-logo {
  height: 40px;
  width: auto;
  /* Official wordmark is black ink on transparent — invert to white
     since the footer background is solid dark purple. */
  filter: invert(1);
  margin-bottom: var(--space-sm);
}

.footer__brand-desc {
  font-size: var(--fs-small);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.footer__heading {
  font-family: var(--font-arabic-body);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--paper-white);
  margin-bottom: var(--space-md);
}

.footer__link {
  display: block;
  font-size: var(--fs-small);
  padding-block: 4px;
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--gold-warm);
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-small);
  margin-bottom: var(--space-xs);
  direction: ltr;
  text-align: left;
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--duration-fast) var(--ease-mechanical);
}

.footer__social-link:hover {
  background: var(--gold-warm);
  border-color: var(--gold-warm);
  color: var(--purple-deep);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-micro);
  font-family: var(--font-mono);
  direction: ltr;
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* ═══════════════════════════════════════
   FLOATING WHATSAPP BUTTON
   ═══════════════════════════════════════ */

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 900;
}

.whatsapp-float__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-mechanical),
              box-shadow var(--duration-fast);
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37,211,102,0.5);
  animation: none;
}

.whatsapp-float__btn svg {
  width: 30px;
  height: 30px;
  fill: white;
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6), 0 0 0 10px rgba(37,211,102,0.1); }
}

/* ═══════════════════════════════════════
   LOUPE CURSOR
   ═══════════════════════════════════════ */

.loupe-canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: normal;
}

body.loupe-active {
  cursor: none;
}

/* ═══════════════════════════════════════
   COLOR SEPARATION ANIMATION
   ═══════════════════════════════════════ */

.section-animated {
  position: relative;
}

.section-animated > * {
  position: relative;
}

/* CMYK ghost layers for section entrance */
.color-sep-ghost {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

.color-sep-ghost--c {
  background: rgba(0, 160, 227, 0.1);
  mix-blend-mode: multiply;
}
.color-sep-ghost--m {
  background: rgba(229, 0, 126, 0.1);
  mix-blend-mode: multiply;
}
.color-sep-ghost--y {
  background: rgba(255, 237, 0, 0.1);
  mix-blend-mode: multiply;
}

@keyframes separationIn {
  0% {
    opacity: 0.6;
    transform: translate(var(--sep-x), var(--sep-y));
  }
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

.section-animated.in-view .color-sep-ghost--c {
  --sep-x: 6px; --sep-y: -4px;
  animation: separationIn 300ms var(--ease-mechanical) forwards;
}
.section-animated.in-view .color-sep-ghost--m {
  --sep-x: -5px; --sep-y: 3px;
  animation: separationIn 300ms var(--ease-mechanical) 50ms forwards;
}
.section-animated.in-view .color-sep-ghost--y {
  --sep-x: 3px; --sep-y: 5px;
  animation: separationIn 300ms var(--ease-mechanical) 100ms forwards;
}

/* Section content reveal */
.reveal-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-mechanical),
              transform 0.6s var(--ease-mechanical);
}

.section-animated.in-view .reveal-content {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-content:nth-child(2) { transition-delay: 0.1s; }
.reveal-content:nth-child(3) { transition-delay: 0.2s; }
.reveal-content:nth-child(4) { transition-delay: 0.3s; }
.reveal-content:nth-child(5) { transition-delay: 0.4s; }
.reveal-content:nth-child(6) { transition-delay: 0.5s; }

/* ═══════════════════════════════════════
   SECTION LABEL (mono technical label)
   ═══════════════════════════════════════ */

.section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  direction: ltr;
  display: inline-block;
}

.section-label--light {
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════
   HERO HALFTONE SVG FILTER
   ═══════════════════════════════════════ */

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════
   SECTION GOLD DIVIDER
   ═══════════════════════════════════════ */

.gold-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-warm), var(--gold-dark));
  margin: var(--space-sm) auto;
  border-radius: 2px;
}

/* For RTL center alignment */
.text-center { text-align: center; }

/* ═══════════════════════════════════════
   INNER PAGE STYLES
   ═══════════════════════════════════════ */

.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
  text-align: center;
}

.page-hero__title {
  color: var(--paper-white);
  margin-bottom: var(--space-sm);
}

.page-hero__subtitle {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-body);
}

.page-content {
  padding-block: var(--space-3xl);
}

.page-content .container {
  max-width: 900px;
}
