/* ==========================================================================
   DARKROOM (غُرفة الظلام) — Analog Silver-Gelatin Darkroom & Film Studio
   Deep #0A0202 · Black #120404 · Paper #EDE7DD · Silver #A9A39B
   Safelight Crimson #B3001B · Ruby #FF4D5E · 35mm Amber #E8A33A
   ========================================================================== */

:root {
  --deep: #0A0202;
  --black: #120404;
  --pane-bg: #200606;
  --paper: #EDE7DD;
  --silver-ink: #A9A39B;
  --safelight: #B3001B;
  --safelight-hi: #D1001F;
  --ruby: #FF4D5E;
  --amber: #E8A33A;
  --line: rgba(237, 231, 221, 0.14);
  --line-2: rgba(237, 231, 221, 0.36);
  --font-serif: 'Amiri', Georgia, serif;
  --font-sans: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
  --nav-h: 60px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  background: var(--deep);
  color: var(--paper);
  scroll-behavior: auto;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--deep);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: clip;
}

::selection { background: var(--safelight); color: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

/* Global Analog Film Grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Fixed 60px Darkroom Safelight Header
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 70;
  background: rgba(10, 2, 2, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-grp {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.96rem;
}

.brand-en {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  color: var(--paper);
}

.safelight-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--silver-ink);
  direction: ltr;
}

.safelight-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ruby);
  box-shadow: 0 0 10px var(--ruby);
  animation: dkPulse 2.4s ease-in-out infinite;
}

@keyframes dkPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.nav-links a,
.nav-cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--silver-ink);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-cart-btn:hover {
  color: var(--paper);
}

.nav-cart-btn b {
  color: var(--ruby);
}

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn--red {
  background: var(--safelight);
  color: var(--paper);
}

.btn--red:hover { background: var(--safelight-hi); }

.btn--sm { padding: 8px 14px; font-size: 0.7rem; }

.btn--line {
  background: transparent;
  border-color: var(--line-2);
  color: var(--paper);
}

.btn--line:hover { border-color: var(--paper); background: rgba(237, 231, 221, 0.07); }

/* --------------------------------------------------------------------------
   HERO (42fr Copy / 58fr Interactive 35mm Developer Tray Canvas)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: stretch;
  background: radial-gradient(circle at 82% 85%, rgba(179, 0, 27, 0.2), transparent 48%), var(--deep);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px clamp(20px, 4vw, 56px);
}

.stamp {
  align-self: flex-start;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--ruby);
  color: var(--ruby);
  transform: rotate(-2.5deg);
  margin-bottom: 22px;
}

.hero-eye {
  color: var(--silver-ink);
  margin: 0 0 22px;
}

.hero-title {
  margin: 0 0 18px;
  padding-top: 8px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.85rem, 5.4vw, 5.4rem);
  line-height: 1.25;
  color: var(--paper);
}

.hero-title em,
.h2 em {
  font-style: italic;
  color: var(--ruby);
  animation: dkDevelopWord 3.4s var(--ease) both;
}

@keyframes dkDevelopWord {
  0% { opacity: 0.08; filter: blur(9px); }
  100% { opacity: 1; filter: blur(0px); }
}

.hero-sub {
  margin: 0 0 26px;
  max-width: 40ch;
  color: var(--silver-ink);
  font-size: 0.98rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.7vw, 2.3rem);
  font-weight: 400;
  line-height: 1.1;
  direction: ltr;
  text-align: right;
  white-space: nowrap;
}

.hero-stats span {
  display: block;
  margin-top: 4px;
  color: var(--silver-ink);
  font-size: 0.66rem;
}

/* Interactive 35mm Sprocket-Perforated Developer Tray (.pane) */
.pane-wrap {
  padding: 14px;
  display: flex;
}

.pane {
  position: relative;
  flex: 1;
  min-height: 540px;
  background: var(--pane-bg);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: crosshair;
}

.sprockets {
  height: 28px;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 18px,
      rgba(237, 231, 221, 0.14) 18px 34px,
      transparent 34px 54px
    ),
    #0f0303;
  background-size: 54px 14px;
  background-repeat: repeat-x;
  background-position: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 4;
}

.sprockets.is-bot {
  border-bottom: none;
  border-top: 1px solid var(--line);
}

.pane-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #1a0606;
}

#dk-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.pane-frames {
  position: absolute;
  top: 10px;
  left: 16px;
  z-index: 5;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  direction: ltr;
  pointer-events: none;
}

.pane-stock {
  position: absolute;
  top: 28px;
  left: 16px;
  z-index: 5;
  color: rgba(237, 231, 221, 0.72);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  direction: ltr;
  pointer-events: none;
}

.devclock {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(10, 2, 2, 0.8);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  direction: ltr;
  pointer-events: none;
}

.devclock .t {
  color: var(--ruby);
  font-weight: 700;
}

.dev-bar {
  width: 78px;
  height: 2px;
  background: rgba(237, 231, 221, 0.2);
}

.dev-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ruby);
}

.pane-cap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  color: var(--silver-ink);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  direction: ltr;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   WORK GALLERY (#work — 3 Hanging Prints Swing on Hover + Print Cart)
   -------------------------------------------------------------------------- */
.sec {
  padding: clamp(76px, 9vw, 136px) 0;
}

.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

.eyebrow {
  color: var(--ruby);
  margin: 0 0 10px;
}

.h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 4.5rem);
  line-height: 1.05;
}

.link-arrow {
  padding-bottom: 5px;
  border-bottom: 1.5px solid var(--safelight);
  color: var(--paper);
}

.prints-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.print-card {
  display: flex;
  flex-direction: column;
}

.print-card.is-stagger {
  margin-top: 22px;
}

.print-swing {
  transform-origin: top center;
  transition: transform 0.55s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.print-card:hover .print-swing {
  transform: rotate(-2.2deg);
}

.print-ph {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #1a0808;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 16px;
}

.print-ph svg,
.print-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.1);
  transition: filter 0.55s var(--ease), transform 0.6s var(--ease);
}

.print-card:hover .print-ph svg,
.print-card:hover .print-ph img {
  filter: grayscale(0) contrast(1.06);
  transform: scale(1.03);
}

.print-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--silver-ink);
}

.print-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 400;
}

.print-spec {
  color: var(--silver-ink);
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.add-print-btn {
  align-self: flex-start;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-print-btn:hover {
  background: var(--safelight);
  border-color: var(--safelight);
}

/* --------------------------------------------------------------------------
   PROCESS SCROLLYTELLING (#process — 00:00 -> 10:00 Darkroom Clock)
   -------------------------------------------------------------------------- */
.chap {
  position: relative;
  height: 290svh;
  border-block: 1px solid var(--line);
}

.chap-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 84px 0 42px;
  background: radial-gradient(circle at 50% 42%, rgba(179, 0, 27, 0.34), #0a0202 68%);
}

#dk-proc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.chap-in {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.beat-box {
  position: relative;
  width: min(460px, 100%);
  min-height: 210px;
}

.dk-beat {
  position: absolute;
  inset: 0;
  padding: 24px 26px;
  background: rgba(10, 2, 2, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-inline-start: 2.5px solid var(--safelight);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.dk-beat.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dk-beat h3 {
  margin: 8px 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
}

.dk-beat p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--silver-ink);
}

.chap-rail {
  text-align: end;
}

.rail-clock {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1;
  color: var(--ruby);
  margin-bottom: 14px;
  direction: ltr;
}

.rail-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-items li {
  color: rgba(237, 231, 221, 0.42);
  transition: color 0.25s ease;
}

.rail-items li.is-cur {
  color: var(--paper);
}

.rail-items li.is-cur::before {
  content: '● ';
  color: var(--ruby);
}

/* --------------------------------------------------------------------------
   4-COLUMN TIMELINE STEPS (#steps) & ABOUT (#about)
   -------------------------------------------------------------------------- */
.steps-sec {
  background: linear-gradient(180deg, #130404 0%, #0a0202 100%);
  border-bottom: 1px solid var(--line);
}

.steps-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.step-col {
  padding: 28px 20px 10px;
  border-inline-end: 1px solid var(--line);
}

.step-col:last-child { border-inline-end: none; }

.step-col .n { color: var(--ruby); display: block; margin-bottom: 12px; }
.step-col h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 1.5rem; font-weight: 400; }
.step-col p { margin: 0; font-size: 0.9rem; color: var(--silver-ink); }

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.about-portrait {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #1a0606;
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.08);
}

.quote-box {
  margin: 28px 0;
  padding: 8px 22px;
  border-inline-start: 2px solid var(--safelight);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.55rem;
  line-height: 1.45;
  color: var(--paper);
}

.contact-sheet {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #120404;
  border: 1px solid var(--line);
}

.cs-frame {
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #2d0b0d, #120404);
  border: 1px solid rgba(232, 163, 58, 0.28);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--amber);
}

/* --------------------------------------------------------------------------
   CLOSING CRIMSON BANNER & GIANT OUTLINED FOOTER
   -------------------------------------------------------------------------- */
.closing {
  background: var(--safelight);
  color: var(--paper);
  padding: clamp(64px, 8vw, 108px) 0;
}

.closing-in {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: end;
}

.closing h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  line-height: 1.05;
}

.closing h2 em {
  color: var(--black);
  font-style: italic;
  animation: none;
}

.closing p {
  margin: 0 0 22px;
  color: rgba(237, 231, 221, 0.88);
}

.closing .btn-dark {
  background: var(--black);
  color: var(--paper);
}

.closing .btn-dark:hover {
  background: #000000;
}

.dk-foot {
  background: var(--deep);
  padding: 40px 0 36px;
  overflow: hidden;
}

.foot-word {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(4.2rem, 17vw, 16rem);
  line-height: 0.92;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 77, 94, 0.45);
  margin-bottom: 34px;
  user-select: none;
  direction: ltr;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.foot-grid h4 {
  margin: 0 0 12px;
  color: var(--ruby);
}

.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--silver-ink);
}

.foot-grid a:hover { color: var(--paper); }

.foot-bot {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--silver-ink);
}

/* Enquiry & Cart Modal */
.dk-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(10, 2, 2, 0.82);
  backdrop-filter: blur(10px);
}

.dk-modal.is-open { display: grid; }

.dk-dialog {
  width: min(460px, 100%);
  background: var(--black);
  border: 1px solid var(--line-2);
  padding: 28px;
}

.dk-dialog h3 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
}

.dk-field { margin-bottom: 14px; }
.dk-field label { display: block; margin-bottom: 6px; color: var(--silver-ink); }
.dk-field input {
  width: 100%;
  padding: 10px 12px;
  background: #1b0707;
  border: 1px solid var(--line);
  outline: none;
}
.dk-field input:focus { border-color: var(--ruby); }

@media (max-width: 1120px) {
  .pane-cap { display: none; }
}

@media (max-width: 1024px) {
  .about-grid,
  .closing-in {
    grid-template-columns: 1fr;
  }
  .safelight-tag { display: none; }
  .prints-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid, .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .pane-stage { min-height: 380px; }
  .container { width: calc(100% - 32px); }
  .nav-links { display: none; }
  .prints-grid, .steps-grid, .foot-grid { grid-template-columns: 1fr; }
  .step-col { border-inline-end: none; border-bottom: 1px solid var(--line); }
  .print-card.is-stagger { margin-top: 0; }
}
