/* ════════════════════════════════════════════════════════════════
   APEX landing — dark blade aesthetic derived from the logo:
   red steel on near-black, blade-angled seams, four-point stars.
   Display: Aref Ruqaa · Body: IBM Plex Sans Arabic · Latin: Michroma
   ════════════════════════════════════════════════════════════════ */

:root {
  --black:  #0A0908;
  --coal:   #15120F;
  --coal-2: #1D1915;
  --smoke:  #F2EFEA;
  --ash:    #9B948B;
  --blade:  #E8192C;
  --blood:  #7A0E1B;
  --brass:  #C9A45C;
  --line:   rgba(242, 239, 234, .10);
  --seam:   2.25rem;            /* height of the blade-angle section cut */
  --radius: 4px;                /* sharp corners — this brand has edges  */
  --font-body:    'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-display: 'Aref Ruqaa', serif;
  --font-latin:   'Michroma', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--black);
  color: var(--smoke);
  font-family: var(--font-body);
  line-height: 1.8;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 72rem; margin-inline: auto; padding-inline: 1.5rem; }

::selection { background: var(--blade); color: var(--smoke); }

:focus-visible { outline: 2px solid var(--blade); outline-offset: 3px; }

/* ─── Four-point star (from the logo's center spark) ─── */
.star {
  display: inline-block;
  width: .7em; height: .7em;
  margin-inline-end: .4em;
  background: var(--blade);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  transform: translateY(.06em);
}

/* ─── Type roles ─── */
.eyebrow {
  color: var(--brass);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.nav-word {
  font-family: var(--font-latin);
  font-size: 1.05rem;
  letter-spacing: .35em;
  margin-inline-start: .35em; /* optically balance the trailing tracking */
  color: var(--smoke);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .85em 1.9em;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:active { transform: scale(.97); }
.btn .ico { width: 1.25em; height: 1.25em; flex: none; }

.btn-solid { background: var(--blade); color: #fff; }
.btn-solid:hover { background: #FF2238; }

.btn-ghost { border: 1px solid var(--line); color: var(--smoke); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }

.btn-sm { padding: .55em 1.3em; font-size: .9rem; }
.btn-lg { padding: 1em 2.8em; font-size: 1.15rem; }

/* ─── Nav ─── */
.nav {
  position: fixed;
  inset-inline: 0; top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.5rem;
  transition: background .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 9, 8, .86);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav-brand { display: flex; align-items: center; gap: .6rem; }
.nav-logo { width: 2.1rem; height: 2.1rem; object-fit: cover; border-radius: 50%; }

.nav-links { display: flex; gap: 1.75rem; font-size: .95rem; color: var(--ash); }
.nav-links a:hover { color: var(--smoke); }

@media (max-width: 760px) { .nav-links { display: none; } }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem 1.5rem 5rem;
  background:
    radial-gradient(ellipse 70% 55% at 85% 20%, rgba(122, 14, 27, .28), transparent 65%),
    radial-gradient(ellipse 55% 45% at 15% 85%, rgba(122, 14, 27, .14), transparent 60%),
    var(--black);
}

/* Giant ghosted logo on the far (left) side */
.hero-mark {
  position: absolute;
  inset-block: 0;
  inset-inline-end: auto;
  inset-inline-start: -8rem;
  display: flex;
  align-items: center;
  opacity: .14;
  pointer-events: none;
}
.hero-mark img {
  width: min(44rem, 70vw);
  mix-blend-mode: screen; /* the jpg's black ground disappears into the page */
}

.hero-inner { position: relative; max-width: 72rem; margin-inline: auto; width: 100%; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.45;
  margin-block: .5rem 1.5rem;
}
.hero-title span { display: block; }
.hero-title .accent { color: var(--blade); }

.hero-sub {
  max-width: 34rem;
  color: var(--ash);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  margin-bottom: 2.5rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* The blade: a thin red edge slicing across the hero's foot */
.hero-blade {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: var(--seam);
  background: linear-gradient(90deg, var(--blood), var(--blade) 55%, var(--blood));
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  opacity: .9;
}

/* ─── Sections & blade seams ─── */
.section { padding: 6rem 0; }
.section-tint { background: var(--coal); }

/* Each seamed section's top edge is cut at the blade angle */
.seam { clip-path: polygon(0 var(--seam), 100% 0, 100% 100%, 0 100%); margin-top: calc(var(--seam) * -1); padding-top: calc(6rem + var(--seam)); }

/* ─── Service cards ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--coal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(201, 164, 92, .45); }

.section-tint .card { background: var(--coal-2); }

.card-featured { border-color: rgba(232, 25, 44, .4); background: linear-gradient(170deg, rgba(122, 14, 27, .18), var(--coal) 55%); }
.card-featured:hover { border-color: var(--blade); }

.card-ico { width: 2.75rem; height: 2.75rem; color: var(--blade); margin-bottom: 1.25rem; }
.card-ico svg { width: 100%; height: 100%; }

.card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.card p { color: var(--ash); font-size: .95rem; margin-bottom: 1.25rem; }

.card ul { list-style: none; }
.card li {
  position: relative;
  padding-inline-start: 1.4em;
  font-size: .92rem;
  margin-bottom: .45em;
}
.card li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .55em;
  width: .55em; height: .55em;
  background: var(--brass);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

/* ─── Why points ─── */
.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2.5rem 2rem;
}
.point h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--blade);
  display: inline-block;
}
.point p { color: var(--ash); font-size: .95rem; }

/* ─── Works ─── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  grid-auto-rows: 13rem;
  gap: 1rem;
}

.work {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(122, 14, 27, .25), transparent 60%),
    var(--coal);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.work-tall { grid-row: span 2; }

.work::before {
  /* ghost star watermark while photos are pending */
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3rem; height: 3rem;
  background: rgba(242, 239, 234, .07);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

.work img { width: 100%; height: 100%; object-fit: cover; }

.work figcaption {
  position: relative;
  width: 100%;
  padding: .7rem 1rem;
  font-size: .85rem;
  color: var(--ash);
  background: linear-gradient(transparent, rgba(10, 9, 8, .85));
}

.works-note { margin-top: 1.5rem; color: var(--ash); font-size: .9rem; }
.works-note a { color: var(--brass); border-bottom: 1px solid currentColor; }

/* ─── Visit ─── */
.visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 3rem;
}
.visit .section-title { margin-bottom: 1rem; }
.visit-address { color: var(--ash); margin-bottom: 1.5rem; font-size: 1.05rem; }

.hours { max-width: 24rem; }
.hours > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .7rem;
  border-bottom: 1px solid var(--line);
}
.hours dt { color: var(--ash); }
.hours dd { font-weight: 600; }

/* ─── CTA band ─── */
.cta-band {
  padding: 6rem 0;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(122, 14, 27, .5), transparent 70%),
    var(--coal);
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.5;
}
.cta-sub { color: var(--ash); margin-block: .5rem 2rem; }

/* ─── Footer ─── */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand p { color: var(--ash); font-size: .85rem; margin-top: .3rem; }
.footer-contact { display: flex; gap: 1.5rem; font-size: .92rem; color: var(--ash); }
.footer-contact a:hover { color: var(--smoke); }
.footer-meta { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--ash); }
.admin-link:hover { color: var(--brass); }

/* ─── Reveal animation ─── */
.reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .25s; }
.reveal.d3 { transition-delay: .4s; }
.reveal.d4 { transition-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ─── Mobile ─── */
@media (max-width: 760px) {
  .hero { padding-top: 6rem; }
  .hero-mark { inset-inline-start: -40vw; opacity: .1; }
  .section { padding: 4rem 0; }
  .seam { padding-top: calc(4rem + var(--seam)); }
  .footer-inner { flex-direction: column; text-align: center; }
}
