:root {
  --wall: #0a1330;
  --wall-deep: #060c20;
  --primary: #2a4d9b;
  --glow: #8fb4ff;
  --paper: #eef2fb;
  --muted: #a9b6d3;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", sans-serif;
  background: var(--wall);
  color: var(--paper);
  line-height: 1.9;
  font-size: 1.05rem;
}

a:focus-visible,
.frame:focus-visible,
.lb-close:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 4px;
}

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.25rem;
  background:
    radial-gradient(ellipse 65% 75% at 50% 0%, rgba(42, 77, 155, 0.55), transparent 70%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall-deep) 100%);
  animation: reveal 1.2s ease-out both;
}

.hero-note {
  color: var(--glow);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 { line-height: 1.15; margin-bottom: 1.5rem; }

.hero .first {
  display: block;
  font-weight: 900;
  font-size: clamp(3.2rem, 15vw, 7.5rem);
}

.hero .rest {
  display: block;
  font-weight: 300;
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  color: var(--muted);
}

.hero-text {
  max-width: 34rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.down {
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.8rem;
  border: 1px solid var(--primary);
  border-radius: 999px;
  transition: background 0.25s;
}
.down:hover { background: var(--primary); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.works {
  max-width: 68rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
}

.works h2, .contact h2 {
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 2.5rem;
}

.work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 4.5rem;
}

.frame {
  background: var(--wall-deep);
  padding: 12px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 0 6px var(--wall-deep), 0 0 0 7px rgba(42, 77, 155, 0.5), 0 28px 50px rgba(0, 0, 0, 0.55);
}

.frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--wall);
}

.plaque {
  border-inline-start: 3px solid var(--primary);
  padding-inline-start: 1.2rem;
}

.plaque h3 {
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.plaque p { color: var(--muted); }
.plaque strong { color: var(--glow); font-weight: 600; }

@media (min-width: 820px) {
  .work { grid-template-columns: 1.5fr 1fr; gap: 3rem; }
  .work:nth-of-type(even) { grid-template-columns: 1fr 1.5fr; }
  .work:nth-of-type(even) .frame { order: 2; }
}

.contact {
  text-align: center;
  padding: 4rem 1.25rem 5rem;
  background: radial-gradient(ellipse 70% 90% at 50% 100%, rgba(42, 77, 155, 0.4), transparent 70%);
}

.contact h2 { margin-bottom: 0.8rem; }
.contact p { color: var(--muted); margin-bottom: 1.8rem; }

.mail {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  word-break: break-all;
  transition: background 0.25s;
}
.mail:hover { background: #3a63c0; }

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(42, 77, 155, 0.35);
}

/* ---- تأثيرات JavaScript ---- */
.js-ready .frame {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.js-ready .frame.is-visible {
  opacity: 1;
  transform: none;
}
.zoomable { cursor: zoom-in; }

.lightbox {
  border: 1px solid var(--primary);
  background: var(--wall-deep);
  color: var(--paper);
  padding: 0;
  margin: auto;
  max-width: min(92vw, 62rem);
}
.lightbox::backdrop { background: rgba(3, 6, 18, 0.88); }
.lb-inner { position: relative; padding: 12px; }
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  margin: 0 auto;
}
.lb-cap {
  text-align: center;
  font-weight: 600;
  padding: 0.8rem 0.4rem 0.2rem;
}
.lb-close {
  position: absolute;
  inset-block-start: 1.2rem;
  inset-inline-start: 1.2rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--paper);
  background: rgba(6, 12, 32, 0.85);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 0.25rem 1rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { animation: none; }
  .js-ready .frame { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
