/* Layout: an edit suite. The pitch sits beside a live multicam wall of real hooks; the work below
   is laid out like the project's bins, one shelf per category, vertical and horizontal clips apart.
   Single dark look on purpose: video reads best on a graphite panel, as in the editing software. */
:root {
  --suite: #1B1C20;     /* page: editing-panel graphite */
  --panel: #23252A;     /* raised surfaces: form, dialog, chips */
  --line: #34373E;      /* hairlines and borders */
  --well: #0D0E10;      /* behind video */
  --text: #EDEEF0;
  --dim: #A3A7B0;
  --mango: #F3A43B;     /* accent: the "Mango" clip label */
  --on-mango: #1B1C20;
  /* category labels, named after Premiere Pro's label colours */
  --rose: #EA93B5; --cerulean: #5DA9E9; --caribbean: #35C4B4; --violet: #A98EEC; --forest: #76BD68; --tan: #D0AA86;

  --f-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-ar-display: "Alexandria", "Segoe UI", Tahoma, sans-serif;
  --f-ar-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --t-xs: 0.6875rem;   /* mono labels */
  --t-s: 0.875rem;
  --t-m: 1.0625rem;    /* body */
  --t-l: 1.375rem;
  --t-xl: clamp(2.25rem, 4.6vw, 3.5rem);
  --t-xxl: clamp(3.5rem, 8.2vw, 7.25rem);
  --r: 3px;
  --max: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--suite);
  color: var(--text);
  font: 400 var(--t-m)/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body, html:lang(ar) body { font-family: var(--f-ar-body); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mango); outline-offset: 2px; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

.skip { position: absolute; inset-inline-start: 16px; top: -48px; z-index: 50; background: var(--mango); color: var(--on-mango); padding: 8px 12px; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 850; text-transform: uppercase; letter-spacing: 0.005em; text-wrap: balance; }
h1 { font-size: var(--t-xxl); line-height: 0.86; }
h2 { font-size: var(--t-xl); line-height: 0.92; }
h3 { font-size: var(--t-l); line-height: 1; }
mark { background: none; color: var(--mango); }
p { margin: 0; }
.label, .mono, .tc {
  font-family: var(--f-mono);
  font-stretch: 87.5%;
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.label { color: var(--dim); }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3 {
  font-family: var(--f-ar-display); font-weight: 750; text-transform: none; letter-spacing: 0;
}
html:lang(ar) h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: 1.2; }
html:lang(ar) h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.3; }
html:lang(ar) h3 { font-size: 1.15rem; line-height: 1.4; }
html:lang(ar) .label { font-family: var(--f-ar-body); font-size: 0.8125rem; letter-spacing: 0; text-transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  background: var(--mango); color: var(--on-mango);
  border: 1px solid var(--mango); border-radius: var(--r);
  font-weight: 650; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: #F7B85E; border-color: #F7B85E; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); border-color: var(--dim); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: var(--t-s); }
.btn:disabled { opacity: .35; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.icon-btn:hover { border-color: var(--dim); }
.link-btn { background: none; border: 0; padding: 0; color: var(--mango); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--mango); flex: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgb(27 28 32 / 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: center; gap: 24px; min-height: 60px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 760px) { .nav-inner { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-name { font: 850 1.6rem/1 var(--f-display); text-transform: uppercase; }
.brand-role { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); color: var(--dim); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
html:lang(ar) .brand-role { font-family: var(--f-ar-body); font-size: .8125rem; text-transform: none; letter-spacing: 0; }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; color: var(--dim); font-size: var(--t-s); font-weight: 550; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lang button {
  min-width: 38px; height: 34px; padding: 0 8px; background: transparent; border: 0; cursor: pointer;
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); color: var(--dim);
}
.lang button[lang="ar"] { font-family: var(--f-ar-display); font-size: 1rem; }
.lang button + button { border-inline-start: 1px solid var(--line); }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--suite); }
@media (max-width: 900px) { .nav-links { display: none; } .nav-actions { margin-inline-start: auto; } }
@media (max-width: 560px) { .brand-role, .nav-actions .btn { display: none; } }

/* ---------- hero ---------- */
.hero { display: grid; gap: 40px; padding-block: 48px 56px; align-items: center; }
@media (min-width: 1000px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; padding-block: 64px 72px; } }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.lede { max-width: 58ch; color: var(--dim); font-size: 1.125rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.multicam { margin: 0; background: var(--well); border: 1px solid var(--line); border-radius: 6px; padding: 8px; min-width: 0; }
.mc-bar, .mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 10px; }
.mc-foot { padding: 10px 4px 2px; color: var(--dim); font-size: var(--t-s); line-height: 1.4; }
.mc-title { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.tc { color: var(--mango); font-variant-numeric: tabular-nums; }
.mc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; direction: ltr; }
.angle {
  position: relative; aspect-ratio: 9 / 16; max-width: 100%; overflow: hidden;
  padding: 0; border: 0; border-radius: 2px; background: #000; cursor: pointer;
}
.angle img, .angle video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.angle::after { content: ""; position: absolute; inset: 0; border-radius: 2px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s; }
.angle.is-pgm::after { box-shadow: inset 0 0 0 2px var(--mango); }
.angle:hover::after { box-shadow: inset 0 0 0 2px var(--text); }
.angle-label {
  position: absolute; left: 0; bottom: 0; max-width: 100%; z-index: 1;
  padding: 3px 6px; background: rgb(13 14 16 / 0.7); color: var(--text);
  font-family: var(--f-mono); font-stretch: 75%; font-size: 0.625rem; letter-spacing: .02em; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.angle.is-pgm .angle-label { background: var(--mango); color: var(--on-mango); }
.angle-label b { font-weight: 600; }
@media (max-width: 520px) { .angle-label span { display: none; } }
#mc-toggle .i-play, #mc-toggle[aria-pressed="true"] .i-pause { display: none; }
#mc-toggle[aria-pressed="true"] .i-play { display: block; }

/* ---------- brands ---------- */
.brands { border-block: 1px solid var(--line); }
.brands-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; padding-block: 20px; }
.brand-list { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.brand-list li { font: 800 1.35rem/1.1 var(--f-display); text-transform: uppercase; color: var(--dim); }

/* ---------- work ---------- */
.work { padding-block: 72px 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 24px; }
.section-head p { color: var(--dim); max-width: 52ch; }
.bins { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bin {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
  font-size: var(--t-s); font-weight: 550; color: var(--text);
}
.bin small { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); color: var(--dim); }
.bin:hover { border-color: var(--dim); }
.bin[aria-pressed="true"] { background: var(--text); color: var(--suite); border-color: var(--text); }
.bin[aria-pressed="true"] small { color: var(--suite); opacity: .7; }

.shelf { padding-block: 40px 16px; border-top: 1px solid var(--line); margin-top: 32px; }
.shelf:first-child { margin-top: 24px; }
.shelf-head { display: grid; gap: 6px; margin-bottom: 24px; }
.shelf-head h3 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.shelf-head h3 .swatch { width: 12px; height: 12px; }
html:lang(ar) .shelf-head h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.shelf-head p { color: var(--dim); max-width: 64ch; }
.shelf-head .label { color: var(--dim); }
.group-label { margin: 28px 0 14px; }
.group-label:first-of-type { margin-top: 0; }
.grid { display: grid; gap: 28px 14px; }
.grid-tall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
@media (max-width: 420px) { .grid-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 0; background: none; border: 0; text-align: start; cursor: pointer;
}
.thumb { position: relative; width: 100%; aspect-ratio: 9 / 16; max-width: 100%; overflow: hidden; border-radius: var(--r); background: var(--well); }
.card.is-wide .thumb { aspect-ratio: 16 / 9; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .2s; }
.thumb.is-playing video { opacity: 1; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s; }
.card:hover .thumb::after, .card:focus-visible .thumb::after { box-shadow: inset 0 0 0 2px var(--mango); }
.card:focus-visible { outline: none; }
.badge {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 1;
  padding: 3px 7px; border-radius: 2px; background: rgb(13 14 16 / 0.72); color: var(--text);
  font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); letter-spacing: .02em;
}
html:lang(ar) .badge { font-family: var(--f-ar-body); font-size: .75rem; }
.card-text { display: grid; gap: 3px; min-width: 0; }
.card-client { color: var(--dim); }
.card-name { font: 800 1.3rem/1.02 var(--f-display); text-transform: uppercase; overflow-wrap: anywhere; }
html:lang(ar) .card-name { font-family: var(--f-ar-display); font-weight: 700; font-size: 1rem; line-height: 1.45; text-transform: none; }
.card-meta { color: var(--dim); }

/* ---------- method ---------- */
.method { background: var(--panel); border-block: 1px solid var(--line); margin-top: 56px; }
.method-inner { display: grid; gap: 48px; padding-block: 72px; }
@media (min-width: 960px) { .method-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; } }
.method-intro { display: flex; flex-direction: column; gap: 20px; }
.method-intro > p { color: var(--dim); font-size: 1.125rem; max-width: 50ch; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 24px; margin: 8px 0 0; }
.specs div { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.specs dt { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--mango); }
html:lang(ar) .specs dt { font-family: var(--f-ar-body); font-size: .8125rem; text-transform: none; letter-spacing: 0; }
.specs dd { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.step-n { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-s); color: var(--mango); padding-top: 4px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--dim); }

/* ---------- contact ---------- */
.contact { display: grid; gap: 40px; padding-block: 80px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; } }
.contact-copy { display: flex; flex-direction: column; gap: 18px; }
.contact-copy > p:not(.label) { color: var(--dim); font-size: 1.125rem; max-width: 46ch; }
.contact-copy .label { margin-top: 12px; }
.direct { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.direct .mono { font-size: var(--t-s); text-transform: none; letter-spacing: 0; color: var(--text); user-select: all; }
.direct a { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-s); }
.form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
}
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); padding: 18px; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: var(--t-s); color: var(--dim); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--suite); border: 1px solid var(--line); border-radius: var(--r);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mango); }
.field.has-error input { border-color: #F07A7A; }
.err { color: #F4A0A0; font-size: var(--t-s); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-note { color: var(--dim); font-size: var(--t-s); flex: 1 1 220px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 24px; color: var(--dim); font-size: var(--t-s); }

/* ---------- viewer ---------- */
.viewer {
  width: min(1180px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 32px));
  max-width: none; max-height: none; padding: 0; overflow: hidden;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
}
.viewer::backdrop { background: rgb(8 8 10 / 0.86); }
.v-close { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; background: rgb(13 14 16 / 0.7); }
.v-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: 100%; }
.v-stage { display: grid; place-items: center; min-height: 0; min-width: 0; background: #000; overflow: hidden; }
.v-stage video { max-width: 100%; max-height: 100%; background: #000; }
.v-stage video.is-tall { height: 100%; width: auto; }
.v-stage video.is-wide { width: 100%; height: auto; }
.v-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow-y: auto; padding: 56px 22px 20px; border-inline-start: 1px solid var(--line); }
.v-cat { display: flex; align-items: center; gap: 8px; }
.v-client { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--dim); margin-bottom: 4px; }
.v-side h3 { font-size: 1.9rem; line-height: .95; }
html:lang(ar) .v-side h3 { font-size: 1.3rem; line-height: 1.4; }
.v-desc { color: var(--dim); font-size: var(--t-s); }
.v-title { font-weight: 600; font-size: var(--t-s); }
.v-specs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 20px; margin: 0; }
.v-specs div { display: grid; gap: 2px; }
.v-specs dt { font-size: .75rem; color: var(--dim); }
.v-specs dd { margin: 0; font-size: var(--t-s); }
.v-specs .mono { font-size: var(--t-xs); text-transform: none; }
.v-list-wrap { display: grid; gap: 8px; }
.v-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.v-list button {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 6px; border: 0; border-radius: var(--r); background: transparent; text-align: start; cursor: pointer;
  font-size: .8125rem; line-height: 1.3;
}
.v-list button:hover { background: var(--suite); }
.v-list button[aria-current="true"] { background: var(--line); }
.v-list button[aria-current="true"] .v-item-title { color: var(--mango); }
.v-list img { width: 44px; height: 44px; object-fit: cover; border-radius: 2px; background: var(--well); }
.v-item-title { overflow-wrap: anywhere; }
.v-item-dur { font-family: var(--f-mono); font-stretch: 87.5%; font-size: var(--t-xs); color: var(--dim); }
.v-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.v-nav .mono { color: var(--dim); }

@media (max-width: 860px) {
  .viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .v-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .v-stage { height: 58dvh; }
  .v-side { border-inline-start: 0; padding: 18px 16px 20px; }
  .v-side h3 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
