/* ==========================================================================
   © 2026 Omar Khaled. All rights reserved.

   Built by Omar Khaled — Full-Stack Developer
   Website:   https://omar-khaled.life
   Email:     support@omar-khaled.life
   WhatsApp:  +1 872 321 0134
   Telegram:  @codedbyomar
   LinkedIn:  https://www.linkedin.com/in/omar-khaled-36126b404/
   Instagram: https://www.instagram.com/codedbyomar/
   GitHub:    https://github.com/omar-khaled-dev
   ========================================================================== */

/* ==========================================================================
   SeeBox — Base Reset, Tokens, Logical Properties
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Color tokens
   -------------------------------------------------------------------------- */
:root {
  --color-charcoal: #1a1714;
  --color-stone: #e8e2d6;
  --color-pistachio: #a8b896;
  --color-pistachio-dark: #8ca179;
  --color-gold: #b8975a;
  --color-off-white: #faf8f4;
  --color-text: #1a1714;
  --color-text-muted: #6b6459;
  --color-text-inverse: #faf8f4;

  /* Type scale */
  --font-display-en: "Fraunces", serif;
  --font-body-en: "Inter", sans-serif;
  --font-display-ar: "Markazi Text", serif;
  --font-body-ar: "IBM Plex Sans Arabic", sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.75rem;
  --fs-xl: 2.5rem;
  --fs-2xl: 3.5rem;
  --fs-3xl: 4.5rem;

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

  /* Motion */
  --ease-lid: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms;
  --dur-base: 400ms;
  --dur-slow: 700ms;

  /* Layout */
  --container-max: 1280px;
  --radius-sm: 6px;
  --radius-md: 12px;
}

/* --------------------------------------------------------------------------
   Language / direction switching
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body-en);
  background: var(--color-off-white);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
  font-family: var(--font-body-ar);
}

h1,
h2,
h3,
.display {
  font-family: var(--font-display-en);
  font-weight: 500;
  line-height: 1.1;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .display {
  font-family: var(--font-display-ar);
}

/* --------------------------------------------------------------------------
   Layout primitives — logical properties throughout (auto-flip for RTL)
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.u-flex {
  display: flex;
  gap: var(--space-sm);
}

/* Example of a physical-property gotcha that needs manual RTL handling:
   transforms, box-shadow offsets, and background-position do NOT
   auto-flip with dir="rtl". Handle those per-component. */
[dir="rtl"] .icon-arrow {
  transform: scaleX(-1);
}

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

/* --------------------------------------------------------------------------
   Phase 1 test-page styles (temporary, remove once Phase 2 starts)
   -------------------------------------------------------------------------- */
.test-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-md);
  padding-inline: var(--space-md);
}

.test-page h1 {
  font-size: var(--fs-2xl);
  color: var(--color-charcoal);
}

.test-page p {
  max-width: 40ch;
  color: var(--color-text-muted);
}

.lang-toggle {
  font-family: var(--font-body-en);
  background: var(--color-pistachio);
  color: var(--color-charcoal);
  border: none;
  border-radius: var(--radius-sm);
  padding-block: var(--space-xs);
  padding-inline: var(--space-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-lid);
}

.lang-toggle:hover {
  background: var(--color-pistachio-dark);
}

/* --------------------------------------------------------------------------
   Scroll-reveal utility
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--dur-slow) var(--ease-lid),
    transform var(--dur-slow) var(--ease-lid);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

[data-reveal-group] > [data-reveal]:nth-child(1) {
  transition-delay: 0ms;
}
[data-reveal-group] > [data-reveal]:nth-child(2) {
  transition-delay: 80ms;
}
[data-reveal-group] > [data-reveal]:nth-child(3) {
  transition-delay: 160ms;
}
[data-reveal-group] > [data-reveal]:nth-child(4) {
  transition-delay: 240ms;
}
[data-reveal-group] > [data-reveal]:nth-child(5) {
  transition-delay: 320ms;
}
[data-reveal-group] > [data-reveal]:nth-child(6) {
  transition-delay: 400ms;
}
[data-reveal-group] > [data-reveal]:nth-child(7) {
  transition-delay: 480ms;
}
[data-reveal-group] > [data-reveal]:nth-child(8) {
  transition-delay: 560ms;
}
[data-reveal-group] > [data-reveal].is-revealed {
  transition-delay: 0ms;
}
