/* From index.html */

:root {
  --bg: #050505;
  --accent: #ff4500;
  --card: #111111;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg);
  color: #d1d5db; /* text-gray-300 */
  margin: 0;
  overflow-x: hidden;
}

.font-serif {
  font-family: "Playfair Display", serif;
}

/* Language Toggle Styles */
html[lang="ar"] .en {
  display: none !important;
}

html[lang="en"] .ar {
  display: none !important;
}

html[lang="ar"] body {
  font-family: "Inter", "IBM Plex Sans Arabic", sans-serif;
}

html[lang="ar"] .font-serif {
  font-family: "Playfair Display", "Noto Serif Arabic", serif;
}

/* Arabic: no letter-spacing (breaks letter joins), no faux-italic, roomier line-height */
html[lang="ar"] * {
  letter-spacing: 0 !important;
}

html[lang="ar"] .italic {
  font-style: normal !important;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  line-height: 1.4 !important;
}

/* Reveal Animation Styles */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Floating Animations */
@keyframes float-hand-left {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

@keyframes float-hand-right {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(20px) rotate(-2deg);
  }
}

.animate-float-left {
  animation: float-hand-left 12s ease-in-out infinite;
}

.animate-float-right {
  animation: float-hand-right 14s ease-in-out infinite;
}

/* Noise Texture Overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("../images/noise.svg");
}

/* Parallax Container Effect */
.parallax-card-up {
  transform: translateY(var(--scroll-offset-up, 0px));
}

.parallax-card-down {
  transform: translateY(var(--scroll-offset-down, 0px));
}

/* From index.html */

#works .wk-arrow::before {
  content: "→";
}

html[lang="ar"] #works .wk-arrow::before {
  content: "←";
}

#works .wk-row:hover .wk-arrow {
  transform: translateX(6px);
}

html[lang="ar"] #works .wk-row:hover .wk-arrow {
  transform: translateX(-6px);
}

html[lang="ar"] #works {
  direction: rtl;
}

/* Selected Work title: white fading into orange at the end */
#works .sw-grad {
  display: inline-block;
  padding-bottom: 0.12em;
  color: #e5e7eb;
  background-image: linear-gradient(
    90deg,
    #e5e7eb 0%,
    #e5e7eb 45%,
    #ff4500 100%
  );
}

html[lang="ar"] #works .sw-grad {
  background-image: linear-gradient(
    270deg,
    #e5e7eb 0%,
    #e5e7eb 45%,
    #ff4500 100%
  );
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #works .sw-grad {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* From index.html */

html[lang="ar"] #process {
  direction: rtl;
}

#process #process-list {
  border-inline-start: 3px solid #ff4500;
  padding-inline-start: 1.5rem;
}

#process .pr-btn {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

#process .pr-btn:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

#process .pr-plus {
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
}

#process .pr-plus::before,
#process .pr-plus::after {
  content: "";
  position: absolute;
  background: #fff;
  transition: transform 250ms ease;
}

#process .pr-plus::before {
  left: 0;
  top: 10.5px;
  width: 24px;
  height: 3px;
}

#process .pr-plus::after {
  left: 10.5px;
  top: 0;
  width: 3px;
  height: 24px;
}

#process .pr-item.open .pr-plus::after {
  transform: scaleY(0);
}

#process .pr-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}

#process .pr-item.open .pr-panel {
  grid-template-rows: 1fr;
}

#process .pr-panel-inner {
  overflow: hidden;
}

/* Animations */
.mask-text {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.mask-text .mask-inner {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.mask-text.is-visible .mask-inner {
  transform: translateY(0);
}

.fade-in-text {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
.fade-in-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}
