/* Layout: a grey studio-wall hero where the name runs across the portrait in difference blend,
   then a near-black reading room: intro statement, proof row, case studies, outlined service numerals, contact. */
:root {
  color-scheme: dark;
  --wall: #d8d7d3;        /* hero backdrop, matches the photo's grey wall */
  --wall-ink: #151515;
  --ink: #111111;         /* page ground */
  --raise: #1a1a1a;
  --line: #2b2b2b;
  --text: #f0eeea;
  --muted: #8f8b85;
  --accent: #ff7a1a;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ar: "Tajawal", "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--display); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h2, h3 { text-wrap: balance; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--accent); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--wall); color: var(--wall-ink); height: clamp(600px, 62vw, 880px); }
.hero nav { position: relative; z-index: 3; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 16px; padding-block: 22px; font-size: 13px; }
.hero nav a { text-decoration: none; }
.hero nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-photo { position: absolute; z-index: 1; bottom: 0; left: 54%; transform: translateX(-50%); height: 93%; width: auto; max-width: none; }
.name { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); top: 41%; font-size: clamp(52px, 10.6vw, 186px); font-weight: 500; letter-spacing: -.058em; line-height: .86; white-space: nowrap; color: #ffffff; mix-blend-mode: difference; }
.name span { display: inline; }
.role { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(24px, 4vw, 52px); font-size: clamp(22px, 3.3vw, 46px); font-weight: 500; letter-spacing: -.035em; line-height: 1.04; color: #ffffff; mix-blend-mode: difference; text-align: left; }
.socials { position: absolute; z-index: 3; left: var(--gutter); bottom: clamp(24px, 4vw, 52px); list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.socials a { text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.socials a:hover { text-decoration: underline; text-underline-offset: 4px; }
.socials i { font-style: normal; font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; line-height: 16px; }

/* ---------- Intro ---------- */
section.dark { border-top: 1px solid var(--line); padding-block: clamp(64px, 9vw, 128px); }
.intro h2 { margin-top: clamp(40px, 6vw, 80px); max-width: 26ch; margin-inline: auto; font-size: clamp(30px, 4.5vw, 62px); font-weight: 500; letter-spacing: -.04em; line-height: 1.04; }
.intro h2 em { font-style: normal; color: var(--accent); }
.intro .sub { display: grid; gap: 24px; justify-items: start; max-width: 40ch; margin: clamp(32px, 4vw, 52px) 0 0 auto; margin-right: clamp(0px, 14vw, 220px); color: var(--muted); font-size: 14px; line-height: 1.55; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border: 1px solid #3a3a3a; border-radius: 40px; color: var(--text); text-decoration: none; font-size: 13px; }
.pill:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Proof ---------- */
.proof { border-top: 1px solid var(--line); }
.proof .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof .cell { padding: 28px 20px 30px 0; display: grid; gap: 6px; align-content: start; }
.proof .cell + .cell { padding-left: 20px; border-left: 1px solid var(--line); }
.proof b { font-size: clamp(34px, 4.4vw, 60px); font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.proof b.long { font-size: clamp(22px, 2.3vw, 32px); letter-spacing: -.035em; line-height: 1.08; }
.proof span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.proof a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.proof a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* ---------- Work ---------- */
.case + .case { margin-top: clamp(80px, 10vw, 140px); }
.case-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 32px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 48px); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.case-head h3 { font-size: clamp(48px, 9vw, 132px); font-weight: 500; letter-spacing: -.06em; line-height: .86; }
.case-head h3 .ar { font-family: var(--ar); font-size: .36em; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: .3em; }
.case-head .meta { display: grid; gap: 4px; text-align: right; }
.badge { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--text); border: 1px solid var(--accent); border-radius: 30px; padding: 5px 12px; text-decoration: none; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.case-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px clamp(32px, 6vw, 96px); padding-block: 28px 36px; }
.case-body .lead { font-size: clamp(20px, 2vw, 26px); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; }
.case-body .lead em { font-style: normal; color: var(--accent); }
.case-body .story { margin-top: 16px; color: var(--muted); max-width: 60ch; }
.case-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; align-content: start; font-size: 14px; }
.case-body dt, .case-body dd { padding-block: 10px; border-bottom: 1px solid var(--line); }
.case-body dt { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-right: 24px; padding-top: 12px; }
.case-body dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1vw, 14px); }
.gallery figure { margin: 0; min-width: 0; background: var(--raise); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.g-full { grid-column: span 6; } .g-full img { aspect-ratio: 16 / 9; }
.g-half { grid-column: span 3; } .g-half img { aspect-ratio: 16 / 10; }
.gallery .nat img { aspect-ratio: auto; }
.gallery.portrait { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery.portrait img { aspect-ratio: 3 / 4; }
.case-foot { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 16px; }
.case-foot a { font-size: 14px; text-underline-offset: 4px; }
.case-foot a:hover { color: var(--accent); }


/* ---------- Work tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) clamp(10px, 1.4vw, 20px); margin-top: clamp(28px, 4vw, 48px); }
.tile { display: grid; gap: 14px; align-content: start; min-width: 0; text-decoration: none; color: inherit; }
.tile .sq { position: relative; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden; background: var(--raise); }
.tile .sq img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.tile .arrow { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center; font-size: 18px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
a.tile:hover .sq img, a.tile:focus-visible .sq img { transform: scale(1.04); }
a.tile:hover .arrow, a.tile:focus-visible .arrow { opacity: 1; transform: none; }
.tile .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.tile h3 { margin: 0; font-size: clamp(20px, 1.9vw, 27px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.tile .num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.tile .cat { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); text-align: right; }
.tile.empty .sq { background: transparent; border: 1px dashed var(--line); display: grid; place-items: center; }
.tile.empty .sq span { font-family: var(--mono); font-size: 12px; color: #55514c; }
.tile.empty .cap { color: #55514c; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Services ---------- */
.service { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 24px clamp(24px, 4vw, 64px); align-items: start; padding-block: clamp(36px, 5vw, 64px); }
.service + .service { border-top: 1px solid var(--line); }
.numeral { font-family: var(--mono); font-weight: 300; font-size: clamp(110px, 17vw, 240px); line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.4px #cfcbc5; font-feature-settings: "zero" 1; }
.service h3 { font-size: clamp(30px, 3.8vw, 52px); font-weight: 500; letter-spacing: -.045em; line-height: 1; margin-top: clamp(0px, 2vw, 28px); }
.service > div > p { margin-top: 14px; color: var(--muted); font-size: 14px; max-width: 52ch; }
.service ul { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: li; border-top: 1px solid var(--line); }
.service li { counter-increment: li; display: flex; justify-content: space-between; gap: 16px; padding: 11px 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.service li::after { content: counter(li, decimal-leading-zero); font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); }

.packs { margin-top: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.pack { padding: 26px clamp(18px, 2vw, 28px) 30px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.pack + .pack { border-left: 1px solid var(--line); }
.pack header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pack h4 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.pack .price { font-size: clamp(40px, 4.4vw, 58px); font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.pack .price small { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin-right: 8px; vertical-align: .9em; }
.pack p { color: var(--muted); font-size: 14px; }
.pack ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.pack li { padding-left: 16px; position: relative; }
.pack li::before { content: ""; position: absolute; left: 0; top: .78em; width: 7px; height: 1px; background: var(--accent); }
.pack.rec { background: var(--raise); }
.pack .tag { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.extras { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.extras b { color: var(--text); font-weight: 500; }

/* ---------- Process ---------- */
.steps { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; padding: 22px 24px 30px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }
.steps h3 { font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact h2 { margin-top: clamp(28px, 4vw, 48px); font-size: clamp(46px, 8.6vw, 128px); font-weight: 500; letter-spacing: -.06em; line-height: .9; }
.contact h2 em { font-style: normal; color: var(--accent); }
.contact .grid { margin-top: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.contact .grid p { color: var(--muted); max-width: 44ch; }
.contact .grid .ar { font-family: var(--ar); direction: rtl; margin-top: 10px; }
.contact ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.contact li .v { font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; letter-spacing: -.02em; text-decoration: none; overflow-wrap: anywhere; }
.contact li a.v:hover { color: var(--accent); }
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 22px; }

@media (max-width: 900px) {
  .hero nav { grid-template-columns: 1fr auto auto auto; }
  .hero nav .hide-md { display: none; }
  .proof .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof .cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof .cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-body, .service, .contact .grid { grid-template-columns: minmax(0, 1fr); }
  .packs { grid-template-columns: minmax(0, 1fr); }
  .pack + .pack { border-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro .sub { margin-right: 0; }
}
@media (max-width: 640px) {
  .hero { height: 640px; }
  .hero nav { grid-template-columns: 1fr auto; }
  .hero nav .hide-sm { display: none; }
  .hero-photo { height: 84%; left: 60%; }
  .name { top: 47%; font-size: 15.5vw; white-space: normal; line-height: .84; }
  .name span { display: block; }
  .role { font-size: 22px; }
  .socials { display: none; }
  .case-head .meta { text-align: left; }
  .badge { justify-self: start; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .g-full, .g-half { grid-column: span 1; }
  .gallery.portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-photo { animation: rise 1100ms cubic-bezier(.2,.7,.2,1) both; }
  .name { animation: slide 1100ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { transform: translate(-50%, 18px); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
  @keyframes slide { from { transform: translateX(-24px); opacity: .5; } to { transform: none; opacity: 1; } }
}

/* ---------- Project pages ---------- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar nav { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 16px; padding-block: 22px; font-size: 13px; }
.topbar nav a { text-decoration: none; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--accent); }
.crumb { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 56px); }
.crumb a { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.next { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-top: clamp(64px, 8vw, 112px); padding-top: 24px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.next strong { display: block; margin-top: 8px; font-size: clamp(40px, 7vw, 100px); font-weight: 500; letter-spacing: -.06em; line-height: .9; }
.next:hover strong { color: var(--accent); }
@media (max-width: 900px) { .topbar nav { grid-template-columns: 1fr auto auto auto; } .topbar nav .hide-md { display: none; } }
@media (max-width: 640px) { .topbar nav { grid-template-columns: 1fr auto; } .topbar nav .hide-sm { display: none; } }

/* ---------- Motion ---------- */
.ticker { overflow: hidden; border-top: 1px solid var(--line); padding-block: clamp(14px, 2vw, 22px); }
.ticker .track { display: flex; width: max-content; }
.ticker .group { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); padding-right: clamp(18px, 2.4vw, 32px); white-space: nowrap; }
.ticker span { font-size: clamp(28px, 4.2vw, 60px); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.ticker span.o { color: transparent; -webkit-text-stroke: 1.2px #cfcbc5; }
.ticker i { font-style: normal; color: var(--accent); font-size: clamp(16px, 2vw, 26px); }
@media (prefers-reduced-motion: no-preference) {
  .ticker .track { animation: tick 40s linear infinite; }
  .ticker:hover .track { animation-play-state: paused; }
  @keyframes tick { to { transform: translateX(-50%); } }
  .js .pre { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
  .js .pre.in { opacity: 1; transform: none; }
}

/* ---------- Closing contact link ---------- */
.cta-end { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 112px); }
.cta-end .row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-top: clamp(20px, 3vw, 36px); }
.cta-end .big { font-size: clamp(40px, 7vw, 104px); font-weight: 500; letter-spacing: -.06em; line-height: .9; color: inherit; text-decoration: none; transition: color .3s; }
.cta-end .big em { font-style: normal; color: var(--accent); }
.cta-end .big:hover { color: var(--accent); }

/* ---------- Logofolio grid ---------- */
.gallery.logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.logos img { aspect-ratio: 4 / 5; }
@media (max-width: 640px) { .gallery.logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Language link ---------- */
.navend { display: flex; justify-content: flex-end; align-items: baseline; gap: clamp(12px, 2vw, 24px); }
.navend .lang { font-family: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", sans-serif; }

/* ---------- Footer social links ---------- */
footer .soc { justify-content: flex-start; gap: 22px; padding-block: 0 22px; }
footer .soc a { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); text-decoration: none; }
footer .soc a:hover { color: var(--accent); }
footer .soc svg { width: 15px; height: 15px; flex: none; }
