/* Tamora — design system.
   Light-first (the brand is Shark #25272C on warm off-white), with a full
   dark theme that follows the system and a manual toggle.
   Marcellus echoes the flared capitals of the TAMORA wordmark; Jost carries
   the body. One warm accent, taken from the Dubai sunset in the hero. */

:root {
  --shark: #25272c;

  --bg: #f4f2ee;
  --bg-2: #ebe8e2;
  --surface: #ffffff;
  --ink: #25272c;
  --ink-2: #4a4d55;
  --muted: #6b6e76;
  --line: rgba(37, 39, 44, 0.13);
  --accent: #96561f;          /* text-safe on --bg (≈5.2:1) */
  --accent-soft: #d39a62;     /* decorative only */
  --overlay: rgba(20, 21, 24, 0.55);

  --f-display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --f-body: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171b;
    --bg-2: #1d1f24;
    --surface: #212328;
    --ink: #ecebe7;
    --ink-2: #c6c5c1;
    --muted: #9fa1a8;
    --line: rgba(236, 235, 231, 0.12);
    --accent: #e3a86f;
    --accent-soft: #b9824f;
    --overlay: rgba(10, 10, 12, 0.62);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16171b;
  --bg-2: #1d1f24;
  --surface: #212328;
  --ink: #ecebe7;
  --ink-2: #c6c5c1;
  --muted: #9fa1a8;
  --line: rgba(236, 235, 231, 0.12);
  --accent: #e3a86f;
  --accent-soft: #b9824f;
  --overlay: rgba(10, 10, 12, 0.62);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: #fff; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- logo (one SVG, any colour, via mask) ---------- */
.logo {
  display: block;
  width: 150px;
  aspect-ratio: 352 / 135;
  background: currentColor;
  -webkit-mask: url("/img/logo.svg") no-repeat center / contain;
          mask: url("/img/logo.svg") no-repeat center / contain;
}
.logo--sm { width: 110px; }

/* ---------- type ---------- */
.eyebrow {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow--light { color: #f2c798; }
.eyebrow .dot { opacity: 0.6; margin: 0 0.35em; }

.display {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--light { background: #f6f3ee; color: var(--shark); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: #fff;
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav[data-stuck="true"] {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
          backdrop-filter: saturate(1.4) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: block; color: inherit; padding: 6px 0; }

.nav__links { display: flex; gap: 34px; }
.nav__links a {
  text-decoration: none; font-size: 13px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after { transform: scaleX(1); }

.nav__tools { display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: inherit;
}
.iconbtn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.i-moon { fill: none; }
/* show the icon for the theme you would switch TO */
.i-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

.burger { display: none; }
.burger span { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.burger span + span { margin-top: 6px; }
.burger { flex-direction: column; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 820px) {
  .burger { display: flex; align-items: center; justify-content: center; }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg); color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav__links[data-open="true"] { display: flex; }
  .nav__links a { display: block; padding: 14px 0; font-size: 14px; }
  .nav__links li + li { border-top: 1px solid var(--line); }
  .nav:has(.nav__links[data-open="true"]) { background: var(--bg); color: var(--ink); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh; min-height: 100vh;
  display: flex; align-items: flex-end;
  color: #fff;
  padding: 120px 0 clamp(64px, 10vh, 120px);
  overflow: hidden;
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg { z-index: -2; }
.hero__bg img { object-fit: cover; object-position: 30% 60%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14,15,18,.55) 0%, rgba(14,15,18,0) 26%),
    linear-gradient(0deg, rgba(14,15,18,.82) 0%, rgba(14,15,18,.35) 48%, rgba(14,15,18,0) 75%);
}
.hero__in { position: relative; }
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(38px, 6.6vw, 84px);
  line-height: 1.04;
  max-width: 15ch;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: #f2c798; }
.hero__lede { max-width: 56ch; margin-top: 26px; font-size: clamp(16px, 1.5vw, 19px); font-weight: 300; color: rgba(255,255,255,.88); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__ar {
  position: absolute; right: var(--gutter); top: calc(84px + 5vh);
  font-size: clamp(56px, 10vw, 150px); line-height: 1;
  color: rgba(255,255,255,.13);
  pointer-events: none; user-select: none;
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", serif;
}

/* ---------- sections ---------- */
section:not(.hero) { padding: clamp(80px, 11vw, 140px) 0; }
.head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.head--split > div { max-width: 640px; }
.head__note { max-width: 36ch; color: var(--muted); font-size: 15.5px; }
.head__note strong { color: var(--ink); font-weight: 500; }
.head__lede { margin-top: 22px; color: var(--ink-2); font-size: 18px; font-weight: 300; max-width: 62ch; }

/* intro */
.intro { background: var(--bg); }
.intro__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.intro__body p { color: var(--ink-2); font-size: 18px; font-weight: 300; }
.intro__body p + p { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chips li {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
}
@media (max-width: 820px) { .intro__grid { grid-template-columns: 1fr; } }

/* AI band (always dark, a beat between the light sections) */
.ai {
  position: relative; overflow: hidden;
  background: #1a1b1f; color: #f1efea;
}
.ai::before {
  /* a slow sunset glow, echoing the hero */
  content: ""; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px;
  background: radial-gradient(closest-side, rgba(227,168,111,.20), rgba(227,168,111,0));
  pointer-events: none;
}
.ai .display em { font-style: normal; color: #f2c798; }
.ai .head__lede { color: rgba(241,239,234,.78); }
.ai__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); position: relative; }
.ai__col {
  border: 1px solid rgba(241,239,234,.12); border-radius: var(--radius);
  background: rgba(255,255,255,.025);
  padding: clamp(26px, 3vw, 40px);
}
.ai__col h3 { font-family: var(--f-display); font-size: 28px; line-height: 1.2; margin-bottom: 8px; }
.ai__k { display: block; font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: #f2c798; margin-bottom: 14px; }
.ai__col li { padding: 18px 0 0 22px; position: relative; color: rgba(241,239,234,.75); font-weight: 300; font-size: 16px; }
.ai__col li + li { border-top: 1px solid rgba(241,239,234,.1); margin-top: 18px; }
.ai__col li::before {
  content: ""; position: absolute; left: 0; top: 29px; width: 7px; height: 7px; border-radius: 50%;
  background: #f2c798; box-shadow: 0 0 0 4px rgba(242,199,152,.14);
}
.ai__col li strong { color: #f1efea; font-weight: 500; }
@media (max-width: 820px) { .ai__cols { grid-template-columns: 1fr; } }

/* services */
.services { background: var(--bg-2); }
.svc { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.svc__item { padding: 32px 28px 8px 0; position: relative; }
.svc__item + .svc__item { padding-left: 28px; border-left: 1px solid var(--line); }
.svc__n { display: block; font-family: var(--f-display); font-size: 15px; color: var(--accent); margin-bottom: 26px; }
.svc__item h3 { font-family: var(--f-display); font-size: 27px; line-height: 1.2; margin-bottom: 14px; }
.svc__item p { color: var(--ink-2); font-size: 15.5px; font-weight: 300; }
.svc__item ul { margin-top: 22px; }
.svc__item ul li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; font-weight: 500; }
@media (max-width: 1000px) {
  .svc { grid-template-columns: 1fr 1fr; }
  .svc__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .svc__item:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }
}
@media (max-width: 600px) {
  .svc { grid-template-columns: 1fr; }
  .svc__item, .svc__item + .svc__item { padding-left: 0; border-left: 0; }
  .svc__item + .svc__item { border-top: 1px solid var(--line); margin-top: 16px; }
}

/* work */
.work { background: var(--bg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters[hidden] { display: none; }
.filter {
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  padding: 8px 16px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.2vw, 16px); }
.w { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-2); }
.w[hidden] { display: none; }
.w a { display: block; aspect-ratio: 4 / 3; }
.w img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s var(--ease); }
.w a:hover img, .w a:focus-visible img { transform: scale(1.045); }
.w__tag {
  position: absolute; left: 12px; bottom: 12px; pointer-events: none;
  background: rgba(20,21,24,.6); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.w:hover .w__tag, .w:focus-within .w__tag { opacity: 1; transform: none; }
@media (hover: none) { .w__tag { opacity: 1; transform: none; } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  /* One swipeable row of filters instead of a screenful of chips. */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1) 20px; padding: 2px var(--gutter);
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
            mask: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .w__tag { left: 8px; bottom: 8px; font-size: 9.5px; padding: 4px 8px; letter-spacing: 0.1em; }
}

/* approach */
.approach { background: var(--bg-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px 38px;
}
.step__k { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.step h3 { font-family: var(--f-display); font-size: 28px; margin-bottom: 12px; }
.step p { color: var(--ink-2); font-weight: 300; font-size: 16px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* contact (always dark, like the hero) */
.contact {
  position: relative; overflow: hidden;
  background: #1a1b1f; color: #f1efea; text-align: center;
}
.contact__in { display: flex; flex-direction: column; align-items: center; position: relative; }
.contact__mark {
  position: absolute; left: 50%; top: 50%; width: min(560px, 120vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #fff; opacity: .045; pointer-events: none;
  -webkit-mask: url("/favicon.svg") no-repeat center / contain;
          mask: url("/favicon.svg") no-repeat center / contain;
}
.contact .display { max-width: 18ch; }
.contact__lede { margin: 22px 0 34px; color: rgba(241,239,234,.75); font-weight: 300; font-size: 18px; max-width: 46ch; }
.contact__addr { margin-top: 44px; font-style: normal; font-size: 14.5px; color: rgba(241,239,234,.6); line-height: 1.8; }

/* footer */
.foot { background: #141518; color: rgba(241,239,234,.6); font-size: 13.5px; padding: 30px 0; }
.foot__in { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot .logo { color: #f1efea; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- lightbox ---------- */
.lb {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(12,12,14,.94); color: #fff;
}
.lb::backdrop { background: rgba(12,12,14,.6); }
.lb[open] { display: grid; place-items: center; }
.lb__fig { margin: 0; padding: 64px 72px 56px; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100%; }
.lb__fig img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb__fig figcaption { font-size: 14px; color: rgba(255,255,255,.75); text-align: center; max-width: 70ch; }
.lb__btn {
  position: absolute; width: 48px; height: 48px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 0; border-radius: 50%; cursor: pointer; color: #fff;
}
.lb__btn:hover { background: rgba(255,255,255,.18); }
.lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { top: 14px; right: 14px; }
.lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb__fig { padding: 64px 12px 90px; }
  .lb__prev, .lb__next { top: auto; bottom: 18px; transform: none; }
  .lb__prev { left: calc(50% - 60px); }
  .lb__next { right: calc(50% - 60px); }
}

/* ---------- reveal (only with JS, only with motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .r { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .r.in { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.nf .logo { margin: 0 auto 48px; color: var(--ink); }
.nf p { color: var(--muted); margin: 18px 0 32px; }
.nf .btn { background: var(--ink); color: var(--bg); }
