/* Luster Scope - site stylesheet (prototype v1)
   Colour tokens from BRAND_PALETTE.txt. The accent is reserved for figures and findings only. */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600&family=Noto+Sans+Arabic:wght@400;600&display=swap");

:root {
  --ink: #2F3030;          /* fixed by the logo, not black */
  --ground: #F7F6F4;       /* warm off-white, not pure white */
  --ground-dark: #17181A;  /* near-black, for dark sections */
  --accent: #8F6824;       /* ochre, ON LIGHT GROUND ONLY */
  --accent-dark: #A7792A;  /* ochre, ON DARK GROUND ONLY */
  --rule: rgba(47, 48, 48, 0.16);
  --max: 1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

html[lang="ar"] body {
  font-family: "Noto Sans Arabic", "Noto Sans", system-ui, sans-serif;
  line-height: 1.8;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

section { padding: 112px 0; }

.dark { background: var(--ground-dark); color: var(--ground); }
.dark a { color: var(--ground); }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(46px, 7.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  max-width: 22ch;
}

.lede { font-size: clamp(19px, 2vw, 24px); line-height: 1.5; max-width: 34ch; opacity: 0.88; }

.btn {
  display: inline-block;
  padding: 16px 28px;
  background: var(--ink);
  color: var(--ground);
  border: 1px solid var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.btn:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.dark .btn { background: var(--ground); color: var(--ground-dark); border-color: var(--ground); }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  padding: 28px 0;
  color: var(--ground);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .lockup { height: 84px; width: auto; }
.site-header .mark { display: none; height: 60px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--ground); text-decoration: none; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: flex-end; padding: 180px 0 104px; }

/* ---------- Gap ---------- */
.gap h2 { max-width: 24ch; }

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  margin-top: 56px;
}
.step {
  padding: 32px 28px 44px 0;
  border-bottom: 1px solid var(--rule);
}
.step .n { display: block; font-size: 14px; font-weight: 600; opacity: 0.6; margin-bottom: 28px; }
.step h3 { font-size: 22px; line-height: 1.25; margin-bottom: 12px; }
.step p { font-size: 16px; opacity: 0.88; margin: 0; }

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.service {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  padding: 36px 28px 40px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}
.service h3 { font-size: 22px; margin-bottom: 10px; }
.service p { font-size: 16px; opacity: 0.88; margin: 0; }
.service .more { margin-top: auto; padding-top: 28px; }

/* ---------- Figure (the only place the accent appears) ---------- */
.figure { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.figure .fig {
  display: block;
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent-dark);
  margin-bottom: 20px;
}
.figure p { font-size: 18px; opacity: 0.88; margin: 0; }
.figure .fig-note { font-size: 14px; line-height: 1.5; opacity: 0.7; max-width: 36ch; margin: 0 0 4px; }

/* ---------- Image band ---------- */
.band { margin: 0; }
.band img { width: 100%; height: min(60vw, 560px); object-fit: cover; display: block; }

/* ---------- Clients ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  justify-items: center;
  margin: 64px 0 32px;
}
.logo-slot {
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.logo-slot img { width: 72%; height: auto; max-width: none; max-height: none; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact .intro { font-size: 18px; opacity: 0.9; }
.contact .detail { margin-top: 40px; font-size: 16px; }
.contact .detail h3 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.contact .detail p { margin-bottom: 20px; }

form.contact-form { display: grid; gap: 20px; }
form.contact-form label { display: grid; gap: 8px; font-size: 15px; font-weight: 600; }
form.contact-form input,
form.contact-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 14px 16px;
  border-radius: 0;
  width: 100%;
}
form.contact-form textarea { min-height: 150px; resize: vertical; }
form.contact-form button { justify-self: start; font: inherit; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 36px; }
.site-footer .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.site-footer .small { font-size: 14px; opacity: 0.7; }
.site-footer .footer-lockup { height: 76px; width: auto; }
.site-footer .legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(247, 246, 244, 0.2); font-size: 13px; opacity: 0.7; }
.site-footer nav a { color: var(--ground); margin-inline-start: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .figure, .contact { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  section { padding: 84px 0; }
  .site-header { padding: 20px 0; }
  .site-header .lockup { display: none; }
  .site-header .mark { display: block; }
  .site-nav { gap: 16px; font-size: 14px; }
  .site-nav .hide-sm { display: none; }
  .steps, .services, .logos { grid-template-columns: 1fr; }
  .hero { padding: 160px 0 80px; }
  .site-footer .footer-lockup { height: 60px; }
}

/* ---------- Photo use (v2): header wash + low-opacity section backgrounds ---------- */
/* Header: photo under a gradient so the headline stays readable and the image never reads as a billboard. */
.hero {
  --hero-img: url("../images/hero-8204311-mirror-soft3-1600.jpg");
  --hero-pos: center;
  /* Left to right: 30% solid dark, a 20% fade, then 50% of the photo. */
  --hero-fade: linear-gradient(to right, #17181A 0%, #17181A 30%, rgba(23,24,26,0) 50%);
  background:
    linear-gradient(180deg, rgba(23,24,26,0.55) 0%, rgba(23,24,26,0.78) 55%, rgba(23,24,26,0.97) 100%),
    var(--hero-fade),
    var(--hero-img) var(--hero-pos) / cover no-repeat;
}
/* Arabic: original photo, fade reversed (right to left), content centred vertically. */
html[lang="ar"] .hero {
  --hero-img: url("../images/hero-8204311-1600.jpg");
  --hero-pos: 12% center;
  --hero-fade: linear-gradient(to left, #17181A 0%, #17181A 30%, rgba(23,24,26,0) 50%);
  align-items: center;
  min-height: 86vh;
}

/* Section backgrounds: photo at low opacity, desaturated, behind the content. */
.bg-photo { position: relative; isolation: isolate; }
.bg-photo > .wrap { position: relative; z-index: 1; }
.bg-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-img) center / cover no-repeat;
  opacity: 0.1;
  filter: grayscale(1);
  z-index: -1;
  pointer-events: none;
}
.dark.bg-photo::before { opacity: 0.16; }
.bg-process  { --bg-img: url("../images/bg-8837507-1200.jpg"); }
.bg-figure   { --bg-img: url("../images/bg-6248959-1600.jpg"); }

@media (max-width: 640px) {
  .hero { --hero-pos: 88% center; }
  html[lang="ar"] .hero { --hero-pos: 12% center; min-height: 80vh; }
}

/* ---------- v3: activity photos ---------- */
.service { min-height: 0; padding-bottom: 22px; }
.service .svc-img {
  display: block;
  max-width: none;
  height: auto;
  width: calc(100% + 58px);
  margin: -37px -29px 14px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(0.15);
}

/* ---------- v4: inner pages ---------- */
.page-hero {
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  padding: 170px 0 84px;
  background:
    linear-gradient(180deg, rgba(23,24,26,0.55) 0%, rgba(23,24,26,0.8) 55%, rgba(23,24,26,0.97) 100%),
    var(--ph, none) center / cover no-repeat;
  background-color: var(--ground-dark);
  color: var(--ground);
}
.page-hero h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1.05; max-width: 20ch; }
.page-hero .lede { max-width: 40ch; }
.page-hero.ph-plain { --ph: none; }
.page-hero.ph-about { --ph: url("../images/page-about-1600.jpg"); }
.page-hero.ph-how { --ph: url("../images/page-how-1600.jpg"); }
.page-hero.ph-services { --ph: url("../images/page-services-1600.jpg"); }
.page-hero.ph-media { --ph: url("../images/page-media-1600.jpg"); }
.page-hero.ph-advertising { --ph: url("../images/page-advertising-1600.jpg"); }
.page-hero.ph-production { --ph: url("../images/page-production-1600.jpg"); }
.page-hero.ph-research { --ph: url("../images/page-research-1600.jpg"); }
.page-hero .eyebrow { color: var(--accent-dark); opacity: 1; }

section.dark .eyebrow { color: var(--ground); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.two h2 { margin-bottom: 0; }
.prose p { font-size: 18px; opacity: 0.92; }
.prose ul, .legal-text ul { padding-inline-start: 22px; }
.prose code, .legal-text code { font-size: 0.92em; }

.page-img { margin: 0; }
.page-img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }

.checks { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.checks li { padding: 22px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }

.cta-row { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-row h2 { margin-bottom: 12px; }
.cta-row .intro { margin: 0; font-size: 18px; opacity: 0.9; max-width: 56ch; }

.legal-text { max-width: 74ch; }
.legal-text h2 { font-size: 26px; margin: 48px 0 14px; }
.legal-text p, .legal-text li { font-size: 17px; }
.legal-text .eyebrow { margin-bottom: 28px; }

.service .more a { font-weight: 600; }

@media (max-width: 1000px) {
  .two { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .page-hero { padding: 150px 0 64px; min-height: 52vh; }
  .cta-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- v5: header that returns on scroll up, and back-to-top ---------- */
.site-header {
  position: fixed;
  transition: transform 0.35s ease, background-color 0.35s ease, padding 0.35s ease;
}
.site-header.is-solid {
  background: rgba(23, 24, 26, 0.96);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 0 rgba(247, 246, 244, 0.08);
}
.site-header.is-hidden { transform: translateY(-100%); }

.to-top {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ground-dark);
  color: var(--ground);
  border: 1px solid rgba(247, 246, 244, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:focus-visible { outline: 2px solid var(--ground); outline-offset: 3px; }

@media (max-width: 640px) {
  .site-header.is-solid { padding-top: 10px; padding-bottom: 10px; }
  .to-top { width: 46px; height: 46px; bottom: 18px; inset-inline-end: 18px; }
}

/* ---------- v6: brand tag under the hero headline ---------- */
.brand-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}
.brand-tag::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
  flex: none;
}
html[lang="ar"] .brand-tag { letter-spacing: 0; text-transform: none; font-size: 15px; }

/* ---------- v7: phone menu (three-line button and panel) ---------- */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(247, 246, 244, 0.35);
  color: var(--ground);
  cursor: pointer;
  flex: none;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid var(--ground); outline-offset: 3px; }

@media (max-width: 640px) {
  .menu-toggle { display: block; }
  .site-header .wrap { position: relative; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 24px 18px;
    background: #17181A;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    font-size: 17px;
  }
  .menu-open .site-nav { display: flex; }
  .site-nav a,
  .site-nav .hide-sm {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(247, 246, 244, 0.12);
    opacity: 1;
    text-decoration: none;
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-header.menu-open {
    transform: none !important;
    background: #17181A;
  }
}
